aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb
diff options
context:
space:
mode:
authorHema Kalliguddi <hemahk@ti.com>2010-09-29 12:26:39 -0400
committerFelipe Balbi <balbi@ti.com>2010-12-01 03:56:33 -0500
commitfcf173e4511193b1efeccb0f22a8c641b464353b (patch)
treea5cc4b3e560d857513a6684ed307b04a492b9670 /drivers/usb/musb
parentea65df57c2eea803535a071752efb030c46a11f5 (diff)
usb: musb: add names for IRQs in structure resource
Soon resource data will get automatically populated from a set of autogenerated data from TI's hardware database for the OMAP platform. Such database, might not have resources at the expected order by the current drivers. While we could hack in some exceptions to that tool to generate resources in a specific order, it seems less fragile to use the resource name instead. That way, no matter what order the resources are generated, the driver still work. Modified the OMAP, Blackfin and Davinci architecture files to add the name of the IRQs in the resource structures and musb driver to use the platform_get_irq_byname() api to get the device and dma irq numbers instead of using the index. Cc: Tony Lindgren <tony@atomide.com> Acked-by: Kevin Hilman <khilman@deeprootsystems.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Hema HK <hemahk@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r--drivers/usb/musb/cppi_dma.c2
-rw-r--r--drivers/usb/musb/musb_core.c2
-rw-r--r--drivers/usb/musb/musbhsdma.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/musb/cppi_dma.c b/drivers/usb/musb/cppi_dma.c
index f5a65ff0ac2b..de55a3c3259a 100644
--- a/drivers/usb/musb/cppi_dma.c
+++ b/drivers/usb/musb/cppi_dma.c
@@ -1308,7 +1308,7 @@ dma_controller_create(struct musb *musb, void __iomem *mregs)
1308 struct cppi *controller; 1308 struct cppi *controller;
1309 struct device *dev = musb->controller; 1309 struct device *dev = musb->controller;
1310 struct platform_device *pdev = to_platform_device(dev); 1310 struct platform_device *pdev = to_platform_device(dev);
1311 int irq = platform_get_irq(pdev, 1); 1311 int irq = platform_get_irq_byname(pdev, "dma");
1312 1312
1313 controller = kzalloc(sizeof *controller, GFP_KERNEL); 1313 controller = kzalloc(sizeof *controller, GFP_KERNEL);
1314 if (!controller) 1314 if (!controller)
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 4b71a1bb4187..a5ceddfe57d6 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2206,7 +2206,7 @@ static u64 *orig_dma_mask;
2206static int __init musb_probe(struct platform_device *pdev) 2206static int __init musb_probe(struct platform_device *pdev)
2207{ 2207{
2208 struct device *dev = &pdev->dev; 2208 struct device *dev = &pdev->dev;
2209 int irq = platform_get_irq(pdev, 0); 2209 int irq = platform_get_irq_byname(pdev, "mc");
2210 int status; 2210 int status;
2211 struct resource *iomem; 2211 struct resource *iomem;
2212 void __iomem *base; 2212 void __iomem *base;
diff --git a/drivers/usb/musb/musbhsdma.c b/drivers/usb/musb/musbhsdma.c
index 6f771af5cbdb..4e8183589624 100644
--- a/drivers/usb/musb/musbhsdma.c
+++ b/drivers/usb/musb/musbhsdma.c
@@ -363,7 +363,7 @@ dma_controller_create(struct musb *musb, void __iomem *base)
363 struct musb_dma_controller *controller; 363 struct musb_dma_controller *controller;
364 struct device *dev = musb->controller; 364 struct device *dev = musb->controller;
365 struct platform_device *pdev = to_platform_device(dev); 365 struct platform_device *pdev = to_platform_device(dev);
366 int irq = platform_get_irq(pdev, 1); 366 int irq = platform_get_irq_byname(pdev, "dma");
367 367
368 if (irq == 0) { 368 if (irq == 0) {
369 dev_err(dev, "No DMA interrupt line!\n"); 369 dev_err(dev, "No DMA interrupt line!\n");