Skip to contentSkip to conversation

rtc: Tighten some rtc driver dependencies

PATCH New Tom Rini 3 participants 19 messages Aug 4, 2025 – Oct 29, 2025

Subsystems (4)
lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/3 rtc: Tighten some rtc driver dependencies

The Marvell RTC rtc driver cannot build without access to some platform specific header files. Express that requirements in Kconfig as well.

---
 drivers/rtc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/Kconfig +1 -1
index 79b879d68d1b..ed903999f067 100644
@@ -218,7 +218,7 @@ config RTC_PL031
 
 config RTC_MV
 	bool "Enable Marvell RTC driver"
-	depends on DM_RTC
+	depends on DM_RTC && ARCH_KIRKWOOD
 	help
 	  Enable Marvell RTC driver. This driver supports the rtc that is present
 	  on some Marvell SoCs.
Signature · 1 line
2.43.0
author
#1 lore raw

PATCH 2/3 rtc: mc146818: Fix building on more architectures

This driver makes calls to in8/out8(). On PowerPC these are separate and real calls but elsewhere they are able to simply be wrappers to inb/outb. Rework this logic to be able to build this driver on more platforms.

---
 drivers/rtc/mc146818.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/rtc/mc146818.c +2 -2
index c0d86c6d063d..08bc528aeaf7 100644
@@ -11,9 +11,9 @@
 #include <command.h>
 #include <dm.h>
 #include <rtc.h>
-
-#if defined(CONFIG_X86) || defined(CONFIG_TARGET_MALTA)
 #include <asm/io.h>
+
+#if !defined(CONFIG_PPC)
 #define in8(p) inb(p)
 #define out8(p, v) outb(v, p)
 #endif
Signature · 1 line
2.43.0
author
#2 lore raw

PATCH 1/2 serial: Tighten some serial driver dependencies

In reply to Tom Rini

A few serial drivers cannot build without access to some platform specific header files. Express those requirements in Kconfig as well.

---
 drivers/serial/Kconfig | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
drivers/serial/Kconfig +9 -5
index 1f2f2468eb0b..d7d59e02dd0a 100644
@@ -665,6 +665,7 @@ config ARM_DCC
 
 config ATMEL_USART
 	bool "Atmel USART support"
+	depends on ARCH_AT91
 	help
 	  Select this to enable USART support for Atmel SoCs. It can be
 	  configured in the device tree, and input clock frequency can
@@ -703,8 +704,8 @@ config BCM6345_SERIAL
 
 config COREBOOT_SERIAL
 	bool "Coreboot UART support"
-	depends on DM_SERIAL
-	default y if SYS_COREBOOT
+	depends on DM_SERIAL && SYS_COREBOOT
+	default y
 	select SYS_NS16550
 	help
 	  Select this to enable a ns16550-style UART where the platform data
@@ -724,7 +725,7 @@ config COREBOOT_SERIAL_FROM_DBG2
 
 config CORTINA_UART
 	bool "Cortina UART support"
-	depends on DM_SERIAL
+	depends on DM_SERIAL && TARGET_PRESIDIO_ASIC
 	help
 	  Select this to enable UART support for Cortina-Access UART devices
 	  found on CAxxxx SoCs.
@@ -738,6 +739,7 @@ config FSL_LINFLEXUART
 
 config FSL_LPUART
 	bool "Freescale LPUART support"
+	depends on MACH_IMX || ARCH_LS1021A || ARCH_LS1028A
 	help
 	  Select this to enable a Low Power UART for Freescale VF610 and
 	  QorIQ Layerscape devices.
@@ -748,12 +750,14 @@ config LPUART
 
 config MVEBU_A3700_UART
 	bool "UART support for Armada 3700"
+	depends on ARCH_MVEBU
 	help
 	  Choose this option to add support for UART driver on the Marvell
 	  Armada 3700 SoC. The base address is configured via DT.
 
 config MCFUART
 	bool "Freescale ColdFire UART support"
