Skip to content
Snippets Groups Projects
Commit f838f124 authored by Bin Meng's avatar Bin Meng Committed by Simon Glass
Browse files

timer: sandbox: Use device tree to pass the clock frequency


We should use device tree to pass the clock frequency of the timer
instead of hardcoded in the driver codes.

Signed-off-by: default avatarBin Meng <bmeng.cn@gmail.com>
Acked-by: default avatarSimon Glass <sjg@chromium.org>
parent 9e360a5c
No related branches found
No related tags found
No related merge requests found
...@@ -179,6 +179,7 @@ ...@@ -179,6 +179,7 @@
timer { timer {
compatible = "sandbox,timer"; compatible = "sandbox,timer";
clock-frequency = <1000000>;
}; };
tpm { tpm {
......
...@@ -27,10 +27,6 @@ static int sandbox_timer_get_count(struct udevice *dev, unsigned long *count) ...@@ -27,10 +27,6 @@ static int sandbox_timer_get_count(struct udevice *dev, unsigned long *count)
static int sandbox_timer_probe(struct udevice *dev) static int sandbox_timer_probe(struct udevice *dev)
{ {
struct timer_dev_priv *uc_priv = dev_get_uclass_priv(dev);
uc_priv->clock_rate = 1000000;
return 0; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment