Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sgimips/sgimips reenable mips1-specific dmamem_sync...
details: https://anonhg.NetBSD.org/src/rev/ed5208c1eea7
branches: trunk
changeset: 348938:ed5208c1eea7
user: macallan <macallan%NetBSD.org@localhost>
date: Wed Nov 16 19:39:38 2016 +0000
description:
reenable mips1-specific dmamem_sync method
clean up a bit while there
diffstat:
sys/arch/sgimips/sgimips/bus.c | 32 +++++---------------------------
1 files changed, 5 insertions(+), 27 deletions(-)
diffs (76 lines):
diff -r a952ad5365ca -r ed5208c1eea7 sys/arch/sgimips/sgimips/bus.c
--- a/sys/arch/sgimips/sgimips/bus.c Wed Nov 16 19:37:06 2016 +0000
+++ b/sys/arch/sgimips/sgimips/bus.c Wed Nov 16 19:39:38 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.c,v 1.68 2016/07/14 19:08:12 skrll Exp $ */
+/* $NetBSD: bus.c,v 1.69 2016/11/16 19:39:38 macallan Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.68 2016/07/14 19:08:12 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.69 2016/11/16 19:39:38 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -80,22 +80,17 @@
void
sgimips_bus_dma_init(void)
{
- printf("%s\n", __func__);
normal_bus_mem_init(&normal_mbst, NULL);
normal_memt = &normal_mbst;
-#if 0
+#ifdef MIPS1
switch (mach_type) {
/* R2000/R3000 */
- case MACH_SGI_IP6 | MACH_SGI_IP10:
+ case MACH_SGI_IP6 | MACH_SGI_IP10: /* same number... */
case MACH_SGI_IP12:
sgimips_default_bus_dma_tag._dmamap_ops.dmamap_sync =
_bus_dmamap_sync_mips1;
break;
-
- default:
- panic("sgimips_bus_dma_init: unsupported mach type IP%d\n",
- mach_type);
}
#endif
}
@@ -129,6 +124,7 @@
}
#endif
+#ifdef MIPS1
/* Common function from DMA map synchronization. May be called
* by chipset-specific DMA map synchronization functions.
*
@@ -230,24 +226,6 @@
len -= minlen;
}
}
-
-#if 0
-paddr_t
-bus_space_mmap(bus_space_tag_t space, bus_addr_t addr, off_t off,
- int prot, int flags)
-{
-
- if (flags & BUS_SPACE_MAP_CACHEABLE) {
-
- return mips_btop(MIPS_KSEG0_TO_PHYS(addr) + off);
- } else
-#if defined(_MIPS_PADDR_T_64BIT) || defined(_LP64)
- return mips_btop((MIPS_KSEG1_TO_PHYS(addr) + off)
- | PGC_NOCACHE);
-#else
- return mips_btop((MIPS_KSEG1_TO_PHYS(addr) + off));
-#endif
-}
#endif
#define CHIP normal
Home |
Main Index |
Thread Index |
Old Index