]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
ARM: davinci: Move clock init after ioremap.
authorDavid Lechner <david@lechnology.com>
Thu, 14 Apr 2016 19:13:35 +0000 (14:13 -0500)
committerSekhar Nori <nsekhar@ti.com>
Wed, 27 Apr 2016 10:33:49 +0000 (16:03 +0530)
Some clocks (such as the USB PHY clocks in DA8xx) will need to use iomem.
The davinci_common_init() function must be called before the ioremap, so
the clock init is now split out as separate function.

Signed-off-by: David Lechner <david@lechnology.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
arch/arm/mach-davinci/clock.c
arch/arm/mach-davinci/common.c
arch/arm/mach-davinci/da830.c
arch/arm/mach-davinci/da850.c
arch/arm/mach-davinci/dm355.c
arch/arm/mach-davinci/dm365.c
arch/arm/mach-davinci/dm644x.c
arch/arm/mach-davinci/dm646x.c

index 34b4f9fda35d1903a9cd674061c463a6c95a36f0..df42c93a93d69e88db6e8e621271a59e36025c5f 100644 (file)
@@ -577,7 +577,7 @@ EXPORT_SYMBOL(davinci_set_pllrate);
  * than that used by default in <soc>.c file. The reference clock rate
  * should be updated early in the boot process; ideally soon after the
  * clock tree has been initialized once with the default reference clock
- * rate (davinci_common_init()).
+ * rate (davinci_clk_init()).
  *
  * Returns 0 on success, error otherwise.
  */
index f55ef2ef2f92eb88c9c7485e5bfda537af126d31..6bc8c22b8ace83e49e1f28ad048e1aac523043a3 100644 (file)
@@ -103,12 +103,6 @@ void __init davinci_common_init(struct davinci_soc_info *soc_info)
        if (ret < 0)
                goto err;
 
-       if (davinci_soc_info.cpu_clks) {
-               ret = davinci_clk_init(davinci_soc_info.cpu_clks);
-
-               if (ret != 0)
-                       goto err;
-       }
 
        return;
 
index 7187e7fc28220ed2ba592200cea3438a56f6477c..426fd747735731b80e716c192988aeb3d5b7b955 100644 (file)
@@ -1214,4 +1214,6 @@ void __init da830_init(void)
 
        da8xx_syscfg0_base = ioremap(DA8XX_SYSCFG0_BASE, SZ_4K);
        WARN(!da8xx_syscfg0_base, "Unable to map syscfg0 module");
+
+       davinci_clk_init(davinci_soc_info_da830.cpu_clks);
 }
index 97d8779a9a65d788bde6b98c342b2bae1771e35d..1f85bbca2e558b7454e040ec6f385de9efbf342d 100644 (file)
@@ -1346,4 +1346,6 @@ void __init da850_init(void)
        v = __raw_readl(DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP3_REG));
        v &= ~CFGCHIP3_PLL1_MASTER_LOCK;
        __raw_writel(v, DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP3_REG));
+
+       davinci_clk_init(davinci_soc_info_da850.cpu_clks);
 }
index a0ecf499c2f227df04749df7cf477f5ae54a15d7..5a19cca7ed6a0378b75c6043b77b2a0c3d79d156 100644 (file)
@@ -1052,6 +1052,7 @@ void __init dm355_init(void)
 {
        davinci_common_init(&davinci_soc_info_dm355);
        davinci_map_sysmod();
+       davinci_clk_init(davinci_soc_info_dm355.cpu_clks);
 }
 
 int __init dm355_init_video(struct vpfe_config *vpfe_cfg,
index 384d3674dd9b196eafcdfec54d1481a36185ff86..8aa004b02fe90f9161a0284804a4e405b02b3d9e 100644 (file)
@@ -1176,6 +1176,7 @@ void __init dm365_init(void)
 {
        davinci_common_init(&davinci_soc_info_dm365);
        davinci_map_sysmod();
+       davinci_clk_init(davinci_soc_info_dm365.cpu_clks);
 }
 
 static struct resource dm365_vpss_resources[] = {
index b4b3a8b9ca20203391eacee76bcb8aa4bcd58dd7..0afa279ec460b47c1466d877b9950cc85b115429 100644 (file)
@@ -932,6 +932,7 @@ void __init dm644x_init(void)
 {
        davinci_common_init(&davinci_soc_info_dm644x);
        davinci_map_sysmod();
+       davinci_clk_init(davinci_soc_info_dm644x.cpu_clks);
 }
 
 int __init dm644x_init_video(struct vpfe_config *vpfe_cfg,
index a43db0f5fbaa7ba33202eff406ab37a92765b48e..da21353cac450d2f8dddaa75a7291670220ba17c 100644 (file)
@@ -956,6 +956,7 @@ void __init dm646x_init(void)
 {
        davinci_common_init(&davinci_soc_info_dm646x);
        davinci_map_sysmod();
+       davinci_clk_init(davinci_soc_info_dm646x.cpu_clks);
 }
 
 static int __init dm646x_init_devices(void)