davinci: DM646x: pass correct MUSB IRQs
authorSergei Shtylyov <sshtylyov@ru.mvista.com>
Thu, 16 Jul 2009 15:58:53 +0000 (19:58 +0400)
committerKevin Hilman <khilman@deeprootsystems.com>
Wed, 26 Aug 2009 08:55:38 +0000 (11:55 +0300)
DM646x has MUSB connected to IRQs 13 and 14 (unlike IRQ12 on other platforms),
so pass the correct IRQ resources with the platform device.

Signed-off-by: Dmitry Krivoschekov <dkrivoschekov@ru.mvista.com>
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
arch/arm/mach-davinci/usb.c

index abedb633718281c83ca433347eb6e6ba85ab3289..06f55931620c3fa6dc95238464deef0c220adc06 100644 (file)
@@ -13,6 +13,7 @@
 #include <mach/common.h>
 #include <mach/hardware.h>
 #include <mach/irqs.h>
+#include <mach/cputype.h>
 
 #define DAVINCI_USB_OTG_BASE 0x01C64000
 
@@ -64,6 +65,10 @@ static struct resource usb_resources[] = {
                .start          = IRQ_USBINT,
                .flags          = IORESOURCE_IRQ,
        },
+       {
+               /* placeholder for the dedicated CPPI IRQ */
+               .flags          = IORESOURCE_IRQ,
+       },
 };
 
 static u64 usb_dmamask = DMA_BIT_MASK(32);
@@ -84,6 +89,14 @@ void __init setup_usb(unsigned mA, unsigned potpgt_msec)
 {
        usb_data.power = mA / 2;
        usb_data.potpgt = potpgt_msec / 2;
+
+       if (cpu_is_davinci_dm646x()) {
+               /* Override the defaults as DM6467 uses different IRQs. */
+               usb_dev.resource[1].start = IRQ_DM646X_USBINT;
+               usb_dev.resource[2].start = IRQ_DM646X_USBDMAINT;
+       } else  /* other devices don't have dedicated CPPI IRQ */
+               usb_dev.num_resources = 2;
+
        platform_device_register(&usb_dev);
 }
 
This page took 0.024948 seconds and 5 git commands to generate.