ipq8084: provide monotonic us timer
This service is required by various coreboot code modules. It looks
like the 8064 SOC does not provide anything better than a 32 KHz free
running counter (it is used in u-boot for us timer as well). Let's use
this for now.
BUG=chrome-os-partner:27784
TEST=manual
. with the rest of the patches applied AP148 boots all the way to
trying to start the payload.
Change-Id: I98b91ce179f7388d59c769a59caf49ca7640e047
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/197896
This commit is contained in:
parent
73d72df228
commit
d526830f9d
1 changed files with 5 additions and 0 deletions
|
|
@ -76,6 +76,11 @@ void udelay(unsigned usec)
|
|||
} while (runcount < val);
|
||||
}
|
||||
|
||||
void timer_monotonic_get(struct mono_time *mt)
|
||||
{
|
||||
mono_time_set_usecs(mt, (readl(GPT_COUNT_VAL) * 1000) / GPT_FREQ_KHZ);
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue