Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/xscale/i8134x/i81342_pci.c
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
printf("i81342_pci_write_config: Invalid size : %d\n", bytes); | printf("i81342_pci_write_config: Invalid size : %d\n", bytes); | ||||
} | } | ||||
} | } | ||||
static struct resource * | static struct resource * | ||||
i81342_pci_alloc_resource(device_t bus, device_t child, int type, int *rid, | i81342_pci_alloc_resource(device_t bus, device_t child, int type, int *rid, | ||||
u_long start, u_long end, u_long count, u_int flags) | rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) | ||||
{ | { | ||||
struct i81342_pci_softc *sc = device_get_softc(bus); | struct i81342_pci_softc *sc = device_get_softc(bus); | ||||
struct resource *rv; | struct resource *rv; | ||||
struct rman *rm; | struct rman *rm; | ||||
bus_space_tag_t bt = NULL; | bus_space_tag_t bt = NULL; | ||||
bus_space_handle_t bh = 0; | bus_space_handle_t bh = 0; | ||||
switch (type) { | switch (type) { | ||||
Show All 38 Lines | |||||
return (NULL); | return (NULL); | ||||
} | } | ||||
static int | static int | ||||
i81342_pci_activate_resource(device_t bus, device_t child, int type, int rid, | i81342_pci_activate_resource(device_t bus, device_t child, int type, int rid, | ||||
struct resource *r) | struct resource *r) | ||||
{ | { | ||||
u_long p; | bus_space_handle_t p; | ||||
int error; | int error; | ||||
if (type == SYS_RES_MEMORY) { | if (type == SYS_RES_MEMORY) { | ||||
error = bus_space_map(rman_get_bustag(r), | error = bus_space_map(rman_get_bustag(r), | ||||
rman_get_bushandle(r), rman_get_size(r), 0, &p); | rman_get_bushandle(r), rman_get_size(r), 0, &p); | ||||
if (error) | if (error) | ||||
return (error); | return (error); | ||||
rman_set_bushandle(r, p); | rman_set_bushandle(r, p); | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |