aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Simek2017-07-12 10:32:18 +0200
committerMichal Simek2017-08-02 09:11:52 +0200
commit90a35db410ae5b6123ebdb2f6233a1f9ce8d0412 (patch)
treeccb813a9350fcb071abe0a7b2c442c1685110847
parent926870478d1fd5e8cf6a38716c9cf1ae845435e1 (diff)
arm64: zynqmp: Do not setup time if already setup
Newer psu_init_gpl.c/h contain clock setup. Detect if reference clock is active. If yes, skip timer setup. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
-rw-r--r--board/xilinx/zynqmp/zynqmp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index ecdae5e261f..a67473f344d 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -155,7 +155,10 @@ int board_early_init_r(void)
{
u32 val;
- if (current_el() == 3) {
+ val = readl(&crlapb_base->timestamp_ref_ctrl);
+ val &= ZYNQMP_CRL_APB_TIMESTAMP_REF_CTRL_CLKACT;
+
+ if (current_el() == 3 && !val) {
val = readl(&crlapb_base->timestamp_ref_ctrl);
val |= ZYNQMP_CRL_APB_TIMESTAMP_REF_CTRL_CLKACT;
writel(val, &crlapb_base->timestamp_ref_ctrl);