changes for NEC RISCstation 2250 of arc port.
This commit is contained in:
parent
b2e2c7ec87
commit
8ac7bdd00c
|
@ -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 @@ tga_getdevconfig(memt, pc, tag, dc)
|
|||
#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 @@ tga_mmap(v, offset, prot)
|
|||
|
||||
/* 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
|
||||
|
|
Loading…
Reference in New Issue