Re: [PATCH 28/34] media: mx2_camera: remove mach/hardware.h inclusion

2012-10-06 Thread Shawn Guo
On Thu, Sep 27, 2012 at 04:36:56AM -0300, Mauro Carvalho Chehab wrote:
 I'm understanding that this patch will flow through arm tree[1]. So:

Yes, it will go through arm-soc tree for 3.8.

 Acked-by: Mauro Carvalho Chehab mche...@redhat.com
 
Thanks, Mauro.

Shawn
--
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 28/34] media: mx2_camera: remove mach/hardware.h inclusion

2012-09-27 Thread Mauro Carvalho Chehab
Em 18-09-2012 05:35, javier Martin escreveu:
 On 17 September 2012 15:59, Guennadi Liakhovetski g.liakhovet...@gmx.de 
 wrote:
 On Mon, 17 Sep 2012, javier Martin wrote:

 Hi Shawn,

 On 17 September 2012 11:21, Guennadi Liakhovetski g.liakhovet...@gmx.de 
 wrote:
 On Mon, 17 Sep 2012, Shawn Guo wrote:

 It changes the driver to use platform_device_id rather than cpu_is_xxx
 to determine the controller type, and updates the platform code
 accordingly.

 As the result, mach/hardware.h inclusion gets removed from the driver.

 Signed-off-by: Shawn Guo shawn@linaro.org
 Cc: Guennadi Liakhovetski g.liakhovet...@gmx.de
 Cc: linux-media@vger.kernel.org

 
 Tested-by: Javier Martin javier.mar...@vista-silicon.com

I'm understanding that this patch will flow through arm tree[1]. So:
Acked-by: Mauro Carvalho Chehab mche...@redhat.com

