MLK-21828-3 clk-imx8: fix get clk rate issue
authorYe Li <ye.li@nxp.com>
Fri, 8 Mar 2019 09:29:56 +0000 (01:29 -0800)
committerYe Li <ye.li@nxp.com>
Fri, 24 May 2019 08:51:15 +0000 (01:51 -0700)
The SCFW get clock rate API only return u32, but we use a ulong to
get the value. The ulong variable is not initialized, so on stack
it higher 32 bits may not zero, and return invalid rate.

Signed-off-by: Ye Li <ye.li@nxp.com>
drivers/clk/imx/clk-imx8.c

index d03fcc2..99e0d98 100644 (file)
@@ -45,7 +45,7 @@ static struct imx8_clks imx8_clk_names[] = {
 static ulong imx8_clk_get_rate(struct clk *clk)
 {
        sc_pm_clk_t pm_clk;
-       ulong rate;
+       u32 rate;
        u16 resource;
        int ret;