[PATCH v2 1/1] rtc: CONFIGS_RTC_PL031 must depend on CONFIGS_DM_RTC

Building qemu_arm64_defconfig with CONFIGS_DM_RTC=n and CONFIGS_RTC_PL031=y leads to a build failure.
Adjust the vexpress64 configuration to avoid circular dependency.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com --- v2: Adjust the vexpress64 configuration to avoid circular dependency. --- board/armltd/vexpress64/Kconfig | 2 +- drivers/rtc/Kconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/board/armltd/vexpress64/Kconfig b/board/armltd/vexpress64/Kconfig index cf998096e45..584b5455e97 100644 --- a/board/armltd/vexpress64/Kconfig +++ b/board/armltd/vexpress64/Kconfig @@ -16,8 +16,8 @@ config VEXPRESS64_BASE_MODEL select VIRTIO_BLK if VIRTIO_MMIO select VIRTIO_NET if VIRTIO_MMIO select DM_ETH if VIRTIO_NET + imply DM_RTC imply RTC_PL031 - select DM_RTC if RTC_PL031 imply EFI_SET_TIME if DM_RTC select LINUX_KERNEL_IMAGE_HEADER select POSITION_INDEPENDENT diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 7fc53a6d61e..9c2d1398247 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -203,6 +203,7 @@ config RTC_RX8025
config RTC_PL031 bool "Enable ARM AMBA PL031 RTC driver" + depends on DM_RTC help The ARM PrimeCell Real Time Clock (PL031) is an optional SoC peripheral based on the Advanced Microcontroller Bus Architecture

Building qemu_arm64_defconfig with CONFIGS_DM_RTC=n and CONFIGS_RTC_PL031=y leads to a build failure.
Adjust the vexpress64 configuration to avoid circular dependency.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com --- v2: Adjust the vexpress64 configuration to avoid circular dependency. --- board/armltd/vexpress64/Kconfig | 2 +- drivers/rtc/Kconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/board/armltd/vexpress64/Kconfig b/board/armltd/vexpress64/Kconfig index cf998096e45..584b5455e97 100644 --- a/board/armltd/vexpress64/Kconfig +++ b/board/armltd/vexpress64/Kconfig @@ -16,8 +16,8 @@ config VEXPRESS64_BASE_MODEL select VIRTIO_BLK if VIRTIO_MMIO select VIRTIO_NET if VIRTIO_MMIO select DM_ETH if VIRTIO_NET + imply DM_RTC imply RTC_PL031 - select DM_RTC if RTC_PL031 imply EFI_SET_TIME if DM_RTC select LINUX_KERNEL_IMAGE_HEADER select POSITION_INDEPENDENT diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 7fc53a6d61e..9c2d1398247 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -203,6 +203,7 @@ config RTC_RX8025
config RTC_PL031 bool "Enable ARM AMBA PL031 RTC driver" + depends on DM_RTC help The ARM PrimeCell Real Time Clock (PL031) is an optional SoC peripheral based on the Advanced Microcontroller Bus Architecture

On Thu, Dec 5, 2024 at 9:36 PM Heinrich Schuchardt heinrich.schuchardt@canonical.com wrote:
Building qemu_arm64_defconfig with CONFIGS_DM_RTC=n and CONFIGS_RTC_PL031=y leads to a build failure.
Adjust the vexpress64 configuration to avoid circular dependency.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
v2: Adjust the vexpress64 configuration to avoid circular dependency.
imply DM_RTC imply RTC_PL031
select DM_RTC if RTC_PL031
Should it not be: imply RTC_PL031 if DM_RTC
(The dependency in the driver will fix it I guess.)
The way we are using imply in U-Boot is a bit worrisome but I'm no expert. It may work better in our case because we never have an option be "m" (module) as in Linux... This works for sure.
Yours, Linus Walleij

On Tue, Dec 17, 2024 at 03:03:57PM +0100, Linus Walleij wrote:
On Thu, Dec 5, 2024 at 9:36 PM Heinrich Schuchardt heinrich.schuchardt@canonical.com wrote:
Building qemu_arm64_defconfig with CONFIGS_DM_RTC=n and CONFIGS_RTC_PL031=y leads to a build failure.
Adjust the vexpress64 configuration to avoid circular dependency.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
v2: Adjust the vexpress64 configuration to avoid circular dependency.
imply DM_RTC imply RTC_PL031
select DM_RTC if RTC_PL031
Should it not be: imply RTC_PL031 if DM_RTC
(The dependency in the driver will fix it I guess.)
The way we are using imply in U-Boot is a bit worrisome but I'm no expert. It may work better in our case because we never have an option be "m" (module) as in Linux... This works for sure.
In this case, DM_RTC (and most DT_xxx symbols) are library functions. In this case, RTC_PL031 already correctly depends on DM_RTC. So we imply DM_RTC here so that we can then also imply RTC_PL031.
participants (3)
-
Heinrich Schuchardt
-
Linus Walleij
-
Tom Rini