[1] if you understand otherwise, I can apply it via my tree as well

 
 Acked-by: Guennadi Liakhovetski g.liakhovet...@gmx.de

 i.MX25 support is broken and is scheduled for removal.

 It is not yet, I haven't pushed those your patches yet.

 Thanks
 Guennadi

 I think we should not keep on trying to maintain it. Couldn't we just
 drop it? It only makes maintenance tasks more difficult.

 Thanks
 Guennadi

 ---
  arch/arm/mach-imx/clk-imx25.c   |6 +-
  arch/arm/mach-imx/clk-imx27.c   |6 +-
  arch/arm/mach-imx/devices/devices-common.h  |1 +
  arch/arm/mach-imx/devices/platform-mx2-camera.c |   12 +--
  drivers/media/video/mx2_camera.c|   95 
 +--
  5 files changed, 85 insertions(+), 35 deletions(-)

 diff --git a/arch/arm/mach-imx/clk-imx25.c b/arch/arm/mach-imx/clk-imx25.c
 index 1aea073..71fe521 100644
 --- a/arch/arm/mach-imx/clk-imx25.c
 +++ b/arch/arm/mach-imx/clk-imx25.c
 @@ -231,9 +231,9 @@ int __init mx25_clocks_init(void)
   clk_register_clkdev(clk[esdhc2_ipg_per], per, 
 sdhci-esdhc-imx25.1);
   clk_register_clkdev(clk[esdhc2_ipg], ipg, sdhci-esdhc-imx25.1);
   clk_register_clkdev(clk[esdhc2_ahb], ahb, sdhci-esdhc-imx25.1);
 - clk_register_clkdev(clk[csi_ipg_per], per, mx2-camera.0);
 - clk_register_clkdev(clk[csi_ipg], ipg, mx2-camera.0);
 - clk_register_clkdev(clk[csi_ahb], ahb, mx2-camera.0);
 + clk_register_clkdev(clk[csi_ipg_per], per, imx25-camera.0);
 + clk_register_clkdev(clk[csi_ipg], ipg, imx25-camera.0);
 + clk_register_clkdev(clk[csi_ahb], ahb, imx25-camera.0);
   clk_register_clkdev(clk[dummy], audmux, NULL);
   clk_register_clkdev(clk[can1_ipg], NULL, flexcan.0);
   clk_register_clkdev(clk[can2_ipg], NULL, flexcan.1);
 diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c
 index 5ff5cf0..e26de52 100644
 --- a/arch/arm/mach-imx/clk-imx27.c
 +++ b/arch/arm/mach-imx/clk-imx27.c
 @@ -224,7 +224,7 @@ int __init mx27_clocks_init(unsigned long fref)
   clk_register_clkdev(clk[per3_gate], per, imx-fb.0);
   clk_register_clkdev(clk[lcdc_ipg_gate], ipg, imx-fb.0);
   clk_register_clkdev(clk[lcdc_ahb_gate], ahb, imx-fb.0);
 - clk_register_clkdev(clk[csi_ahb_gate], ahb, mx2-camera.0);
 + clk_register_clkdev(clk[csi_ahb_gate], ahb, imx27-camera.0);
   clk_register_clkdev(clk[usb_div], per, fsl-usb2-udc);
   clk_register_clkdev(clk[usb_ipg_gate], ipg, fsl-usb2-udc);
   clk_register_clkdev(clk[usb_ahb_gate], ahb, fsl-usb2-udc);
 @@ -251,8 +251,8 @@ int __init mx27_clocks_init(unsigned long fref)
   clk_register_clkdev(clk[i2c2_ipg_gate], NULL, imx21-i2c.1);
   clk_register_clkdev(clk[owire_ipg_gate], NULL, mxc_w1.0);
   clk_register_clkdev(clk[kpp_ipg_gate], NULL, imx-keypad);
 - clk_register_clkdev(clk[emma_ahb_gate], emma-ahb, mx2-camera.0);
 - clk_register_clkdev(clk[emma_ipg_gate], emma-ipg, mx2-camera.0);
 + clk_register_clkdev(clk[emma_ahb_gate], emma-ahb, 
 imx27-camera.0);
 + clk_register_clkdev(clk[emma_ipg_gate], emma-ipg, 
 imx27-camera.0);
   clk_register_clkdev(clk[emma_ahb_gate], ahb, m2m-emmaprp.0);
   clk_register_clkdev(clk[emma_ipg_gate], ipg, m2m-emmaprp.0);
   clk_register_clkdev(clk[iim_ipg_gate], iim, NULL);
 diff --git a/arch/arm/mach-imx/devices/devices-common.h 
 b/arch/arm/mach-imx/devices/devices-common.h
 index 7f2698c..8112a1a 100644
 --- a/arch/arm/mach-imx/devices/devices-common.h
 +++ b/arch/arm/mach-imx/devices/devices-common.h
 @@ -202,6 +202,7 @@ struct platform_device *__init imx_add_mx3_sdc_fb(

  #include linux/platform_data/camera-mx2.h
  struct imx_mx2_camera_data {
 + const char *devid;
   resource_size_t iobasecsi;
   resource_size_t iosizecsi;
   resource_size_t irqcsi;
 diff --git a/arch/arm/mach-imx/devices/platform-mx2-camera.c 
 b/arch/arm/mach-imx/devices/platform-mx2-camera.c
 index 9ad5b2d..b88877d 100644
 --- a/arch/arm/mach-imx/devices/platform-mx2-camera.c
 +++ b/arch/arm/mach-imx/devices/platform-mx2-camera.c
 @@ -9,14 +9,16 @@
  #include mach/hardware.h
  #include devices-common.h


Re: [PATCH 28/34] media: mx2_camera: remove mach/hardware.h inclusion

2012-09-18 Thread javier Martin
On 17 September 2012 15:59, Guennadi Liakhovetski g.liakhovet...@gmx.de wrote:
 On Mon, 17 Sep 2012, javier Martin wrote:

 Hi Shawn,

 On 17 September 2012 11:21, Guennadi Liakhovetski g.liakhovet...@gmx.de 
 wrote:
  On Mon, 17 Sep 2012, Shawn Guo wrote:
 
  It changes the driver to use platform_device_id rather than cpu_is_xxx
  to determine the controller type, and updates the platform code
  accordingly.
 
  As the result, mach/hardware.h inclusion gets removed from the driver.
 
  Signed-off-by: Shawn Guo shawn@linaro.org
  Cc: Guennadi Liakhovetski g.liakhovet...@gmx.de
  Cc: linux-media@vger.kernel.org
 

Tested-by: Javier Martin javier.mar...@vista-silicon.com

  Acked-by: Guennadi Liakhovetski g.liakhovet...@gmx.de

 i.MX25 support is broken and is scheduled for removal.

 It is not yet, I haven't pushed those your patches yet.

 Thanks
 Guennadi

 I think we should not keep on trying to maintain it. Couldn't we just
 drop it? It only makes maintenance tasks more difficult.

  Thanks
  Guennadi
 
  ---
   arch/arm/mach-imx/clk-imx25.c   |6 +-
   arch/arm/mach-imx/clk-imx27.c   |6 +-
   arch/arm/mach-imx/devices/devices-common.h  |1 +
   arch/arm/mach-imx/devices/platform-mx2-camera.c |   12 +--
   drivers/media/video/mx2_camera.c|   95 
  +--
   5 files changed, 85 insertions(+), 35 deletions(-)
 
  diff --git a/arch/arm/mach-imx/clk-imx25.c b/arch/arm/mach-imx/clk-imx25.c
  index 1aea073..71fe521 100644
  --- a/arch/arm/mach-imx/clk-imx25.c
  +++ b/arch/arm/mach-imx/clk-imx25.c
  @@ -231,9 +231,9 @@ int __init mx25_clocks_init(void)
clk_register_clkdev(clk[esdhc2_ipg_per], per, 
  sdhci-esdhc-imx25.1);
clk_register_clkdev(clk[esdhc2_ipg], ipg, sdhci-esdhc-imx25.1);
clk_register_clkdev(clk[esdhc2_ahb], ahb, sdhci-esdhc-imx25.1);
  - clk_register_clkdev(clk[csi_ipg_per], per, mx2-camera.0);
  - clk_register_clkdev(clk[csi_ipg], ipg, mx2-camera.0);
  - clk_register_clkdev(clk[csi_ahb], ahb, mx2-camera.0);
  + clk_register_clkdev(clk[csi_ipg_per], per, imx25-camera.0);
  + clk_register_clkdev(clk[csi_ipg], ipg, imx25-camera.0);
  + clk_register_clkdev(clk[csi_ahb], ahb, imx25-camera.0);
clk_register_clkdev(clk[dummy], audmux, NULL);
clk_register_clkdev(clk[can1_ipg], NULL, flexcan.0);
clk_register_clkdev(clk[can2_ipg], NULL, flexcan.1);
  diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c
  index 5ff5cf0..e26de52 100644
  --- a/arch/arm/mach-imx/clk-imx27.c
  +++ b/arch/arm/mach-imx/clk-imx27.c
  @@ -224,7 +224,7 @@ int __init mx27_clocks_init(unsigned long fref)
clk_register_clkdev(clk[per3_gate], per, imx-fb.0);
clk_register_clkdev(clk[lcdc_ipg_gate], ipg, imx-fb.0);
clk_register_clkdev(clk[lcdc_ahb_gate], ahb, imx-fb.0);
  - clk_register_clkdev(clk[csi_ahb_gate], ahb, mx2-camera.0);
  + clk_register_clkdev(clk[csi_ahb_gate], ahb, imx27-camera.0);
clk_register_clkdev(clk[usb_div], per, fsl-usb2-udc);
clk_register_clkdev(clk[usb_ipg_gate], ipg, fsl-usb2-udc);
clk_register_clkdev(clk[usb_ahb_gate], ahb, fsl-usb2-udc);
  @@ -251,8 +251,8 @@ int __init mx27_clocks_init(unsigned long fref)
clk_register_clkdev(clk[i2c2_ipg_gate], NULL, imx21-i2c.1);
clk_register_clkdev(clk[owire_ipg_gate], NULL, mxc_w1.0);
clk_register_clkdev(clk[kpp_ipg_gate], NULL, imx-keypad);
  - clk_register_clkdev(clk[emma_ahb_gate], emma-ahb, mx2-camera.0);
  - clk_register_clkdev(clk[emma_ipg_gate], emma-ipg, mx2-camera.0);
  + clk_register_clkdev(clk[emma_ahb_gate], emma-ahb, 
  imx27-camera.0);
  + clk_register_clkdev(clk[emma_ipg_gate], emma-ipg, 
  imx27-camera.0);
clk_register_clkdev(clk[emma_ahb_gate], ahb, m2m-emmaprp.0);
clk_register_clkdev(clk[emma_ipg_gate], ipg, m2m-emmaprp.0);
clk_register_clkdev(clk[iim_ipg_gate], iim, NULL);
  diff --git a/arch/arm/mach-imx/devices/devices-common.h 
  b/arch/arm/mach-imx/devices/devices-common.h
  index 7f2698c..8112a1a 100644
  --- a/arch/arm/mach-imx/devices/devices-common.h
  +++ b/arch/arm/mach-imx/devices/devices-common.h
  @@ -202,6 +202,7 @@ struct platform_device *__init imx_add_mx3_sdc_fb(
 
   #include linux/platform_data/camera-mx2.h
   struct imx_mx2_camera_data {
  + const char *devid;
resource_size_t iobasecsi;
resource_size_t iosizecsi;
resource_size_t irqcsi;
  diff --git a/arch/arm/mach-imx/devices/platform-mx2-camera.c 
  b/arch/arm/mach-imx/devices/platform-mx2-camera.c
  index 9ad5b2d..b88877d 100644
  --- a/arch/arm/mach-imx/devices/platform-mx2-camera.c
  +++ b/arch/arm/mach-imx/devices/platform-mx2-camera.c
  @@ -9,14 +9,16 @@
   #include mach/hardware.h
   #include devices-common.h
 
  -#define imx_mx2_camera_data_entry_single(soc)
  \
  +#define imx_mx2_camera_data_entry_single(soc, _devid)  

Re: [PATCH 28/34] media: mx2_camera: remove mach/hardware.h inclusion

2012-09-17 Thread Guennadi Liakhovetski
On Mon, 17 Sep 2012, Shawn Guo wrote:

 It changes the driver to use platform_device_id rather than cpu_is_xxx
 to determine the controller type, and updates the platform code
 accordingly.
 
 As the result, mach/hardware.h inclusion gets removed from the driver.
 
 Signed-off-by: Shawn Guo shawn@linaro.org
 Cc: Guennadi Liakhovetski g.liakhovet...@gmx.de
 Cc: linux-media@vger.kernel.org

Acked-by: Guennadi Liakhovetski g.liakhovet...@gmx.de

Thanks
Guennadi

 ---
  arch/arm/mach-imx/clk-imx25.c   |6 +-
  arch/arm/mach-imx/clk-imx27.c   |6 +-
  arch/arm/mach-imx/devices/devices-common.h  |1 +
  arch/arm/mach-imx/devices/platform-mx2-camera.c |   12 +--
  drivers/media/video/mx2_camera.c|   95 
 +--
  5 files changed, 85 insertions(+), 35 deletions(-)
 
 diff --git a/arch/arm/mach-imx/clk-imx25.c b/arch/arm/mach-imx/clk-imx25.c
 index 1aea073..71fe521 100644
 --- a/arch/arm/mach-imx/clk-imx25.c
 +++ b/arch/arm/mach-imx/clk-imx25.c
 @@ -231,9 +231,9 @@ int __init mx25_clocks_init(void)
   clk_register_clkdev(clk[esdhc2_ipg_per], per, sdhci-esdhc-imx25.1);
   clk_register_clkdev(clk[esdhc2_ipg], ipg, sdhci-esdhc-imx25.1);
   clk_register_clkdev(clk[esdhc2_ahb], ahb, sdhci-esdhc-imx25.1);
 - clk_register_clkdev(clk[csi_ipg_per], per, mx2-camera.0);
 - clk_register_clkdev(clk[csi_ipg], ipg, mx2-camera.0);
 - clk_register_clkdev(clk[csi_ahb], ahb, mx2-camera.0);
 + clk_register_clkdev(clk[csi_ipg_per], per, imx25-camera.0);
 + clk_register_clkdev(clk[csi_ipg], ipg, imx25-camera.0);
 + clk_register_clkdev(clk[csi_ahb], ahb, imx25-camera.0);
   clk_register_clkdev(clk[dummy], audmux, NULL);
   clk_register_clkdev(clk[can1_ipg], NULL, flexcan.0);
   clk_register_clkdev(clk[can2_ipg], NULL, flexcan.1);
 diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c
 index 5ff5cf0..e26de52 100644
 --- a/arch/arm/mach-imx/clk-imx27.c
 +++ b/arch/arm/mach-imx/clk-imx27.c
 @@ -224,7 +224,7 @@ int __init mx27_clocks_init(unsigned long fref)
   clk_register_clkdev(clk[per3_gate], per, imx-fb.0);
   clk_register_clkdev(clk[lcdc_ipg_gate], ipg, imx-fb.0);
   clk_register_clkdev(clk[lcdc_ahb_gate], ahb, imx-fb.0);
 - clk_register_clkdev(clk[csi_ahb_gate], ahb, mx2-camera.0);
 + clk_register_clkdev(clk[csi_ahb_gate], ahb, imx27-camera.0);
   clk_register_clkdev(clk[usb_div], per, fsl-usb2-udc);
   clk_register_clkdev(clk[usb_ipg_gate], ipg, fsl-usb2-udc);
   clk_register_clkdev(clk[usb_ahb_gate], ahb, fsl-usb2-udc);
 @@ -251,8 +251,8 @@ int __init mx27_clocks_init(unsigned long fref)
   clk_register_clkdev(clk[i2c2_ipg_gate], NULL, imx21-i2c.1);
   clk_register_clkdev(clk[owire_ipg_gate], NULL, mxc_w1.0);
   clk_register_clkdev(clk[kpp_ipg_gate], NULL, imx-keypad);
 - clk_register_clkdev(clk[emma_ahb_gate], emma-ahb, mx2-camera.0);
 - clk_register_clkdev(clk[emma_ipg_gate], emma-ipg, mx2-camera.0);
 + clk_register_clkdev(clk[emma_ahb_gate], emma-ahb, imx27-camera.0);
 + clk_register_clkdev(clk[emma_ipg_gate], emma-ipg, imx27-camera.0);
   clk_register_clkdev(clk[emma_ahb_gate], ahb, m2m-emmaprp.0);
   clk_register_clkdev(clk[emma_ipg_gate], ipg, m2m-emmaprp.0);
   clk_register_clkdev(clk[iim_ipg_gate], iim, NULL);
 diff --git a/arch/arm/mach-imx/devices/devices-common.h 
 b/arch/arm/mach-imx/devices/devices-common.h
 index 7f2698c..8112a1a 100644
 --- a/arch/arm/mach-imx/devices/devices-common.h
 +++ b/arch/arm/mach-imx/devices/devices-common.h
 @@ -202,6 +202,7 @@ struct platform_device *__init imx_add_mx3_sdc_fb(
  
  #include linux/platform_data/camera-mx2.h
  struct imx_mx2_camera_data {
 + const char *devid;
   resource_size_t iobasecsi;
   resource_size_t iosizecsi;
   resource_size_t irqcsi;
 diff --git a/arch/arm/mach-imx/devices/platform-mx2-camera.c 
 b/arch/arm/mach-imx/devices/platform-mx2-camera.c
 index 9ad5b2d..b88877d 100644
 --- a/arch/arm/mach-imx/devices/platform-mx2-camera.c
 +++ b/arch/arm/mach-imx/devices/platform-mx2-camera.c
 @@ -9,14 +9,16 @@
  #include mach/hardware.h
  #include devices-common.h
  
 -#define imx_mx2_camera_data_entry_single(soc)
 \
 +#define imx_mx2_camera_data_entry_single(soc, _devid)
 \
   {   \
 + .devid = _devid,\
   .iobasecsi = soc ## _CSI_BASE_ADDR, \
   .iosizecsi = SZ_4K, \
   .irqcsi = soc ## _INT_CSI,  \
   }
 -#define imx_mx2_camera_data_entry_single_emma(soc)   \
 +#define imx_mx2_camera_data_entry_single_emma(soc, _devid)   \
   {   \
 + .devid = 

Re: [PATCH 28/34] media: mx2_camera: remove mach/hardware.h inclusion

2012-09-17 Thread javier Martin
Hi Shawn,

On 17 September 2012 11:21, Guennadi Liakhovetski g.liakhovet...@gmx.de wrote:
 On Mon, 17 Sep 2012, Shawn Guo wrote:

 It changes the driver to use platform_device_id rather than cpu_is_xxx
 to determine the controller type, and updates the platform code
 accordingly.

 As the result, mach/hardware.h inclusion gets removed from the driver.

 Signed-off-by: Shawn Guo shawn@linaro.org
 Cc: Guennadi Liakhovetski g.liakhovet...@gmx.de
 Cc: linux-media@vger.kernel.org

 Acked-by: Guennadi Liakhovetski g.liakhovet...@gmx.de

i.MX25 support is broken and is scheduled for removal.

I think we should not keep on trying to maintain it. Couldn't we just
drop it? It only makes maintenance tasks more difficult.

 Thanks
 Guennadi

 ---
  arch/arm/mach-imx/clk-imx25.c   |6 +-
  arch/arm/mach-imx/clk-imx27.c   |6 +-
  arch/arm/mach-imx/devices/devices-common.h  |1 +
  arch/arm/mach-imx/devices/platform-mx2-camera.c |   12 +--
  drivers/media/video/mx2_camera.c|   95 
 +--
  5 files changed, 85 insertions(+), 35 deletions(-)

 diff --git a/arch/arm/mach-imx/clk-imx25.c b/arch/arm/mach-imx/clk-imx25.c
 index 1aea073..71fe521 100644
 --- a/arch/arm/mach-imx/clk-imx25.c
 +++ b/arch/arm/mach-imx/clk-imx25.c
 @@ -231,9 +231,9 @@ int __init mx25_clocks_init(void)
   clk_register_clkdev(clk[esdhc2_ipg_per], per, sdhci-esdhc-imx25.1);
   clk_register_clkdev(clk[esdhc2_ipg], ipg, sdhci-esdhc-imx25.1);
   clk_register_clkdev(clk[esdhc2_ahb], ahb, sdhci-esdhc-imx25.1);
 - clk_register_clkdev(clk[csi_ipg_per], per, mx2-camera.0);
 - clk_register_clkdev(clk[csi_ipg], ipg, mx2-camera.0);
 - clk_register_clkdev(clk[csi_ahb], ahb, mx2-camera.0);
 + clk_register_clkdev(clk[csi_ipg_per], per, imx25-camera.0);
 + clk_register_clkdev(clk[csi_ipg], ipg, imx25-camera.0);
 + clk_register_clkdev(clk[csi_ahb], ahb, imx25-camera.0);
   clk_register_clkdev(clk[dummy], audmux, NULL);
   clk_register_clkdev(clk[can1_ipg], NULL, flexcan.0);
   clk_register_clkdev(clk[can2_ipg], NULL, flexcan.1);
 diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c
 index 5ff5cf0..e26de52 100644
 --- a/arch/arm/mach-imx/clk-imx27.c
 +++ b/arch/arm/mach-imx/clk-imx27.c
 @@ -224,7 +224,7 @@ int __init mx27_clocks_init(unsigned long fref)
   clk_register_clkdev(clk[per3_gate], per, imx-fb.0);
   clk_register_clkdev(clk[lcdc_ipg_gate], ipg, imx-fb.0);
   clk_register_clkdev(clk[lcdc_ahb_gate], ahb, imx-fb.0);
 - clk_register_clkdev(clk[csi_ahb_gate], ahb, mx2-camera.0);
 + clk_register_clkdev(clk[csi_ahb_gate], ahb, imx27-camera.0);
   clk_register_clkdev(clk[usb_div], per, fsl-usb2-udc);
   clk_register_clkdev(clk[usb_ipg_gate], ipg, fsl-usb2-udc);
   clk_register_clkdev(clk[usb_ahb_gate], ahb, fsl-usb2-udc);
 @@ -251,8 +251,8 @@ int __init mx27_clocks_init(unsigned long fref)
   clk_register_clkdev(clk[i2c2_ipg_gate], NULL, imx21-i2c.1);
   clk_register_clkdev(clk[owire_ipg_gate], NULL, mxc_w1.0);
   clk_register_clkdev(clk[kpp_ipg_gate], NULL, imx-keypad);
 - clk_register_clkdev(clk[emma_ahb_gate], emma-ahb, mx2-camera.0);
 - clk_register_clkdev(clk[emma_ipg_gate], emma-ipg, mx2-camera.0);
 + clk_register_clkdev(clk[emma_ahb_gate], emma-ahb, imx27-camera.0);
 + clk_register_clkdev(clk[emma_ipg_gate], emma-ipg, imx27-camera.0);
   clk_register_clkdev(clk[emma_ahb_gate], ahb, m2m-emmaprp.0);
   clk_register_clkdev(clk[emma_ipg_gate], ipg, m2m-emmaprp.0);
   clk_register_clkdev(clk[iim_ipg_gate], iim, NULL);
 diff --git a/arch/arm/mach-imx/devices/devices-common.h 
 b/arch/arm/mach-imx/devices/devices-common.h
 index 7f2698c..8112a1a 100644
 --- a/arch/arm/mach-imx/devices/devices-common.h
 +++ b/arch/arm/mach-imx/devices/devices-common.h
 @@ -202,6 +202,7 @@ struct platform_device *__init imx_add_mx3_sdc_fb(

  #include linux/platform_data/camera-mx2.h
  struct imx_mx2_camera_data {
 + const char *devid;
   resource_size_t iobasecsi;
   resource_size_t iosizecsi;
   resource_size_t irqcsi;
 diff --git a/arch/arm/mach-imx/devices/platform-mx2-camera.c 
 b/arch/arm/mach-imx/devices/platform-mx2-camera.c
 index 9ad5b2d..b88877d 100644
 --- a/arch/arm/mach-imx/devices/platform-mx2-camera.c
 +++ b/arch/arm/mach-imx/devices/platform-mx2-camera.c
 @@ -9,14 +9,16 @@
  #include mach/hardware.h
  #include devices-common.h

 -#define imx_mx2_camera_data_entry_single(soc)   
  \
 +#define imx_mx2_camera_data_entry_single(soc, _devid)   
  \
   {   \
 + .devid = _devid,\
   .iobasecsi = soc ## _CSI_BASE_ADDR, \
   .iosizecsi = SZ_4K, \
   .irqcsi = soc ## _INT_CSI,   

Re: [PATCH 28/34] media: mx2_camera: remove mach/hardware.h inclusion

2012-09-17 Thread Guennadi Liakhovetski
On Mon, 17 Sep 2012, javier Martin wrote:

 Hi Shawn,
 
 On 17 September 2012 11:21, Guennadi Liakhovetski g.liakhovet...@gmx.de 
 wrote:
  On Mon, 17 Sep 2012, Shawn Guo wrote:
 
  It changes the driver to use platform_device_id rather than cpu_is_xxx
  to determine the controller type, and updates the platform code
  accordingly.
 
  As the result, mach/hardware.h inclusion gets removed from the driver.
 
  Signed-off-by: Shawn Guo shawn@linaro.org
  Cc: Guennadi Liakhovetski g.liakhovet...@gmx.de
  Cc: linux-media@vger.kernel.org
 
  Acked-by: Guennadi Liakhovetski g.liakhovet...@gmx.de
 
 i.MX25 support is broken and is scheduled for removal.

It is not yet, I haven't pushed those your patches yet.

Thanks
Guennadi

 I think we should not keep on trying to maintain it. Couldn't we just
 drop it? It only makes maintenance tasks more difficult.
 
  Thanks
  Guennadi
 
  ---
   arch/arm/mach-imx/clk-imx25.c   |6 +-
   arch/arm/mach-imx/clk-imx27.c   |6 +-
   arch/arm/mach-imx/devices/devices-common.h  |1 +
   arch/arm/mach-imx/devices/platform-mx2-camera.c |   12 +--
   drivers/media/video/mx2_camera.c|   95 
  +--
   5 files changed, 85 insertions(+), 35 deletions(-)
 
  diff --git a/arch/arm/mach-imx/clk-imx25.c b/arch/arm/mach-imx/clk-imx25.c
  index 1aea073..71fe521 100644
  --- a/arch/arm/mach-imx/clk-imx25.c
  +++ b/arch/arm/mach-imx/clk-imx25.c
  @@ -231,9 +231,9 @@ int __init mx25_clocks_init(void)
clk_register_clkdev(clk[esdhc2_ipg_per], per, 
  sdhci-esdhc-imx25.1);
clk_register_clkdev(clk[esdhc2_ipg], ipg, sdhci-esdhc-imx25.1);
clk_register_clkdev(clk[esdhc2_ahb], ahb, sdhci-esdhc-imx25.1);
  - clk_register_clkdev(clk[csi_ipg_per], per, mx2-camera.0);
  - clk_register_clkdev(clk[csi_ipg], ipg, mx2-camera.0);
  - clk_register_clkdev(clk[csi_ahb], ahb, mx2-camera.0);
  + clk_register_clkdev(clk[csi_ipg_per], per, imx25-camera.0);
  + clk_register_clkdev(clk[csi_ipg], ipg, imx25-camera.0);
  + clk_register_clkdev(clk[csi_ahb], ahb, imx25-camera.0);
clk_register_clkdev(clk[dummy], audmux, NULL);
clk_register_clkdev(clk[can1_ipg], NULL, flexcan.0);
clk_register_clkdev(clk[can2_ipg], NULL, flexcan.1);
  diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c
  index 5ff5cf0..e26de52 100644
  --- a/arch/arm/mach-imx/clk-imx27.c
  +++ b/arch/arm/mach-imx/clk-imx27.c
  @@ -224,7 +224,7 @@ int __init mx27_clocks_init(unsigned long fref)
clk_register_clkdev(clk[per3_gate], per, imx-fb.0);
clk_register_clkdev(clk[lcdc_ipg_gate], ipg, imx-fb.0);
clk_register_clkdev(clk[lcdc_ahb_gate], ahb, imx-fb.0);
  - clk_register_clkdev(clk[csi_ahb_gate], ahb, mx2-camera.0);
  + clk_register_clkdev(clk[csi_ahb_gate], ahb, imx27-camera.0);
clk_register_clkdev(clk[usb_div], per, fsl-usb2-udc);
clk_register_clkdev(clk[usb_ipg_gate], ipg, fsl-usb2-udc);
clk_register_clkdev(clk[usb_ahb_gate], ahb, fsl-usb2-udc);
  @@ -251,8 +251,8 @@ int __init mx27_clocks_init(unsigned long fref)
clk_register_clkdev(clk[i2c2_ipg_gate], NULL, imx21-i2c.1);
clk_register_clkdev(clk[owire_ipg_gate], NULL, mxc_w1.0);
clk_register_clkdev(clk[kpp_ipg_gate], NULL, imx-keypad);
  - clk_register_clkdev(clk[emma_ahb_gate], emma-ahb, mx2-camera.0);
  - clk_register_clkdev(clk[emma_ipg_gate], emma-ipg, mx2-camera.0);
  + clk_register_clkdev(clk[emma_ahb_gate], emma-ahb, 
  imx27-camera.0);
  + clk_register_clkdev(clk[emma_ipg_gate], emma-ipg, 
  imx27-camera.0);
clk_register_clkdev(clk[emma_ahb_gate], ahb, m2m-emmaprp.0);
clk_register_clkdev(clk[emma_ipg_gate], ipg, m2m-emmaprp.0);
clk_register_clkdev(clk[iim_ipg_gate], iim, NULL);
  diff --git a/arch/arm/mach-imx/devices/devices-common.h 
  b/arch/arm/mach-imx/devices/devices-common.h
  index 7f2698c..8112a1a 100644
  --- a/arch/arm/mach-imx/devices/devices-common.h
  +++ b/arch/arm/mach-imx/devices/devices-common.h
  @@ -202,6 +202,7 @@ struct platform_device *__init imx_add_mx3_sdc_fb(
 
   #include linux/platform_data/camera-mx2.h
   struct imx_mx2_camera_data {
  + const char *devid;
resource_size_t iobasecsi;
resource_size_t iosizecsi;
resource_size_t irqcsi;
  diff --git a/arch/arm/mach-imx/devices/platform-mx2-camera.c 
  b/arch/arm/mach-imx/devices/platform-mx2-camera.c
  index 9ad5b2d..b88877d 100644
  --- a/arch/arm/mach-imx/devices/platform-mx2-camera.c
  +++ b/arch/arm/mach-imx/devices/platform-mx2-camera.c
  @@ -9,14 +9,16 @@
   #include mach/hardware.h
   #include devices-common.h
 
  -#define imx_mx2_camera_data_entry_single(soc) 
 \
  +#define imx_mx2_camera_data_entry_single(soc, _devid) 
 \
{   \
  + .devid = _devid,  

[PATCH 28/34] media: mx2_camera: remove mach/hardware.h inclusion

2012-09-16 Thread Shawn Guo
It changes the driver to use platform_device_id rather than cpu_is_xxx
to determine the controller type, and updates the platform code
accordingly.

As the result, mach/hardware.h inclusion gets removed from the driver.

Signed-off-by: Shawn Guo shawn@linaro.org
Cc: Guennadi Liakhovetski g.liakhovet...@gmx.de
Cc: linux-media@vger.kernel.org
---
 arch/arm/mach-imx/clk-imx25.c   |6 +-
 arch/arm/mach-imx/clk-imx27.c   |6 +-
 arch/arm/mach-imx/devices/devices-common.h  |1 +
 arch/arm/mach-imx/devices/platform-mx2-camera.c |   12 +--
 drivers/media/video/mx2_camera.c|   95 +--
 5 files changed, 85 insertions(+), 35 deletions(-)

diff --git a/arch/arm/mach-imx/clk-imx25.c b/arch/arm/mach-imx/clk-imx25.c
index 1aea073..71fe521 100644
--- a/arch/arm/mach-imx/clk-imx25.c
+++ b/arch/arm/mach-imx/clk-imx25.c
@@ -231,9 +231,9 @@ int __init mx25_clocks_init(void)
clk_register_clkdev(clk[esdhc2_ipg_per], per, sdhci-esdhc-imx25.1);
clk_register_clkdev(clk[esdhc2_ipg], ipg, sdhci-esdhc-imx25.1);
clk_register_clkdev(clk[esdhc2_ahb], ahb, sdhci-esdhc-imx25.1);
-   clk_register_clkdev(clk[csi_ipg_per], per, mx2-camera.0);
-   clk_register_clkdev(clk[csi_ipg], ipg, mx2-camera.0);
-   clk_register_clkdev(clk[csi_ahb], ahb, mx2-camera.0);
+   clk_register_clkdev(clk[csi_ipg_per], per, imx25-camera.0);
+   clk_register_clkdev(clk[csi_ipg], ipg, imx25-camera.0);
+   clk_register_clkdev(clk[csi_ahb], ahb, imx25-camera.0);
clk_register_clkdev(clk[dummy], audmux, NULL);
clk_register_clkdev(clk[can1_ipg], NULL, flexcan.0);
clk_register_clkdev(clk[can2_ipg], NULL, flexcan.1);
diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c
index 5ff5cf0..e26de52 100644
--- a/arch/arm/mach-imx/clk-imx27.c
+++ b/arch/arm/mach-imx/clk-imx27.c
@@ -224,7 +224,7 @@ int __init mx27_clocks_init(unsigned long fref)
clk_register_clkdev(clk[per3_gate], per, imx-fb.0);
clk_register_clkdev(clk[lcdc_ipg_gate], ipg, imx-fb.0);
clk_register_clkdev(clk[lcdc_ahb_gate], ahb, imx-fb.0);
-   clk_register_clkdev(clk[csi_ahb_gate], ahb, mx2-camera.0);
+   clk_register_clkdev(clk[csi_ahb_gate], ahb, imx27-camera.0);
clk_register_clkdev(clk[usb_div], per, fsl-usb2-udc);
clk_register_clkdev(clk[usb_ipg_gate], ipg, fsl-usb2-udc);
clk_register_clkdev(clk[usb_ahb_gate], ahb, fsl-usb2-udc);
@@ -251,8 +251,8 @@ int __init mx27_clocks_init(unsigned long fref)
clk_register_clkdev(clk[i2c2_ipg_gate], NULL, imx21-i2c.1);
clk_register_clkdev(clk[owire_ipg_gate], NULL, mxc_w1.0);
clk_register_clkdev(clk[kpp_ipg_gate], NULL, imx-keypad);
-   clk_register_clkdev(clk[emma_ahb_gate], emma-ahb, mx2-camera.0);
-   clk_register_clkdev(clk[emma_ipg_gate], emma-ipg, mx2-camera.0);
+   clk_register_clkdev(clk[emma_ahb_gate], emma-ahb, imx27-camera.0);
+   clk_register_clkdev(clk[emma_ipg_gate], emma-ipg, imx27-camera.0);
clk_register_clkdev(clk[emma_ahb_gate], ahb, m2m-emmaprp.0);
clk_register_clkdev(clk[emma_ipg_gate], ipg, m2m-emmaprp.0);
clk_register_clkdev(clk[iim_ipg_gate], iim, NULL);
diff --git a/arch/arm/mach-imx/devices/devices-common.h 
b/arch/arm/mach-imx/devices/devices-common.h
index 7f2698c..8112a1a 100644
--- a/arch/arm/mach-imx/devices/devices-common.h
+++ b/arch/arm/mach-imx/devices/devices-common.h
@@ -202,6 +202,7 @@ struct platform_device *__init imx_add_mx3_sdc_fb(
 
 #include linux/platform_data/camera-mx2.h
 struct imx_mx2_camera_data {
+   const char *devid;
resource_size_t iobasecsi;
resource_size_t iosizecsi;
resource_size_t irqcsi;
diff --git a/arch/arm/mach-imx/devices/platform-mx2-camera.c 
b/arch/arm/mach-imx/devices/platform-mx2-camera.c
index 9ad5b2d..b88877d 100644
--- a/arch/arm/mach-imx/devices/platform-mx2-camera.c
+++ b/arch/arm/mach-imx/devices/platform-mx2-camera.c
@@ -9,14 +9,16 @@
 #include mach/hardware.h
 #include devices-common.h
 
-#define imx_mx2_camera_data_entry_single(soc)  \
+#define imx_mx2_camera_data_entry_single(soc, _devid)  \
{   \
+   .devid = _devid,\
.iobasecsi = soc ## _CSI_BASE_ADDR, \
.iosizecsi = SZ_4K, \
.irqcsi = soc ## _INT_CSI,  \
}
-#define imx_mx2_camera_data_entry_single_emma(soc) \
+#define imx_mx2_camera_data_entry_single_emma(soc, _devid) \
{   \
+   .devid = _devid,\
.iobasecsi = soc ## _CSI_BASE_ADDR, \