MLK-24907 imx8mp: configure GIC clk to 500M
authorPeng Fan <peng.fan@nxp.com>
Wed, 21 Oct 2020 09:12:22 +0000 (17:12 +0800)
committerYe Li <ye.li@nxp.com>
Thu, 29 Apr 2021 10:26:20 +0000 (03:26 -0700)
Following Linux, set GIC clk to 500M. If U-Boot has different settings
compared with kernel required, kernel will dump. However we could not
let kernel runtime change GIC clk parents, because it is CLK_IS_CRITICAL
and CLK_SET_PARENT_GATE, it will always fail. There is no otherway
to address the issue unless let U-Boot configure it ready.

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit b6ddbcb9dc61e8822899349fc516d06941e7efd6)
(cherry picked from commit 081c11af7ac49865f6bd0026dd8c7ca2c00394fb)

arch/arm/mach-imx/imx8m/clock_imx8mm.c

index 7020310..b84b6a3 100644 (file)
@@ -527,8 +527,10 @@ int clock_init(void)
 
 #ifdef CONFIG_IMX8MP
        /* 8MP ROM already set NOC to 800Mhz, only need to configure NOC_IO clk to 600Mhz */
-       /* 8MP ROM already set GIC to 400Mhz, system_pll1_800m with div = 2 */
        clock_set_target_val(NOC_IO_CLK_ROOT, CLK_ROOT_ON | CLK_ROOT_SOURCE_SEL(2));
+       clock_enable(CCGR_GIC, 0);
+       clock_set_target_val(GIC_CLK_ROOT, CLK_ROOT_ON | CLK_ROOT_SOURCE_SEL(5));
+       clock_enable(CCGR_GIC, 1);
 #else
        clock_set_target_val(NOC_CLK_ROOT, CLK_ROOT_ON | CLK_ROOT_SOURCE_SEL(2));