summaryrefslogtreecommitdiffstats
path: root/arch/sandbox/dts
diff options
context:
space:
mode:
authorSean Anderson <seanga2@gmail.com>2020-09-28 10:52:23 -0400
committerAndes <uboot@andestech.com>2020-09-30 08:54:45 +0800
commit7616e3687e447b5a838f472afb5275fe6a841f5b (patch)
tree805ce147c29cffb9b0c4027a7151f596bc5960ff /arch/sandbox/dts
parent3576121687965ffe580fc44f5dd1d8e9ab434c5b (diff)
downloadu-boot-7616e3687e447b5a838f472afb5275fe6a841f5b.tar.gz
u-boot-7616e3687e447b5a838f472afb5275fe6a841f5b.tar.xz
u-boot-7616e3687e447b5a838f472afb5275fe6a841f5b.zip
timer: Add a test for timer_timebase_fallback
To test this function, sandbox CPU must set cpu_platdata.timebase_freq on bind. It also needs to expose a method to set the current cpu. I also make some most members of cpu_sandbox_ops static. On the timer side, the device tree property sandbox,timebase-frequency-fallback controls whether sandbox_timer_probe falls back to time_timebase_fallback or to SANDBOX_TIMER_RATE. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox/dts')
-rw-r--r--arch/sandbox/dts/test.dts9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index 9f45c48e4e..2f559265a5 100644
--- a/arch/sandbox/dts/test.dts
+++ b/arch/sandbox/dts/test.dts
@@ -533,7 +533,9 @@
};
cpus {
+ timebase-frequency = <2000000>;
cpu-test1 {
+ timebase-frequency = <3000000>;
compatible = "sandbox,cpu_sandbox";
u-boot,dm-pre-reloc;
};
@@ -839,11 +841,16 @@
0x58 8>;
};
- timer {
+ timer@0 {
compatible = "sandbox,timer";
clock-frequency = <1000000>;
};
+ timer@1 {
+ compatible = "sandbox,timer";
+ sandbox,timebase-frequency-fallback;
+ };
+
tpm2 {
compatible = "sandbox,tpm2";
};