summaryrefslogtreecommitdiff
path: root/arch/sandbox
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-02-22 09:34:04 -0700
committerTom Rini <trini@konsulko.com>2023-03-02 17:45:58 -0500
commitdd8a29040dec1566c567e5d8c39456bd0f49e01d (patch)
treee68d6224c97ba0fd1eb641f5a041666fca48c2bd /arch/sandbox
parent05a8e1a44711263a8fd6c39267e57f3d21480a79 (diff)
downloadu-boot-dd8a29040dec1566c567e5d8c39456bd0f49e01d.tar.gz
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 'arch/sandbox')
-rw-r--r--arch/sandbox/dts/sandbox.dts2
-rw-r--r--arch/sandbox/dts/sandbox.dtsi6
-rw-r--r--arch/sandbox/include/asm/rtc.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts
index a4c1b8f6cb..e9b6745d2d 100644
--- a/arch/sandbox/dts/sandbox.dts
+++ b/arch/sandbox/dts/sandbox.dts
@@ -76,7 +76,7 @@
clock-frequency = <400000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c0>;
- bootph-all;
+ bootph-pre-ram;
};
pcic: pci@0 {
diff --git a/arch/sandbox/dts/sandbox.dtsi b/arch/sandbox/dts/sandbox.dtsi
index 1f446e62e1..30a305c4d2 100644
--- a/arch/sandbox/dts/sandbox.dtsi
+++ b/arch/sandbox/dts/sandbox.dtsi
@@ -115,7 +115,7 @@
reg = <0x43>;
compatible = "sandbox-rtc";
sandbox,emul = <&emul0>;
- bootph-all;
+ bootph-pre-ram;
};
sandbox_pmic: sandbox_pmic {
reg = <0x40>;
@@ -126,7 +126,7 @@
};
i2c_emul: emul {
- bootph-all;
+ bootph-pre-ram;
reg = <0xff>;
compatible = "sandbox,i2c-emul-parent";
emul_eeprom: emul-eeprom {
@@ -136,7 +136,7 @@
#emul-cells = <0>;
};
emul0: emul0 {
- bootph-all;
+ bootph-pre-ram;
compatible = "sandbox,i2c-rtc-emul";
#emul-cells = <0>;
};
diff --git a/arch/sandbox/include/asm/rtc.h b/arch/sandbox/include/asm/rtc.h
index 025cd6c67c..bf3ac5ea1e 100644
--- a/arch/sandbox/include/asm/rtc.h
+++ b/arch/sandbox/include/asm/rtc.h
@@ -40,7 +40,7 @@ enum {
* @reg: Register values
*/
struct sandbox_i2c_rtc_plat_data {
-#if CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_PLATDATA) && IS_ENABLED(CONFIG_RTC_SANDBOX)
struct dtd_sandbox_i2c_rtc_emul dtplat;
#endif
long base_time;