linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Baruch Siach <baruch@tkos.co.il>
Cc: linux-media@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Sascha Hauer <kernel@pengutronix.de>
Subject: Re: [PATCH 2/3] mx27: add support for the CSI device
Date: Fri, 21 May 2010 09:17:53 +0200	[thread overview]
Message-ID: <20100521071753.GB17272@pengutronix.de> (raw)
In-Reply-To: <2df2fdd7809e836bac3ff4cd2d77aa976e6ca760.1273150585.git.baruch@tkos.co.il>

On Thu, May 06, 2010 at 04:09:40PM +0300, Baruch Siach wrote:
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
>  arch/arm/mach-mx2/clock_imx27.c |    2 +-
>  arch/arm/mach-mx2/devices.c     |   31 +++++++++++++++++++++++++++++++
>  arch/arm/mach-mx2/devices.h     |    1 +
>  3 files changed, 33 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/mach-mx2/clock_imx27.c b/arch/arm/mach-mx2/clock_imx27.c
> index 0f0823c..5a1aa15 100644
> --- a/arch/arm/mach-mx2/clock_imx27.c
> +++ b/arch/arm/mach-mx2/clock_imx27.c
> @@ -644,7 +644,7 @@ static struct clk_lookup lookups[] = {
>  	_REGISTER_CLOCK("spi_imx.1", NULL, cspi2_clk)
>  	_REGISTER_CLOCK("spi_imx.2", NULL, cspi3_clk)
>  	_REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk)
> -	_REGISTER_CLOCK(NULL, "csi", csi_clk)
> +	_REGISTER_CLOCK("mx2-camera.0", NULL, csi_clk)
>  	_REGISTER_CLOCK("fsl-usb2-udc", "usb", usb_clk)
>  	_REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", usb_clk1)
>  	_REGISTER_CLOCK("mxc-ehci.0", "usb", usb_clk)
> diff --git a/arch/arm/mach-mx2/devices.c b/arch/arm/mach-mx2/devices.c
> index b91e412..de501ac 100644
> --- a/arch/arm/mach-mx2/devices.c
> +++ b/arch/arm/mach-mx2/devices.c
> @@ -40,6 +40,37 @@
>  
>  #include "devices.h"
>  
> +#ifdef CONFIG_MACH_MX27
> +static struct resource mx27_camera_resources[] = {
> +	{
> +	       .start = CSI_BASE_ADDR,
> +	       .end = CSI_BASE_ADDR + 0x1f,
> +	       .flags = IORESOURCE_MEM,
> +	}, {
> +	       .start = EMMA_PRP_BASE_ADDR,
> +	       .end = EMMA_PRP_BASE_ADDR + 0x1f,
> +	       .flags = IORESOURCE_MEM,
> +	}, {
> +	       .start = MXC_INT_CSI,
> +	       .end = MXC_INT_CSI,
> +	       .flags = IORESOURCE_IRQ,
> +	},{
> +	       .start = MXC_INT_EMMAPRP,
> +	       .end = MXC_INT_EMMAPRP,
> +	       .flags = IORESOURCE_IRQ,
> +	},
> +};
> +struct platform_device mx27_camera_device = {
> +	.name = "mx2-camera",
> +	.id = 0,
> +	.num_resources = ARRAY_SIZE(mx27_camera_resources),
> +	.resource = mx27_camera_resources,
> +	.dev = {
> +		.coherent_dma_mask = 0xffffffff,
> +	},
> +};
> +#endif
> +
>  /*
>   * SPI master controller
>   *
> diff --git a/arch/arm/mach-mx2/devices.h b/arch/arm/mach-mx2/devices.h
> index 84ed513..8bdf018 100644
> --- a/arch/arm/mach-mx2/devices.h
> +++ b/arch/arm/mach-mx2/devices.h
> @@ -29,6 +29,7 @@ extern struct platform_device mxc_i2c_device1;
>  extern struct platform_device mxc_sdhc_device0;
>  extern struct platform_device mxc_sdhc_device1;
>  extern struct platform_device mxc_otg_udc_device;
> +extern struct platform_device mx27_camera_device;
>  extern struct platform_device mxc_otg_host;
>  extern struct platform_device mxc_usbh1;
>  extern struct platform_device mxc_usbh2;
> -- 
> 1.7.0
> 
>

Please amend the following to this patch to make it compile on i.MX27:
 
>From f1dc7e4c35ea0847e5527d9db50b6343c655de8c Mon Sep 17 00:00:00 2001
From: Sascha Hauer <s.hauer@pengutronix.de>
Date: Thu, 20 May 2010 13:36:11 +0200
Subject: [PATCH 1/2] mx27 devices: Fix CSI/EMMA base addresses

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/mach-mx2/devices.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-mx2/devices.c b/arch/arm/mach-mx2/devices.c
index de501ac..6a49c79 100644
--- a/arch/arm/mach-mx2/devices.c
+++ b/arch/arm/mach-mx2/devices.c
@@ -43,20 +43,20 @@
 #ifdef CONFIG_MACH_MX27
 static struct resource mx27_camera_resources[] = {
 	{
-	       .start = CSI_BASE_ADDR,
-	       .end = CSI_BASE_ADDR + 0x1f,
+	       .start = MX27_CSI_BASE_ADDR,
+	       .end = MX27_CSI_BASE_ADDR + 0x1f,
 	       .flags = IORESOURCE_MEM,
 	}, {
-	       .start = EMMA_PRP_BASE_ADDR,
-	       .end = EMMA_PRP_BASE_ADDR + 0x1f,
+	       .start = MX27_EMMA_PRP_BASE_ADDR,
+	       .end = MX27_EMMA_PRP_BASE_ADDR + 0x1f,
 	       .flags = IORESOURCE_MEM,
 	}, {
-	       .start = MXC_INT_CSI,
-	       .end = MXC_INT_CSI,
+	       .start = MX27_INT_CSI,
+	       .end = MX27_INT_CSI,
 	       .flags = IORESOURCE_IRQ,
 	},{
-	       .start = MXC_INT_EMMAPRP,
-	       .end = MXC_INT_EMMAPRP,
+	       .start = MX27_INT_EMMAPRP,
+	       .end = MX27_INT_EMMAPRP,
 	       .flags = IORESOURCE_IRQ,
 	},
 };
-- 
1.7.0


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2010-05-21  7:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-06 13:09 [PATCH 0/3] Driver for the i.MX2x CMOS Sensor Interface Baruch Siach
2010-05-06 13:09 ` [PATCH 1/3] mx2_camera: Add soc_camera support for i.MX25/i.MX27 Baruch Siach
2010-05-12 19:02   ` Guennadi Liakhovetski
2010-05-13  5:21     ` Baruch Siach
2010-05-17  7:27     ` Sascha Hauer
2010-05-17 13:58       ` Baruch Siach
2010-05-19  8:55         ` Sascha Hauer
2010-05-21  7:19   ` Sascha Hauer
2010-05-06 13:09 ` [PATCH 2/3] mx27: add support for the CSI device Baruch Siach
2010-05-21  7:17   ` Sascha Hauer [this message]
2010-05-06 13:09 ` [PATCH 3/3] mx25: " Baruch Siach
2010-05-12 19:11   ` Guennadi Liakhovetski
2010-05-21  7:20 ` [PATCH 0/3] Driver for the i.MX2x CMOS Sensor Interface Sascha Hauer
2010-05-21  7:27   ` Baruch Siach
2010-05-21 18:33     ` Guennadi Liakhovetski
2010-05-25  7:20       ` Sascha Hauer

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=20100521071753.GB17272@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=baruch@tkos.co.il \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-media@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).