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.
This commit is contained in:
parent
92d7260f77
commit
fb38d30359
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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");
|
||||
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user