svn commit: r328524 - in head/sys: amd64/amd64 dev/ata dev/atkbdc dev/sbni dev/sound/isa i386/i386 isa powerpc/mpc85xx sparc64/sparc64 x86/isa x86/pci x86/x86
Warner Losh
imp at FreeBSD.org
Mon Jan 29 00:22:32 UTC 2018
Author: imp
Date: Mon Jan 29 00:22:30 2018
New Revision: 328524
URL: https://svnweb.freebsd.org/changeset/base/328524
Log:
Add ISA PNP tables to ISA drivers. Fix a few incidental comments.
ACPI ISA PBP tables not tagged, there's bigger issues with them.
Modified:
head/sys/amd64/amd64/fpu.c
head/sys/dev/ata/ata-isa.c
head/sys/dev/atkbdc/psm.c
head/sys/dev/sbni/if_sbni_isa.c
head/sys/dev/sound/isa/ess.c
head/sys/dev/sound/isa/gusc.c
head/sys/dev/sound/isa/mss.c
head/sys/dev/sound/isa/sbc.c
head/sys/i386/i386/npx.c
head/sys/isa/vga_isa.c
head/sys/powerpc/mpc85xx/atpic.c
head/sys/sparc64/sparc64/rtc.c
head/sys/x86/isa/atpic.c
head/sys/x86/isa/atrtc.c
head/sys/x86/isa/clock.c
head/sys/x86/isa/isa_dma.c
head/sys/x86/isa/orm.c
head/sys/x86/pci/pci_bus.c
head/sys/x86/x86/nexus.c
Modified: head/sys/amd64/amd64/fpu.c
==============================================================================
--- head/sys/amd64/amd64/fpu.c Mon Jan 29 00:14:46 2018 (r328523)
+++ head/sys/amd64/amd64/fpu.c Mon Jan 29 00:22:30 2018 (r328524)
@@ -917,6 +917,7 @@ static driver_t fpupnp_driver = {
static devclass_t fpupnp_devclass;
DRIVER_MODULE(fpupnp, acpi, fpupnp_driver, fpupnp_devclass, 0, 0);
+ISA_PNP_INFO(fpupnp_ids);
#endif /* DEV_ISA */
static MALLOC_DEFINE(M_FPUKERN_CTX, "fpukern_ctx",
Modified: head/sys/dev/ata/ata-isa.c
==============================================================================
--- head/sys/dev/ata/ata-isa.c Mon Jan 29 00:14:46 2018 (r328523)
+++ head/sys/dev/ata/ata-isa.c Mon Jan 29 00:22:30 2018 (r328524)
@@ -207,3 +207,4 @@ static driver_t ata_isa_driver = {
DRIVER_MODULE(ata, isa, ata_isa_driver, ata_devclass, NULL, NULL);
MODULE_DEPEND(ata, ata, 1, 1, 1);
+ISA_PNP_INFO(ata_ids);
Modified: head/sys/dev/atkbdc/psm.c
==============================================================================
--- head/sys/dev/atkbdc/psm.c Mon Jan 29 00:14:46 2018 (r328523)
+++ head/sys/dev/atkbdc/psm.c Mon Jan 29 00:22:30 2018 (r328524)
@@ -7186,5 +7186,5 @@ psmcpnp_attach(device_t dev)
DRIVER_MODULE(psmcpnp, isa, psmcpnp_driver, psmcpnp_devclass, 0, 0);
DRIVER_MODULE(psmcpnp, acpi, psmcpnp_driver, psmcpnp_devclass, 0, 0);
-
+ISA_PNP_INFO(psmcpnp_ids);
#endif /* DEV_ISA */
Modified: head/sys/dev/sbni/if_sbni_isa.c
==============================================================================
--- head/sys/dev/sbni/if_sbni_isa.c Mon Jan 29 00:14:46 2018 (r328523)
+++ head/sys/dev/sbni/if_sbni_isa.c Mon Jan 29 00:22:30 2018 (r328524)
@@ -166,3 +166,4 @@ sbni_attach_isa(device_t dev)
DRIVER_MODULE(sbni, isa, sbni_isa_driver, sbni_isa_devclass, 0, 0);
MODULE_DEPEND(sbni, isa, 1, 1, 1);
+ISA_PNP_INFO(sbni_ids);
Modified: head/sys/dev/sound/isa/ess.c
==============================================================================
--- head/sys/dev/sound/isa/ess.c Mon Jan 29 00:14:46 2018 (r328523)
+++ head/sys/dev/sound/isa/ess.c Mon Jan 29 00:22:30 2018 (r328524)
@@ -1016,3 +1016,4 @@ static driver_t esscontrol_driver = {
DRIVER_MODULE(esscontrol, isa, esscontrol_driver, esscontrol_devclass, 0, 0);
DRIVER_MODULE(esscontrol, acpi, esscontrol_driver, esscontrol_devclass, 0, 0);
+ISA_PNP_INFO(essc_ids);
Modified: head/sys/dev/sound/isa/gusc.c
==============================================================================
--- head/sys/dev/sound/isa/gusc.c Mon Jan 29 00:14:46 2018 (r328523)
+++ head/sys/dev/sound/isa/gusc.c Mon Jan 29 00:22:30 2018 (r328524)
@@ -673,5 +673,4 @@ DRIVER_MODULE(snd_gusc, isa, gusc_driver, gusc_devclas
DRIVER_MODULE(snd_gusc, acpi, gusc_driver, gusc_devclass, 0, 0);
MODULE_DEPEND(snd_gusc, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER);
MODULE_VERSION(snd_gusc, 1);
-
-
+ISA_PNP_INFO(gusc_ids);
Modified: head/sys/dev/sound/isa/mss.c
==============================================================================
--- head/sys/dev/sound/isa/mss.c Mon Jan 29 00:14:46 2018 (r328523)
+++ head/sys/dev/sound/isa/mss.c Mon Jan 29 00:22:30 2018 (r328524)
@@ -2293,5 +2293,4 @@ static driver_t guspcm_driver = {
DRIVER_MODULE(snd_guspcm, gusc, guspcm_driver, pcm_devclass, 0, 0);
MODULE_DEPEND(snd_guspcm, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER);
MODULE_VERSION(snd_guspcm, 1);
-
-
+ISA_PNP_INFO(pnpmss_ids);
Modified: head/sys/dev/sound/isa/sbc.c
==============================================================================
--- head/sys/dev/sound/isa/sbc.c Mon Jan 29 00:14:46 2018 (r328523)
+++ head/sys/dev/sound/isa/sbc.c Mon Jan 29 00:22:30 2018 (r328524)
@@ -750,3 +750,4 @@ DRIVER_MODULE(snd_sbc, isa, sbc_driver, sbc_devclass,
DRIVER_MODULE(snd_sbc, acpi, sbc_driver, sbc_devclass, 0, 0);
MODULE_DEPEND(snd_sbc, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER);
MODULE_VERSION(snd_sbc, 1);
+ISA_PNP_INFO(sbc_ids);
Modified: head/sys/i386/i386/npx.c
==============================================================================
--- head/sys/i386/i386/npx.c Mon Jan 29 00:14:46 2018 (r328523)
+++ head/sys/i386/i386/npx.c Mon Jan 29 00:22:30 2018 (r328524)
@@ -1277,6 +1277,7 @@ static devclass_t npxisa_devclass;
DRIVER_MODULE(npxisa, isa, npxisa_driver, npxisa_devclass, 0, 0);
DRIVER_MODULE(npxisa, acpi, npxisa_driver, npxisa_devclass, 0, 0);
+ISA_PNP_INFO(npxisa_ids);
#endif /* DEV_ISA */
static MALLOC_DEFINE(M_FPUKERN_CTX, "fpukern_ctx",
Modified: head/sys/isa/vga_isa.c
==============================================================================
--- head/sys/isa/vga_isa.c Mon Jan 29 00:14:46 2018 (r328523)
+++ head/sys/isa/vga_isa.c Mon Jan 29 00:22:30 2018 (r328524)
@@ -61,6 +61,13 @@ __FBSDID("$FreeBSD$");
#include <isa/isareg.h>
#include <isa/isavar.h>
+#define VGA_ID 0x0009d041 /* PNP0900 */
+
+static struct isa_pnp_id vga_ids[] = {
+ { VGA_ID, NULL }, /* PNP0900 */
+ { 0, NULL },
+};
+
static void
vga_suspend(device_t dev)
{
@@ -175,7 +182,8 @@ isavga_probe(device_t dev)
adp.va_io_base, adp.va_io_size);
bus_set_resource(dev, SYS_RES_MEMORY, 0,
adp.va_mem_base, adp.va_mem_size);
- isa_set_vendorid(dev, PNP_EISAID("PNP0900"));
+ isa_set_vendorid(dev, VGA_ID);
+ isa_set_logicalid(dev, VGA_ID);
#if 0
isa_set_port(dev, adp.va_io_base);
isa_set_portsize(dev, adp.va_io_size);
@@ -383,3 +391,4 @@ static driver_t vgapm_driver = {
};
DRIVER_MODULE(vgapm, vgapci, vgapm_driver, vgapm_devclass, 0, 0);
+ISA_PNP_INFO(vga_ids);
Modified: head/sys/powerpc/mpc85xx/atpic.c
==============================================================================
--- head/sys/powerpc/mpc85xx/atpic.c Mon Jan 29 00:14:46 2018 (r328523)
+++ head/sys/powerpc/mpc85xx/atpic.c Mon Jan 29 00:22:30 2018 (r328524)
@@ -112,13 +112,14 @@ static driver_t atpic_isa_driver = {
static devclass_t atpic_devclass;
-DRIVER_MODULE(atpic, isa, atpic_isa_driver, atpic_devclass, 0, 0);
-
static struct isa_pnp_id atpic_ids[] = {
{ 0x0000d041 /* PNP0000 */, "AT interrupt controller" },
{ 0 }
};
+DRIVER_MODULE(atpic, isa, atpic_isa_driver, atpic_devclass, 0, 0);
+ISA_PNP_INFO(atpic_ids);
+
static __inline uint8_t
atpic_read(struct atpic_softc *sc, int icu, int ofs)
{
@@ -363,4 +364,3 @@ atpic_ofw_translate_code(device_t dev, u_int irq, int
*pol = INTR_POLARITY_CONFORM;
}
}
-
Modified: head/sys/sparc64/sparc64/rtc.c
==============================================================================
--- head/sys/sparc64/sparc64/rtc.c Mon Jan 29 00:14:46 2018 (r328523)
+++ head/sys/sparc64/sparc64/rtc.c Mon Jan 29 00:22:30 2018 (r328524)
@@ -122,7 +122,13 @@ static driver_t rtc_isa_driver = {
sizeof(struct mc146818_softc),
};
+static struct isa_pnp_id rtc_isa_ids[] = {
+ { 0x000bd041, RTC_DESC }, /* PNP0B00 */
+ { 0 }
+};
+
DRIVER_MODULE(rtc, isa, rtc_isa_driver, rtc_devclass, 0, 0);
+ISA_PNP_INFO(rtc_isa_ids);
#endif
static u_int pc87317_getcent(device_t dev);
@@ -145,11 +151,6 @@ rtc_ebus_probe(device_t dev)
}
#ifdef DEV_ISA
-static struct isa_pnp_id rtc_isa_ids[] = {
- { 0x000bd041, RTC_DESC }, /* PNP0B00 */
- { 0 }
-};
-
static int
rtc_isa_probe(device_t dev)
{
Modified: head/sys/x86/isa/atpic.c
==============================================================================
--- head/sys/x86/isa/atpic.c Mon Jan 29 00:14:46 2018 (r328523)
+++ head/sys/x86/isa/atpic.c Mon Jan 29 00:22:30 2018 (r328524)
@@ -565,6 +565,21 @@ atpic_attach(device_t dev)
return (0);
}
+/*
+ * Return a bitmap of the current interrupt requests. This is 8259-specific
+ * and is only suitable for use at probe time.
+ */
+intrmask_t
+isa_irq_pending(void)
+{
+ u_char irr1;
+ u_char irr2;
+
+ irr1 = inb(IO_ICU1);
+ irr2 = inb(IO_ICU2);
+ return ((irr2 << 8) | irr1);
+}
+
static device_method_t atpic_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, atpic_probe),
@@ -586,19 +601,5 @@ static devclass_t atpic_devclass;
DRIVER_MODULE(atpic, isa, atpic_driver, atpic_devclass, 0, 0);
DRIVER_MODULE(atpic, acpi, atpic_driver, atpic_devclass, 0, 0);
-
-/*
- * Return a bitmap of the current interrupt requests. This is 8259-specific
- * and is only suitable for use at probe time.
- */
-intrmask_t
-isa_irq_pending(void)
-{
- u_char irr1;
- u_char irr2;
-
- irr1 = inb(IO_ICU1);
- irr2 = inb(IO_ICU2);
- return ((irr2 << 8) | irr1);
-}
+ISA_PNP_INFO(atpic_ids);
#endif /* DEV_ISA */
Modified: head/sys/x86/isa/atrtc.c
==============================================================================
--- head/sys/x86/isa/atrtc.c Mon Jan 29 00:14:46 2018 (r328523)
+++ head/sys/x86/isa/atrtc.c Mon Jan 29 00:22:30 2018 (r328524)
@@ -415,6 +415,7 @@ static devclass_t atrtc_devclass;
DRIVER_MODULE(atrtc, isa, atrtc_driver, atrtc_devclass, 0, 0);
DRIVER_MODULE(atrtc, acpi, atrtc_driver, atrtc_devclass, 0, 0);
+ISA_PNP_INFO(atrtc_ids);
#include "opt_ddb.h"
#ifdef DDB
Modified: head/sys/x86/isa/clock.c
==============================================================================
--- head/sys/x86/isa/clock.c Mon Jan 29 00:14:46 2018 (r328523)
+++ head/sys/x86/isa/clock.c Mon Jan 29 00:22:30 2018 (r328524)
@@ -667,5 +667,6 @@ static devclass_t attimer_devclass;
DRIVER_MODULE(attimer, isa, attimer_driver, attimer_devclass, 0, 0);
DRIVER_MODULE(attimer, acpi, attimer_driver, attimer_devclass, 0, 0);
+ISA_PNP_INFO(attimer_ids);
#endif /* DEV_ISA */
Modified: head/sys/x86/isa/isa_dma.c
==============================================================================
--- head/sys/x86/isa/isa_dma.c Mon Jan 29 00:14:46 2018 (r328523)
+++ head/sys/x86/isa/isa_dma.c Mon Jan 29 00:22:30 2018 (r328524)
@@ -612,3 +612,4 @@ static devclass_t atdma_devclass;
DRIVER_MODULE(atdma, isa, atdma_driver, atdma_devclass, 0, 0);
DRIVER_MODULE(atdma, acpi, atdma_driver, atdma_devclass, 0, 0);
+ISA_PNP_INFO(atdma_ids);
Modified: head/sys/x86/isa/orm.c
==============================================================================
--- head/sys/x86/isa/orm.c Mon Jan 29 00:14:46 2018 (r328523)
+++ head/sys/x86/isa/orm.c Mon Jan 29 00:22:30 2018 (r328524)
@@ -188,3 +188,4 @@ static driver_t orm_driver = {
static devclass_t orm_devclass;
DRIVER_MODULE(orm, isa, orm_driver, orm_devclass, 0, 0);
+ISA_PNP_INFO(orm_ids);
Modified: head/sys/x86/pci/pci_bus.c
==============================================================================
--- head/sys/x86/pci/pci_bus.c Mon Jan 29 00:14:46 2018 (r328523)
+++ head/sys/x86/pci/pci_bus.c Mon Jan 29 00:22:30 2018 (r328524)
@@ -683,8 +683,7 @@ DRIVER_MODULE(pcib, legacy, legacy_pcib_driver, hostb_
* ID is available and the PCI BIOS isn't, but for now we just
* eat the PnP ID and do nothing else.
*
- * XXX we should silence this probe, as it will generally confuse
- * people.
+ * we silence this probe, as it will generally confuse people.
*/
static struct isa_pnp_id pcibus_pnp_ids[] = {
{ 0x030ad041 /* PNP0A03 */, "PCI Bus" },
@@ -747,6 +746,7 @@ static devclass_t pcib_devclass;
DEFINE_CLASS_1(pcib, pcibios_pcib_driver, pcibios_pcib_pci_methods,
sizeof(struct pcib_softc), pcib_driver);
DRIVER_MODULE(pcibios_pcib, pci, pcibios_pcib_driver, pcib_devclass, 0, 0);
+ISA_PNP_INFO(pcibus_pnp_ids);
static int
pcibios_pcib_probe(device_t dev)
Modified: head/sys/x86/x86/nexus.c
==============================================================================
--- head/sys/x86/x86/nexus.c Mon Jan 29 00:14:46 2018 (r328523)
+++ head/sys/x86/x86/nexus.c Mon Jan 29 00:22:30 2018 (r328524)
@@ -901,4 +901,5 @@ static driver_t sysresource_driver = {
static devclass_t sysresource_devclass;
DRIVER_MODULE(sysresource, isa, sysresource_driver, sysresource_devclass, 0, 0);
+ISA_PNP_INFO(sysresource_ids);
#endif /* DEV_ISA */
More information about the svn-src-all
mailing list