From f5472a10c6fc3f0c452c514c7a23b7046e42ac55 Mon Sep 17 00:00:00 2001 From: Keith Hui Date: Sat, 2 May 2020 15:24:28 -0400 Subject: superio/winbond/w83977tf: Only list IR logical device if needed Really old versions of W83977TF Super I/O had an IR logical device, but is no longer the case. It does not exist in the newer W83977EF version, installed in some Asus P2B family boards, and served by this same code. Add a config option on the off chance we may see board with it (as if we would) and don't include this device unless it is set. Saves us from the need to declare a not-present device off and/or extraneous PNP device errors about a not-present device. Change-Id: I761ebc41f1735a03e768339a68ca139167edc095 Signed-off-by: Keith Hui Reviewed-on: https://review.coreboot.org/c/coreboot/+/41004 Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- src/superio/winbond/w83977tf/Kconfig | 6 ++++++ src/superio/winbond/w83977tf/superio.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/superio/winbond/w83977tf/Kconfig b/src/superio/winbond/w83977tf/Kconfig index d656b67884..e7f25ab1e7 100644 --- a/src/superio/winbond/w83977tf/Kconfig +++ b/src/superio/winbond/w83977tf/Kconfig @@ -4,3 +4,9 @@ config SUPERIO_WINBOND_W83977TF bool select SUPERIO_WINBOND_COMMON_PRE_RAM + +config W83977TF_HAVE_SEPARATE_IR_DEVICE + bool + help + Mainboard should select this option if it contains an old + version of W83977TF with a separate IR logical device. diff --git a/src/superio/winbond/w83977tf/superio.c b/src/superio/winbond/w83977tf/superio.c index b56bb9c325..04b26e0f60 100644 --- a/src/superio/winbond/w83977tf/superio.c +++ b/src/superio/winbond/w83977tf/superio.c @@ -37,7 +37,9 @@ static struct pnp_info pnp_dev_info[] = { { NULL, W83977TF_SP2, PNP_IO0 | PNP_IRQ0, 0x07f8, }, { NULL, W83977TF_KBC, PNP_IO0 | PNP_IO1 | PNP_IRQ0 | PNP_IRQ1, 0x07ff, 0x07ff, }, +#if CONFIG(W83977TF_HAVE_SEPARATE_IR_DEVICE) { NULL, W83977TF_CIR, PNP_IO0 | PNP_IRQ0, 0x07f8, }, +#endif { NULL, W83977TF_GAME_MIDI_GPIO1, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07ff, 0x07fe, }, { NULL, W83977TF_ACPI, PNP_IRQ0, }, -- cgit v1.2.3