- Make pcib_devclass private to sys/dev/pci/pci_pci.c and change all the
various pcib drivers to use their own private devclass_t variables for their modules. - Use the DEFINE_CLASS_0() macro to declare drivers for the various pcib drivers while I'm here.
This commit is contained in:
parent
6bed9d9e73
commit
04dda605c5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154079
@ -100,13 +100,10 @@ static device_method_t mptable_hostb_methods[] = {
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static driver_t mptable_hostb_driver = {
|
||||
"pcib",
|
||||
mptable_hostb_methods,
|
||||
1,
|
||||
};
|
||||
static devclass_t hostb_devclass;
|
||||
|
||||
DRIVER_MODULE(mptable_pcib, legacy, mptable_hostb_driver, pcib_devclass, 0, 0);
|
||||
DEFINE_CLASS_0(pcib, mptable_hostb_driver, mptable_hostb_methods, 1);
|
||||
DRIVER_MODULE(mptable_pcib, legacy, mptable_hostb_driver, hostb_devclass, 0, 0);
|
||||
|
||||
/* PCI to PCI bridge driver. */
|
||||
|
||||
@ -155,11 +152,9 @@ static device_method_t mptable_pcib_pci_methods[] = {
|
||||
{0, 0}
|
||||
};
|
||||
|
||||
static driver_t mptable_pcib_driver = {
|
||||
"pcib",
|
||||
mptable_pcib_pci_methods,
|
||||
sizeof(struct pcib_softc),
|
||||
};
|
||||
static devclass_t pcib_devclass;
|
||||
|
||||
DEFINE_CLASS_0(pcib, mptable_pcib_driver, mptable_pcib_pci_methods,
|
||||
sizeof(struct pcib_softc));
|
||||
DRIVER_MODULE(mptable_pcib, pci, mptable_pcib_driver, pcib_devclass, 0, 0);
|
||||
|
||||
|
@ -326,12 +326,9 @@ static device_method_t legacy_pcib_methods[] = {
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static driver_t legacy_pcib_driver = {
|
||||
"pcib",
|
||||
legacy_pcib_methods,
|
||||
1,
|
||||
};
|
||||
static devclass_t pcib_devclass;
|
||||
|
||||
DEFINE_CLASS_0(pcib, legacy_pcib_driver, legacy_pcib_methods, 1);
|
||||
DRIVER_MODULE(pcib, legacy, legacy_pcib_driver, pcib_devclass, 0, 0);
|
||||
|
||||
|
||||
@ -377,12 +374,7 @@ static device_method_t pcibus_pnp_methods[] = {
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static driver_t pcibus_pnp_driver = {
|
||||
"pcibus_pnp",
|
||||
pcibus_pnp_methods,
|
||||
1, /* no softc */
|
||||
};
|
||||
|
||||
static devclass_t pcibus_pnp_devclass;
|
||||
|
||||
DEFINE_CLASS_0(pcibus_pnp, pcibus_pnp_driver, pcibus_pnp_methods, 1);
|
||||
DRIVER_MODULE(pcibus_pnp, isa, pcibus_pnp_driver, pcibus_pnp_devclass, 0, 0);
|
||||
|
@ -107,12 +107,10 @@ static device_method_t acpi_pcib_acpi_methods[] = {
|
||||
{0, 0}
|
||||
};
|
||||
|
||||
static driver_t acpi_pcib_acpi_driver = {
|
||||
"pcib",
|
||||
acpi_pcib_acpi_methods,
|
||||
sizeof(struct acpi_hpcib_softc),
|
||||
};
|
||||
static devclass_t pcib_devclass;
|
||||
|
||||
DEFINE_CLASS_0(pcib, acpi_pcib_acpi_driver, acpi_pcib_acpi_methods,
|
||||
sizeof(struct acpi_hpcib_softc));
|
||||
DRIVER_MODULE(acpi_pcib, acpi, acpi_pcib_acpi_driver, pcib_devclass, 0, 0);
|
||||
MODULE_DEPEND(acpi_pcib, acpi, 1, 1, 1);
|
||||
|
||||
|
@ -97,12 +97,10 @@ static device_method_t acpi_pcib_pci_methods[] = {
|
||||
{0, 0}
|
||||
};
|
||||
|
||||
static driver_t acpi_pcib_pci_driver = {
|
||||
"pcib",
|
||||
acpi_pcib_pci_methods,
|
||||
sizeof(struct acpi_pcib_softc),
|
||||
};
|
||||
static devclass_t pcib_devclass;
|
||||
|
||||
DEFINE_CLASS_0(pcib, acpi_pcib_pci_driver, acpi_pcib_pci_methods,
|
||||
sizeof(struct acpi_pcib_softc));
|
||||
DRIVER_MODULE(acpi_pcib, pci, acpi_pcib_pci_driver, pcib_devclass, 0, 0);
|
||||
MODULE_DEPEND(acpi_pcib, acpi, 1, 1, 1);
|
||||
|
||||
|
@ -83,14 +83,9 @@ static device_method_t pcib_methods[] = {
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static driver_t pcib_driver = {
|
||||
"pcib",
|
||||
pcib_methods,
|
||||
sizeof(struct pcib_softc),
|
||||
};
|
||||
|
||||
devclass_t pcib_devclass;
|
||||
static devclass_t pcib_devclass;
|
||||
|
||||
DEFINE_CLASS_0(pcib, pcib_driver, pcib_methods, sizeof(struct pcib_softc));
|
||||
DRIVER_MODULE(pcib, pci, pcib_driver, pcib_devclass, 0, 0);
|
||||
|
||||
/*
|
||||
|
@ -75,6 +75,4 @@ uint32_t pcib_read_config(device_t dev, int b, int s, int f, int reg, int width)
|
||||
void pcib_write_config(device_t dev, int b, int s, int f, int reg, uint32_t val, int width);
|
||||
int pcib_route_interrupt(device_t pcib, device_t dev, int pin);
|
||||
|
||||
extern devclass_t pcib_devclass;
|
||||
|
||||
#endif
|
||||
|
@ -100,13 +100,10 @@ static device_method_t mptable_hostb_methods[] = {
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static driver_t mptable_hostb_driver = {
|
||||
"pcib",
|
||||
mptable_hostb_methods,
|
||||
1,
|
||||
};
|
||||
static devclass_t hostb_devclass;
|
||||
|
||||
DRIVER_MODULE(mptable_pcib, legacy, mptable_hostb_driver, pcib_devclass, 0, 0);
|
||||
DEFINE_CLASS_0(pcib, mptable_hostb_driver, mptable_hostb_methods, 1);
|
||||
DRIVER_MODULE(mptable_pcib, legacy, mptable_hostb_driver, hostb_devclass, 0, 0);
|
||||
|
||||
/* PCI to PCI bridge driver. */
|
||||
|
||||
@ -155,11 +152,9 @@ static device_method_t mptable_pcib_pci_methods[] = {
|
||||
{0, 0}
|
||||
};
|
||||
|
||||
static driver_t mptable_pcib_driver = {
|
||||
"pcib",
|
||||
mptable_pcib_pci_methods,
|
||||
sizeof(struct pcib_softc),
|
||||
};
|
||||
static devclass_t pcib_devclass;
|
||||
|
||||
DEFINE_CLASS_0(pcib, mptable_pcib_driver, mptable_pcib_pci_methods,
|
||||
sizeof(struct pcib_softc));
|
||||
DRIVER_MODULE(mptable_pcib, pci, mptable_pcib_driver, pcib_devclass, 0, 0);
|
||||
|
||||
|
@ -538,13 +538,10 @@ static device_method_t legacy_pcib_methods[] = {
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static driver_t legacy_pcib_driver = {
|
||||
"pcib",
|
||||
legacy_pcib_methods,
|
||||
1,
|
||||
};
|
||||
static devclass_t hostb_devclass;
|
||||
|
||||
DRIVER_MODULE(pcib, legacy, legacy_pcib_driver, pcib_devclass, 0, 0);
|
||||
DEFINE_CLASS_0(pcib, legacy_pcib_driver, legacy_pcib_methods, 1);
|
||||
DRIVER_MODULE(pcib, legacy, legacy_pcib_driver, hostb_devclass, 0, 0);
|
||||
|
||||
|
||||
/*
|
||||
@ -589,14 +586,9 @@ static device_method_t pcibus_pnp_methods[] = {
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static driver_t pcibus_pnp_driver = {
|
||||
"pcibus_pnp",
|
||||
pcibus_pnp_methods,
|
||||
1, /* no softc */
|
||||
};
|
||||
|
||||
static devclass_t pcibus_pnp_devclass;
|
||||
|
||||
DEFINE_CLASS_0(pcibus_pnp, pcibus_pnp_driver, pcibus_pnp_methods, 1);
|
||||
DRIVER_MODULE(pcibus_pnp, isa, pcibus_pnp_driver, pcibus_pnp_devclass, 0, 0);
|
||||
|
||||
|
||||
@ -635,12 +627,10 @@ static device_method_t pcibios_pcib_pci_methods[] = {
|
||||
{0, 0}
|
||||
};
|
||||
|
||||
static driver_t pcibios_pcib_driver = {
|
||||
"pcib",
|
||||
pcibios_pcib_pci_methods,
|
||||
sizeof(struct pcib_softc),
|
||||
};
|
||||
static devclass_t pcib_devclass;
|
||||
|
||||
DEFINE_CLASS_0(pcib, pcibios_pcib_driver, pcibios_pcib_pci_methods,
|
||||
sizeof(struct pcib_softc));
|
||||
DRIVER_MODULE(pcibios_pcib, pci, pcibios_pcib_driver, pcib_devclass, 0, 0);
|
||||
|
||||
static int
|
||||
|
@ -75,12 +75,10 @@ static device_method_t ofw_pcib_pci_methods[] = {
|
||||
{0, 0}
|
||||
};
|
||||
|
||||
static driver_t ofw_pcib_pci_driver = {
|
||||
"pcib",
|
||||
ofw_pcib_pci_methods,
|
||||
sizeof(struct pcib_softc),
|
||||
};
|
||||
static devclass_t pcib_devclass;
|
||||
|
||||
DEFINE_CLASS_0(pcib, ofw_pcib_pci_driver, ofw_pcib_pci_methods,
|
||||
sizeof(struct pcib_softc));
|
||||
DRIVER_MODULE(ofw_pcib, pci, ofw_pcib_pci_driver, pcib_devclass, 0, 0);
|
||||
|
||||
static int
|
||||
|
@ -112,12 +112,9 @@ static device_method_t apb_methods[] = {
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static driver_t apb_driver = {
|
||||
"pcib",
|
||||
apb_methods,
|
||||
sizeof(struct apb_softc),
|
||||
};
|
||||
static devclass_t pcib_devclass;
|
||||
|
||||
DEFINE_CLASS_0(pcib, apb_driver, apb_methods, sizeof(struct apb_softc));
|
||||
DRIVER_MODULE(apb, pci, apb_driver, pcib_devclass, 0, 0);
|
||||
|
||||
/* APB specific registers */
|
||||
|
@ -93,12 +93,10 @@ static device_method_t ofw_pcib_methods[] = {
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static driver_t ofw_pcib_driver = {
|
||||
"pcib",
|
||||
ofw_pcib_methods,
|
||||
sizeof(struct ofw_pcib_gen_softc),
|
||||
};
|
||||
static devclass_t pcib_devclass;
|
||||
|
||||
DEFINE_CLASS_0(pcib, ofw_pcib_driver, ofw_pcib_methods,
|
||||
sizeof(struct ofw_pcib_gen_softc));
|
||||
DRIVER_MODULE(ofw_pcib, pci, ofw_pcib_driver, pcib_devclass, 0, 0);
|
||||
|
||||
static int
|
||||
|
Loading…
Reference in New Issue
Block a user