Commit b987c4b2 authored by Sekhar Nori's avatar Sekhar Nori Committed by Kevin Hilman

davinci: am18x/da850/omap-l138: keep async clock constant with cpufreq

Keep PLL0 SYSCLK3 at a constant rate of 100MHz. This enables the AEMIF
timing to remain valid even as the PLL0 output is changed by cpufreq
driver to save power.
Signed-off-by: default avatarSekhar Nori <nsekhar@ti.com>
Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
parent 30a2c5d2
...@@ -787,7 +787,7 @@ static __init void da850_evm_init(void) ...@@ -787,7 +787,7 @@ static __init void da850_evm_init(void)
if (ret) if (ret)
pr_warning("da850_evm_init: rtc setup failed: %d\n", ret); pr_warning("da850_evm_init: rtc setup failed: %d\n", ret);
ret = da850_register_cpufreq(); ret = da850_register_cpufreq("pll0_sysclk3");
if (ret) if (ret)
pr_warning("da850_evm_init: cpufreq registration failed: %d\n", pr_warning("da850_evm_init: cpufreq registration failed: %d\n",
ret); ret);
......
...@@ -86,6 +86,8 @@ static struct clk pll0_sysclk3 = { ...@@ -86,6 +86,8 @@ static struct clk pll0_sysclk3 = {
.parent = &pll0_clk, .parent = &pll0_clk,
.flags = CLK_PLL, .flags = CLK_PLL,
.div_reg = PLLDIV3, .div_reg = PLLDIV3,
.set_rate = davinci_set_sysclk_rate,
.maxrate = 100000000,
}; };
static struct clk pll0_sysclk4 = { static struct clk pll0_sysclk4 = {
...@@ -929,10 +931,16 @@ static struct platform_device da850_cpufreq_device = { ...@@ -929,10 +931,16 @@ static struct platform_device da850_cpufreq_device = {
.dev = { .dev = {
.platform_data = &cpufreq_info, .platform_data = &cpufreq_info,
}, },
.id = -1,
}; };
int __init da850_register_cpufreq(void) int __init da850_register_cpufreq(char *async_clk)
{ {
/* cpufreq driver can help keep an "async" clock constant */
if (async_clk)
clk_add_alias("async", da850_cpufreq_device.name,
async_clk, NULL);
return platform_device_register(&da850_cpufreq_device); return platform_device_register(&da850_cpufreq_device);
} }
......
...@@ -78,7 +78,7 @@ int da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata); ...@@ -78,7 +78,7 @@ int da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata);
int da8xx_register_mmcsd0(struct davinci_mmc_config *config); int da8xx_register_mmcsd0(struct davinci_mmc_config *config);
void __init da8xx_register_mcasp(int id, struct snd_platform_data *pdata); void __init da8xx_register_mcasp(int id, struct snd_platform_data *pdata);
int da8xx_register_rtc(void); int da8xx_register_rtc(void);
int da850_register_cpufreq(void); int da850_register_cpufreq(char *async_clk);
int da8xx_register_cpuidle(void); int da8xx_register_cpuidle(void);
void __iomem * __init da8xx_get_mem_ctlr(void); void __iomem * __init da8xx_get_mem_ctlr(void);
int da850_register_pm(struct platform_device *pdev); int da850_register_pm(struct platform_device *pdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment