Changeset View
Changeset View
Standalone View
Standalone View
head/sys/arm/mv/mv_pci.c
Show First 20 Lines • Show All 326 Lines • ▼ Show 20 Lines | |||||
static void mv_pcib_enable(struct mv_pcib_softc *, uint32_t); | static void mv_pcib_enable(struct mv_pcib_softc *, uint32_t); | ||||
static int mv_pcib_mem_init(struct mv_pcib_softc *); | static int mv_pcib_mem_init(struct mv_pcib_softc *); | ||||
/* Forward prototypes */ | /* Forward prototypes */ | ||||
static int mv_pcib_probe(device_t); | static int mv_pcib_probe(device_t); | ||||
static int mv_pcib_attach(device_t); | static int mv_pcib_attach(device_t); | ||||
static struct resource *mv_pcib_alloc_resource(device_t, device_t, int, int *, | static struct resource *mv_pcib_alloc_resource(device_t, device_t, int, int *, | ||||
u_long, u_long, u_long, u_int); | rman_res_t, rman_res_t, rman_res_t, u_int); | ||||
static int mv_pcib_release_resource(device_t, device_t, int, int, | static int mv_pcib_release_resource(device_t, device_t, int, int, | ||||
struct resource *); | struct resource *); | ||||
static int mv_pcib_read_ivar(device_t, device_t, int, uintptr_t *); | static int mv_pcib_read_ivar(device_t, device_t, int, uintptr_t *); | ||||
static int mv_pcib_write_ivar(device_t, device_t, int, uintptr_t); | static int mv_pcib_write_ivar(device_t, device_t, int, uintptr_t); | ||||
static int mv_pcib_maxslots(device_t); | static int mv_pcib_maxslots(device_t); | ||||
static uint32_t mv_pcib_read_config(device_t, u_int, u_int, u_int, u_int, int); | static uint32_t mv_pcib_read_config(device_t, u_int, u_int, u_int, u_int, int); | ||||
static void mv_pcib_write_config(device_t, u_int, u_int, u_int, u_int, | static void mv_pcib_write_config(device_t, u_int, u_int, u_int, u_int, | ||||
▲ Show 20 Lines • Show All 481 Lines • ▼ Show 20 Lines | while (bar < maxbar) { | ||||
} | } | ||||
} | } | ||||
return (0); | return (0); | ||||
} | } | ||||
static struct resource * | static struct resource * | ||||
mv_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, | mv_pcib_alloc_resource(device_t dev, 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 mv_pcib_softc *sc = device_get_softc(dev); | struct mv_pcib_softc *sc = device_get_softc(dev); | ||||
struct rman *rm = NULL; | struct rman *rm = NULL; | ||||
struct resource *res; | struct resource *res; | ||||
switch (type) { | switch (type) { | ||||
case SYS_RES_IOPORT: | case SYS_RES_IOPORT: | ||||
rm = &sc->sc_io_rman; | rm = &sc->sc_io_rman; | ||||
▲ Show 20 Lines • Show All 375 Lines • Show Last 20 Lines |