Rename obio_alloc/obio_mapin and check for obio in match functions
for attachments that will use obio_mapin.
This commit is contained in:
parent
a5efc65699
commit
388bf0e0e0
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_ie_obio.c,v 1.9 1997/03/15 18:10:51 is Exp $ */
|
||||
/* $NetBSD: if_ie_obio.c,v 1.10 1997/04/28 21:59:19 gwr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
@ -91,6 +91,10 @@ ie_obio_match(parent, cf, args)
|
||||
{
|
||||
struct confargs *ca = args;
|
||||
|
||||
/* We use obio_mapin(), so require OBIO. */
|
||||
if (ca->ca_bustype != BUS_OBIO)
|
||||
return (0);
|
||||
|
||||
/* Make sure there is something there... */
|
||||
if (bus_peek(ca->ca_bustype, ca->ca_paddr, 1) == -1)
|
||||
return (0);
|
||||
@ -126,7 +130,7 @@ ie_obio_attach(parent, self, args)
|
||||
sc->sc_msize = 0x8000; /* MEMSIZE 32K */
|
||||
|
||||
/* Map in the control registers. */
|
||||
sc->sc_reg = obio_alloc(ca->ca_paddr, OBIO_INTEL_ETHER_SIZE);
|
||||
sc->sc_reg = obio_mapin(ca->ca_paddr, OBIO_INTEL_ETHER_SIZE);
|
||||
|
||||
/* Allocate "shared" memory (in DVMA space). */
|
||||
sc->sc_maddr = dvma_malloc(sc->sc_msize);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_le.c,v 1.37 1997/03/17 03:17:39 thorpej Exp $ */
|
||||
/* $NetBSD: if_le.c,v 1.38 1997/04/28 21:59:21 gwr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
@ -124,6 +124,10 @@ le_match(parent, cf, aux)
|
||||
{
|
||||
struct confargs *ca = aux;
|
||||
|
||||
/* We use obio_mapin(), so require OBIO. */
|
||||
if (ca->ca_bustype != BUS_OBIO)
|
||||
return (0);
|
||||
|
||||
/* Make sure there is something there... */
|
||||
if (bus_peek(ca->ca_bustype, ca->ca_paddr, 1) == -1)
|
||||
return (0);
|
||||
@ -145,7 +149,7 @@ le_attach(parent, self, aux)
|
||||
struct confargs *ca = aux;
|
||||
|
||||
lesc->sc_r1 = (struct lereg1 *)
|
||||
obio_alloc(ca->ca_paddr, sizeof(struct lereg1));
|
||||
obio_mapin(ca->ca_paddr, sizeof(struct lereg1));
|
||||
|
||||
sc->sc_memsize = 0x4000; /* 16K */
|
||||
sc->sc_mem = dvma_malloc(sc->sc_memsize);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: memerr.c,v 1.7 1996/12/17 21:10:50 gwr Exp $ */
|
||||
/* $NetBSD: memerr.c,v 1.8 1997/04/28 21:59:22 gwr Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -99,7 +99,11 @@ memerr_match(parent, cf, args)
|
||||
if (cf->cf_unit != 0)
|
||||
return (0);
|
||||
|
||||
/* The peek returns -1 on bus error. */
|
||||
/* We use obio_mapin(), so require OBIO. */
|
||||
if (ca->ca_bustype != BUS_OBIO)
|
||||
return (0);
|
||||
|
||||
/* Make sure there is something there... */
|
||||
if (bus_peek(ca->ca_bustype, ca->ca_paddr, 1) == -1)
|
||||
return (0);
|
||||
|
||||
@ -140,7 +144,7 @@ memerr_attach(parent, self, args)
|
||||
printf(": (%s memory)\n", sc->sc_typename);
|
||||
|
||||
mer = (struct memerr *)
|
||||
obio_alloc(ca->ca_paddr, sizeof(*mer));
|
||||
obio_mapin(ca->ca_paddr, sizeof(*mer));
|
||||
if (mer == NULL)
|
||||
panic("memerr: can not map register");
|
||||
sc->sc_reg = mer;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: si_obio.c,v 1.11 1997/02/26 22:26:02 gwr Exp $ */
|
||||
/* $NetBSD: si_obio.c,v 1.12 1997/04/28 21:59:23 gwr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
@ -153,6 +153,10 @@ si_obio_match(parent, cf, args)
|
||||
{
|
||||
struct confargs *ca = args;
|
||||
|
||||
/* We use obio_mapin(), so require OBIO. */
|
||||
if (ca->ca_bustype != BUS_OBIO)
|
||||
return (0);
|
||||
|
||||
/* Make sure there is something there... */
|
||||
if (bus_peek(ca->ca_bustype, ca->ca_paddr + 1, 1) == -1)
|
||||
return (0);
|
||||
@ -184,7 +188,7 @@ si_obio_attach(parent, self, args)
|
||||
|
||||
sc->sc_adapter_type = ca->ca_bustype;
|
||||
sc->sc_regs = (struct si_regs *)
|
||||
obio_alloc(ca->ca_paddr, sizeof(struct si_regs));
|
||||
obio_mapin(ca->ca_paddr, sizeof(struct si_regs));
|
||||
|
||||
/*
|
||||
* MD function pointers used by the MI code.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: obio.h,v 1.19 1997/01/27 19:41:05 gwr Exp $ */
|
||||
/* $NetBSD: obio.h,v 1.20 1997/04/28 21:59:25 gwr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
@ -77,7 +77,7 @@
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
caddr_t obio_alloc __P((int, int));
|
||||
caddr_t obio_mapin __P((int, int));
|
||||
void obio_init __P((void));
|
||||
caddr_t obio_find_mapping __P((int pa, int size));
|
||||
caddr_t obio_vm_alloc __P((int));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: obio.h,v 1.19 1997/01/27 19:41:05 gwr Exp $ */
|
||||
/* $NetBSD: obio.h,v 1.20 1997/04/28 21:59:25 gwr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
@ -77,7 +77,7 @@
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
caddr_t obio_alloc __P((int, int));
|
||||
caddr_t obio_mapin __P((int, int));
|
||||
void obio_init __P((void));
|
||||
caddr_t obio_find_mapping __P((int pa, int size));
|
||||
caddr_t obio_vm_alloc __P((int));
|
||||
|
Loading…
Reference in New Issue
Block a user