+	depends on M68K
         help
           Choose this option to add support for UART driver on the ColdFire
           SoC's family. The serial communication channel provides a full-duplex
@@ -879,7 +883,7 @@ config PL01X_SERIAL
 
 config ROCKCHIP_SERIAL
 	bool "Rockchip on-chip UART support"
-	depends on DM_SERIAL
+	depends on DM_SERIAL && ARCH_ROCKCHIP
 	select SYS_NS16550
 	help
 	  Select this to enable a debug UART for Rockchip devices when using
@@ -1110,7 +1114,7 @@ config MTK_SERIAL
 
 config MT7620_SERIAL
 	bool "UART driver for MediaTek MT7620 and earlier SoCs"
-	depends on DM_SERIAL
+	depends on DM_SERIAL && SOC_MT7620
 	help
 	  Select this to enable UART support for MediaTek MT7620 and earlier
 	  SoCs. This driver uses driver model and requires a device tree
Signature · 1 line
2.43.0
author
#3 lore raw

PATCH 1/1 soc: Tighten some soc driver dependencies

In reply to Tom Rini

The Qualcomm Snapdragon "SoC" driver cannot build without access to some ARM64 specific functionality. Express that requirements in Kconfig as well.

---
Cc: Casey Connolly <[email protected]>

---
 drivers/soc/qcom/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/soc/qcom/Kconfig +1 -0
index 4aa7833930c7..8243805e46a3 100644
@@ -4,6 +4,7 @@
 #
 menuconfig SOC_QCOM
 	bool "Qualcomm SOC drivers support"
+	depends on ARM64
 	help
 	  Say Y here if you want to enable Qualcomm SOC drivers support.
 
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#4 lore raw

Re: [PATCH] soc: Tighten some soc driver dependencies

Quoted 5 lines · Tom Rini

The Qualcomm Snapdragon "SoC" driver cannot build without access to some ARM64 specific functionality. Express that requirements in Kconfig as well.

Quoted 18 lines

---
Cc: Casey Connolly <[email protected]>

---
 drivers/soc/qcom/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/soc/qcom/Kconfig +1 -0
index 4aa7833930c7..8243805e46a3 100644
@@ -4,6 +4,7 @@
 #
 menuconfig SOC_QCOM
 	bool "Qualcomm SOC drivers support"
+	depends on ARM64
 	help
 	  Say Y here if you want to enable Qualcomm SOC drivers support.
 
Signature · 1 line
// Casey (she/her)
author
#5 lore raw

Re: [PATCH] soc: Tighten some soc driver dependencies

In reply to Tom Rini
Quoted 5 lines · Tom Rini

The Qualcomm Snapdragon "SoC" driver cannot build without access to some ARM64 specific functionality. Express that requirements in Kconfig as well.

Applied to u-boot/next, thanks!

[1/1] soc: Tighten some soc driver dependencies

      commit: 01bc65a0e9b2e0bac7af28bf102ee0df4f98b205
Signature · 1 line
Tom
author
#6 lore raw

PATCH 1/2 spi: Tighten some spi driver dependencies

In reply to Tom Rini

A few spi drivers cannot build without access to some platform specific header files. Express those requirements in Kconfig as well.

---
Cc: Jagan Teki <[email protected]>

---
 drivers/spi/Kconfig | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/spi/Kconfig +4 -1
index 1ae36b5a348b..243d93faee32 100644
@@ -452,6 +452,7 @@ config ROCKCHIP_SFC
 
 config ROCKCHIP_SPI
 	bool "Rockchip SPI driver"
+	depends on ARCH_ROCKCHIP
 	help
 	  Enable the Rockchip SPI driver, used to access SPI NOR flash and
 	  other SPI peripherals (such as the Chrome OS EC) on Rockchip SoCs.
@@ -495,7 +496,7 @@ config SANDBOX_SPI_MAX_CS
 
 config SPI_ASPEED_SMC
 	bool "ASPEED SPI flash controller driver"
