From fcf173e4511193b1efeccb0f22a8c641b464353b Mon Sep 17 00:00:00 2001 From: Hema Kalliguddi Date: Wed, 29 Sep 2010 11:26:39 -0500 Subject: 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 Acked-by: Kevin Hilman Acked-by: Mike Frysinger Signed-off-by: Hema HK Signed-off-by: Felipe Balbi --- arch/arm/mach-davinci/usb.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/arm/mach-davinci') diff --git a/arch/arm/mach-davinci/usb.c b/arch/arm/mach-davinci/usb.c index 31f0cbea0ca..b0d6b07431c 100644 --- a/arch/arm/mach-davinci/usb.c +++ b/arch/arm/mach-davinci/usb.c @@ -64,10 +64,12 @@ static struct resource usb_resources[] = { { .start = IRQ_USBINT, .flags = IORESOURCE_IRQ, + .name = "mc" }, { /* placeholder for the dedicated CPPI IRQ */ .flags = IORESOURCE_IRQ, + .name = "dma" }, }; -- cgit v1.2.3-18-g5258 From 05ac10dd6862a3fcce33d2203fbb2ef285e3ca87 Mon Sep 17 00:00:00 2001 From: Felipe Balbi Date: Thu, 2 Dec 2010 08:49:26 +0200 Subject: usb: musb: trivial search and replace patch change all ocurrences of musb_hdrc to musb-hdrc. We will call glue layer drivers musb-, so in order to keep things somewhat standard, let's change the underscore into a dash. Signed-off-by: Felipe Balbi --- arch/arm/mach-davinci/usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-davinci') diff --git a/arch/arm/mach-davinci/usb.c b/arch/arm/mach-davinci/usb.c index b0d6b07431c..0c7735bc0d1 100644 --- a/arch/arm/mach-davinci/usb.c +++ b/arch/arm/mach-davinci/usb.c @@ -76,7 +76,7 @@ static struct resource usb_resources[] = { static u64 usb_dmamask = DMA_BIT_MASK(32); static struct platform_device usb_dev = { - .name = "musb_hdrc", + .name = "musb-hdrc", .id = -1, .dev = { .platform_data = &usb_data, -- cgit v1.2.3-18-g5258 From 73b089b052a69020b953312a624a6e1eb5b81fab Mon Sep 17 00:00:00 2001 From: Felipe Balbi Date: Thu, 2 Dec 2010 09:16:55 +0200 Subject: usb: musb: split davinci to its own platform_driver Just adding its own platform_driver, not really using it yet. When all HW glue layers are converted, more patches will come to split power management code from musb_core and move it completely to HW glue layer. Signed-off-by: Felipe Balbi --- arch/arm/mach-davinci/usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-davinci') diff --git a/arch/arm/mach-davinci/usb.c b/arch/arm/mach-davinci/usb.c index 0c7735bc0d1..803dbacfa5c 100644 --- a/arch/arm/mach-davinci/usb.c +++ b/arch/arm/mach-davinci/usb.c @@ -76,7 +76,7 @@ static struct resource usb_resources[] = { static u64 usb_dmamask = DMA_BIT_MASK(32); static struct platform_device usb_dev = { - .name = "musb-hdrc", + .name = "musb-davinci", .id = -1, .dev = { .platform_data = &usb_data, -- cgit v1.2.3-18-g5258 From 8ceae51ed5d1739d4ed5c4b947d12ff1d7df0e89 Mon Sep 17 00:00:00 2001 From: Felipe Balbi Date: Thu, 2 Dec 2010 09:19:35 +0200 Subject: usb: musb: split da8xx to its own platform_driver Just adding its own platform_driver, not really using it yet. When all HW glue layers are converted, more patches will come to split power management code from musb_core and move it completely to HW glue layer. Signed-off-by: Felipe Balbi --- arch/arm/mach-davinci/usb.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/mach-davinci') diff --git a/arch/arm/mach-davinci/usb.c b/arch/arm/mach-davinci/usb.c index 803dbacfa5c..1867366d1f3 100644 --- a/arch/arm/mach-davinci/usb.c +++ b/arch/arm/mach-davinci/usb.c @@ -123,6 +123,7 @@ int __init da8xx_register_usb20(unsigned mA, unsigned potpgt) usb_dev.resource = da8xx_usb20_resources; usb_dev.num_resources = ARRAY_SIZE(da8xx_usb20_resources); + usb_dev.name = "musb-da8xx"; return platform_device_register(&usb_dev); } -- cgit v1.2.3-18-g5258 From 5a166f4f9999355720f829e94cf3bd306bae6f8b Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Fri, 10 Dec 2010 20:23:06 +0300 Subject: DA8xx: assign name to MUSB IRQ resource Commit fcf173e4511193b1efeccb0f22a8c641b464353b (usb: musb: add names for IRQs in structure resource) forgot to assign name to the DA8xx MUSB IRQ resource. Because of that MUSB driver fails to load on DA8xx machines. Signed-off-by: Sergei Shtylyov Signed-off-by: Felipe Balbi --- arch/arm/mach-davinci/usb.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/mach-davinci') diff --git a/arch/arm/mach-davinci/usb.c b/arch/arm/mach-davinci/usb.c index 1867366d1f3..23d2b6d9fa6 100644 --- a/arch/arm/mach-davinci/usb.c +++ b/arch/arm/mach-davinci/usb.c @@ -112,6 +112,7 @@ static struct resource da8xx_usb20_resources[] = { { .start = IRQ_DA8XX_USB_INT, .flags = IORESOURCE_IRQ, + .name = "mc", }, }; -- cgit v1.2.3-18-g5258