Rename ofwpci.c to ofw_pcib.c
It's a class0 driver that implements some pcib methods and creates a pci bus as its children. The "ofw_pci" name will be used by a new driver that will be a subclass of the pci bus. No functional changes intended. Submitted by: Kornel Duleba <mindal@semihalf.com> Reviewed by: andrew Obtained from: Semihalf Sponsored by: Alstom Group Differential Revision: https://reviews.freebsd.org/D30226
This commit is contained in:
parent
b08bf4c35c
commit
240429103c
@ -1533,7 +1533,7 @@ tegra_pcib_attach(device_t dev)
|
||||
}
|
||||
|
||||
sc->ofw_pci.sc_range_mask = 0x3;
|
||||
rv = ofw_pci_init(dev);
|
||||
rv = ofw_pcib_init(dev);
|
||||
if (rv != 0)
|
||||
goto out;
|
||||
|
||||
@ -1625,6 +1625,6 @@ static device_method_t tegra_pcib_methods[] = {
|
||||
|
||||
static devclass_t pcib_devclass;
|
||||
DEFINE_CLASS_1(pcib, tegra_pcib_driver, tegra_pcib_methods,
|
||||
sizeof(struct tegra_pcib_softc), ofw_pci_driver);
|
||||
sizeof(struct tegra_pcib_softc), ofw_pcib_driver);
|
||||
DRIVER_MODULE(tegra_pcib, simplebus, tegra_pcib_driver, pcib_devclass,
|
||||
NULL, NULL);
|
||||
|
@ -1276,7 +1276,7 @@ rk_pcie_attach(device_t dev)
|
||||
if (rv != 0)
|
||||
goto out;
|
||||
|
||||
rv = ofw_pci_init(dev);
|
||||
rv = ofw_pcib_init(dev);
|
||||
if (rv != 0)
|
||||
goto out;
|
||||
|
||||
@ -1383,7 +1383,7 @@ static device_method_t rk_pcie_methods[] = {
|
||||
};
|
||||
|
||||
DEFINE_CLASS_1(pcib, rk_pcie_driver, rk_pcie_methods,
|
||||
sizeof(struct rk_pcie_softc), ofw_pci_driver);
|
||||
sizeof(struct rk_pcie_softc), ofw_pcib_driver);
|
||||
static devclass_t rk_pcie_devclass;
|
||||
DRIVER_MODULE( rk_pcie, simplebus, rk_pcie_driver, rk_pcie_devclass,
|
||||
NULL, NULL);
|
||||
|
@ -91,7 +91,7 @@ dev/hwpmc/hwpmc_arm.c optional hwpmc
|
||||
dev/hwpmc/hwpmc_armv7.c optional hwpmc armv6
|
||||
dev/hwpmc/hwpmc_armv7.c optional hwpmc armv7
|
||||
dev/iicbus/twsi/twsi.c optional twsi
|
||||
dev/ofw/ofwpci.c optional fdt pci
|
||||
dev/ofw/ofw_pcib.c optional fdt pci
|
||||
dev/pci/pci_host_generic.c optional pci_host_generic pci
|
||||
dev/pci/pci_host_generic_fdt.c optional pci_host_generic pci fdt
|
||||
dev/psci/psci.c optional psci
|
||||
|
@ -245,7 +245,7 @@ dev/neta/if_mvneta_fdt.c optional neta fdt
|
||||
dev/neta/if_mvneta.c optional neta mdio mii
|
||||
|
||||
dev/ofw/ofw_cpu.c optional fdt
|
||||
dev/ofw/ofwpci.c optional fdt pci
|
||||
dev/ofw/ofw_pcib.c optional fdt pci
|
||||
|
||||
dev/pci/controller/pci_n1sdp.c optional pci_n1sdp acpi
|
||||
dev/pci/pci_host_generic.c optional pci
|
||||
|
@ -115,7 +115,7 @@ dev/ntb/ntb_hw/ntb_hw_intel.c optional ntb_hw_intel | ntb_hw
|
||||
dev/ntb/ntb_hw/ntb_hw_plx.c optional ntb_hw_plx | ntb_hw
|
||||
dev/ntb/test/ntb_tool.c optional ntb_tool
|
||||
dev/nvram/nvram.c optional nvram isa
|
||||
dev/ofw/ofwpci.c optional fdt pci
|
||||
dev/ofw/ofw_pcib.c optional fdt pci
|
||||
dev/pcf/pcf_isa.c optional pcf
|
||||
dev/random/ivy.c optional rdrand_rng !random_loadable
|
||||
dev/random/nehemiah.c optional padlock_rng !random_loadable
|
||||
|
@ -96,7 +96,7 @@ dev/hwpmc/hwpmc_mips24k.c optional hwpmc_mips24k
|
||||
dev/hwpmc/hwpmc_mips74k.c optional hwpmc_mips74k
|
||||
|
||||
# ofw support
|
||||
dev/ofw/ofwpci.c optional fdt pci
|
||||
dev/ofw/ofw_pcib.c optional fdt pci
|
||||
|
||||
# INTRNG support code
|
||||
kern/msi_if.m optional intrng
|
||||
|
@ -90,7 +90,7 @@ dev/ofw/ofw_bus_subr.c standard
|
||||
dev/ofw/ofw_console.c optional aim
|
||||
dev/ofw/ofw_disk.c optional ofwd aim
|
||||
dev/ofw/ofwbus.c standard
|
||||
dev/ofw/ofwpci.c optional pci
|
||||
dev/ofw/ofw_pcib.c optional pci
|
||||
dev/ofw/ofw_standard.c optional aim powerpc
|
||||
dev/ofw/ofw_subr.c standard
|
||||
dev/powermac_nvram/powermac_nvram.c optional powermac_nvram powermac
|
||||
|
@ -4,7 +4,7 @@ cddl/dev/dtrace/riscv/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}"
|
||||
cddl/dev/fbt/riscv/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}"
|
||||
crypto/des/des_enc.c optional netsmb
|
||||
dev/ofw/ofw_cpu.c optional fdt
|
||||
dev/ofw/ofwpci.c optional pci fdt
|
||||
dev/ofw/ofw_pcib.c optional pci fdt
|
||||
dev/pci/pci_host_generic.c optional pci
|
||||
dev/pci/pci_host_generic_fdt.c optional pci fdt
|
||||
dev/uart/uart_cpu_fdt.c optional uart fdt
|
||||
|
@ -66,77 +66,77 @@ __FBSDID("$FreeBSD$");
|
||||
/*
|
||||
* bus interface.
|
||||
*/
|
||||
static struct resource * ofw_pci_alloc_resource(device_t, device_t,
|
||||
static struct resource * ofw_pcib_alloc_resource(device_t, device_t,
|
||||
int, int *, rman_res_t, rman_res_t, rman_res_t, u_int);
|
||||
static int ofw_pci_release_resource(device_t, device_t, int, int,
|
||||
static int ofw_pcib_release_resource(device_t, device_t, int, int,
|
||||
struct resource *);
|
||||
static int ofw_pci_activate_resource(device_t, device_t, int, int,
|
||||
static int ofw_pcib_activate_resource(device_t, device_t, int, int,
|
||||
struct resource *);
|
||||
static int ofw_pci_deactivate_resource(device_t, device_t, int, int,
|
||||
static int ofw_pcib_deactivate_resource(device_t, device_t, int, int,
|
||||
struct resource *);
|
||||
static int ofw_pci_adjust_resource(device_t, device_t, int,
|
||||
static int ofw_pcib_adjust_resource(device_t, device_t, int,
|
||||
struct resource *, rman_res_t, rman_res_t);
|
||||
static int ofw_pci_translate_resource(device_t bus, int type,
|
||||
static int ofw_pcib_translate_resource(device_t bus, int type,
|
||||
rman_res_t start, rman_res_t *newstart);
|
||||
|
||||
#ifdef __powerpc__
|
||||
static bus_space_tag_t ofw_pci_bus_get_bus_tag(device_t, device_t);
|
||||
static bus_space_tag_t ofw_pcib_bus_get_bus_tag(device_t, device_t);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* pcib interface
|
||||
*/
|
||||
static int ofw_pci_maxslots(device_t);
|
||||
static int ofw_pcib_maxslots(device_t);
|
||||
|
||||
/*
|
||||
* ofw_bus interface
|
||||
*/
|
||||
static phandle_t ofw_pci_get_node(device_t, device_t);
|
||||
static phandle_t ofw_pcib_get_node(device_t, device_t);
|
||||
|
||||
/*
|
||||
* local methods
|
||||
*/
|
||||
static int ofw_pci_fill_ranges(phandle_t, struct ofw_pci_range *);
|
||||
static struct rman *ofw_pci_get_rman(struct ofw_pci_softc *, int, u_int);
|
||||
static int ofw_pcib_fill_ranges(phandle_t, struct ofw_pci_range *);
|
||||
static struct rman *ofw_pcib_get_rman(struct ofw_pci_softc *, int, u_int);
|
||||
|
||||
/*
|
||||
* Driver methods.
|
||||
*/
|
||||
static device_method_t ofw_pci_methods[] = {
|
||||
static device_method_t ofw_pcib_methods[] = {
|
||||
/* Device interface */
|
||||
DEVMETHOD(device_attach, ofw_pci_attach),
|
||||
DEVMETHOD(device_attach, ofw_pcib_attach),
|
||||
|
||||
/* Bus interface */
|
||||
DEVMETHOD(bus_print_child, bus_generic_print_child),
|
||||
DEVMETHOD(bus_read_ivar, ofw_pci_read_ivar),
|
||||
DEVMETHOD(bus_write_ivar, ofw_pci_write_ivar),
|
||||
DEVMETHOD(bus_read_ivar, ofw_pcib_read_ivar),
|
||||
DEVMETHOD(bus_write_ivar, ofw_pcib_write_ivar),
|
||||
DEVMETHOD(bus_setup_intr, bus_generic_setup_intr),
|
||||
DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr),
|
||||
DEVMETHOD(bus_alloc_resource, ofw_pci_alloc_resource),
|
||||
DEVMETHOD(bus_release_resource, ofw_pci_release_resource),
|
||||
DEVMETHOD(bus_activate_resource, ofw_pci_activate_resource),
|
||||
DEVMETHOD(bus_deactivate_resource, ofw_pci_deactivate_resource),
|
||||
DEVMETHOD(bus_adjust_resource, ofw_pci_adjust_resource),
|
||||
DEVMETHOD(bus_translate_resource, ofw_pci_translate_resource),
|
||||
DEVMETHOD(bus_alloc_resource, ofw_pcib_alloc_resource),
|
||||
DEVMETHOD(bus_release_resource, ofw_pcib_release_resource),
|
||||
DEVMETHOD(bus_activate_resource, ofw_pcib_activate_resource),
|
||||
DEVMETHOD(bus_deactivate_resource, ofw_pcib_deactivate_resource),
|
||||
DEVMETHOD(bus_adjust_resource, ofw_pcib_adjust_resource),
|
||||
DEVMETHOD(bus_translate_resource, ofw_pcib_translate_resource),
|
||||
#ifdef __powerpc__
|
||||
DEVMETHOD(bus_get_bus_tag, ofw_pci_bus_get_bus_tag),
|
||||
DEVMETHOD(bus_get_bus_tag, ofw_pcib_bus_get_bus_tag),
|
||||
#endif
|
||||
|
||||
/* pcib interface */
|
||||
DEVMETHOD(pcib_maxslots, ofw_pci_maxslots),
|
||||
DEVMETHOD(pcib_route_interrupt, ofw_pci_route_interrupt),
|
||||
DEVMETHOD(pcib_maxslots, ofw_pcib_maxslots),
|
||||
DEVMETHOD(pcib_route_interrupt, ofw_pcib_route_interrupt),
|
||||
DEVMETHOD(pcib_request_feature, pcib_request_feature_allow),
|
||||
|
||||
/* ofw_bus interface */
|
||||
DEVMETHOD(ofw_bus_get_node, ofw_pci_get_node),
|
||||
DEVMETHOD(ofw_bus_get_node, ofw_pcib_get_node),
|
||||
|
||||
DEVMETHOD_END
|
||||
};
|
||||
|
||||
DEFINE_CLASS_0(ofw_pci, ofw_pci_driver, ofw_pci_methods, 0);
|
||||
DEFINE_CLASS_0(ofw_pcib, ofw_pcib_driver, ofw_pcib_methods, 0);
|
||||
|
||||
int
|
||||
ofw_pci_init(device_t dev)
|
||||
ofw_pcib_init(device_t dev)
|
||||
{
|
||||
struct ofw_pci_softc *sc;
|
||||
phandle_t node;
|
||||
@ -169,7 +169,7 @@ ofw_pci_init(device_t dev)
|
||||
|
||||
sc->sc_nrange = 0;
|
||||
for (c = OF_child(node); c != 0; c = OF_peer(c)) {
|
||||
n = ofw_pci_nranges(c, cell_info);
|
||||
n = ofw_pcib_nranges(c, cell_info);
|
||||
if (n > 0)
|
||||
sc->sc_nrange += n;
|
||||
}
|
||||
@ -181,13 +181,13 @@ ofw_pci_init(device_t dev)
|
||||
M_DEVBUF, M_WAITOK);
|
||||
i = 0;
|
||||
for (c = OF_child(node); c != 0; c = OF_peer(c)) {
|
||||
n = ofw_pci_fill_ranges(c, &sc->sc_range[i]);
|
||||
n = ofw_pcib_fill_ranges(c, &sc->sc_range[i]);
|
||||
if (n > 0)
|
||||
i += n;
|
||||
}
|
||||
KASSERT(i == sc->sc_nrange, ("range count mismatch"));
|
||||
} else {
|
||||
sc->sc_nrange = ofw_pci_nranges(node, cell_info);
|
||||
sc->sc_nrange = ofw_pcib_nranges(node, cell_info);
|
||||
if (sc->sc_nrange <= 0) {
|
||||
device_printf(dev, "could not getranges\n");
|
||||
error = ENXIO;
|
||||
@ -195,7 +195,7 @@ ofw_pci_init(device_t dev)
|
||||
}
|
||||
sc->sc_range = malloc(sc->sc_nrange * sizeof(sc->sc_range[0]),
|
||||
M_DEVBUF, M_WAITOK);
|
||||
ofw_pci_fill_ranges(node, sc->sc_range);
|
||||
ofw_pcib_fill_ranges(node, sc->sc_range);
|
||||
}
|
||||
|
||||
sc->sc_io_rman.rm_type = RMAN_ARRAY;
|
||||
@ -272,14 +272,14 @@ ofw_pci_init(device_t dev)
|
||||
}
|
||||
|
||||
int
|
||||
ofw_pci_attach(device_t dev)
|
||||
ofw_pcib_attach(device_t dev)
|
||||
{
|
||||
struct ofw_pci_softc *sc;
|
||||
int error;
|
||||
|
||||
sc = device_get_softc(dev);
|
||||
if (!sc->sc_initialized) {
|
||||
error = ofw_pci_init(dev);
|
||||
error = ofw_pcib_init(dev);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
}
|
||||
@ -289,14 +289,14 @@ ofw_pci_attach(device_t dev)
|
||||
}
|
||||
|
||||
static int
|
||||
ofw_pci_maxslots(device_t dev)
|
||||
ofw_pcib_maxslots(device_t dev)
|
||||
{
|
||||
|
||||
return (PCI_SLOTMAX);
|
||||
}
|
||||
|
||||
int
|
||||
ofw_pci_route_interrupt(device_t bus, device_t dev, int pin)
|
||||
ofw_pcib_route_interrupt(device_t bus, device_t dev, int pin)
|
||||
{
|
||||
struct ofw_pci_softc *sc;
|
||||
struct ofw_pci_register reg;
|
||||
@ -333,7 +333,7 @@ ofw_pci_route_interrupt(device_t bus, device_t dev, int pin)
|
||||
}
|
||||
|
||||
int
|
||||
ofw_pci_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
|
||||
ofw_pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
|
||||
{
|
||||
struct ofw_pci_softc *sc;
|
||||
|
||||
@ -354,7 +354,7 @@ ofw_pci_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
|
||||
}
|
||||
|
||||
int
|
||||
ofw_pci_write_ivar(device_t dev, device_t child, int which, uintptr_t value)
|
||||
ofw_pcib_write_ivar(device_t dev, device_t child, int which, uintptr_t value)
|
||||
{
|
||||
struct ofw_pci_softc *sc;
|
||||
|
||||
@ -372,7 +372,7 @@ ofw_pci_write_ivar(device_t dev, device_t child, int which, uintptr_t value)
|
||||
}
|
||||
|
||||
int
|
||||
ofw_pci_nranges(phandle_t node, struct ofw_pci_cell_info *info)
|
||||
ofw_pcib_nranges(phandle_t node, struct ofw_pci_cell_info *info)
|
||||
{
|
||||
ssize_t nbase_ranges;
|
||||
|
||||
@ -400,7 +400,7 @@ ofw_pci_nranges(phandle_t node, struct ofw_pci_cell_info *info)
|
||||
}
|
||||
|
||||
static struct resource *
|
||||
ofw_pci_alloc_resource(device_t bus, device_t child, int type, int *rid,
|
||||
ofw_pcib_alloc_resource(device_t bus, device_t child, int type, int *rid,
|
||||
rman_res_t start, rman_res_t end, rman_res_t count, u_int flags)
|
||||
{
|
||||
struct ofw_pci_softc *sc;
|
||||
@ -420,7 +420,7 @@ ofw_pci_alloc_resource(device_t bus, device_t child, int type, int *rid,
|
||||
}
|
||||
#endif
|
||||
|
||||
rm = ofw_pci_get_rman(sc, type, flags);
|
||||
rm = ofw_pcib_get_rman(sc, type, flags);
|
||||
if (rm == NULL) {
|
||||
return (bus_generic_alloc_resource(bus, child, type, rid,
|
||||
start, end, count, flags | needactivate));
|
||||
@ -449,7 +449,7 @@ ofw_pci_alloc_resource(device_t bus, device_t child, int type, int *rid,
|
||||
}
|
||||
|
||||
static int
|
||||
ofw_pci_release_resource(device_t bus, device_t child, int type, int rid,
|
||||
ofw_pcib_release_resource(device_t bus, device_t child, int type, int rid,
|
||||
struct resource *res)
|
||||
{
|
||||
struct ofw_pci_softc *sc;
|
||||
@ -464,7 +464,7 @@ ofw_pci_release_resource(device_t bus, device_t child, int type, int rid,
|
||||
res));
|
||||
#endif
|
||||
|
||||
rm = ofw_pci_get_rman(sc, type, rman_get_flags(res));
|
||||
rm = ofw_pcib_get_rman(sc, type, rman_get_flags(res));
|
||||
if (rm == NULL) {
|
||||
return (bus_generic_release_resource(bus, child, type, rid,
|
||||
res));
|
||||
@ -480,7 +480,7 @@ ofw_pci_release_resource(device_t bus, device_t child, int type, int rid,
|
||||
}
|
||||
|
||||
static int
|
||||
ofw_pci_translate_resource(device_t bus, int type, rman_res_t start,
|
||||
ofw_pcib_translate_resource(device_t bus, int type, rman_res_t start,
|
||||
rman_res_t *newstart)
|
||||
{
|
||||
struct ofw_pci_softc *sc;
|
||||
@ -519,7 +519,7 @@ ofw_pci_translate_resource(device_t bus, int type, rman_res_t start,
|
||||
}
|
||||
|
||||
static int
|
||||
ofw_pci_activate_resource(device_t bus, device_t child, int type, int rid,
|
||||
ofw_pcib_activate_resource(device_t bus, device_t child, int type, int rid,
|
||||
struct resource *res)
|
||||
{
|
||||
struct ofw_pci_softc *sc;
|
||||
@ -587,7 +587,7 @@ ofw_pci_activate_resource(device_t bus, device_t child, int type, int rid,
|
||||
|
||||
#ifdef __powerpc__
|
||||
static bus_space_tag_t
|
||||
ofw_pci_bus_get_bus_tag(device_t bus, device_t child)
|
||||
ofw_pcib_bus_get_bus_tag(device_t bus, device_t child)
|
||||
{
|
||||
|
||||
return (&bs_le_tag);
|
||||
@ -595,7 +595,7 @@ ofw_pci_bus_get_bus_tag(device_t bus, device_t child)
|
||||
#endif
|
||||
|
||||
static int
|
||||
ofw_pci_deactivate_resource(device_t bus, device_t child, int type, int rid,
|
||||
ofw_pcib_deactivate_resource(device_t bus, device_t child, int type, int rid,
|
||||
struct resource *res)
|
||||
{
|
||||
vm_size_t psize;
|
||||
@ -612,7 +612,7 @@ ofw_pci_deactivate_resource(device_t bus, device_t child, int type, int rid,
|
||||
}
|
||||
|
||||
static int
|
||||
ofw_pci_adjust_resource(device_t bus, device_t child, int type,
|
||||
ofw_pcib_adjust_resource(device_t bus, device_t child, int type,
|
||||
struct resource *res, rman_res_t start, rman_res_t end)
|
||||
{
|
||||
struct rman *rm;
|
||||
@ -625,7 +625,7 @@ ofw_pci_adjust_resource(device_t bus, device_t child, int type,
|
||||
start, end));
|
||||
#endif
|
||||
|
||||
rm = ofw_pci_get_rman(sc, type, rman_get_flags(res));
|
||||
rm = ofw_pcib_get_rman(sc, type, rman_get_flags(res));
|
||||
if (rm == NULL) {
|
||||
return (bus_generic_adjust_resource(bus, child, type, res,
|
||||
start, end));
|
||||
@ -638,7 +638,7 @@ ofw_pci_adjust_resource(device_t bus, device_t child, int type,
|
||||
}
|
||||
|
||||
static phandle_t
|
||||
ofw_pci_get_node(device_t bus, device_t dev)
|
||||
ofw_pcib_get_node(device_t bus, device_t dev)
|
||||
{
|
||||
struct ofw_pci_softc *sc;
|
||||
|
||||
@ -649,7 +649,7 @@ ofw_pci_get_node(device_t bus, device_t dev)
|
||||
}
|
||||
|
||||
static int
|
||||
ofw_pci_fill_ranges(phandle_t node, struct ofw_pci_range *ranges)
|
||||
ofw_pcib_fill_ranges(phandle_t node, struct ofw_pci_range *ranges)
|
||||
{
|
||||
int host_address_cells = 1, pci_address_cells = 3, size_cells = 2;
|
||||
cell_t *base_ranges;
|
||||
@ -696,7 +696,7 @@ ofw_pci_fill_ranges(phandle_t node, struct ofw_pci_range *ranges)
|
||||
}
|
||||
|
||||
static struct rman *
|
||||
ofw_pci_get_rman(struct ofw_pci_softc *sc, int type, u_int flags)
|
||||
ofw_pcib_get_rman(struct ofw_pci_softc *sc, int type, u_int flags)
|
||||
{
|
||||
|
||||
switch (type) {
|
@ -32,7 +32,7 @@
|
||||
/*
|
||||
* Export class definition for inheritance purposes
|
||||
*/
|
||||
DECLARE_CLASS(ofw_pci_driver);
|
||||
DECLARE_CLASS(ofw_pcib_driver);
|
||||
|
||||
struct ofw_pci_cell_info {
|
||||
pcell_t host_address_cells;
|
||||
@ -77,11 +77,11 @@ struct ofw_pci_softc {
|
||||
struct ofw_bus_iinfo sc_pci_iinfo;
|
||||
};
|
||||
|
||||
int ofw_pci_init(device_t);
|
||||
int ofw_pci_attach(device_t);
|
||||
int ofw_pci_read_ivar(device_t, device_t, int, uintptr_t *);
|
||||
int ofw_pci_write_ivar(device_t, device_t, int, uintptr_t);
|
||||
int ofw_pci_route_interrupt(device_t, device_t, int);
|
||||
int ofw_pci_nranges(phandle_t, struct ofw_pci_cell_info *);
|
||||
int ofw_pcib_init(device_t);
|
||||
int ofw_pcib_attach(device_t);
|
||||
int ofw_pcib_read_ivar(device_t, device_t, int, uintptr_t *);
|
||||
int ofw_pcib_write_ivar(device_t, device_t, int, uintptr_t);
|
||||
int ofw_pcib_route_interrupt(device_t, device_t, int);
|
||||
int ofw_pcib_nranges(phandle_t, struct ofw_pci_cell_info *);
|
||||
|
||||
#endif /* _DEV_OFW_OFWPCI_H_ */
|
||||
|
@ -638,7 +638,7 @@ pci_dw_init(device_t dev)
|
||||
if (rv != 0)
|
||||
goto out;
|
||||
|
||||
rv = ofw_pci_init(dev);
|
||||
rv = ofw_pcib_init(dev);
|
||||
if (rv != 0)
|
||||
goto out;
|
||||
rv = pci_dw_decode_ranges(sc, sc->ofw_pci.sc_range,
|
||||
@ -686,4 +686,4 @@ static device_method_t pci_dw_methods[] = {
|
||||
};
|
||||
|
||||
DEFINE_CLASS_1(pcib, pci_dw_driver, pci_dw_methods,
|
||||
sizeof(struct pci_dw_softc), ofw_pci_driver);
|
||||
sizeof(struct pci_dw_softc), ofw_pcib_driver);
|
||||
|
@ -258,7 +258,7 @@ static device_method_t fsl_pcib_methods[] = {
|
||||
static devclass_t fsl_pcib_devclass;
|
||||
|
||||
DEFINE_CLASS_1(pcib, fsl_pcib_driver, fsl_pcib_methods,
|
||||
sizeof(struct fsl_pcib_softc), ofw_pci_driver);
|
||||
sizeof(struct fsl_pcib_softc), ofw_pcib_driver);
|
||||
EARLY_DRIVER_MODULE(pcib, ofwbus, fsl_pcib_driver, fsl_pcib_devclass, 0, 0,
|
||||
BUS_PASS_BUS);
|
||||
|
||||
@ -361,7 +361,7 @@ fsl_pcib_attach(device_t dev)
|
||||
* Initialize generic OF PCI interface (ranges, etc.)
|
||||
*/
|
||||
|
||||
error = ofw_pci_init(dev);
|
||||
error = ofw_pcib_init(dev);
|
||||
if (error)
|
||||
return (error);
|
||||
|
||||
@ -429,7 +429,7 @@ fsl_pcib_attach(device_t dev)
|
||||
|
||||
fsl_pcib_err_init(dev);
|
||||
|
||||
return (ofw_pci_attach(dev));
|
||||
return (ofw_pcib_attach(dev));
|
||||
|
||||
err:
|
||||
return (ENXIO);
|
||||
|
@ -140,7 +140,7 @@ struct cpcht_softc {
|
||||
|
||||
static devclass_t cpcht_devclass;
|
||||
DEFINE_CLASS_1(pcib, cpcht_driver, cpcht_methods, sizeof(struct cpcht_softc),
|
||||
ofw_pci_driver);
|
||||
ofw_pcib_driver);
|
||||
EARLY_DRIVER_MODULE(cpcht, ofwbus, cpcht_driver, cpcht_devclass, 0, 0,
|
||||
BUS_PASS_BUS);
|
||||
|
||||
@ -212,7 +212,7 @@ cpcht_attach(device_t dev)
|
||||
/* Now make the mapping table available to the MPIC */
|
||||
cpcht_irqmap = sc->htirq_map;
|
||||
|
||||
return (ofw_pci_attach(dev));
|
||||
return (ofw_pcib_attach(dev));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -100,7 +100,7 @@ static device_method_t grackle_methods[] = {
|
||||
|
||||
static devclass_t grackle_devclass;
|
||||
DEFINE_CLASS_1(pcib, grackle_driver, grackle_methods,
|
||||
sizeof(struct grackle_softc), ofw_pci_driver);
|
||||
sizeof(struct grackle_softc), ofw_pcib_driver);
|
||||
DRIVER_MODULE(grackle, ofwbus, grackle_driver, grackle_devclass, 0, 0);
|
||||
|
||||
static int
|
||||
@ -137,7 +137,7 @@ grackle_attach(device_t dev)
|
||||
sc->sc_addr = (vm_offset_t)pmap_mapdev(GRACKLE_ADDR, PAGE_SIZE);
|
||||
sc->sc_data = (vm_offset_t)pmap_mapdev(GRACKLE_DATA, PAGE_SIZE);
|
||||
|
||||
return (ofw_pci_attach(dev));
|
||||
return (ofw_pcib_attach(dev));
|
||||
}
|
||||
|
||||
static u_int32_t
|
||||
|
@ -100,7 +100,7 @@ static device_method_t uninorth_methods[] = {
|
||||
static devclass_t uninorth_devclass;
|
||||
|
||||
DEFINE_CLASS_1(pcib, uninorth_driver, uninorth_methods,
|
||||
sizeof(struct uninorth_softc), ofw_pci_driver);
|
||||
sizeof(struct uninorth_softc), ofw_pcib_driver);
|
||||
EARLY_DRIVER_MODULE(uninorth, ofwbus, uninorth_driver, uninorth_devclass, 0, 0,
|
||||
BUS_PASS_BUS);
|
||||
|
||||
@ -176,7 +176,7 @@ uninorth_attach(device_t dev)
|
||||
|
||||
mtx_init(&sc->sc_cfg_mtx, "uninorth pcicfg", NULL, MTX_SPIN);
|
||||
|
||||
return (ofw_pci_attach(dev));
|
||||
return (ofw_pcib_attach(dev));
|
||||
}
|
||||
|
||||
static u_int32_t
|
||||
|
@ -169,7 +169,7 @@ struct opalpci_softc {
|
||||
|
||||
static devclass_t opalpci_devclass;
|
||||
DEFINE_CLASS_1(pcib, opalpci_driver, opalpci_methods,
|
||||
sizeof(struct opalpci_softc), ofw_pci_driver);
|
||||
sizeof(struct opalpci_softc), ofw_pcib_driver);
|
||||
EARLY_DRIVER_MODULE(opalpci, ofwbus, opalpci_driver, opalpci_devclass, 0, 0,
|
||||
BUS_PASS_BUS);
|
||||
|
||||
@ -464,7 +464,7 @@ opalpci_attach(device_t dev)
|
||||
/*
|
||||
* General OFW PCI attach
|
||||
*/
|
||||
err = ofw_pci_init(dev);
|
||||
err = ofw_pcib_init(dev);
|
||||
if (err != 0)
|
||||
return (err);
|
||||
|
||||
@ -496,7 +496,7 @@ opalpci_attach(device_t dev)
|
||||
rp->pci + rp->size - 1);
|
||||
}
|
||||
|
||||
return (ofw_pci_attach(dev));
|
||||
return (ofw_pcib_attach(dev));
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
|
@ -101,7 +101,7 @@ struct rtaspci_softc {
|
||||
|
||||
static devclass_t rtaspci_devclass;
|
||||
DEFINE_CLASS_1(pcib, rtaspci_driver, rtaspci_methods,
|
||||
sizeof(struct rtaspci_softc), ofw_pci_driver);
|
||||
sizeof(struct rtaspci_softc), ofw_pcib_driver);
|
||||
DRIVER_MODULE(rtaspci, ofwbus, rtaspci_driver, rtaspci_devclass, 0, 0);
|
||||
|
||||
static int
|
||||
@ -143,7 +143,7 @@ rtaspci_attach(device_t dev)
|
||||
OF_getencprop(ofw_bus_get_node(dev), "ibm,pci-config-space-type",
|
||||
&sc->sc_extended_config, sizeof(sc->sc_extended_config));
|
||||
|
||||
return (ofw_pci_attach(dev));
|
||||
return (ofw_pcib_attach(dev));
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
|
Loading…
Reference in New Issue
Block a user