aboutsummaryrefslogtreecommitdiff
path: root/drivers/rtc
diff options
context:
space:
mode:
authorSimon Glass2023-02-22 09:34:04 -0700
committerTom Rini2023-03-02 17:45:58 -0500
commitdd8a29040dec1566c567e5d8c39456bd0f49e01d (patch)
treee68d6224c97ba0fd1eb641f5a041666fca48c2bd /drivers/rtc
parent05a8e1a44711263a8fd6c39267e57f3d21480a79 (diff)
sandbox: Tidy up RTC options
At present we enable the sandbox RTC driver for all builds. Add a separate Kconfig option to control this, so that it can be disabled in TPL, where it is not needed. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/Kconfig18
-rw-r--r--drivers/rtc/Makefile4
2 files changed, 20 insertions, 2 deletions
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 35b6ed4d7c7..fcfda2847c8 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -231,6 +231,24 @@ config RTC_M41T62
Enable driver for ST's M41T62 compatible RTC devices (like RV-4162).
It is a serial (I2C) real-time clock (RTC) with alarm.
+config RTC_SANDBOX
+ bool "Enable sandbox RTC driver"
+ depends on SANDBOX && DM_RTC
+ default y
+ help
+ Enable the sandbox RTC driver. This driver connects to the RTC
+ emulator and is used to test the RTC uclasses and associated code,
+ as well as the I2C subsystem.
+
+config SPL_RTC_SANDBOX
+ bool "Enable sandbox RTC driver (SPL)"
+ depends on SANDBOX && SPL_DM_RTC
+ default y
+ help
+ Enable the sandbox RTC driver. This driver connects to the RTC
+ emulator and is used to test the RTC uclasses and associated code,
+ as well as the I2C subsystem.
+
config RTC_STM32
bool "Enable STM32 RTC driver"
depends on DM_RTC
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 447551e15aa..b6c9029c8f0 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -16,7 +16,7 @@ obj-$(CONFIG_RTC_DS3231) += ds3231.o
obj-$(CONFIG_RTC_DS3232) += ds3232.o
obj-$(CONFIG_RTC_EMULATION) += emul_rtc.o
obj-$(CONFIG_RTC_HT1380) += ht1380.o
-obj-$(CONFIG_SANDBOX) += i2c_rtc_emul.o
+obj-$(CONFIG_$(SPL_TPL_)RTC_SANDBOX) += i2c_rtc_emul.o
obj-$(CONFIG_RTC_ISL1208) += isl1208.o
obj-$(CONFIG_RTC_M41T62) += m41t62.o
obj-$(CONFIG_RTC_MC13XXX) += mc13xxx-rtc.o
@@ -35,6 +35,6 @@ obj-$(CONFIG_RTC_RX8025) += rx8025.o
obj-$(CONFIG_RTC_RX8010SJ) += rx8010sj.o
obj-$(CONFIG_RTC_S35392A) += s35392a.o
obj-$(CONFIG_RTC_STM32) += stm32_rtc.o
-obj-$(CONFIG_SANDBOX) += sandbox_rtc.o
+obj-$(CONFIG_$(SPL_TPL_)RTC_SANDBOX) += sandbox_rtc.o
obj-$(CONFIG_RTC_ABX80X) += abx80x.o
obj-$(CONFIG_RTC_ZYNQMP) += zynqmp_rtc.o