Add SUN4U magic to make nell work without things like WI_AT_BIGENDIAN_HACK.

XXX - need to move this (as well as the equivalent sparc stuff added
recently) outa here into sbus_machdep or something. We should not need
to know details of the actual bus_space implementation here.
This commit is contained in:
martin 2003-01-07 20:39:19 +00:00
parent 013008be77
commit 9da7636a93
1 changed files with 15 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: stp4020.c,v 1.33 2003/01/03 13:28:54 martin Exp $ */
/* $NetBSD: stp4020.c,v 1.34 2003/01/07 20:39:19 martin Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: stp4020.c,v 1.33 2003/01/03 13:28:54 martin Exp $");
__KERNEL_RCSID(0, "$NetBSD: stp4020.c,v 1.34 2003/01/07 20:39:19 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -390,7 +390,7 @@ stp4020attach(parent, self, aux)
tag->sparc_write_8 = stp4020_write_8;
#else
tag = sa->sa_bustag;
#endif
#endif /* __FULL_SPARC_BUS_SPACE */
sc->sc_bustag = tag;
/* Set up per-socket static initialization */
@ -873,6 +873,12 @@ stp4020_chip_mem_map(pch, kind, card_addr, size, pcmhp, offsetp, windowp)
pcmhp->memt = h->pcmciat;
bus_space_subregion(h->pcmciat, h->windows[win].winaddr, card_addr, size, &pcmhp->memh);
#ifdef SUN4U
if ((u_int8_t)pcmhp->memh._asi == ASI_PHYS_NON_CACHED)
pcmhp->memh._asi = ASI_PHYS_NON_CACHED_LITTLE;
else if ((u_int8_t)pcmhp->memh._asi == ASI_PRIMARY)
pcmhp->memh._asi = ASI_PRIMARY_LITTLE;
#endif
pcmhp->size = size;
pcmhp->realsize = STP4020_WINDOW_SIZE - card_addr;
*offsetp = 0;
@ -923,6 +929,12 @@ stp4020_chip_io_map(pch, width, offset, size, pcihp, windowp)
pcihp->iot = h->pcmciat;
bus_space_subregion(h->pcmciat, h->windows[STP_WIN_IO].winaddr, offset, size, &pcihp->ioh);
#ifdef SUN4U
if ((u_int8_t)pcihp->ioh._asi == ASI_PHYS_NON_CACHED)
pcihp->ioh._asi = ASI_PHYS_NON_CACHED_LITTLE;
else if ((u_int8_t)pcihp->ioh._asi == ASI_PRIMARY)
pcihp->ioh._asi = ASI_PRIMARY_LITTLE;
#endif
*windowp = 0;
return 0;
}