diff mbox

DM646x: pass correct MUSB IRQs (take 3)

Message ID 200907161958.53885.sshtylyov@ru.mvista.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Sergei Shtylyov July 16, 2009, 3:58 p.m. UTC
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>

---
Killed stray spaces...

 arch/arm/mach-davinci/usb.c |   13 +++++++++++++
 1 files changed, 13 insertions(+)

Comments

Kevin Hilman July 16, 2009, 9:19 p.m. UTC | #1
Sergei Shtylyov <sshtylyov@ru.mvista.com> writes:

> 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>
>
> ---
> Killed stray spaces...
>

added 'davinci: ' prefix to $SUBJECT, pushed to davinci git, and
added to queue for 2.6.32.

Thanks,

Kevin
Sergei Shtylyov July 17, 2009, 11:45 a.m. UTC | #2
Hello.

Kevin Hilman wrote:

>>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>

>>---
>>Killed stray spaces...

> added 'davinci: ' prefix to $SUBJECT, pushed to davinci git, and
> added to queue for 2.6.32.

    IMO this is a bugfix erather than enhancement, so should be in 2.6.31. 
Although, DM6467 EVM board code currently doesn't register USB device at all 
-- this still needs to be addressed...

> Thanks,

> Kevin

WBR, Sergei
Kevin Hilman July 17, 2009, 3:49 p.m. UTC | #3
Sergei Shtylyov <sshtylyov@ru.mvista.com> writes:

> Hello.
>
> Kevin Hilman wrote:
>
>>>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>
>
>>>---
>>>Killed stray spaces...
>
>> added 'davinci: ' prefix to $SUBJECT, pushed to davinci git, and
>> added to queue for 2.6.32.
>
>    IMO this is a bugfix erather than enhancement, so should be in
> 2.6.31. 

Yes, this is a fix that could go into 2.6.31, but..

> Although, DM6467 EVM board code currently doesn't register USB
> device at all -- this still needs to be addressed...

Due to this and to bandwidth limitations on my side, it will save
some time for me to just keep this in the 2.6.32 queue.

Kevin
diff mbox

Patch

Index: linux-davinci/arch/arm/mach-davinci/usb.c
===================================================================
--- linux-davinci.orig/arch/arm/mach-davinci/usb.c
+++ linux-davinci/arch/arm/mach-davinci/usb.c
@@ -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, unsig
 {
 	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);
 }