diff options
author | imp <imp@FreeBSD.org> | 2000-03-26 07:01:52 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2000-03-26 07:01:52 +0000 |
commit | fb38d30359ababb8082c15745ebaa0f3414af0db (patch) | |
tree | 264cc9d8043b42573ed626a91ef9e79f0de0aa8b | |
parent | 92d7260f770e76599df704529c8e80d298a141ae (diff) | |
download | FreeBSD-src-fb38d30359ababb8082c15745ebaa0f3414af0db.zip FreeBSD-src-fb38d30359ababb8082c15745ebaa0f3414af0db.tar.gz |
Minor changes to some of the interfaces.
Remove RF_PCCARD_ATTR in anticipation of removing it from sys/rman.h
Add interface for setting "attributes" of pccard/cardbus devices.
Minor formatting nits.
-rw-r--r-- | sys/dev/pccard/card_if.m | 6 | ||||
-rw-r--r-- | sys/dev/pccard/pccard.c | 3 | ||||
-rw-r--r-- | sys/dev/pccard/pccard_cis.c | 2 | ||||
-rw-r--r-- | sys/dev/pccard/pccardvar.h | 13 |
4 files changed, 16 insertions, 8 deletions
diff --git a/sys/dev/pccard/card_if.m b/sys/dev/pccard/card_if.m index 256ec7e..51b3bcb 100644 --- a/sys/dev/pccard/card_if.m +++ b/sys/dev/pccard/card_if.m @@ -37,14 +37,10 @@ INTERFACE card; # the driver activating the resources doesn't necessarily know or need to know # these attributes. # -# XXX A nagging doubt in the back of my mind suggests that these sorts of -# XXX things might be able to be done with ivars. This nagging doubt doesn't -# XXX offer a good way to actually do this, but remains nonetheless. -# METHOD int set_resource_attribute { device_t dev; device_t child; - int *rid; + int rid; u_int flags; }; diff --git a/sys/dev/pccard/pccard.c b/sys/dev/pccard/pccard.c index fd35126..ee95cd0 100644 --- a/sys/dev/pccard/pccard.c +++ b/sys/dev/pccard/pccard.c @@ -334,7 +334,8 @@ pccard_function_enable(struct pccard_function *pf) pf->ccr_rid = 0; pf->ccr_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &pf->ccr_rid, pf->ccr_base, pf->ccr_base + PCCARD_CCR_SIZE, - PCCARD_CCR_SIZE, RF_ACTIVE | RF_PCCARD_ATTR); + PCCARD_CCR_SIZE, RF_ACTIVE); + /* XXX SET MEM_ATTR */ if (!pf->ccr_res) goto bad; pf->pf_ccrt = rman_get_bustag(pf->ccr_res); diff --git a/sys/dev/pccard/pccard_cis.c b/sys/dev/pccard/pccard_cis.c index 5d61269..779763d 100644 --- a/sys/dev/pccard/pccard_cis.c +++ b/sys/dev/pccard/pccard_cis.c @@ -121,7 +121,7 @@ pccard_scan_cis(device_t dev, int (*fct)(struct pccard_tuple *, void *), rid = 0; res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, 0, ~0, - PCCARD_CIS_SIZE, RF_ACTIVE | RF_PCCARD_ATTR); + PCCARD_CIS_SIZE, RF_ACTIVE /* | RF_PCCARD_ATTR */); if (res == NULL) { #ifdef DIAGNOSTIC device_printf(dev, "can't alloc memory to read attributes\n"); diff --git a/sys/dev/pccard/pccardvar.h b/sys/dev/pccard/pccardvar.h index ed26e3f..dbf2825 100644 --- a/sys/dev/pccard/pccardvar.h +++ b/sys/dev/pccard/pccardvar.h @@ -280,5 +280,16 @@ __inline static int pccard_get_ether(device_t dev, u_char *enaddr) { return BUS_READ_IVAR(device_get_parent(dev), dev, - PCCARD_IVAR_ETHADDR, (uintptr_t *)enaddr); + PCCARD_IVAR_ETHADDR, (uintptr_t *)enaddr); +} + +enum { + PCCARD_A_MEM_ATTR +}; + +/* Set the */ + +static __inline__ void +pccard_set_attribute(device_t dev, struct resource *r, int rid, int flags) +{ } |