mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-28 01:51:33 +00:00
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: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
9e360a5c9c
commit
f838f12452
2 changed files with 1 additions and 4 deletions
|
@ -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)
|
||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue