diff options
author | Lad, Prabhakar <prabhakar.csengg@gmail.com> | 2013-03-22 03:53:12 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-04-14 19:08:09 -0400 |
commit | 9a3e89b10f5e48c0d8cca7896c02bf4d76d0ae46 (patch) | |
tree | 2b1d3c265b377a87f2fd89945333936e733f0e96 /arch/arm/mach-davinci/dm365.c | |
parent | 407ccc65bfd2899ed008c4f8900f23ac15f75f9f (diff) |
[media] media: davinci: vpss: enable vpss clocks
By default the VPSS clocks were enabled in capture driver
for davinci family which creates duplicates for dm355/dm365/dm644x.
This patch adds support to enable the VPSS clocks in VPSS driver,
which avoids duplication of code and also adding clock aliases.
This patch uses PM runtime API to enable/disable clock, instead
of DaVinci clock framework. con_ids for master and slave clocks of
vpss is added in pm_domain.
This patch cleanups the VPSS clock enabling in the capture driver,
and also removes the clock alias in machine file. Along side adds
a vpss slave clock for DM365 as mentioned by Sekhar
(https://patchwork.kernel.org/patch/1221261/).
The Suspend/Resume in dm644x_ccdc.c which enabled/disabled the VPSS clock
is now implemented as part of the VPSS driver.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'arch/arm/mach-davinci/dm365.c')
-rw-r--r-- | arch/arm/mach-davinci/dm365.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c index 6c3980540be0..c61dd94daadc 100644 --- a/arch/arm/mach-davinci/dm365.c +++ b/arch/arm/mach-davinci/dm365.c | |||
@@ -257,6 +257,12 @@ static struct clk vpss_master_clk = { | |||
257 | .flags = CLK_PSC, | 257 | .flags = CLK_PSC, |
258 | }; | 258 | }; |
259 | 259 | ||
260 | static struct clk vpss_slave_clk = { | ||
261 | .name = "vpss_slave", | ||
262 | .parent = &pll1_sysclk5, | ||
263 | .lpsc = DAVINCI_LPSC_VPSSSLV, | ||
264 | }; | ||
265 | |||
260 | static struct clk arm_clk = { | 266 | static struct clk arm_clk = { |
261 | .name = "arm_clk", | 267 | .name = "arm_clk", |
262 | .parent = &pll2_sysclk2, | 268 | .parent = &pll2_sysclk2, |
@@ -449,7 +455,8 @@ static struct clk_lookup dm365_clks[] = { | |||
449 | CLK(NULL, "pll2_sysclk8", &pll2_sysclk8), | 455 | CLK(NULL, "pll2_sysclk8", &pll2_sysclk8), |
450 | CLK(NULL, "pll2_sysclk9", &pll2_sysclk9), | 456 | CLK(NULL, "pll2_sysclk9", &pll2_sysclk9), |
451 | CLK(NULL, "vpss_dac", &vpss_dac_clk), | 457 | CLK(NULL, "vpss_dac", &vpss_dac_clk), |
452 | CLK(NULL, "vpss_master", &vpss_master_clk), | 458 | CLK("vpss", "master", &vpss_master_clk), |
459 | CLK("vpss", "slave", &vpss_slave_clk), | ||
453 | CLK(NULL, "arm", &arm_clk), | 460 | CLK(NULL, "arm", &arm_clk), |
454 | CLK(NULL, "uart0", &uart0_clk), | 461 | CLK(NULL, "uart0", &uart0_clk), |
455 | CLK(NULL, "uart1", &uart1_clk), | 462 | CLK(NULL, "uart1", &uart1_clk), |
@@ -1239,8 +1246,6 @@ static int __init dm365_init_devices(void) | |||
1239 | clk_add_alias(NULL, dev_name(&dm365_mdio_device.dev), | 1246 | clk_add_alias(NULL, dev_name(&dm365_mdio_device.dev), |
1240 | NULL, &dm365_emac_device.dev); | 1247 | NULL, &dm365_emac_device.dev); |
1241 | 1248 | ||
1242 | /* Add isif clock alias */ | ||
1243 | clk_add_alias("master", dm365_isif_dev.name, "vpss_master", NULL); | ||
1244 | platform_device_register(&dm365_vpss_device); | 1249 | platform_device_register(&dm365_vpss_device); |
1245 | platform_device_register(&dm365_isif_dev); | 1250 | platform_device_register(&dm365_isif_dev); |
1246 | platform_device_register(&vpfe_capture_dev); | 1251 | platform_device_register(&vpfe_capture_dev); |