-	depends on DM_SPI && SPI_MEM
+	depends on DM_SPI && SPI_MEM && ARCH_ASPEED
 	help
 	  Enable ASPEED SPI flash controller driver for AST2500
 	  and AST2600 SoCs.
@@ -614,6 +615,7 @@ config ZYNQ_SPI
 
 config ZYNQ_QSPI
 	bool "Zynq QSPI driver"
+	depends on ARCH_VERSAL || ARCH_VERSAL_NET || ARCH_VERSAL2 || ARCH_ZYNQ || ARCH_ZYNQMP
 	imply SPI_FLASH_BAR
 	help
 	  Enable the Zynq Quad-SPI (QSPI) driver. This driver can be
@@ -623,6 +625,7 @@ config ZYNQ_QSPI
 
 config ZYNQMP_GQSPI
 	bool "Configure ZynqMP Generic QSPI"
+	depends on ARCH_VERSAL || ARCH_VERSAL_NET || ARCH_VERSAL2 || ARCH_ZYNQ || ARCH_ZYNQMP
 	help
 	  This option is used to enable ZynqMP QSPI controller driver which
 	  is used to communicate with qspi flash devices.
Signature · 1 line
2.43.0
author
#7 lore raw

Re: [PATCH 1/2] spi: Tighten some spi driver dependencies

Quoted 4 lines · Tom Rini

A few spi drivers cannot build without access to some platform specific header files. Express those requirements in Kconfig as well.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
author
#8 lore raw

PATCH 2/2 spi: altera_spi: Add missing <time.h> to altera_spi.c

In reply to Tom Rini

This driver references the get_timer macro while relying on an indirection inclusion of <time.h>. Add the missing include directly.

---
Cc: Jagan Teki <[email protected]>

---
 drivers/spi/altera_spi.c | 1 +
 1 file changed, 1 insertion(+)
drivers/spi/altera_spi.c +1 -0
index dafaf1130bb3..a75d861bda48 100644
@@ -12,6 +12,7 @@
 #include <malloc.h>
 #include <fdtdec.h>
 #include <spi.h>
+#include <time.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
 
Signature · 1 line
2.43.0
author
#9 lore raw

Re: [PATCH 2/2] spi: altera_spi: Add missing <time.h> to altera_spi.c

Quoted 4 lines · Tom Rini

This driver references the get_timer macro while relying on an indirection inclusion of <time.h>. Add the missing include directly.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
author
#10 lore raw

PATCH 3/3 rtc: pl031: Correct function type of pl031_write_reg

In reply to Tom Rini

When calling writel we do not have a return value to check or pass along. This function should therefore be void and not return what writel gives us.

---
 drivers/rtc/pl031.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/rtc/pl031.c +2 -2
index 855ee9134168..6f189bc503ef 100644
@@ -39,11 +39,11 @@ static inline u32 pl031_read_reg(struct udevice *dev, int reg)
 	return readl(pdata->base + reg);
 }
 
