Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/cardbus/cardbus_cis.c
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
/* allocate the memory space to read CIS */ | /* allocate the memory space to read CIS */ | ||||
res = bus_alloc_resource_any(child, SYS_RES_MEMORY, rid, | res = bus_alloc_resource_any(child, SYS_RES_MEMORY, rid, | ||||
rman_make_alignment_flags(4096) | RF_ACTIVE); | rman_make_alignment_flags(4096) | RF_ACTIVE); | ||||
if (res == NULL) { | if (res == NULL) { | ||||
device_printf(cbdev, "Unable to allocate resource " | device_printf(cbdev, "Unable to allocate resource " | ||||
"to read CIS.\n"); | "to read CIS.\n"); | ||||
return (NULL); | return (NULL); | ||||
} | } | ||||
DEVPRINTF((cbdev, "CIS Mapped to %#lx\n", rman_get_start(res))); | DEVPRINTF((cbdev, "CIS Mapped to %#jx\n", | ||||
rman_get_start(res))); | |||||
/* Flip to the right ROM image if CIS is in ROM */ | /* Flip to the right ROM image if CIS is in ROM */ | ||||
if (space == PCIM_CIS_ASI_ROM) { | if (space == PCIM_CIS_ASI_ROM) { | ||||
uint32_t imagesize; | uint32_t imagesize; | ||||
uint32_t imagebase = 0; | uint32_t imagebase = 0; | ||||
uint32_t pcidata; | uint32_t pcidata; | ||||
uint16_t romsig; | uint16_t romsig; | ||||
int romnum = 0; | int romnum = 0; | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |