From: Kevin Hilman <khilman@deeprootsystems.com>
To: m-karicheri2@ti.com
Cc: linux-media@vger.kernel.org, hverkuil@xs4all.nl,
davinci-linux-open-source@linux.davincidsp.com
Subject: Re: [PATCH - v3 4/4] DaVinci - vpfe-capture-converting ccdc drivers to platform driver
Date: Tue, 05 Jan 2010 15:28:02 -0800 [thread overview]
Message-ID: <871vi4rv25.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1260895054-13232-1-git-send-email-m-karicheri2@ti.com> (m-karicheri2@ti.com's message of "Tue\, 15 Dec 2009 11\:37\:31 -0500")
m-karicheri2@ti.com writes:
> From: Muralidharan Karicheri <m-karicheri2@ti.com>
>
> This combines the two patches sent earlier to change the clock configuration
> and converting ccdc drivers to platform drivers. This has updated comments
> against v2 of these patches. Two new clocks "master" and "slave" are defined for ccdc driver
> as per comments from Kevin Hilman.
>
> This adds platform code for ccdc driver on DM355 and DM6446.
>
> Reviewed-by: Vaibhav Hiremath <hvaibhav@ti.com>
> Reviewed-by: Kevin Hilman <khilman@deeprootsystems.com>
>
> Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
> ---
> Applies to linux-davinci tree
> arch/arm/mach-davinci/dm355.c | 41 ++++++++++++++++++++++++++++-----------
> arch/arm/mach-davinci/dm644x.c | 20 ++++++++++++++++++-
> 2 files changed, 48 insertions(+), 13 deletions(-)
>
> diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c
> index 2244e8c..a9ea761 100644
> --- a/arch/arm/mach-davinci/dm355.c
> +++ b/arch/arm/mach-davinci/dm355.c
> @@ -378,6 +378,8 @@ static struct davinci_clk dm355_clks[] = {
> CLK(NULL, "timer3", &timer3_clk),
> CLK(NULL, "rto", &rto_clk),
> CLK(NULL, "usb", &usb_clk),
> + CLK("dm355_ccdc", "master", &vpss_master_clk),
> + CLK("dm355_ccdc", "slave", &vpss_slave_clk),
I still don't understand why you have to add new entries here and
can't simply rename the existing CLK nodes using vpss_*_clk.
Same comment for dm644x.c changes.
Kevin
> CLK(NULL, NULL, NULL),
> };
>
> @@ -665,6 +667,17 @@ static struct platform_device dm355_asp1_device = {
> .resource = dm355_asp1_resources,
> };
>
> +static void dm355_ccdc_setup_pinmux(void)
> +{
> + davinci_cfg_reg(DM355_VIN_PCLK);
> + davinci_cfg_reg(DM355_VIN_CAM_WEN);
> + davinci_cfg_reg(DM355_VIN_CAM_VD);
> + davinci_cfg_reg(DM355_VIN_CAM_HD);
> + davinci_cfg_reg(DM355_VIN_YIN_EN);
> + davinci_cfg_reg(DM355_VIN_CINL_EN);
> + davinci_cfg_reg(DM355_VIN_CINH_EN);
> +}
> +
> static struct resource dm355_vpss_resources[] = {
> {
> /* VPSS BL Base address */
> @@ -701,6 +714,10 @@ static struct resource vpfe_resources[] = {
> .end = IRQ_VDINT1,
> .flags = IORESOURCE_IRQ,
> },
> +};
> +
> +static u64 vpfe_capture_dma_mask = DMA_BIT_MASK(32);
> +static struct resource dm355_ccdc_resource[] = {
> /* CCDC Base address */
> {
> .flags = IORESOURCE_MEM,
> @@ -708,8 +725,18 @@ static struct resource vpfe_resources[] = {
> .end = 0x01c70600 + 0x1ff,
> },
> };
> +static struct platform_device dm355_ccdc_dev = {
> + .name = "dm355_ccdc",
> + .id = -1,
> + .num_resources = ARRAY_SIZE(dm355_ccdc_resource),
> + .resource = dm355_ccdc_resource,
> + .dev = {
> + .dma_mask = &vpfe_capture_dma_mask,
> + .coherent_dma_mask = DMA_BIT_MASK(32),
> + .platform_data = dm355_ccdc_setup_pinmux,
> + },
> +};
>
> -static u64 vpfe_capture_dma_mask = DMA_BIT_MASK(32);
> static struct platform_device vpfe_capture_dev = {
> .name = CAPTURE_DRV_NAME,
> .id = -1,
> @@ -860,17 +887,7 @@ static int __init dm355_init_devices(void)
> davinci_cfg_reg(DM355_INT_EDMA_CC);
> platform_device_register(&dm355_edma_device);
> platform_device_register(&dm355_vpss_device);
> - /*
> - * setup Mux configuration for vpfe input and register
> - * vpfe capture platform device
> - */
> - davinci_cfg_reg(DM355_VIN_PCLK);
> - davinci_cfg_reg(DM355_VIN_CAM_WEN);
> - davinci_cfg_reg(DM355_VIN_CAM_VD);
> - davinci_cfg_reg(DM355_VIN_CAM_HD);
> - davinci_cfg_reg(DM355_VIN_YIN_EN);
> - davinci_cfg_reg(DM355_VIN_CINL_EN);
> - davinci_cfg_reg(DM355_VIN_CINH_EN);
> + platform_device_register(&dm355_ccdc_dev);
> platform_device_register(&vpfe_capture_dev);
>
> return 0;
> diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c
> index e65e29e..e5f1ee9 100644
> --- a/arch/arm/mach-davinci/dm644x.c
> +++ b/arch/arm/mach-davinci/dm644x.c
> @@ -315,6 +315,8 @@ struct davinci_clk dm644x_clks[] = {
> CLK(NULL, "timer0", &timer0_clk),
> CLK(NULL, "timer1", &timer1_clk),
> CLK("watchdog", NULL, &timer2_clk),
> + CLK("dm644x_ccdc", "master", &vpss_master_clk),
> + CLK("dm644x_ccdc", "slave", &vpss_slave_clk),
> CLK(NULL, NULL, NULL),
> };
>
> @@ -612,6 +614,11 @@ static struct resource vpfe_resources[] = {
> .end = IRQ_VDINT1,
> .flags = IORESOURCE_IRQ,
> },
> +};
> +
> +static u64 vpfe_capture_dma_mask = DMA_BIT_MASK(32);
> +static struct resource dm644x_ccdc_resource[] = {
> + /* CCDC Base address */
> {
> .start = 0x01c70400,
> .end = 0x01c70400 + 0xff,
> @@ -619,7 +626,17 @@ static struct resource vpfe_resources[] = {
> },
> };
>
> -static u64 vpfe_capture_dma_mask = DMA_BIT_MASK(32);
> +static struct platform_device dm644x_ccdc_dev = {
> + .name = "dm644x_ccdc",
> + .id = -1,
> + .num_resources = ARRAY_SIZE(dm644x_ccdc_resource),
> + .resource = dm644x_ccdc_resource,
> + .dev = {
> + .dma_mask = &vpfe_capture_dma_mask,
> + .coherent_dma_mask = DMA_BIT_MASK(32),
> + },
> +};
> +
> static struct platform_device vpfe_capture_dev = {
> .name = CAPTURE_DRV_NAME,
> .id = -1,
> @@ -772,6 +789,7 @@ static int __init dm644x_init_devices(void)
> platform_device_register(&dm644x_edma_device);
> platform_device_register(&dm644x_emac_device);
> platform_device_register(&dm644x_vpss_device);
> + platform_device_register(&dm644x_ccdc_dev);
> platform_device_register(&vpfe_capture_dev);
>
> return 0;
> --
> 1.6.0.4
next prev parent reply other threads:[~2010-01-05 23:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-15 16:37 [PATCH - v3 4/4] DaVinci - vpfe-capture-converting ccdc drivers to platform driver m-karicheri2
2009-12-15 16:37 ` [PATCH - v3 2/4] V4L - vpfe capture - convert dm355 ccdc driver to a " m-karicheri2
2009-12-15 16:37 ` [PATCH - v3 3/4] V4L - vpfe capture - convert dm644x ccdc module " m-karicheri2
2009-12-15 16:37 ` [PATCH - v3 1/4] V4L - vpfe_capture - remove clock and ccdc resource handling m-karicheri2
2010-01-05 23:28 ` Kevin Hilman [this message]
2010-01-06 14:44 ` [PATCH - v3 4/4] DaVinci - vpfe-capture-converting ccdc drivers to platform driver Karicheri, Muralidharan
2010-01-06 16:04 ` Kevin Hilman
2010-01-06 16:20 ` Karicheri, Muralidharan
2010-01-06 16:36 ` Kevin Hilman
2010-01-07 18:18 ` Karicheri, Muralidharan
2010-01-07 19:43 ` Kevin Hilman
2010-01-07 21:33 ` Karicheri, Muralidharan
2010-01-07 21:50 ` Kevin Hilman
2010-01-07 23:25 ` Karicheri, Muralidharan
2010-01-08 9:06 ` Hiremath, Vaibhav
2010-01-08 15:10 ` Kevin Hilman
2010-01-11 4:36 ` Hiremath, Vaibhav
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871vi4rv25.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=davinci-linux-open-source@linux.davincidsp.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=m-karicheri2@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox