Skip to contentSkip to conversation

watchdog: iTCO: fix link error

PATCH In review Arnd Bergmann 4 participants 4 messages Apr 28, 2020 – Apr 29, 2020 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 watchdog: iTCO: fix link error

When the MFD driver is a loadable module, the watchdog driver fails to get linked into the kernel:

drivers/watchdog/iTCO_wdt.o: In function `update_no_reboot_bit_pmc':
iTCO_wdt.c:(.text+0x54f): undefined reference to `intel_pmc_gcr_update'

The code is written to support operation without the MFD driver, so add a Kconfig dependency that allows this, while disallowing the watchdog to be built-in when the MFD driver is a module.

Fixes 25f1ca31e230 ("platform/x86: intel_pmc_ipc: Convert to MFD")
---
 drivers/watchdog/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/watchdog/Kconfig +1 -0
index 66ca69f30f01..67a83578810e 100644
@@ -1217,6 +1217,7 @@ config ITCO_WDT
 	depends on (X86 || IA64) && PCI
 	select WATCHDOG_CORE
 	depends on I2C || I2C=n
+	depends on MFD_INTEL_PMC_BXT || !MFD_INTEL_PMC_BXT
 	select LPC_ICH if !EXPERT
 	select I2C_I801 if !EXPERT && I2C
 	---help---
Signature · 1 line
2.26.0
#1 lore raw
Quoted 22 lines · Arnd Bergmann

When the MFD driver is a loadable module, the watchdog driver fails to get linked into the kernel:

drivers/watchdog/iTCO_wdt.o: In function `update_no_reboot_bit_pmc':
iTCO_wdt.c:(.text+0x54f): undefined reference to `intel_pmc_gcr_update'

The code is written to support operation without the MFD driver, so add a Kconfig dependency that allows this, while disallowing the watchdog to be built-in when the MFD driver is a module.

Fixes 25f1ca31e230 ("platform/x86: intel_pmc_ipc: Convert to MFD")
---
 drivers/watchdog/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/watchdog/Kconfig +0 -0
index 66ca69f30f01..67a83578810e 100644

drivers/watchdog/Kconfig config ITCO_WDT · line 1220

Quoted 4 lines
drivers/watchdog/Kconfig +1 -0
@@ -1217,6 +1217,7 @@ config ITCO_WDT
        depends on (X86 || IA64) && PCI
        select WATCHDOG_CORE
        depends on I2C || I2C=n
+       depends on MFD_INTEL_PMC_BXT || !MFD_INTEL_PMC_BXT

Can we use same format as for I2C?

Quoted 6 lines
drivers/watchdog/Kconfig +0 -1
        select LPC_ICH if !EXPERT
        select I2C_I801 if !EXPERT && I2C
        ---help---
--

2.26.0

Signature · 2 lines
With Best Regards,
Andy Shevchenko
maintainer Acked-by on v1 1/1
#2 lore raw
In reply to Arnd Bergmann
Quoted 6 lines · Arnd Bergmann

When the MFD driver is a loadable module, the watchdog driver fails to get linked into the kernel:

drivers/watchdog/iTCO_wdt.o: In function `update_no_reboot_bit_pmc':
iTCO_wdt.c:(.text+0x54f): undefined reference to `intel_pmc_gcr_update'

Quoted 6 lines

The code is written to support operation without the MFD driver, so add a Kconfig dependency that allows this, while disallowing the watchdog to be built-in when the MFD driver is a module.

Fixes 25f1ca31e230 ("platform/x86: intel_pmc_ipc: Convert to MFD")
Quoted 17 lines
---
 drivers/watchdog/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/watchdog/Kconfig +1 -0
index 66ca69f30f01..67a83578810e 100644
@@ -1217,6 +1217,7 @@ config ITCO_WDT
 	depends on (X86 || IA64) && PCI
 	select WATCHDOG_CORE
 	depends on I2C || I2C=n
+	depends on MFD_INTEL_PMC_BXT || !MFD_INTEL_PMC_BXT
 	select LPC_ICH if !EXPERT
 	select I2C_I801 if !EXPERT && I2C
 	---help---
Reviewed-by on v1 1/1
#3 lore raw
In reply to Arnd Bergmann
Quoted 6 lines · Arnd Bergmann

When the MFD driver is a loadable module, the watchdog driver fails to get linked into the kernel:

drivers/watchdog/iTCO_wdt.o: In function `update_no_reboot_bit_pmc':
iTCO_wdt.c:(.text+0x54f): undefined reference to `intel_pmc_gcr_update'

Quoted 6 lines

The code is written to support operation without the MFD driver, so add a Kconfig dependency that allows this, while disallowing the watchdog to be built-in when the MFD driver is a module.

Fixes 25f1ca31e230 ("platform/x86: intel_pmc_ipc: Convert to MFD")