Add ISA PNP tables to ISA drivers. Fix a few incidental comments.

ACPI ISA PBP tables not tagged, there's bigger issues with them.
This commit is contained in:
Warner Losh 2018-01-29 00:22:30 +00:00
parent 2ced565834
commit d6b6639713
19 changed files with 51 additions and 31 deletions

View File

@ -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",

View File

@ -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);

View File

@ -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 */

View File

@ -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);

View File

@ -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);

View File

@ -673,5 +673,4 @@ DRIVER_MODULE(snd_gusc, isa, gusc_driver, gusc_devclass, 0, 0);
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);

View File

@ -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);

View File

@ -750,3 +750,4 @@ DRIVER_MODULE(snd_sbc, isa, sbc_driver, sbc_devclass, 0, 0);
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);

View File

@ -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",

View File

@ -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);

View File

@ -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 code,
*pol = INTR_POLARITY_CONFORM;
}
}

View File

@ -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)
{

View File

@ -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 */

View File

@ -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

View File

@ -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 */

View File

@ -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);

View File

@ -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);

View File

@ -683,8 +683,7 @@ DRIVER_MODULE(pcib, legacy, legacy_pcib_driver, hostb_devclass, 0, 0);
* 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)

View File

@ -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 */