Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci changes for NEC RISCstation 2250 of arc port.
details: https://anonhg.NetBSD.org/src/rev/d5f02e2593dc
branches: trunk
changeset: 487541:d5f02e2593dc
user: soda <soda%NetBSD.org@localhost>
date: Fri Jun 09 04:48:12 2000 +0000
description:
changes for NEC RISCstation 2250 of arc port.
diffstat:
sys/dev/pci/tga.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diffs (49 lines):
diff -r 68638c98c98c -r d5f02e2593dc sys/dev/pci/tga.c
--- a/sys/dev/pci/tga.c Fri Jun 09 04:47:31 2000 +0000
+++ b/sys/dev/pci/tga.c Fri Jun 09 04:48:12 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tga.c,v 1.23 2000/04/20 05:25:20 nathanw Exp $ */
+/* $NetBSD: tga.c,v 1.24 2000/06/09 04:48:12 soda Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -59,6 +59,9 @@
#ifdef __alpha__
#include <machine/pte.h>
#endif
+#ifdef __mips__
+#include <mips/pte.h>
+#endif
int tgamatch __P((struct device *, struct cfdata *, void *));
void tgaattach __P((struct device *, struct device *, void *));
@@ -204,6 +207,9 @@
#ifdef __alpha__
dc->dc_paddr = ALPHA_K0SEG_TO_PHYS(dc->dc_vaddr); /* XXX */
#endif
+#ifdef arc
+ bus_space_paddr(memt, dc->dc_memh, &dc->dc_paddr);
+#endif
bus_space_subregion(dc->dc_memt, dc->dc_memh,
TGA_MEM_CREGS, TGA_CREGS_SIZE,
@@ -605,12 +611,18 @@
/* XXX NEW MAPPING CODE... */
-#ifdef __alpha__
+#if defined(__alpha__)
struct tga_softc *sc = v;
if (offset >= sc->sc_dc->dc_tgaconf->tgac_cspace_size || offset < 0)
return -1;
return alpha_btop(sc->sc_dc->dc_paddr + offset);
+#elif defined(__mips__)
+ struct tga_softc *sc = v;
+
+ if (offset >= sc->sc_dc->dc_tgaconf->tgac_cspace_size || offset < 0)
+ return -1;
+ return mips_btop(sc->sc_dc->dc_paddr + offset);
#else
return (-1);
#endif
Home |
Main Index |
Thread Index |
Old Index