Changeset View
Changeset View
Standalone View
Standalone View
sys/powerpc/ofw/ofw_pci.c
Context not available. | |||||
static int ofw_pci_read_ivar(device_t, device_t, int, | static int ofw_pci_read_ivar(device_t, device_t, int, | ||||
uintptr_t *); | uintptr_t *); | ||||
static struct resource * ofw_pci_alloc_resource(device_t bus, | static struct resource * ofw_pci_alloc_resource(device_t bus, | ||||
device_t child, int type, int *rid, u_long start, | device_t child, int type, int *rid, rman_res_t start, | ||||
u_long end, u_long count, u_int flags); | rman_res_t end, rman_res_t count, u_int flags); | ||||
static int ofw_pci_release_resource(device_t bus, device_t child, | static int ofw_pci_release_resource(device_t bus, device_t child, | ||||
int type, int rid, struct resource *res); | int type, int rid, struct resource *res); | ||||
static int ofw_pci_activate_resource(device_t bus, device_t child, | static int ofw_pci_activate_resource(device_t bus, device_t child, | ||||
Context not available. | |||||
device_t child, int type, int rid, | device_t child, int type, int rid, | ||||
struct resource *res); | struct resource *res); | ||||
static int ofw_pci_adjust_resource(device_t bus, device_t child, | static int ofw_pci_adjust_resource(device_t bus, device_t child, | ||||
int type, struct resource *res, u_long start, | int type, struct resource *res, rman_res_t start, | ||||
u_long end); | rman_res_t end); | ||||
/* | /* | ||||
* pcib interface. | * pcib interface. | ||||
Context not available. | |||||
static struct resource * | static struct resource * | ||||
ofw_pci_alloc_resource(device_t bus, device_t child, int type, int *rid, | ofw_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 ofw_pci_softc *sc; | struct ofw_pci_softc *sc; | ||||
struct resource *rv; | struct resource *rv; | ||||
Context not available. | |||||
} | } | ||||
if (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT) { | if (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT) { | ||||
struct ofw_pci_range *rp; | struct ofw_pci_range *rp; | ||||
vm_offset_t start; | vm_paddr_t start; | ||||
int space; | int space; | ||||
start = (vm_offset_t)rman_get_start(res); | start = (vm_paddr_t)rman_get_start(res); | ||||
/* | /* | ||||
* Map this through the ranges list | * Map this through the ranges list | ||||
Context not available. | |||||
} | } | ||||
if (bootverbose) | if (bootverbose) | ||||
printf("ofw_pci mapdev: start %zx, len %ld\n", start, | printf("ofw_pci mapdev: start %jx, len %jd\n", | ||||
rman_get_size(res)); | (rman_res_t)start, rman_get_size(res)); | ||||
p = pmap_mapdev(start, (vm_size_t)rman_get_size(res)); | p = pmap_mapdev(start, (vm_size_t)rman_get_size(res)); | ||||
if (p == NULL) | if (p == NULL) | ||||
Context not available. | |||||
static int | static int | ||||
ofw_pci_adjust_resource(device_t bus, device_t child, int type, | ofw_pci_adjust_resource(device_t bus, device_t child, int type, | ||||
struct resource *res, u_long start, u_long end) | struct resource *res, rman_res_t start, rman_res_t end) | ||||
{ | { | ||||
struct rman *rm = NULL; | struct rman *rm = NULL; | ||||
struct ofw_pci_softc *sc = device_get_softc(bus); | struct ofw_pci_softc *sc = device_get_softc(bus); | ||||
Context not available. |