diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-07-02 17:18:19 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-07-02 17:18:19 -0400 |
commit | fdc0867884ec0fc78091e28efa1d439affb5eb20 (patch) | |
tree | 498e8cf99f3675f554a70f0fbfc66a86d90fbb5c /drivers/dma | |
parent | 6887a4131da3adaab011613776d865f4bcfb5678 (diff) | |
parent | 8842a9e2869cae14bbb8184004a42fc3070587fb (diff) |
Merge branch 'imx/sparse-irq' of git://git.linaro.org/people/shawnguo/linux-2.6 into next/irq
From Shawn Guo <shawn.guo@linaro.org>, this makes it possible to use
sparse irqs with mach-imx.
* 'imx/sparse-irq' of git://git.linaro.org/people/shawnguo/linux-2.6:
ARM: imx: enable SPARSE_IRQ for imx platform
ARM: fiq: change FIQ_START to a variable
tty: serial: imx: remove the use of MXC_INTERNAL_IRQS
ARM: imx: remove unneeded mach/irq.h inclusion
i2c: imx: remove unneeded mach/irqs.h inclusion
ARM: imx: add a legacy irqdomain for mx31ads
ARM: imx: add a legacy irqdomain for 3ds_debugboard
ARM: imx: pass gpio than irq number into mxc_expio_init
ARM: imx: leave irq_base of wm8350_platform_data uninitialized
dma: ipu: remove the use of ipu_platform_data
ARM: imx: move irq_domain_add_legacy call into avic driver
ARM: imx: move irq_domain_add_legacy call into tzic driver
gpio/mxc: move irq_domain_add_legacy call into gpio driver
ARM: imx: eliminate macro IRQ_GPIOx()
ARM: imx: eliminate macro IOMUX_TO_IRQ()
ARM: imx: eliminate macro IMX_GPIO_TO_IRQ()
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/ipu/ipu_idmac.c | 8 | ||||
-rw-r--r-- | drivers/dma/ipu/ipu_irq.c | 14 |
2 files changed, 12 insertions, 10 deletions
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 | ||
1664 | static int __init ipu_probe(struct platform_device *pdev) | 1664 | static 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 */ |
355 | int __init ipu_irq_attach_irq(struct ipu *ipu, struct platform_device *dev) | 356 | int __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 | ||
393 | void ipu_irq_detach_irq(struct ipu *ipu, struct platform_device *dev) | 398 | void 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); |