-static inline u32 pl031_write_reg(struct udevice *dev, int reg, u32 value)
+static inline void pl031_write_reg(struct udevice *dev, int reg, u32 value)
 {
 	struct pl031_plat *pdata = dev_get_plat(dev);
 
-	return writel(value, pdata->base + reg);
+	writel(value, pdata->base + reg);
 }
 
 /*
Signature · 1 line
2.43.0
author
#11 lore raw

PATCH 2/2 serial: linflexuart: Remove unused driver

In reply to Tom Rini

This driver is unused. Remove it.

---
 drivers/serial/Kconfig              |   7 -
 drivers/serial/Makefile             |   1 -
 drivers/serial/serial_linflexuart.c | 216 ----------------------------
 3 files changed, 224 deletions(-)
 delete mode 100644 drivers/serial/serial_linflexuart.c
drivers/serial/Kconfig +0 -7
index d7d59e02dd0a..bc05d2f15085 100644
@@ -730,13 +730,6 @@ config CORTINA_UART
 	  Select this to enable UART support for Cortina-Access UART devices
 	  found on CAxxxx SoCs.
 
-config FSL_LINFLEXUART
-	bool "Freescale Linflex UART support"
-	depends on DM_SERIAL
-	help
-	  Select this to enable the Linflex serial module found on some
-	  NXP SoCs like S32V234.
-
 config FSL_LPUART
 	bool "Freescale LPUART support"
 	depends on MACH_IMX || ARCH_LS1021A || ARCH_LS1028A
drivers/serial/Makefile +0 -1
index c32e3fcd439b..8eaae62b0fc4 100644
@@ -36,7 +36,6 @@ obj-$(CONFIG_SCIF_CONSOLE) += serial_sh.o
 obj-$(CONFIG_SEMIHOSTING_SERIAL) += serial_semihosting.o
 obj-$(CONFIG_ZYNQ_SERIAL) += serial_zynq.o
 obj-$(CONFIG_FSL_LPUART) += serial_lpuart.o
-obj-$(CONFIG_FSL_LINFLEXUART) += serial_linflexuart.o
 obj-$(CONFIG_ARC_SERIAL) += serial_arc.o
 obj-$(CONFIG_UNIPHIER_SERIAL) += serial_uniphier.o
 obj-$(CONFIG_STM32_SERIAL) += serial_stm32.o
drivers/serial/serial_linflexuart.c deleted +0 -216

216 lines not on this page · raw message

Signature · 1 line
2.43.0
author
#12 lore raw

PATCH 1/1 sysreset: Tighten some sysreset driver dependencies

In reply to Tom Rini

The MPC83xx sysreset driver cannot build without access to some architecture specific header files. Express that requirements in Kconfig as well.

---
 drivers/sysreset/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/sysreset/Kconfig +1 -0
index 67edf004205c..0181f6cd5819 100644
@@ -283,6 +283,7 @@ config SYSRESET_TPL_X86
 
 config SYSRESET_MPC83XX
 	bool "Enable support MPC83xx SoC family reboot driver"
+	depends on PPC
 	help
 	  Reboot support for NXP MPC83xx SoCs.
 
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#13 lore raw

Re: [PATCH] sysreset: Tighten some sysreset driver dependencies

Quoted 6 lines · Tom Rini

The MPC83xx sysreset driver cannot build without access to some architecture specific header files. Express that requirements in Kconfig as well.

Quoted 19 lines
---
 drivers/sysreset/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/sysreset/Kconfig +1 -1
index 67edf004205c..0181f6cd5819 100644
@@ -283,6 +283,7 @@ config SYSRESET_TPL_X86
 
 config SYSRESET_MPC83XX
        bool "Enable support MPC83xx SoC family reboot driver"
+       depends on PPC
        help
          Reboot support for NXP MPC83xx SoCs.
 
--

2.43.0

author
#14 lore raw

Re: [PATCH] sysreset: Tighten some sysreset driver dependencies

In reply to Tom Rini
Quoted 5 lines · Tom Rini

The MPC83xx sysreset driver cannot build without access to some architecture specific header files. Express that requirements in Kconfig as well.

Applied to u-boot/next, thanks!

[1/1] sysreset: Tighten some sysreset driver dependencies

      commit: 38931172edd71c27101ac19361819d945ae337d8
Signature · 1 line
Tom
author
#15 lore raw

Re: (subset) [PATCH] sysreset: Tighten some sysreset driver dependencies

In reply to Tom Rini
Quoted 5 lines · Tom Rini

The MPC83xx sysreset driver cannot build without access to some architecture specific header files. Express that requirements in Kconfig as well.

Applied to u-boot/master, thanks!

[1/1] sysreset: Tighten some sysreset driver dependencies
(no commit info)

Signature · 1 line
Tom
author
#16 lore raw

PATCH 1/1 sound: Tighten some sound driver dependencies

In reply to Tom Rini

A few sound drivers cannot build without access to some platform specific header files. Express those requirements in Kconfig as well.

---
 drivers/sound/Kconfig | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/sound/Kconfig +4 -4
index 0948d8caab06..81de9b30f397 100644
@@ -23,7 +23,7 @@ config I2S
 
 config I2S_ROCKCHIP
 	bool "Enable I2S support for Rockchip SoCs"
-	depends on I2S
+	depends on I2S && ARCH_ROCKCHIP
 	help
 	  Rockchip SoCs support an I2S interface for sending audio data to an
 	  audio codec. This option enables support for this, using one of the
@@ -32,7 +32,7 @@ config I2S_ROCKCHIP
 
 config I2S_SAMSUNG
 	bool "Enable I2C support for Samsung SoCs"
-	depends on I2S
+	depends on I2S && ARCH_EXYNOS
 	help
 	  Samsung Exynos SoCs support an I2S interface for sending audio
 	  data to an audio codec. This option enables support for this,
@@ -51,7 +51,7 @@ config SOUND_DA7219
 
 config SOUND_I8254
 	bool "Intel i8254 timer / beeper"
-	depends on SOUND
+	depends on SOUND && X86
 	help
 	  This enables support for a beeper that uses the i8254 timer chip.
 	  This can emit beeps at a fixed frequency. It is possible to control
@@ -82,7 +82,7 @@ config SOUND_IVYBRIDGE
 
 config I2S_TEGRA
 	bool "Enable I2S support for Nvidia Tegra SoCs"
-	depends on I2S
+	depends on I2S && ARCH_TEGRA
 	select TEGRA124_DMA
 	help
 	  Nvidia Tegra SoCs support several I2S interfaces for sending audio
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#17 lore raw

Re: [PATCH] sound: Tighten some sound driver dependencies

Quoted 5 lines · Tom Rini

A few sound drivers cannot build without access to some platform specific header files. Express those requirements in Kconfig as well.

Quoted 47 lines
---
 drivers/sound/Kconfig | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/sound/Kconfig +4 -5
index 0948d8caab06..81de9b30f397 100644
@@ -23,7 +23,7 @@ config I2S
 
 config I2S_ROCKCHIP
        bool "Enable I2S support for Rockchip SoCs"
-       depends on I2S
+       depends on I2S && ARCH_ROCKCHIP
        help
          Rockchip SoCs support an I2S interface for sending audio data to an
          audio codec. This option enables support for this, using one of the
@@ -32,7 +32,7 @@ config I2S_ROCKCHIP
 
 config I2S_SAMSUNG
        bool "Enable I2C support for Samsung SoCs"
-       depends on I2S
+       depends on I2S && ARCH_EXYNOS
        help
          Samsung Exynos SoCs support an I2S interface for sending audio
          data to an audio codec. This option enables support for this,
@@ -51,7 +51,7 @@ config SOUND_DA7219
 
 config SOUND_I8254
        bool "Intel i8254 timer / beeper"
-       depends on SOUND
+       depends on SOUND && X86
        help
          This enables support for a beeper that uses the i8254 timer chip.
          This can emit beeps at a fixed frequency. It is possible to control
@@ -82,7 +82,7 @@ config SOUND_IVYBRIDGE
 
 config I2S_TEGRA
        bool "Enable I2S support for Nvidia Tegra SoCs"
-       depends on I2S
+       depends on I2S && ARCH_TEGRA
        select TEGRA124_DMA
        help
          Nvidia Tegra SoCs support several I2S interfaces for sending audio
--

2.43.0

author
#18 lore raw

Re: [PATCH] sound: Tighten some sound driver dependencies

In reply to Tom Rini
Quoted 4 lines · Tom Rini

A few sound drivers cannot build without access to some platform specific header files. Express those requirements in Kconfig as well.

Applied to u-boot/next, thanks!

[1/1] sound: Tighten some sound driver dependencies

      commit: 8b0eac68e5cb7b5bc55a4955672159c337f6afa2
Signature · 1 line
Tom