]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm64: zynqmp: Do not setup time if already setup
authorMichal Simek <michal.simek@xilinx.com>
Wed, 12 Jul 2017 08:32:18 +0000 (10:32 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 2 Aug 2017 07:11:52 +0000 (09:11 +0200)
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>
board/xilinx/zynqmp/zynqmp.c

index ecdae5e261f635b6fba2b68c22c7554d41a1c18e..a67473f344de3da583fe1c0e8705f40893d99445 100644 (file)
@@ -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);