Re: [PATCH v2 27/34] media: mx2_camera: remove cpu_is_xxx by using platform_device_id

2012-10-06 Thread Shawn Guo
On Thu, Sep 27, 2012 at 04:03:21PM -0300, Mauro Carvalho Chehab wrote:
 It seems that it depends on some stuff that got merged via the arm tree.
 
 Not sure what would the better way to handle that, as applying it via -arm
 will likely generate conflicts when merging from both trees upstream.
 
 If this change is not urgent, maybe it would be better to apply it after
 the end of the merge window, via either one of the trees.
 
That's the original plan, having it merged via arm-soc tree at the end
of 3.7 merge window.  But I was told by arm-soc folks that we already
have enough conflicts to sort out for this window, and we do not want
any more.  And we have to postpone it to 3.8.

I will publish a topic branch for this series after 3.7-rc1 comes out.

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 v2 27/34] media: mx2_camera: remove cpu_is_xxx by using platform_device_id

2012-10-06 Thread Mauro Carvalho Chehab
Em Sat, 6 Oct 2012 16:26:40 +0800
Shawn Guo shawn@linaro.org escreveu:

 On Thu, Sep 27, 2012 at 04:03:21PM -0300, Mauro Carvalho Chehab wrote:
  It seems that it depends on some stuff that got merged via the arm tree.
  
  Not sure what would the better way to handle that, as applying it via -arm
  will likely generate conflicts when merging from both trees upstream.
  
  If this change is not urgent, maybe it would be better to apply it after
  the end of the merge window, via either one of the trees.
  
 That's the original plan, having it merged via arm-soc tree at the end
 of 3.7 merge window.  But I was told by arm-soc folks that we already
 have enough conflicts to sort out for this window, and we do not want
 any more.  And we have to postpone it to 3.8.
 
 I will publish a topic branch for this series after 3.7-rc1 comes out.

Ok. Btw, as expected, the patch doesn't apply cleanly anymore, due to the
file renames. Waiting for 3.7-rc1 seems to be the right thing to do here.


-- 
Regards,
Mauro
--
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 27/34] media: mx2_camera: remove cpu_is_xxx by using platform_device_id

2012-09-27 Thread Mauro Carvalho Chehab
Em Thu, 20 Sep 2012 14:45:40 +0800
Shawn Guo shawn@linaro.org escreveu:

 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
 Acked-by: Sascha Hauer s.ha...@pengutronix.de
 Acked-by: Arnd Bergmann a...@arndb.de
 Acked-by: Guennadi Liakhovetski g.liakhovet...@gmx.de
 Tested-by: Javier Martin javier.mar...@vista-silicon.com
 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 
 +--

As most of the changes are at drivers/media, and you got Arnd's ack, it makes 
sense
to merge it via my tree.

However, even after fixing the media patch (that got renamed on 3.6),
the patch doesn't apply:

$ quilt push
Applying patch 
patches/lmml_14534_v2_27_34_media_mx2_camera_remove_cpu_is_xxx_by_using_platform_device_id.patch
patching file arch/arm/mach-imx/clk-imx25.c
Hunk #1 succeeded at 232 (offset 1 line).
patching file arch/arm/mach-imx/clk-imx27.c
Hunk #1 succeeded at 223 (offset -1 lines).
Hunk #2 succeeded at 250 with fuzz 1 (offset -1 lines).
can't find file to patch at input line 82
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--
|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
--
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 94
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--
|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
--
No file to patch.  Skipping patch.
3 out of 3 hunks ignored
patching file drivers/media/platform/soc_camera/mx2_camera.c
Hunk #1 FAILED at 41.
Hunk #6 succeeded at 467 (offset 28 lines).
Hunk #7 succeeded at 499 (offset 28 lines).
Hunk #8 succeeded at 575 (offset 28 lines).
Hunk #9 succeeded at 584 (offset 28 lines).
Hunk #10 succeeded at 669 (offset 28 lines).
Hunk #11 succeeded at 688 (offset 28 lines).
Hunk #12 succeeded at 745 (offset 28 lines).
Hunk #13 succeeded at 868 (offset 28 lines).
Hunk #14 succeeded at 963 (offset 28 lines).
Hunk #15 succeeded at 1115 (offset 28 lines).
Hunk #16 succeeded at 1424 (offset 40 lines).
Hunk #17 succeeded at 1758 (offset 40 lines).
Hunk #18 succeeded at 1809 (offset 40 lines).
Hunk #19 succeeded at 1818 (offset 40 lines).
Hunk #20 succeeded at 1835 (offset 40 lines).
Hunk #21 succeeded at 1855 (offset 40 lines).
Hunk #22 succeeded at 1873 (offset 40 lines).
Hunk #23 succeeded at 1887 (offset 40 lines).
1 out of 23 hunks FAILED -- rejects in file 
drivers/media/platform/soc_camera/mx2_camera.c

It seems that it depends on some stuff that got merged via the arm tree.

Not sure what would the better way to handle that, as applying it via -arm
will likely generate conflicts when merging from both trees upstream.

If this change is not urgent, maybe it would be better to apply it after
the end of the merge window, via either one of the trees.

Arnd,

What do you think?

Regards,
Mauro

--
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 27/34] media: mx2_camera: remove cpu_is_xxx by using platform_device_id

2012-09-20 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
Acked-by: Sascha Hauer s.ha...@pengutronix.de
Acked-by: Arnd Bergmann a...@arndb.de
Acked-by: Guennadi Liakhovetski g.liakhovet...@gmx.de
Tested-by: Javier Martin javier.mar...@vista-silicon.com
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 82cb785..f4ec05e 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) \
{   \
+