Re: [PATCH v2 1/3] media: davinci: vpss: enable vpss clocks
On 4/8/2013 5:08 PM, Prabhakar Lad wrote: > Sekhar, > > On Mon, Apr 8, 2013 at 3:56 PM, Sekhar Nori wrote: >> On 4/2/2013 5:14 PM, Prabhakar lad wrote: >>> From: Lad, Prabhakar >>> >>> 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 instead common clock >>> framework. con_ids for master and slave clocks of vpss is added in pm_domain >> >> Common clock framework in not (yet) used on DaVinci, so this is misleading. >> > OK, I'll make it 'This patch uses PM runtime API to enable/disable > clock, instead > of Davinci specific clock framework. con_ids for master and slave may be just call it "DaVinci clock framework" Thanks, Sekhar -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 1/3] media: davinci: vpss: enable vpss clocks
Sekhar, On Mon, Apr 8, 2013 at 3:56 PM, Sekhar Nori wrote: > On 4/2/2013 5:14 PM, Prabhakar lad wrote: >> From: Lad, Prabhakar >> >> 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 instead common clock >> framework. con_ids for master and slave clocks of vpss is added in pm_domain > > Common clock framework in not (yet) used on DaVinci, so this is misleading. > OK, I'll make it 'This patch uses PM runtime API to enable/disable clock, instead of Davinci specific clock framework. con_ids for master and slave clocks of vpss is added in pm_domain' >> diff --git a/arch/arm/mach-davinci/pm_domain.c >> b/arch/arm/mach-davinci/pm_domain.c >> index c90250e..445b10b 100644 >> --- a/arch/arm/mach-davinci/pm_domain.c >> +++ b/arch/arm/mach-davinci/pm_domain.c >> @@ -53,7 +53,7 @@ static struct dev_pm_domain davinci_pm_domain = { >> >> static struct pm_clk_notifier_block platform_bus_notifier = { >> .pm_domain = &davinci_pm_domain, >> - .con_ids = { "fck", NULL, }, >> + .con_ids = { "fck", "master", "slave", NULL, }, > > NULL is sentinel so you can drop the ',' after that. Apart from that, > for the mach-davinci parts: > OK Regards, --Prabhakar > Acked-by: Sekhar Nori > > Thanks, > Sekhar -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 1/3] media: davinci: vpss: enable vpss clocks
On 4/2/2013 5:14 PM, Prabhakar lad wrote: > From: Lad, Prabhakar > > 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 instead common clock > framework. con_ids for master and slave clocks of vpss is added in pm_domain Common clock framework in not (yet) used on DaVinci, so this is misleading. > diff --git a/arch/arm/mach-davinci/pm_domain.c > b/arch/arm/mach-davinci/pm_domain.c > index c90250e..445b10b 100644 > --- a/arch/arm/mach-davinci/pm_domain.c > +++ b/arch/arm/mach-davinci/pm_domain.c > @@ -53,7 +53,7 @@ static struct dev_pm_domain davinci_pm_domain = { > > static struct pm_clk_notifier_block platform_bus_notifier = { > .pm_domain = &davinci_pm_domain, > - .con_ids = { "fck", NULL, }, > + .con_ids = { "fck", "master", "slave", NULL, }, NULL is sentinel so you can drop the ',' after that. Apart from that, for the mach-davinci parts: Acked-by: Sekhar Nori Thanks, Sekhar -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 1/3] media: davinci: vpss: enable vpss clocks
From: Lad, Prabhakar 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 instead common clock framework. con_ids for master and slave clocks of vpss is added in pm_domain for pm runtime to clock handling. 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 --- arch/arm/mach-davinci/dm355.c|7 +--- arch/arm/mach-davinci/dm365.c| 11 +-- arch/arm/mach-davinci/dm644x.c |9 + arch/arm/mach-davinci/pm_domain.c|2 +- drivers/media/platform/davinci/dm355_ccdc.c | 39 +-- drivers/media/platform/davinci/dm644x_ccdc.c | 44 -- drivers/media/platform/davinci/isif.c| 28 ++-- drivers/media/platform/davinci/vpss.c| 25 ++ 8 files changed, 43 insertions(+), 122 deletions(-) diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c index b49c3b7..8e98bb0 100644 --- a/arch/arm/mach-davinci/dm355.c +++ b/arch/arm/mach-davinci/dm355.c @@ -345,8 +345,8 @@ static struct clk_lookup dm355_clks[] = { CLK(NULL, "pll1_aux", &pll1_aux_clk), CLK(NULL, "pll1_sysclkbp", &pll1_sysclkbp), CLK(NULL, "vpss_dac", &vpss_dac_clk), - CLK(NULL, "vpss_master", &vpss_master_clk), - CLK(NULL, "vpss_slave", &vpss_slave_clk), + CLK("vpss", "master", &vpss_master_clk), + CLK("vpss", "slave", &vpss_slave_clk), CLK(NULL, "clkout1", &clkout1_clk), CLK(NULL, "clkout2", &clkout2_clk), CLK(NULL, "pll2", &pll2_clk), @@ -873,9 +873,6 @@ static int __init dm355_init_devices(void) if (!cpu_is_davinci_dm355()) return 0; - /* Add ccdc clock aliases */ - clk_add_alias("master", dm355_ccdc_dev.name, "vpss_master", NULL); - clk_add_alias("slave", dm355_ccdc_dev.name, "vpss_master", NULL); davinci_cfg_reg(DM355_INT_EDMA_CC); platform_device_register(&dm355_edma_device); platform_device_register(&dm355_vpss_device); diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c index 6c39805..c61dd94 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 = { .flags = CLK_PSC, }; +static struct clk vpss_slave_clk = { + .name = "vpss_slave", + .parent = &pll1_sysclk5, + .lpsc = DAVINCI_LPSC_VPSSSLV, +}; + static struct clk arm_clk = { .name = "arm_clk", .parent = &pll2_sysclk2, @@ -449,7 +455,8 @@ static struct clk_lookup dm365_clks[] = { CLK(NULL, "pll2_sysclk8", &pll2_sysclk8), CLK(NULL, "pll2_sysclk9", &pll2_sysclk9), CLK(NULL, "vpss_dac", &vpss_dac_clk), - CLK(NULL, "vpss_master", &vpss_master_clk), + CLK("vpss", "master", &vpss_master_clk), + CLK("vpss", "slave", &vpss_slave_clk), CLK(NULL, "arm", &arm_clk), CLK(NULL, "uart0", &uart0_clk), CLK(NULL, "uart1", &uart1_clk), @@ -1239,8 +1246,6 @@ static int __init dm365_init_devices(void) clk_add_alias(NULL, dev_name(&dm365_mdio_device.dev), NULL, &dm365_emac_device.dev); - /* Add isif clock alias */ - clk_add_alias("master", dm365_isif_dev.name, "vpss_master", NULL); platform_device_register(&dm365_vpss_device); platform_device_register(&dm365_isif_dev); platform_device_register(&vpfe_capture_dev); diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c index ee0e994..c2a9273 100644 --- a/arch/arm/mach-davinci/dm644x.c +++ b/arch/arm/mach-davinci/dm644x.c @@ -300,8 +300,8 @@ static struct clk_lookup dm644x_clks[] = { CLK(NULL, "dsp", &dsp_clk), CLK(NULL, "arm", &arm_clk), CLK(NULL, "vicp", &vicp_clk), - CLK(NULL, "vpss_master", &vpss_master_clk), - CLK(NULL, "vpss_slave", &vpss_slave_clk), + CLK("vpss", "master", &vpss_master_clk), + CLK("vpss", "slave", &vpss_slave_clk), CLK(NULL, "arm", &arm_clk), CLK(NULL, "uart0", &uart0_clk), CLK(NULL, "uart1", &uart1_clk), @@ -901,11 +901,6 @@ int __init dm644x_init_video(struct vpfe_config *vpfe_cfg, dm644x_vpfe_dev.dev.platform_data = vpfe_cfg; platform_device_register(&dm644x_ccdc_dev); platform_device_register