Skip to content

Commit

Permalink
ARM: davinci: Move clock init after ioremap.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Lechner authored and Sekhar Nori committed Apr 27, 2016
1 parent 8a9d088 commit 6fc9ebb
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mach-davinci/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
6 changes: 0 additions & 6 deletions arch/arm/mach-davinci/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-davinci/da830.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
2 changes: 2 additions & 0 deletions arch/arm/mach-davinci/da850.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
1 change: 1 addition & 0 deletions arch/arm/mach-davinci/dm355.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-davinci/dm365.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = {
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-davinci/dm644x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-davinci/dm646x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6fc9ebb

Please sign in to comment.