Message ID | 1259687940-31435-2-git-send-email-m-karicheri2@ti.com (mailing list archive) |
---|---|
State | RFC, archived |
Headers |
Return-path: <linux-media-owner@vger.kernel.org> Envelope-to: mchehab@infradead.org Delivery-date: Tue, 01 Dec 2009 17:19:15 +0000 Received: from bombadil.infradead.org [18.85.46.34] by pedra with IMAP (fetchmail-6.3.6) for <mchehab@localhost> (single-drop); Tue, 01 Dec 2009 15:22:54 -0200 (BRST) Received: from vger.kernel.org ([209.132.176.167]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1NFWNf-000411-Bp; Tue, 01 Dec 2009 17:19:15 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753631AbZLARTH (ORCPT <rfc822; kmpark@infradead.org> + 1 other); Tue, 1 Dec 2009 12:19:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753462AbZLARTG (ORCPT <rfc822;linux-media-outgoing>); Tue, 1 Dec 2009 12:19:06 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:44548 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753395AbZLARTF (ORCPT <rfc822;linux-media@vger.kernel.org>); Tue, 1 Dec 2009 12:19:05 -0500 Received: from dlep36.itg.ti.com ([157.170.170.91]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id nB1HJ71R010892 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 1 Dec 2009 11:19:08 -0600 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id nB1HJ5Gg006756; Tue, 1 Dec 2009 11:19:05 -0600 (CST) Received: from gt516km11.gt.design.ti.com (gt516km11.gt.design.ti.com [158.218.100.179]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id nB1HJ4Z18095; Tue, 1 Dec 2009 11:19:04 -0600 (CST) Received: from gt516km11.gt.design.ti.com (localhost.localdomain [127.0.0.1]) by gt516km11.gt.design.ti.com (8.13.1/8.13.1) with ESMTP id nB1HJ4gm031467; Tue, 1 Dec 2009 12:19:04 -0500 Received: (from a0868495@localhost) by gt516km11.gt.design.ti.com (8.13.1/8.13.1/Submit) id nB1HJ42q031464; Tue, 1 Dec 2009 12:19:04 -0500 From: m-karicheri2@ti.com To: linux-media@vger.kernel.org, hverkuil@xs4all.nl, khilman@deeprootsystems.com Cc: davinci-linux-open-source@linux.davincidsp.com, hvaibhav@ti.com, Muralidharan Karicheri <m-karicheri2@ti.com> Subject: [PATCH - v0 2/2] DaVinci - vpfe capture - Make clocks configurable Date: Tue, 1 Dec 2009 12:19:00 -0500 Message-Id: <1259687940-31435-2-git-send-email-m-karicheri2@ti.com> X-Mailer: git-send-email 1.6.0.4 In-Reply-To: <1259687940-31435-1-git-send-email-m-karicheri2@ti.com> References: <1259687940-31435-1-git-send-email-m-karicheri2@ti.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org |
Commit Message
m-karicheri2@ti.com
Dec. 1, 2009, 5:19 p.m. UTC
From: Muralidharan Karicheri <m-karicheri2@ti.com> Adding the clocks in vpfe capture configuration Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com> --- arch/arm/mach-davinci/board-dm355-evm.c | 2 ++ arch/arm/mach-davinci/board-dm644x-evm.c | 2 ++ 2 files changed, 4 insertions(+), 0 deletions(-)
Comments
> -----Original Message----- > From: Karicheri, Muralidharan > Sent: Tuesday, December 01, 2009 10:49 PM > To: linux-media@vger.kernel.org; hverkuil@xs4all.nl; > khilman@deeprootsystems.com > Cc: davinci-linux-open-source@linux.davincidsp.com; Hiremath, > Vaibhav; Karicheri, Muralidharan > Subject: [PATCH - v0 2/2] DaVinci - vpfe capture - Make clocks > configurable > > From: Muralidharan Karicheri <m-karicheri2@ti.com> > > Adding the clocks in vpfe capture configuration > > Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com> > --- > arch/arm/mach-davinci/board-dm355-evm.c | 2 ++ > arch/arm/mach-davinci/board-dm644x-evm.c | 2 ++ > 2 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/arch/arm/mach-davinci/board-dm355-evm.c > b/arch/arm/mach-davinci/board-dm355-evm.c > index a9b650d..a28985c 100644 > --- a/arch/arm/mach-davinci/board-dm355-evm.c > +++ b/arch/arm/mach-davinci/board-dm355-evm.c > @@ -239,6 +239,8 @@ static struct vpfe_config vpfe_cfg = { > .sub_devs = vpfe_sub_devs, > .card_name = "DM355 EVM", > .ccdc = "DM355 CCDC", > + .num_clocks = 2, > + .clocks = {"vpss_master", "vpss_slave"}, [Hiremath, Vaibhav] Hi Murali, I was talking to Sekhar about this and actually he made some good points about this implementation. If we consider specific IP, then the required clocks would remain always be the same. There might be some devices which may not be using some clocks (so as that specific feature). Actually we are trying to create one more wrapper for clock configuration. Just to illustrate I am putting some other generic drivers examples - Omap-hsmmc.c - This driver requires 2 clocks, interface and functional. The devices which would be using this driver have to define clock with names "ick" and "fck". VPFE-Capture (Considering only current implementation) - Currently we have vpfe_capture.c file (master/bridge driver) which is handling clk_get/put, and platform data is providing the details about it. Ideally we should handle it in respective ccdc driver file, since he has all the knowledge about required number of clocks and its name. This way we don't have to maintain/pass clock information in platform data. I would appreciate any comments/thoughts/pointers here. Thanks, Vaibhav > }; > > static struct platform_device *davinci_evm_devices[] __initdata = { > diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c > b/arch/arm/mach-davinci/board-dm644x-evm.c > index fd0398b..45beb99 100644 > --- a/arch/arm/mach-davinci/board-dm644x-evm.c > +++ b/arch/arm/mach-davinci/board-dm644x-evm.c > @@ -250,6 +250,8 @@ static struct vpfe_config vpfe_cfg = { > .sub_devs = vpfe_sub_devs, > .card_name = "DM6446 EVM", > .ccdc = "DM6446 CCDC", > + .num_clocks = 2, > + .clocks = {"vpss_master", "vpss_slave"}, > }; > > static struct platform_device rtc_dev = { > -- > 1.6.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
>I was talking to Sekhar about this and actually he made some good points >about this implementation. > >If we consider specific IP, then the required clocks would remain always be >the same. There might be some devices which may not be using some clocks >(so as that specific feature). > >Actually we are trying to create one more wrapper for clock configuration. >Just to illustrate I am putting some other generic drivers examples - > >Omap-hsmmc.c - > >This driver requires 2 clocks, interface and functional. The devices which >would be using this driver have to define clock with names "ick" and "fck". > >VPFE-Capture (Considering only current implementation) - > >Currently we have vpfe_capture.c file (master/bridge driver) which is >handling clk_get/put, and platform data is providing the details about it. >Ideally we should handle it in respective ccdc driver file, since he has >all the knowledge about required number of clocks and its name. This way we >don't have to maintain/pass clock information in platform data. > >I would appreciate any comments/thoughts/pointers here. > Though I agree that this clock could be set by the ccdc driver, I am not sure if the same clock is used by an IP on different SOCs. For example take the case of ccdc on DM6446 which is also used on OMAP 35xx SOC. Do they use vpss master and slave clocks as is done on DM6446? If this is true, then we could set the clock inside ccdc driver. Let me know so that I can re-work the patch and send it to the list. Murali >Thanks, >Vaibhav > >> }; >> >> static struct platform_device *davinci_evm_devices[] __initdata = { >> diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c >> b/arch/arm/mach-davinci/board-dm644x-evm.c >> index fd0398b..45beb99 100644 >> --- a/arch/arm/mach-davinci/board-dm644x-evm.c >> +++ b/arch/arm/mach-davinci/board-dm644x-evm.c >> @@ -250,6 +250,8 @@ static struct vpfe_config vpfe_cfg = { >> .sub_devs = vpfe_sub_devs, >> .card_name = "DM6446 EVM", >> .ccdc = "DM6446 CCDC", >> + .num_clocks = 2, >> + .clocks = {"vpss_master", "vpss_slave"}, >> }; >> >> static struct platform_device rtc_dev = { >> -- >> 1.6.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Vaibhav, Could you confirm my question below? I need to submit a patch on Monday. >>Currently we have vpfe_capture.c file (master/bridge driver) which is >>handling clk_get/put, and platform data is providing the details about it. >>Ideally we should handle it in respective ccdc driver file, since he has >>all the knowledge about required number of clocks and its name. This way >we >>don't have to maintain/pass clock information in platform data. >> >>I would appreciate any comments/thoughts/pointers here. >> >Though I agree that this clock could be set by the ccdc driver, I am not >sure if the same clock is used by an IP on different SOCs. For example take >the case of ccdc on DM6446 which is also used on OMAP 35xx SOC. Do they use >vpss master and slave clocks as is done on DM6446? If this is true, then we >could set the clock inside ccdc driver. > >Let me know so that I can re-work the patch and send it to the list. > >Murali >>Thanks, >>Vaibhav >> >>> }; >>> >>> static struct platform_device *davinci_evm_devices[] __initdata = { >>> diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c >>> b/arch/arm/mach-davinci/board-dm644x-evm.c >>> index fd0398b..45beb99 100644 >>> --- a/arch/arm/mach-davinci/board-dm644x-evm.c >>> +++ b/arch/arm/mach-davinci/board-dm644x-evm.c >>> @@ -250,6 +250,8 @@ static struct vpfe_config vpfe_cfg = { >>> .sub_devs = vpfe_sub_devs, >>> .card_name = "DM6446 EVM", >>> .ccdc = "DM6446 CCDC", >>> + .num_clocks = 2, >>> + .clocks = {"vpss_master", "vpss_slave"}, >>> }; >>> >>> static struct platform_device rtc_dev = { >>> -- >>> 1.6.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
> -----Original Message----- > From: linux-media-owner@vger.kernel.org [mailto:linux-media- > owner@vger.kernel.org] On Behalf Of Karicheri, Muralidharan > Sent: Thursday, December 03, 2009 9:25 PM > To: Hiremath, Vaibhav; linux-media@vger.kernel.org; > hverkuil@xs4all.nl; khilman@deeprootsystems.com > Cc: davinci-linux-open-source@linux.davincidsp.com > Subject: RE: [PATCH - v0 2/2] DaVinci - vpfe capture - Make clocks > configurable > > >I was talking to Sekhar about this and actually he made some good > points > >about this implementation. > > > >If we consider specific IP, then the required clocks would remain > always be > >the same. There might be some devices which may not be using some > clocks > >(so as that specific feature). > > > >Actually we are trying to create one more wrapper for clock > configuration. > >Just to illustrate I am putting some other generic drivers examples > - > > > >Omap-hsmmc.c - > > > >This driver requires 2 clocks, interface and functional. The > devices which > >would be using this driver have to define clock with names "ick" > and "fck". > > > >VPFE-Capture (Considering only current implementation) - > > > >Currently we have vpfe_capture.c file (master/bridge driver) which > is > >handling clk_get/put, and platform data is providing the details > about it. > >Ideally we should handle it in respective ccdc driver file, since > he has > >all the knowledge about required number of clocks and its name. > This way we > >don't have to maintain/pass clock information in platform data. > > > >I would appreciate any comments/thoughts/pointers here. > > > Though I agree that this clock could be set by the ccdc driver, I am > not sure if the same clock is used by an IP on different SOCs. For > example take > the case of ccdc on DM6446 which is also used on OMAP 35xx SOC. Do > they use > vpss master and slave clocks as is done on DM6446? If this is true, > then we > could set the clock inside ccdc driver. > > Let me know so that I can re-work the patch and send it to the list. > [Hiremath, Vaibhav] Murali, They might be using different naming conventions but the number of clocks will always remain the same. If not, then they are not same IP and most probably will not use same driver. Just to clarify more on your Q, AM3517 also uses 2 clocks - vpfe_ck (functional clock) - vpfe_pck (external clock, pixel clock) Whereas you are referring them as master and slave clock. Thanks, Vaibhav > Murali > >Thanks, > >Vaibhav > > > >> }; > >> > >> static struct platform_device *davinci_evm_devices[] __initdata > = { > >> diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c > >> b/arch/arm/mach-davinci/board-dm644x-evm.c > >> index fd0398b..45beb99 100644 > >> --- a/arch/arm/mach-davinci/board-dm644x-evm.c > >> +++ b/arch/arm/mach-davinci/board-dm644x-evm.c > >> @@ -250,6 +250,8 @@ static struct vpfe_config vpfe_cfg = { > >> .sub_devs = vpfe_sub_devs, > >> .card_name = "DM6446 EVM", > >> .ccdc = "DM6446 CCDC", > >> + .num_clocks = 2, > >> + .clocks = {"vpss_master", "vpss_slave"}, > >> }; > >> > >> static struct platform_device rtc_dev = { > >> -- > >> 1.6.0.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux- > media" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Vaibhav, I have posted a re-worked patch with clocks configuration moved to ccdc. From your response below, I understand the clocks are being called differently on different SoCs even though they use the same IP. So IMO, it is better to customize it on a SoC by defining the clock names in the respective platform file as done by my original patch. This will avoid confusion since we need to keep the name in sync with hardware signal names. -Murali >[Hiremath, Vaibhav] Murali, > >They might be using different naming conventions but the number of clocks >will always remain the same. If not, then they are not same IP and most >probably will not use same driver. > >Just to clarify more on your Q, AM3517 also uses 2 clocks > >- vpfe_ck (functional clock) >- vpfe_pck (external clock, pixel clock) > >Whereas you are referring them as master and slave clock. > >Thanks, >Vaibhav > > >> Murali >> >Thanks, >> >Vaibhav >> > >> >> }; >> >> >> >> static struct platform_device *davinci_evm_devices[] __initdata >> = { >> >> diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c >> >> b/arch/arm/mach-davinci/board-dm644x-evm.c >> >> index fd0398b..45beb99 100644 >> >> --- a/arch/arm/mach-davinci/board-dm644x-evm.c >> >> +++ b/arch/arm/mach-davinci/board-dm644x-evm.c >> >> @@ -250,6 +250,8 @@ static struct vpfe_config vpfe_cfg = { >> >> .sub_devs = vpfe_sub_devs, >> >> .card_name = "DM6446 EVM", >> >> .ccdc = "DM6446 CCDC", >> >> + .num_clocks = 2, >> >> + .clocks = {"vpss_master", "vpss_slave"}, >> >> }; >> >> >> >> static struct platform_device rtc_dev = { >> >> -- >> >> 1.6.0.4 >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux- >> media" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c index a9b650d..a28985c 100644 --- a/arch/arm/mach-davinci/board-dm355-evm.c +++ b/arch/arm/mach-davinci/board-dm355-evm.c @@ -239,6 +239,8 @@ static struct vpfe_config vpfe_cfg = { .sub_devs = vpfe_sub_devs, .card_name = "DM355 EVM", .ccdc = "DM355 CCDC", + .num_clocks = 2, + .clocks = {"vpss_master", "vpss_slave"}, }; static struct platform_device *davinci_evm_devices[] __initdata = { diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index fd0398b..45beb99 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c @@ -250,6 +250,8 @@ static struct vpfe_config vpfe_cfg = { .sub_devs = vpfe_sub_devs, .card_name = "DM6446 EVM", .ccdc = "DM6446 CCDC", + .num_clocks = 2, + .clocks = {"vpss_master", "vpss_slave"}, }; static struct platform_device rtc_dev = {