aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2012-06-13 02:07:31 -0400
committerShawn Guo <shawn.guo@linaro.org>2012-07-01 09:57:43 -0400
commit88289c80d419897c03f7f43b35e3730d8fb6825b (patch)
tree026e38319b74258f490e52350af6bc86eaf3ad2b
parent544496ab5cbdae312351da4c742ae70cab08dbf2 (diff)
dma: ipu: remove the use of ipu_platform_data
The struct ipu_platform_data is used by platform code to pass MXC_IPU_IRQ_START to ipu-core driver. We can save it by having ipu-core driver call irq_alloc_descs to get the irq_base. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
-rw-r--r--arch/arm/mach-imx/devices-imx31.h4
-rw-r--r--arch/arm/mach-imx/devices-imx35.h4
-rw-r--r--arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c6
-rw-r--r--arch/arm/mach-imx/mach-armadillo5x0.c6
-rw-r--r--arch/arm/mach-imx/mach-mx31_3ds.c6
-rw-r--r--arch/arm/mach-imx/mach-mx31moboard.c6
-rw-r--r--arch/arm/mach-imx/mach-mx35_3ds.c10
-rw-r--r--arch/arm/mach-imx/mach-pcm037.c6
-rw-r--r--arch/arm/mach-imx/mach-pcm043.c6
-rw-r--r--arch/arm/mach-imx/mach-vpr200.c6
-rw-r--r--arch/arm/mach-imx/mx31lilly-db.c6
-rw-r--r--arch/arm/plat-mxc/devices/platform-ipu-core.c5
-rw-r--r--arch/arm/plat-mxc/include/mach/devices-common.h4
-rw-r--r--arch/arm/plat-mxc/include/mach/ipu.h4
-rw-r--r--drivers/dma/ipu/ipu_idmac.c8
-rw-r--r--drivers/dma/ipu/ipu_irq.c14
16 files changed, 28 insertions, 73 deletions
diff --git a/arch/arm/mach-imx/devices-imx31.h b/arch/arm/mach-imx/devices-imx31.h
index 488e241a6db6..911c2dac2452 100644
--- a/arch/arm/mach-imx/devices-imx31.h
+++ b/arch/arm/mach-imx/devices-imx31.h
@@ -42,8 +42,8 @@ extern const struct imx_imx_uart_1irq_data imx31_imx_uart_data[];
42#define imx31_add_imx_uart4(pdata) imx31_add_imx_uart(4, pdata) 42#define imx31_add_imx_uart4(pdata) imx31_add_imx_uart(4, pdata)
43 43
44extern const struct imx_ipu_core_data imx31_ipu_core_data; 44extern const struct imx_ipu_core_data imx31_ipu_core_data;
45#define imx31_add_ipu_core(pdata) \ 45#define imx31_add_ipu_core() \
46 imx_add_ipu_core(&imx31_ipu_core_data, pdata) 46 imx_add_ipu_core(&imx31_ipu_core_data)
47#define imx31_alloc_mx3_camera(pdata) \ 47#define imx31_alloc_mx3_camera(pdata) \
48 imx_alloc_mx3_camera(&imx31_ipu_core_data, pdata) 48 imx_alloc_mx3_camera(&imx31_ipu_core_data, pdata)
49#define imx31_add_mx3_sdc_fb(pdata) \ 49#define imx31_add_mx3_sdc_fb(pdata) \
diff --git a/arch/arm/mach-imx/devices-imx35.h b/arch/arm/mach-imx/devices-imx35.h
index 7b99ef0bb501..6fb907290f47 100644
--- a/arch/arm/mach-imx/devices-imx35.h
+++ b/arch/arm/mach-imx/devices-imx35.h
@@ -50,8 +50,8 @@ extern const struct imx_imx_uart_1irq_data imx35_imx_uart_data[];
50#define imx35_add_imx_uart2(pdata) imx35_add_imx_uart(2, pdata) 50#define imx35_add_imx_uart2(pdata) imx35_add_imx_uart(2, pdata)
51 51
52extern const struct imx_ipu_core_data imx35_ipu_core_data; 52extern const struct imx_ipu_core_data imx35_ipu_core_data;
53#define imx35_add_ipu_core(pdata) \ 53#define imx35_add_ipu_core() \
54 imx_add_ipu_core(&imx35_ipu_core_data, pdata) 54 imx_add_ipu_core(&imx35_ipu_core_data)
55#define imx35_alloc_mx3_camera(pdata) \ 55#define imx35_alloc_mx3_camera(pdata) \
56 imx_alloc_mx3_camera(&imx35_ipu_core_data, pdata) 56 imx_alloc_mx3_camera(&imx35_ipu_core_data, pdata)
57#define imx35_add_mx3_sdc_fb(pdata) \ 57#define imx35_add_mx3_sdc_fb(pdata) \
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c
index 557f6c486053..6e9dd12a6961 100644
--- a/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c
+++ b/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c
@@ -95,10 +95,6 @@ static const struct fb_videomode fb_modedb[] = {
95 }, 95 },
96}; 96};
97 97
98static const struct ipu_platform_data mx3_ipu_data __initconst = {
99 .irq_base = MXC_IPU_IRQ_START,
100};
101
102static struct mx3fb_platform_data mx3fb_pdata __initdata = { 98static struct mx3fb_platform_data mx3fb_pdata __initdata = {
103 .name = "CMO-QVGA", 99 .name = "CMO-QVGA",
104 .mode = fb_modedb, 100 .mode = fb_modedb,
@@ -287,7 +283,7 @@ void __init eukrea_mbimxsd35_baseboard_init(void)
287 printk(KERN_ERR "error setting mbimxsd pads !\n"); 283 printk(KERN_ERR "error setting mbimxsd pads !\n");
288 284
289 imx35_add_imx_uart1(&uart_pdata); 285 imx35_add_imx_uart1(&uart_pdata);
290 imx35_add_ipu_core(&mx3_ipu_data); 286 imx35_add_ipu_core();
291 imx35_add_mx3_sdc_fb(&mx3fb_pdata); 287 imx35_add_mx3_sdc_fb(&mx3fb_pdata);
292 288
293 imx35_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata); 289 imx35_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata);
diff --git a/arch/arm/mach-imx/mach-armadillo5x0.c b/arch/arm/mach-imx/mach-armadillo5x0.c
index f83c5c683575..2c6ab3273f9e 100644
--- a/arch/arm/mach-imx/mach-armadillo5x0.c
+++ b/arch/arm/mach-imx/mach-armadillo5x0.c
@@ -367,10 +367,6 @@ static const struct fb_videomode fb_modedb[] = {
367 }, 367 },
368}; 368};
369 369
370static const struct ipu_platform_data mx3_ipu_data __initconst = {
371 .irq_base = MXC_IPU_IRQ_START,
372};
373
374static struct mx3fb_platform_data mx3fb_pdata __initdata = { 370static struct mx3fb_platform_data mx3fb_pdata __initdata = {
375 .name = "CRT-VGA", 371 .name = "CRT-VGA",
376 .mode = fb_modedb, 372 .mode = fb_modedb,
@@ -517,7 +513,7 @@ static void __init armadillo5x0_init(void)
517 imx31_add_mxc_mmc(0, &sdhc_pdata); 513 imx31_add_mxc_mmc(0, &sdhc_pdata);
518 514
519 /* Register FB */ 515 /* Register FB */
520 imx31_add_ipu_core(&mx3_ipu_data); 516 imx31_add_ipu_core();
521 imx31_add_mx3_sdc_fb(&mx3fb_pdata); 517 imx31_add_mx3_sdc_fb(&mx3fb_pdata);
522 518
523 /* Register NOR Flash */ 519 /* Register NOR Flash */
diff --git a/arch/arm/mach-imx/mach-mx31_3ds.c b/arch/arm/mach-imx/mach-mx31_3ds.c
index ecdba0497e7e..618935e1e325 100644
--- a/arch/arm/mach-imx/mach-mx31_3ds.c
+++ b/arch/arm/mach-imx/mach-mx31_3ds.c
@@ -274,10 +274,6 @@ static const struct fb_videomode fb_modedb[] = {
274 }, 274 },
275}; 275};
276 276
277static struct ipu_platform_data mx3_ipu_data = {
278 .irq_base = MXC_IPU_IRQ_START,
279};
280
281static struct mx3fb_platform_data mx3fb_pdata __initdata = { 277static struct mx3fb_platform_data mx3fb_pdata __initdata = {
282 .name = "Epson-VGA", 278 .name = "Epson-VGA",
283 .mode = fb_modedb, 279 .mode = fb_modedb,
@@ -743,7 +739,7 @@ static void __init mx31_3ds_init(void)
743 imx31_add_mxc_mmc(0, &sdhc1_pdata); 739 imx31_add_mxc_mmc(0, &sdhc1_pdata);
744 740
745 imx31_add_spi_imx0(&spi0_pdata); 741 imx31_add_spi_imx0(&spi0_pdata);
746 imx31_add_ipu_core(&mx3_ipu_data); 742 imx31_add_ipu_core();
747 imx31_add_mx3_sdc_fb(&mx3fb_pdata); 743 imx31_add_mx3_sdc_fb(&mx3fb_pdata);
748 744
749 /* CSI */ 745 /* CSI */
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c
index f0d26db7719e..54d9e5d9fcec 100644
--- a/arch/arm/mach-imx/mach-mx31moboard.c
+++ b/arch/arm/mach-imx/mach-mx31moboard.c
@@ -473,10 +473,6 @@ static const struct gpio_led_platform_data mx31moboard_led_pdata __initconst = {
473 .leds = mx31moboard_leds, 473 .leds = mx31moboard_leds,
474}; 474};
475 475
476static const struct ipu_platform_data mx3_ipu_data __initconst = {
477 .irq_base = MXC_IPU_IRQ_START,
478};
479
480static struct platform_device *devices[] __initdata = { 476static struct platform_device *devices[] __initdata = {
481 &mx31moboard_flash, 477 &mx31moboard_flash,
482}; 478};
@@ -494,7 +490,7 @@ static int __init mx31moboard_init_cam(void)
494 int dma, ret = -ENOMEM; 490 int dma, ret = -ENOMEM;
495 struct platform_device *pdev; 491 struct platform_device *pdev;
496 492
497 imx31_add_ipu_core(&mx3_ipu_data); 493 imx31_add_ipu_core();
498 494
499 pdev = imx31_alloc_mx3_camera(&camera_pdata); 495 pdev = imx31_alloc_mx3_camera(&camera_pdata);
500 if (IS_ERR(pdev)) 496 if (IS_ERR(pdev))
diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c
index fa1ea74dfdd3..ad63e6ebee6d 100644
--- a/arch/arm/mach-imx/mach-mx35_3ds.c
+++ b/arch/arm/mach-imx/mach-mx35_3ds.c
@@ -80,10 +80,6 @@ static const struct fb_videomode fb_modedb[] = {
80 }, 80 },
81}; 81};
82 82
83static const struct ipu_platform_data mx3_ipu_data __initconst = {
84 .irq_base = MXC_IPU_IRQ_START,
85};
86
87static struct mx3fb_platform_data mx3fb_pdata __initdata = { 83static struct mx3fb_platform_data mx3fb_pdata __initdata = {
88 .name = "Ceramate-CLAA070VC01", 84 .name = "Ceramate-CLAA070VC01",
89 .mode = fb_modedb, 85 .mode = fb_modedb,
@@ -297,10 +293,6 @@ err:
297 return ret; 293 return ret;
298} 294}
299 295
300static const struct ipu_platform_data mx35_3ds_ipu_data __initconst = {
301 .irq_base = MXC_IPU_IRQ_START,
302};
303
304static struct i2c_board_info mx35_3ds_i2c_camera = { 296static struct i2c_board_info mx35_3ds_i2c_camera = {
305 I2C_BOARD_INFO("ov2640", 0x30), 297 I2C_BOARD_INFO("ov2640", 0x30),
306}; 298};
@@ -596,7 +588,7 @@ static void __init mx35_3ds_init(void)
596 i2c_register_board_info( 588 i2c_register_board_info(
597 0, i2c_devices_3ds, ARRAY_SIZE(i2c_devices_3ds)); 589 0, i2c_devices_3ds, ARRAY_SIZE(i2c_devices_3ds));
598 590
599 imx35_add_ipu_core(&mx35_3ds_ipu_data); 591 imx35_add_ipu_core();
600 platform_device_register(&mx35_3ds_ov2640); 592 platform_device_register(&mx35_3ds_ov2640);
601 imx35_3ds_init_camera(); 593 imx35_3ds_init_camera();
602 594
diff --git a/arch/arm/mach-imx/mach-pcm037.c b/arch/arm/mach-imx/mach-pcm037.c
index 551a035f0c2d..ded4ed9def9e 100644
--- a/arch/arm/mach-imx/mach-pcm037.c
+++ b/arch/arm/mach-imx/mach-pcm037.c
@@ -441,10 +441,6 @@ static struct platform_device *devices[] __initdata = {
441 &pcm037_mt9v022, 441 &pcm037_mt9v022,
442}; 442};
443 443
444static const struct ipu_platform_data mx3_ipu_data __initconst = {
445 .irq_base = MXC_IPU_IRQ_START,
446};
447
448static const struct fb_videomode fb_modedb[] = { 444static const struct fb_videomode fb_modedb[] = {
449 { 445 {
450 /* 240x320 @ 60 Hz Sharp */ 446 /* 240x320 @ 60 Hz Sharp */
@@ -648,7 +644,7 @@ static void __init pcm037_init(void)
648 644
649 imx31_add_mxc_nand(&pcm037_nand_board_info); 645 imx31_add_mxc_nand(&pcm037_nand_board_info);
650 imx31_add_mxc_mmc(0, &sdhc_pdata); 646 imx31_add_mxc_mmc(0, &sdhc_pdata);
651 imx31_add_ipu_core(&mx3_ipu_data); 647 imx31_add_ipu_core();
652 imx31_add_mx3_sdc_fb(&mx3fb_pdata); 648 imx31_add_mx3_sdc_fb(&mx3fb_pdata);
653 649
654 /* CSI */ 650 /* CSI */
diff --git a/arch/arm/mach-imx/mach-pcm043.c b/arch/arm/mach-imx/mach-pcm043.c
index 73585f55cca0..133908f94f7e 100644
--- a/arch/arm/mach-imx/mach-pcm043.c
+++ b/arch/arm/mach-imx/mach-pcm043.c
@@ -76,10 +76,6 @@ static const struct fb_videomode fb_modedb[] = {
76 }, 76 },
77}; 77};
78 78
79static const struct ipu_platform_data mx3_ipu_data __initconst = {
80 .irq_base = MXC_IPU_IRQ_START,
81};
82
83static struct mx3fb_platform_data mx3fb_pdata __initdata = { 79static struct mx3fb_platform_data mx3fb_pdata __initdata = {
84 .name = "Sharp-LQ035Q7", 80 .name = "Sharp-LQ035Q7",
85 .mode = fb_modedb, 81 .mode = fb_modedb,
@@ -376,7 +372,7 @@ static void __init pcm043_init(void)
376 372
377 imx35_add_imx_i2c0(&pcm043_i2c0_data); 373 imx35_add_imx_i2c0(&pcm043_i2c0_data);
378 374
379 imx35_add_ipu_core(&mx3_ipu_data); 375 imx35_add_ipu_core();
380 imx35_add_mx3_sdc_fb(&mx3fb_pdata); 376 imx35_add_mx3_sdc_fb(&mx3fb_pdata);
381 377
382 if (otg_mode_host) { 378 if (otg_mode_host) {
diff --git a/arch/arm/mach-imx/mach-vpr200.c b/arch/arm/mach-imx/mach-vpr200.c
index e36eb2c40f41..1aa562285960 100644
--- a/arch/arm/mach-imx/mach-vpr200.c
+++ b/arch/arm/mach-imx/mach-vpr200.c
@@ -87,10 +87,6 @@ static const struct fb_videomode fb_modedb[] = {
87 } 87 }
88}; 88};
89 89
90static const struct ipu_platform_data mx3_ipu_data __initconst = {
91 .irq_base = MXC_IPU_IRQ_START,
92};
93
94static struct mx3fb_platform_data mx3fb_pdata __initdata = { 90static struct mx3fb_platform_data mx3fb_pdata __initdata = {
95 .name = "PT0708048", 91 .name = "PT0708048",
96 .mode = fb_modedb, 92 .mode = fb_modedb,
@@ -290,7 +286,7 @@ static void __init vpr200_board_init(void)
290 imx35_add_imx_uart0(NULL); 286 imx35_add_imx_uart0(NULL);
291 imx35_add_imx_uart2(NULL); 287 imx35_add_imx_uart2(NULL);
292 288
293 imx35_add_ipu_core(&mx3_ipu_data); 289 imx35_add_ipu_core();
294 imx35_add_mx3_sdc_fb(&mx3fb_pdata); 290 imx35_add_mx3_sdc_fb(&mx3fb_pdata);
295 291
296 imx35_add_fsl_usb2_udc(&otg_device_pdata); 292 imx35_add_fsl_usb2_udc(&otg_device_pdata);
diff --git a/arch/arm/mach-imx/mx31lilly-db.c b/arch/arm/mach-imx/mx31lilly-db.c
index 2df625bdc71e..29e890f92055 100644
--- a/arch/arm/mach-imx/mx31lilly-db.c
+++ b/arch/arm/mach-imx/mx31lilly-db.c
@@ -162,10 +162,6 @@ static const struct imxmmc_platform_data mmc_pdata __initconst = {
162}; 162};
163 163
164/* Framebuffer support */ 164/* Framebuffer support */
165static const struct ipu_platform_data ipu_data __initconst = {
166 .irq_base = MXC_IPU_IRQ_START,
167};
168
169static const struct fb_videomode fb_modedb = { 165static const struct fb_videomode fb_modedb = {
170 /* 640x480 TFT panel (IPS-056T) */ 166 /* 640x480 TFT panel (IPS-056T) */
171 .name = "CRT-VGA", 167 .name = "CRT-VGA",
@@ -199,7 +195,7 @@ static void __init mx31lilly_init_fb(void)
199 return; 195 return;
200 } 196 }
201 197
202 imx31_add_ipu_core(&ipu_data); 198 imx31_add_ipu_core();
203 imx31_add_mx3_sdc_fb(&fb_pdata); 199 imx31_add_mx3_sdc_fb(&fb_pdata);
204 gpio_direction_output(LCD_VCC_EN_GPIO, 1); 200 gpio_direction_output(LCD_VCC_EN_GPIO, 1);
205} 201}
diff --git a/arch/arm/plat-mxc/devices/platform-ipu-core.c b/arch/arm/plat-mxc/devices/platform-ipu-core.c
index 79d340ae0af1..d1e33cc6f12e 100644
--- a/arch/arm/plat-mxc/devices/platform-ipu-core.c
+++ b/arch/arm/plat-mxc/devices/platform-ipu-core.c
@@ -30,8 +30,7 @@ const struct imx_ipu_core_data imx35_ipu_core_data __initconst =
30static struct platform_device *imx_ipu_coredev __initdata; 30static struct platform_device *imx_ipu_coredev __initdata;
31 31
32struct platform_device *__init imx_add_ipu_core( 32struct platform_device *__init imx_add_ipu_core(
33 const struct imx_ipu_core_data *data, 33 const struct imx_ipu_core_data *data)
34 const struct ipu_platform_data *pdata)
35{ 34{
36 /* The resource order is important! */ 35 /* The resource order is important! */
37 struct resource res[] = { 36 struct resource res[] = {
@@ -55,7 +54,7 @@ struct platform_device *__init imx_add_ipu_core(
55 }; 54 };
56 55
57 return imx_ipu_coredev = imx_add_platform_device("ipu-core", -1, 56 return imx_ipu_coredev = imx_add_platform_device("ipu-core", -1,
58 res, ARRAY_SIZE(res), pdata, sizeof(*pdata)); 57 res, ARRAY_SIZE(res), NULL, 0);
59} 58}
60 59
61struct platform_device *__init imx_alloc_mx3_camera( 60struct platform_device *__init imx_alloc_mx3_camera(
diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h b/arch/arm/plat-mxc/include/mach/devices-common.h
index 1b2258daa05b..a7f5bb1084d7 100644
--- a/arch/arm/plat-mxc/include/mach/devices-common.h
+++ b/arch/arm/plat-mxc/include/mach/devices-common.h
@@ -183,7 +183,6 @@ struct platform_device *__init imx_add_imx_udc(
183 const struct imx_imx_udc_data *data, 183 const struct imx_imx_udc_data *data,
184 const struct imxusb_platform_data *pdata); 184 const struct imxusb_platform_data *pdata);
185 185
186#include <mach/ipu.h>
187#include <mach/mx3fb.h> 186#include <mach/mx3fb.h>
188#include <mach/mx3_camera.h> 187#include <mach/mx3_camera.h>
189struct imx_ipu_core_data { 188struct imx_ipu_core_data {
@@ -192,8 +191,7 @@ struct imx_ipu_core_data {
192 resource_size_t errirq; 191 resource_size_t errirq;
193}; 192};
194struct platform_device *__init imx_add_ipu_core( 193struct platform_device *__init imx_add_ipu_core(
195 const struct imx_ipu_core_data *data, 194 const struct imx_ipu_core_data *data);
196 const struct ipu_platform_data *pdata);
197struct platform_device *__init imx_alloc_mx3_camera( 195struct platform_device *__init imx_alloc_mx3_camera(
198 const struct imx_ipu_core_data *data, 196 const struct imx_ipu_core_data *data,
199 const struct mx3_camera_pdata *pdata); 197 const struct mx3_camera_pdata *pdata);
diff --git a/arch/arm/plat-mxc/include/mach/ipu.h b/arch/arm/plat-mxc/include/mach/ipu.h
index a9221f1cc1a0..539e559d18b2 100644
--- a/arch/arm/plat-mxc/include/mach/ipu.h
+++ b/arch/arm/plat-mxc/include/mach/ipu.h
@@ -110,10 +110,6 @@ enum ipu_rotate_mode {
110 IPU_ROTATE_90_LEFT = 7, 110 IPU_ROTATE_90_LEFT = 7,
111}; 111};
112 112
113struct ipu_platform_data {
114 unsigned int irq_base;
115};
116
117/* 113/*
118 * Enumeration of DI ports for ADC. 114 * Enumeration of DI ports for ADC.
119 */ 115 */
diff --git a/drivers/dma/ipu/ipu_idmac.c b/drivers/dma/ipu/ipu_idmac.c
index 5ec72044ea4c..c7573e50aa14 100644
--- a/drivers/dma/ipu/ipu_idmac.c
+++ b/drivers/dma/ipu/ipu_idmac.c
@@ -1663,7 +1663,6 @@ static void __exit ipu_idmac_exit(struct ipu *ipu)
1663 1663
1664static int __init ipu_probe(struct platform_device *pdev) 1664static int __init ipu_probe(struct platform_device *pdev)
1665{ 1665{
1666 struct ipu_platform_data *pdata = pdev->dev.platform_data;
1667 struct resource *mem_ipu, *mem_ic; 1666 struct resource *mem_ipu, *mem_ic;
1668 int ret; 1667 int ret;
1669 1668
@@ -1671,7 +1670,7 @@ static int __init ipu_probe(struct platform_device *pdev)
1671 1670
1672 mem_ipu = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1671 mem_ipu = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1673 mem_ic = platform_get_resource(pdev, IORESOURCE_MEM, 1); 1672 mem_ic = platform_get_resource(pdev, IORESOURCE_MEM, 1);
1674 if (!pdata || !mem_ipu || !mem_ic) 1673 if (!mem_ipu || !mem_ic)
1675 return -EINVAL; 1674 return -EINVAL;
1676 1675
1677 ipu_data.dev = &pdev->dev; 1676 ipu_data.dev = &pdev->dev;
@@ -1688,10 +1687,9 @@ static int __init ipu_probe(struct platform_device *pdev)
1688 goto err_noirq; 1687 goto err_noirq;
1689 1688
1690 ipu_data.irq_err = ret; 1689 ipu_data.irq_err = ret;
1691 ipu_data.irq_base = pdata->irq_base;
1692 1690
1693 dev_dbg(&pdev->dev, "fn irq %u, err irq %u, irq-base %u\n", 1691 dev_dbg(&pdev->dev, "fn irq %u, err irq %u\n",
1694 ipu_data.irq_fn, ipu_data.irq_err, ipu_data.irq_base); 1692 ipu_data.irq_fn, ipu_data.irq_err);
1695 1693
1696 /* Remap IPU common registers */ 1694 /* Remap IPU common registers */
1697 ipu_data.reg_ipu = ioremap(mem_ipu->start, resource_size(mem_ipu)); 1695 ipu_data.reg_ipu = ioremap(mem_ipu->start, resource_size(mem_ipu));
diff --git a/drivers/dma/ipu/ipu_irq.c b/drivers/dma/ipu/ipu_irq.c
index a71f55e72be9..fa95bcc3de1f 100644
--- a/drivers/dma/ipu/ipu_irq.c
+++ b/drivers/dma/ipu/ipu_irq.c
@@ -14,6 +14,7 @@
14#include <linux/clk.h> 14#include <linux/clk.h>
15#include <linux/irq.h> 15#include <linux/irq.h>
16#include <linux/io.h> 16#include <linux/io.h>
17#include <linux/module.h>
17 18
18#include <mach/ipu.h> 19#include <mach/ipu.h>
19 20
@@ -354,10 +355,12 @@ static struct irq_chip ipu_irq_chip = {
354/* Install the IRQ handler */ 355/* Install the IRQ handler */
355int __init ipu_irq_attach_irq(struct ipu *ipu, struct platform_device *dev) 356int __init ipu_irq_attach_irq(struct ipu *ipu, struct platform_device *dev)
356{ 357{
357 struct ipu_platform_data *pdata = dev->dev.platform_data; 358 unsigned int irq, i;
358 unsigned int irq, irq_base, i; 359 int irq_base = irq_alloc_descs(-1, 0, CONFIG_MX3_IPU_IRQS,
360 numa_node_id());
359 361
360 irq_base = pdata->irq_base; 362 if (irq_base < 0)
363 return irq_base;
361 364
362 for (i = 0; i < IPU_IRQ_NR_BANKS; i++) 365 for (i = 0; i < IPU_IRQ_NR_BANKS; i++)
363 irq_bank[i].ipu = ipu; 366 irq_bank[i].ipu = ipu;
@@ -387,15 +390,16 @@ int __init ipu_irq_attach_irq(struct ipu *ipu, struct platform_device *dev)
387 irq_set_handler_data(ipu->irq_err, ipu); 390 irq_set_handler_data(ipu->irq_err, ipu);
388 irq_set_chained_handler(ipu->irq_err, ipu_irq_err); 391 irq_set_chained_handler(ipu->irq_err, ipu_irq_err);
389 392
393 ipu->irq_base = irq_base;
394
390 return 0; 395 return 0;
391} 396}
392 397
393void ipu_irq_detach_irq(struct ipu *ipu, struct platform_device *dev) 398void ipu_irq_detach_irq(struct ipu *ipu, struct platform_device *dev)
394{ 399{
395 struct ipu_platform_data *pdata = dev->dev.platform_data;
396 unsigned int irq, irq_base; 400 unsigned int irq, irq_base;
397 401
398 irq_base = pdata->irq_base; 402 irq_base = ipu->irq_base;
399 403
400 irq_set_chained_handler(ipu->irq_fn, NULL); 404 irq_set_chained_handler(ipu->irq_fn, NULL);
401 irq_set_handler_data(ipu->irq_fn, NULL); 405 irq_set_handler_data(ipu->irq_fn, NULL);