aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Lechner <david@lechnology.com>2016-04-14 15:13:35 -0400
committerSekhar Nori <nsekhar@ti.com>2016-04-27 06:33:49 -0400
commit6fc9ebbdeb75197df780c52f5ebcc3eeffb9cd91 (patch)
tree38703cfb86206cc00acef60a545f8cbc3ac1e676
parent8a9d088f66f84d7317b4adc64d3d3114f1ee8583 (diff)
ARM: davinci: Move clock init after ioremap.
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>
-rw-r--r--arch/arm/mach-davinci/clock.c2
-rw-r--r--arch/arm/mach-davinci/common.c6
-rw-r--r--arch/arm/mach-davinci/da830.c2
-rw-r--r--arch/arm/mach-davinci/da850.c2
-rw-r--r--arch/arm/mach-davinci/dm355.c1
-rw-r--r--arch/arm/mach-davinci/dm365.c1
-rw-r--r--arch/arm/mach-davinci/dm644x.c1
-rw-r--r--arch/arm/mach-davinci/dm646x.c1
8 files changed, 9 insertions, 7 deletions
diff --git a/arch/arm/mach-davinci/clock.c b/arch/arm/mach-davinci/clock.c
index 34b4f9fda35d..df42c93a93d6 100644
--- a/arch/arm/mach-davinci/clock.c
+++ b/arch/arm/mach-davinci/clock.c
@@ -577,7 +577,7 @@ EXPORT_SYMBOL(davinci_set_pllrate);
577 * than that used by default in <soc>.c file. The reference clock rate 577 * than that used by default in <soc>.c file. The reference clock rate
578 * should be updated early in the boot process; ideally soon after the 578 * should be updated early in the boot process; ideally soon after the
579 * clock tree has been initialized once with the default reference clock 579 * clock tree has been initialized once with the default reference clock
580 * rate (davinci_common_init()). 580 * rate (davinci_clk_init()).
581 * 581 *
582 * Returns 0 on success, error otherwise. 582 * Returns 0 on success, error otherwise.
583 */ 583 */
diff --git a/arch/arm/mach-davinci/common.c b/arch/arm/mach-davinci/common.c
index f55ef2ef2f92..6bc8c22b8ace 100644
--- a/arch/arm/mach-davinci/common.c
+++ b/arch/arm/mach-davinci/common.c
@@ -103,12 +103,6 @@ void __init davinci_common_init(struct davinci_soc_info *soc_info)
103 if (ret < 0) 103 if (ret < 0)
104 goto err; 104 goto err;
105 105
106 if (davinci_soc_info.cpu_clks) {
107 ret = davinci_clk_init(davinci_soc_info.cpu_clks);
108
109 if (ret != 0)
110 goto err;
111 }
112 106
113 return; 107 return;
114 108
diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c
index 7187e7fc2822..426fd7477357 100644
--- a/arch/arm/mach-davinci/da830.c
+++ b/arch/arm/mach-davinci/da830.c
@@ -1214,4 +1214,6 @@ void __init da830_init(void)
1214 1214
1215 da8xx_syscfg0_base = ioremap(DA8XX_SYSCFG0_BASE, SZ_4K); 1215 da8xx_syscfg0_base = ioremap(DA8XX_SYSCFG0_BASE, SZ_4K);
1216 WARN(!da8xx_syscfg0_base, "Unable to map syscfg0 module"); 1216 WARN(!da8xx_syscfg0_base, "Unable to map syscfg0 module");
1217
1218 davinci_clk_init(davinci_soc_info_da830.cpu_clks);
1217} 1219}
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
index 97d8779a9a65..1f85bbca2e55 100644
--- a/arch/arm/mach-davinci/da850.c
+++ b/arch/arm/mach-davinci/da850.c
@@ -1346,4 +1346,6 @@ void __init da850_init(void)
1346 v = __raw_readl(DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP3_REG)); 1346 v = __raw_readl(DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP3_REG));
1347 v &= ~CFGCHIP3_PLL1_MASTER_LOCK; 1347 v &= ~CFGCHIP3_PLL1_MASTER_LOCK;
1348 __raw_writel(v, DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP3_REG)); 1348 __raw_writel(v, DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP3_REG));
1349
1350 davinci_clk_init(davinci_soc_info_da850.cpu_clks);
1349} 1351}
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c
index a0ecf499c2f2..5a19cca7ed6a 100644
--- a/arch/arm/mach-davinci/dm355.c
+++ b/arch/arm/mach-davinci/dm355.c
@@ -1052,6 +1052,7 @@ void __init dm355_init(void)
1052{ 1052{
1053 davinci_common_init(&davinci_soc_info_dm355); 1053 davinci_common_init(&davinci_soc_info_dm355);
1054 davinci_map_sysmod(); 1054 davinci_map_sysmod();
1055 davinci_clk_init(davinci_soc_info_dm355.cpu_clks);
1055} 1056}
1056 1057
1057int __init dm355_init_video(struct vpfe_config *vpfe_cfg, 1058int __init dm355_init_video(struct vpfe_config *vpfe_cfg,
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c
index 384d3674dd9b..8aa004b02fe9 100644
--- a/arch/arm/mach-davinci/dm365.c
+++ b/arch/arm/mach-davinci/dm365.c
@@ -1176,6 +1176,7 @@ void __init dm365_init(void)
1176{ 1176{
1177 davinci_common_init(&davinci_soc_info_dm365); 1177 davinci_common_init(&davinci_soc_info_dm365);
1178 davinci_map_sysmod(); 1178 davinci_map_sysmod();
1179 davinci_clk_init(davinci_soc_info_dm365.cpu_clks);
1179} 1180}
1180 1181
1181static struct resource dm365_vpss_resources[] = { 1182static struct resource dm365_vpss_resources[] = {
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c
index b4b3a8b9ca20..0afa279ec460 100644
--- a/arch/arm/mach-davinci/dm644x.c
+++ b/arch/arm/mach-davinci/dm644x.c
@@ -932,6 +932,7 @@ void __init dm644x_init(void)
932{ 932{
933 davinci_common_init(&davinci_soc_info_dm644x); 933 davinci_common_init(&davinci_soc_info_dm644x);
934 davinci_map_sysmod(); 934 davinci_map_sysmod();
935 davinci_clk_init(davinci_soc_info_dm644x.cpu_clks);
935} 936}
936 937
937int __init dm644x_init_video(struct vpfe_config *vpfe_cfg, 938int __init dm644x_init_video(struct vpfe_config *vpfe_cfg,
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c
index a43db0f5fbaa..da21353cac45 100644
--- a/arch/arm/mach-davinci/dm646x.c
+++ b/arch/arm/mach-davinci/dm646x.c
@@ -956,6 +956,7 @@ void __init dm646x_init(void)
956{ 956{
957 davinci_common_init(&davinci_soc_info_dm646x); 957 davinci_common_init(&davinci_soc_info_dm646x);
958 davinci_map_sysmod(); 958 davinci_map_sysmod();
959 davinci_clk_init(davinci_soc_info_dm646x.cpu_clks);
959} 960}
960 961
961static int __init dm646x_init_devices(void) 962static int __init dm646x_init_devices(void)