All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v4] usb: musb: Adding names for IRQs in resource structure
  2010-09-29 16:26 [PATCH v4] usb: musb: Adding names for IRQs in resource structure Hema HK
@ 2010-09-29  6:59 ` Felipe Balbi
  2010-09-29  8:54   ` Kalliguddi, Hema
  2010-09-29 13:48 ` Mike Frysinger
       [not found] ` <1285777599-24245-1-git-send-email-hemahk-l0cyMroinI0@public.gmane.org>
  2 siblings, 1 reply; 15+ messages in thread
From: Felipe Balbi @ 2010-09-29  6:59 UTC (permalink / raw)
  To: Kalliguddi, Hema
  Cc: linux-omap, linux-usb, Balbi, Felipe, Tony Lindgren,
	Kevin Hilman, Cousson, Benoit, Paul Walmsley, Mike Frysinger

Hi,

On Wed, Sep 29, 2010 at 11:26:39AM -0500, Kalliguddi, Hema wrote:
>Index: linux-omap-pm/arch/arm/mach-davinci/usb.c
>===================================================================
>--- linux-omap-pm.orig/arch/arm/mach-davinci/usb.c
>+++ linux-omap-pm/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"
> 	},
> };

you add names only to the IRQs, this will still require the memory base
to be the first resource. Maybe adding a name like "regs" to the memory
base and changing to platform_get_resource_byname(pdev, "regs") on
musb-core.c

-- 
balbi

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH v4] usb: musb: Adding names for IRQs in resource structure
  2010-09-29  6:59 ` Felipe Balbi
@ 2010-09-29  8:54   ` Kalliguddi, Hema
  2010-09-29 10:11     ` Felipe Balbi
  0 siblings, 1 reply; 15+ messages in thread
From: Kalliguddi, Hema @ 2010-09-29  8:54 UTC (permalink / raw)
  To: Balbi, Felipe
  Cc: linux-omap, linux-usb, Tony Lindgren, Kevin Hilman, Cousson,
	Benoit, Paul Walmsley, Mike Frysinger

 Hi,

>-----Original Message-----
>From: Balbi, Felipe 
>Sent: Wednesday, September 29, 2010 12:30 PM
>To: Kalliguddi, Hema
>Cc: linux-omap@vger.kernel.org; linux-usb@vger.kernel.org; 
>Balbi, Felipe; Tony Lindgren; Kevin Hilman; Cousson, Benoit; 
>Paul Walmsley; Mike Frysinger
>Subject: Re: [PATCH v4] usb: musb: Adding names for IRQs in 
>resource structure
>
>Hi,
>
>On Wed, Sep 29, 2010 at 11:26:39AM -0500, Kalliguddi, Hema wrote:
>>Index: linux-omap-pm/arch/arm/mach-davinci/usb.c
>>===================================================================
>>--- linux-omap-pm.orig/arch/arm/mach-davinci/usb.c
>>+++ linux-omap-pm/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"
>> 	},
>> };
>
>you add names only to the IRQs, this will still require the memory base
>to be the first resource. Maybe adding a name like "regs" to the memory
>base and changing to platform_get_resource_byname(pdev, "regs") on
>musb-core.c
>
It does not mandate the base address to be the first resource, as the api
used for getting the base address takes the resource type as parameter.
"platform_get_resource(struct platform_device *dev,unsigned int type,
unsigned int num)". but it mandates the base addresses have to be in 
certain order if there are multiple base address.Since for musb there
is one base address.

>-- 
>balbi
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v4] usb: musb: Adding names for IRQs in resource structure
  2010-09-29  8:54   ` Kalliguddi, Hema
@ 2010-09-29 10:11     ` Felipe Balbi
  2010-09-29 11:38       ` Kalliguddi, Hema
  0 siblings, 1 reply; 15+ messages in thread
From: Felipe Balbi @ 2010-09-29 10:11 UTC (permalink / raw)
  To: Kalliguddi, Hema
  Cc: Balbi, Felipe, linux-omap, linux-usb, Tony Lindgren,
	Kevin Hilman, Cousson, Benoit, Paul Walmsley, Mike Frysinger

On Wed, Sep 29, 2010 at 03:54:45AM -0500, Kalliguddi, Hema wrote:
> Hi,
>
>>-----Original Message-----
>>From: Balbi, Felipe
>>Sent: Wednesday, September 29, 2010 12:30 PM
>>To: Kalliguddi, Hema
>>Cc: linux-omap@vger.kernel.org; linux-usb@vger.kernel.org;
>>Balbi, Felipe; Tony Lindgren; Kevin Hilman; Cousson, Benoit;
>>Paul Walmsley; Mike Frysinger
>>Subject: Re: [PATCH v4] usb: musb: Adding names for IRQs in
>>resource structure
>>
>>Hi,
>>
>>On Wed, Sep 29, 2010 at 11:26:39AM -0500, Kalliguddi, Hema wrote:
>>>Index: linux-omap-pm/arch/arm/mach-davinci/usb.c
>>>===================================================================
>>>--- linux-omap-pm.orig/arch/arm/mach-davinci/usb.c
>>>+++ linux-omap-pm/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"
>>> 	},
>>> };
>>
>>you add names only to the IRQs, this will still require the memory base
>>to be the first resource. Maybe adding a name like "regs" to the memory
>>base and changing to platform_get_resource_byname(pdev, "regs") on
>>musb-core.c
>>
>It does not mandate the base address to be the first resource, as the api
>used for getting the base address takes the resource type as parameter.
>"platform_get_resource(struct platform_device *dev,unsigned int type,
>unsigned int num)". but it mandates the base addresses have to be in
>certain order if there are multiple base address.Since for musb there
>is one base address.

true :-p Sorry about that. Just noise.

-- 
balbi

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH v4] usb: musb: Adding names for IRQs in resource structure
  2010-09-29 10:11     ` Felipe Balbi
@ 2010-09-29 11:38       ` Kalliguddi, Hema
  0 siblings, 0 replies; 15+ messages in thread
From: Kalliguddi, Hema @ 2010-09-29 11:38 UTC (permalink / raw)
  To: Balbi, Felipe
  Cc: linux-omap, linux-usb, Tony Lindgren, Kevin Hilman, Cousson,
	Benoit, Paul Walmsley, Mike Frysinger

 

>-----Original Message-----
>From: Balbi, Felipe 
>Sent: Wednesday, September 29, 2010 3:41 PM
>To: Kalliguddi, Hema
>Cc: Balbi, Felipe; linux-omap@vger.kernel.org; 
>linux-usb@vger.kernel.org; Tony Lindgren; Kevin Hilman; 
>Cousson, Benoit; Paul Walmsley; Mike Frysinger
>Subject: Re: [PATCH v4] usb: musb: Adding names for IRQs in 
>resource structure
>
>On Wed, Sep 29, 2010 at 03:54:45AM -0500, Kalliguddi, Hema wrote:
>> Hi,
>>
>>>-----Original Message-----
>>>From: Balbi, Felipe
>>>Sent: Wednesday, September 29, 2010 12:30 PM
>>>To: Kalliguddi, Hema
>>>Cc: linux-omap@vger.kernel.org; linux-usb@vger.kernel.org;
>>>Balbi, Felipe; Tony Lindgren; Kevin Hilman; Cousson, Benoit;
>>>Paul Walmsley; Mike Frysinger
>>>Subject: Re: [PATCH v4] usb: musb: Adding names for IRQs in
>>>resource structure
>>>
>>>Hi,
>>>
>>>On Wed, Sep 29, 2010 at 11:26:39AM -0500, Kalliguddi, Hema wrote:
>>>>Index: linux-omap-pm/arch/arm/mach-davinci/usb.c
>>>>===================================================================
>>>>--- linux-omap-pm.orig/arch/arm/mach-davinci/usb.c
>>>>+++ linux-omap-pm/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"
>>>> 	},
>>>> };
>>>
>>>you add names only to the IRQs, this will still require the 
>memory base
>>>to be the first resource. Maybe adding a name like "regs" to 
>the memory
>>>base and changing to platform_get_resource_byname(pdev, "regs") on
>>>musb-core.c
>>>
>>It does not mandate the base address to be the first 
>resource, as the api
>>used for getting the base address takes the resource type as 
>parameter.
>>"platform_get_resource(struct platform_device *dev,unsigned int type,
>>unsigned int num)". but it mandates the base addresses have to be in
>>certain order if there are multiple base address.Since for musb there
>>is one base address.
>
>true :-p Sorry about that. Just noise.
>
That's Ok...
>-- 
>balbi
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v4] usb: musb: Adding names for IRQs in resource structure
  2010-09-29 16:26 [PATCH v4] usb: musb: Adding names for IRQs in resource structure Hema HK
  2010-09-29  6:59 ` Felipe Balbi
@ 2010-09-29 13:48 ` Mike Frysinger
       [not found] ` <1285777599-24245-1-git-send-email-hemahk-l0cyMroinI0@public.gmane.org>
  2 siblings, 0 replies; 15+ messages in thread
From: Mike Frysinger @ 2010-09-29 13:48 UTC (permalink / raw)
  To: Hema HK
  Cc: linux-omap, linux-usb, Felipe Balbi, Tony Lindgren, Kevin Hilman,
	Cousson, Benoit, Paul Walmsley

On Wed, Sep 29, 2010 at 12:26, Hema HK wrote:
> The resource data is getting automatically populated from a set of data
> generated from TI's hardware database for the OMAP platform,
> 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 get_irq_byname() api to
> get the device and dma irq numbers instead of using the index.
>
> Signed-off-by: Hema HK <hemahk@ti.com>
> Cc: Felipe Balbi <balbi@ti.com>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
> Cc: Cousson, Benoit <b-cousson@ti.com>
> Cc: Paul Walmsley <paul@pwsan.com>
> Cc: Mike Frysinger <vapier@gentoo.org>

if Felipe is ok with this, then i'm ok with this
Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v4] usb: musb: Adding names for IRQs in resource structure
       [not found] ` <1285777599-24245-1-git-send-email-hemahk-l0cyMroinI0@public.gmane.org>
@ 2010-09-29 14:40   ` Kevin Hilman
  2010-12-09 19:34     ` Sergei Shtylyov
  0 siblings, 1 reply; 15+ messages in thread
From: Kevin Hilman @ 2010-09-29 14:40 UTC (permalink / raw)
  To: Hema HK
  Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Felipe Balbi, Tony Lindgren,
	Cousson, Benoit, Paul Walmsley, Mike Frysinger

Hema HK <hemahk-l0cyMroinI0@public.gmane.org> writes:

> The resource data is getting automatically populated from a set of data
> generated from TI's hardware database for the OMAP platform, 
> 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 get_irq_byname() api to
> get the device and dma irq numbers instead of using the index.
>
> Signed-off-by: Hema HK <hemahk-l0cyMroinI0@public.gmane.org>
> Cc: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
> Cc: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
> Cc: Kevin Hilman <khilman-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>
> Cc: Cousson, Benoit <b-cousson-l0cyMroinI0@public.gmane.org>
> Cc: Paul Walmsley <paul-DWxLp4Yu+b8AvxtiuMwx3w@public.gmane.org>
> Cc: Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
> ---

For the davinci changes:

Acked-by: Kevin Hilman <khilman-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>

Kevin

> [Updated the changelog with background]
>
>  arch/arm/mach-davinci/usb.c                |    2 ++
>  arch/arm/mach-omap2/usb-musb.c             |    2 ++
>  arch/blackfin/mach-bf527/boards/cm_bf527.c |    2 ++
>  arch/blackfin/mach-bf527/boards/ezbrd.c    |    2 ++
>  arch/blackfin/mach-bf527/boards/ezkit.c    |    2 ++
>  arch/blackfin/mach-bf548/boards/cm_bf548.c |    2 ++
>  arch/blackfin/mach-bf548/boards/ezkit.c    |    2 ++
>  drivers/usb/musb/cppi_dma.c                |    2 +-
>  drivers/usb/musb/musb_core.c               |    2 +-
>  drivers/usb/musb/musbhsdma.c               |    2 +-
>  10 files changed, 17 insertions(+), 3 deletions(-)
>
> Index: linux-omap-pm/arch/arm/mach-davinci/usb.c
> ===================================================================
> --- linux-omap-pm.orig/arch/arm/mach-davinci/usb.c
> +++ linux-omap-pm/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"
>  	},
>  };
>  
> Index: linux-omap-pm/arch/arm/mach-omap2/usb-musb.c
> ===================================================================
> --- linux-omap-pm.orig/arch/arm/mach-omap2/usb-musb.c
> +++ linux-omap-pm/arch/arm/mach-omap2/usb-musb.c
> @@ -39,10 +39,12 @@ static struct resource musb_resources[] 
>  	[1] = {	/* general IRQ */
>  		.start	= INT_243X_HS_USB_MC,
>  		.flags	= IORESOURCE_IRQ,
> +		.name	= "mc",
>  	},
>  	[2] = {	/* DMA IRQ */
>  		.start	= INT_243X_HS_USB_DMA,
>  		.flags	= IORESOURCE_IRQ,
> +		.name	= "dma",
>  	},
>  };
>  
> Index: linux-omap-pm/arch/blackfin/mach-bf527/boards/cm_bf527.c
> ===================================================================
> --- linux-omap-pm.orig/arch/blackfin/mach-bf527/boards/cm_bf527.c
> +++ linux-omap-pm/arch/blackfin/mach-bf527/boards/cm_bf527.c
> @@ -82,11 +82,13 @@ static struct resource musb_resources[] 
>  		.start	= IRQ_USB_INT0,
>  		.end	= IRQ_USB_INT0,
>  		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
> +		.name	= "mc"
>  	},
>  	[2] = {	/* DMA IRQ */
>  		.start	= IRQ_USB_DMA,
>  		.end	= IRQ_USB_DMA,
>  		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
> +		.name	= "dma"
>  	},
>  };
>  
> Index: linux-omap-pm/arch/blackfin/mach-bf527/boards/ezbrd.c
> ===================================================================
> --- linux-omap-pm.orig/arch/blackfin/mach-bf527/boards/ezbrd.c
> +++ linux-omap-pm/arch/blackfin/mach-bf527/boards/ezbrd.c
> @@ -46,11 +46,13 @@ static struct resource musb_resources[] 
>  		.start	= IRQ_USB_INT0,
>  		.end	= IRQ_USB_INT0,
>  		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
> +		.name	= "mc"
>  	},
>  	[2] = {	/* DMA IRQ */
>  		.start	= IRQ_USB_DMA,
>  		.end	= IRQ_USB_DMA,
>  		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
> +		.name	= "dma"
>  	},
>  };
>  
> Index: linux-omap-pm/arch/blackfin/mach-bf527/boards/ezkit.c
> ===================================================================
> --- linux-omap-pm.orig/arch/blackfin/mach-bf527/boards/ezkit.c
> +++ linux-omap-pm/arch/blackfin/mach-bf527/boards/ezkit.c
> @@ -86,11 +86,13 @@ static struct resource musb_resources[] 
>  		.start	= IRQ_USB_INT0,
>  		.end	= IRQ_USB_INT0,
>  		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
> +		.name	= "mc"
>  	},
>  	[2] = {	/* DMA IRQ */
>  		.start	= IRQ_USB_DMA,
>  		.end	= IRQ_USB_DMA,
>  		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
> +		.name	= "dma"
>  	},
>  };
>  
> Index: linux-omap-pm/arch/blackfin/mach-bf548/boards/cm_bf548.c
> ===================================================================
> --- linux-omap-pm.orig/arch/blackfin/mach-bf548/boards/cm_bf548.c
> +++ linux-omap-pm/arch/blackfin/mach-bf548/boards/cm_bf548.c
> @@ -482,11 +482,13 @@ static struct resource musb_resources[] 
>  		.start	= IRQ_USB_INT0,
>  		.end	= IRQ_USB_INT0,
>  		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
> +		.name	= "mc"
>  	},
>  	[2] = {	/* DMA IRQ */
>  		.start	= IRQ_USB_DMA,
>  		.end	= IRQ_USB_DMA,
>  		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
> +		.name	= "dma"
>  	},
>  };
>  
> Index: linux-omap-pm/arch/blackfin/mach-bf548/boards/ezkit.c
> ===================================================================
> --- linux-omap-pm.orig/arch/blackfin/mach-bf548/boards/ezkit.c
> +++ linux-omap-pm/arch/blackfin/mach-bf548/boards/ezkit.c
> @@ -587,11 +587,13 @@ static struct resource musb_resources[] 
>  		.start	= IRQ_USB_INT0,
>  		.end	= IRQ_USB_INT0,
>  		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
> +		.name	= "mc"
>  	},
>  	[2] = {	/* DMA IRQ */
>  		.start	= IRQ_USB_DMA,
>  		.end	= IRQ_USB_DMA,
>  		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
> +		.name	= "dma"
>  	},
>  };
>  
> Index: linux-omap-pm/drivers/usb/musb/cppi_dma.c
> ===================================================================
> --- linux-omap-pm.orig/drivers/usb/musb/cppi_dma.c
> +++ linux-omap-pm/drivers/usb/musb/cppi_dma.c
> @@ -1307,7 +1307,7 @@ dma_controller_create(struct musb *musb,
>  	struct cppi		*controller;
>  	struct device		*dev = musb->controller;
>  	struct platform_device	*pdev = to_platform_device(dev);
> -	int			irq = platform_get_irq(pdev, 1);
> +	int			irq = platform_get_irq_byname(pdev, "dma");
>  
>  	controller = kzalloc(sizeof *controller, GFP_KERNEL);
>  	if (!controller)
> Index: linux-omap-pm/drivers/usb/musb/musb_core.c
> ===================================================================
> --- linux-omap-pm.orig/drivers/usb/musb/musb_core.c
> +++ linux-omap-pm/drivers/usb/musb/musb_core.c
> @@ -2203,7 +2203,7 @@ static u64	*orig_dma_mask;
>  static int __init musb_probe(struct platform_device *pdev)
>  {
>  	struct device	*dev = &pdev->dev;
> -	int		irq = platform_get_irq(pdev, 0);
> +	int		irq = platform_get_irq_byname(pdev, "mc");
>  	int		status;
>  	struct resource	*iomem;
>  	void __iomem	*base;
> Index: linux-omap-pm/drivers/usb/musb/musbhsdma.c
> ===================================================================
> --- linux-omap-pm.orig/drivers/usb/musb/musbhsdma.c
> +++ linux-omap-pm/drivers/usb/musb/musbhsdma.c
> @@ -363,7 +363,7 @@ dma_controller_create(struct musb *musb,
>  	struct musb_dma_controller *controller;
>  	struct device *dev = musb->controller;
>  	struct platform_device *pdev = to_platform_device(dev);
> -	int irq = platform_get_irq(pdev, 1);
> +	int irq = platform_get_irq_byname(pdev, "dma");
>  
>  	if (irq == 0) {
>  		dev_err(dev, "No DMA interrupt line!\n");
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH v4] usb: musb: Adding names for IRQs in resource structure
@ 2010-09-29 16:26 Hema HK
  2010-09-29  6:59 ` Felipe Balbi
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Hema HK @ 2010-09-29 16:26 UTC (permalink / raw)
  To: linux-omap, linux-usb
  Cc: Hema HK, Felipe Balbi, Tony Lindgren, Kevin Hilman, Cousson,
	Benoit, Paul Walmsley, Mike Frysinger

The resource data is getting automatically populated from a set of data
generated from TI's hardware database for the OMAP platform, 
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 get_irq_byname() api to
get the device and dma irq numbers instead of using the index.

Signed-off-by: Hema HK <hemahk@ti.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Cousson, Benoit <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Mike Frysinger <vapier@gentoo.org>
---
[Updated the changelog with background]

 arch/arm/mach-davinci/usb.c                |    2 ++
 arch/arm/mach-omap2/usb-musb.c             |    2 ++
 arch/blackfin/mach-bf527/boards/cm_bf527.c |    2 ++
 arch/blackfin/mach-bf527/boards/ezbrd.c    |    2 ++
 arch/blackfin/mach-bf527/boards/ezkit.c    |    2 ++
 arch/blackfin/mach-bf548/boards/cm_bf548.c |    2 ++
 arch/blackfin/mach-bf548/boards/ezkit.c    |    2 ++
 drivers/usb/musb/cppi_dma.c                |    2 +-
 drivers/usb/musb/musb_core.c               |    2 +-
 drivers/usb/musb/musbhsdma.c               |    2 +-
 10 files changed, 17 insertions(+), 3 deletions(-)

Index: linux-omap-pm/arch/arm/mach-davinci/usb.c
===================================================================
--- linux-omap-pm.orig/arch/arm/mach-davinci/usb.c
+++ linux-omap-pm/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"
 	},
 };
 
Index: linux-omap-pm/arch/arm/mach-omap2/usb-musb.c
===================================================================
--- linux-omap-pm.orig/arch/arm/mach-omap2/usb-musb.c
+++ linux-omap-pm/arch/arm/mach-omap2/usb-musb.c
@@ -39,10 +39,12 @@ static struct resource musb_resources[] 
 	[1] = {	/* general IRQ */
 		.start	= INT_243X_HS_USB_MC,
 		.flags	= IORESOURCE_IRQ,
+		.name	= "mc",
 	},
 	[2] = {	/* DMA IRQ */
 		.start	= INT_243X_HS_USB_DMA,
 		.flags	= IORESOURCE_IRQ,
+		.name	= "dma",
 	},
 };
 
Index: linux-omap-pm/arch/blackfin/mach-bf527/boards/cm_bf527.c
===================================================================
--- linux-omap-pm.orig/arch/blackfin/mach-bf527/boards/cm_bf527.c
+++ linux-omap-pm/arch/blackfin/mach-bf527/boards/cm_bf527.c
@@ -82,11 +82,13 @@ static struct resource musb_resources[] 
 		.start	= IRQ_USB_INT0,
 		.end	= IRQ_USB_INT0,
 		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
+		.name	= "mc"
 	},
 	[2] = {	/* DMA IRQ */
 		.start	= IRQ_USB_DMA,
 		.end	= IRQ_USB_DMA,
 		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
+		.name	= "dma"
 	},
 };
 
Index: linux-omap-pm/arch/blackfin/mach-bf527/boards/ezbrd.c
===================================================================
--- linux-omap-pm.orig/arch/blackfin/mach-bf527/boards/ezbrd.c
+++ linux-omap-pm/arch/blackfin/mach-bf527/boards/ezbrd.c
@@ -46,11 +46,13 @@ static struct resource musb_resources[] 
 		.start	= IRQ_USB_INT0,
 		.end	= IRQ_USB_INT0,
 		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
+		.name	= "mc"
 	},
 	[2] = {	/* DMA IRQ */
 		.start	= IRQ_USB_DMA,
 		.end	= IRQ_USB_DMA,
 		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
+		.name	= "dma"
 	},
 };
 
Index: linux-omap-pm/arch/blackfin/mach-bf527/boards/ezkit.c
===================================================================
--- linux-omap-pm.orig/arch/blackfin/mach-bf527/boards/ezkit.c
+++ linux-omap-pm/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -86,11 +86,13 @@ static struct resource musb_resources[] 
 		.start	= IRQ_USB_INT0,
 		.end	= IRQ_USB_INT0,
 		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
+		.name	= "mc"
 	},
 	[2] = {	/* DMA IRQ */
 		.start	= IRQ_USB_DMA,
 		.end	= IRQ_USB_DMA,
 		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
+		.name	= "dma"
 	},
 };
 
Index: linux-omap-pm/arch/blackfin/mach-bf548/boards/cm_bf548.c
===================================================================
--- linux-omap-pm.orig/arch/blackfin/mach-bf548/boards/cm_bf548.c
+++ linux-omap-pm/arch/blackfin/mach-bf548/boards/cm_bf548.c
@@ -482,11 +482,13 @@ static struct resource musb_resources[] 
 		.start	= IRQ_USB_INT0,
 		.end	= IRQ_USB_INT0,
 		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
+		.name	= "mc"
 	},
 	[2] = {	/* DMA IRQ */
 		.start	= IRQ_USB_DMA,
 		.end	= IRQ_USB_DMA,
 		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
+		.name	= "dma"
 	},
 };
 
Index: linux-omap-pm/arch/blackfin/mach-bf548/boards/ezkit.c
===================================================================
--- linux-omap-pm.orig/arch/blackfin/mach-bf548/boards/ezkit.c
+++ linux-omap-pm/arch/blackfin/mach-bf548/boards/ezkit.c
@@ -587,11 +587,13 @@ static struct resource musb_resources[] 
 		.start	= IRQ_USB_INT0,
 		.end	= IRQ_USB_INT0,
 		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
+		.name	= "mc"
 	},
 	[2] = {	/* DMA IRQ */
 		.start	= IRQ_USB_DMA,
 		.end	= IRQ_USB_DMA,
 		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
+		.name	= "dma"
 	},
 };
 
Index: linux-omap-pm/drivers/usb/musb/cppi_dma.c
===================================================================
--- linux-omap-pm.orig/drivers/usb/musb/cppi_dma.c
+++ linux-omap-pm/drivers/usb/musb/cppi_dma.c
@@ -1307,7 +1307,7 @@ dma_controller_create(struct musb *musb,
 	struct cppi		*controller;
 	struct device		*dev = musb->controller;
 	struct platform_device	*pdev = to_platform_device(dev);
-	int			irq = platform_get_irq(pdev, 1);
+	int			irq = platform_get_irq_byname(pdev, "dma");
 
 	controller = kzalloc(sizeof *controller, GFP_KERNEL);
 	if (!controller)
Index: linux-omap-pm/drivers/usb/musb/musb_core.c
===================================================================
--- linux-omap-pm.orig/drivers/usb/musb/musb_core.c
+++ linux-omap-pm/drivers/usb/musb/musb_core.c
@@ -2203,7 +2203,7 @@ static u64	*orig_dma_mask;
 static int __init musb_probe(struct platform_device *pdev)
 {
 	struct device	*dev = &pdev->dev;
-	int		irq = platform_get_irq(pdev, 0);
+	int		irq = platform_get_irq_byname(pdev, "mc");
 	int		status;
 	struct resource	*iomem;
 	void __iomem	*base;
Index: linux-omap-pm/drivers/usb/musb/musbhsdma.c
===================================================================
--- linux-omap-pm.orig/drivers/usb/musb/musbhsdma.c
+++ linux-omap-pm/drivers/usb/musb/musbhsdma.c
@@ -363,7 +363,7 @@ dma_controller_create(struct musb *musb,
 	struct musb_dma_controller *controller;
 	struct device *dev = musb->controller;
 	struct platform_device *pdev = to_platform_device(dev);
-	int irq = platform_get_irq(pdev, 1);
+	int irq = platform_get_irq_byname(pdev, "dma");
 
 	if (irq == 0) {
 		dev_err(dev, "No DMA interrupt line!\n");

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v4] usb: musb: Adding names for IRQs in resource structure
  2010-09-29 14:40   ` Kevin Hilman
@ 2010-12-09 19:34     ` Sergei Shtylyov
       [not found]       ` <4D012F2C.9060303-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: Sergei Shtylyov @ 2010-12-09 19:34 UTC (permalink / raw)
  To: Kevin Hilman, Hema HK
  Cc: linux-omap, linux-usb, Felipe Balbi, Tony Lindgren, Cousson,
	Benoit, Paul Walmsley, Mike Frysinger

Hello.

Kevin Hilman wrote:

>> The resource data is getting automatically populated from a set of data
>> generated from TI's hardware database for the OMAP platform, 
>> 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 get_irq_byname() api to
>> get the device and dma irq numbers instead of using the index.

>> Signed-off-by: Hema HK <hemahk@ti.com>
>> Cc: Felipe Balbi <balbi@ti.com>
>> Cc: Tony Lindgren <tony@atomide.com>
>> Cc: Kevin Hilman <khilman@deeprootsystems.com>
>> Cc: Cousson, Benoit <b-cousson@ti.com>
>> Cc: Paul Walmsley <paul@pwsan.com>
>> Cc: Mike Frysinger <vapier@gentoo.org>
>> ---

> For the davinci changes:

> Acked-by: Kevin Hilman <khilman@deeprootsystems.com>

> Kevin

[...]

>> Index: linux-omap-pm/arch/arm/mach-davinci/usb.c
>> ===================================================================
>> --- linux-omap-pm.orig/arch/arm/mach-davinci/usb.c
>> +++ linux-omap-pm/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"
>>  	},
>>  };

    Argh! This failed to also modify da8xx_usb20_resources[]... :-(

WBR, Sergei

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v4] usb: musb: Adding names for IRQs in resource structure
       [not found]       ` <4D012F2C.9060303-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
@ 2010-12-10  4:46         ` Kalliguddi, Hema
       [not found]           ` <AANLkTimF3Eotqa+jZvzCJStguGrDEeS9V-XUGOTa9qBt-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: Kalliguddi, Hema @ 2010-12-10  4:46 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Kevin Hilman, linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Felipe Balbi, Tony Lindgren,
	Cousson, Benoit, Paul Walmsley, Mike Frysinger

On Fri, Dec 10, 2010 at 1:04 AM, Sergei Shtylyov <sshtylyov-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org> wrote:
> Hello.
>
> Kevin Hilman wrote:
>
>>> The resource data is getting automatically populated from a set of data
>>> generated from TI's hardware database for the OMAP platform, 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 get_irq_byname()
>>> api to
>>> get the device and dma irq numbers instead of using the index.
>
>>> Signed-off-by: Hema HK <hemahk-l0cyMroinI0@public.gmane.org>
>>> Cc: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
>>> Cc: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
>>> Cc: Kevin Hilman <khilman-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>
>>> Cc: Cousson, Benoit <b-cousson-l0cyMroinI0@public.gmane.org>
>>> Cc: Paul Walmsley <paul-DWxLp4Yu+b8AvxtiuMwx3w@public.gmane.org>
>>> Cc: Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
>>> ---
>
>> For the davinci changes:
>
>> Acked-by: Kevin Hilman <khilman-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>
>
>> Kevin
>
> [...]
>
>>> Index: linux-omap-pm/arch/arm/mach-davinci/usb.c
>>> ===================================================================
>>> --- linux-omap-pm.orig/arch/arm/mach-davinci/usb.c
>>> +++ linux-omap-pm/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"
>>>        },
>>>  };
>
>   Argh! This failed to also modify da8xx_usb20_resources[]... :-(

I think when I posted these patch, da8xx support was not there in mainline.
I will send patch to add this.

Regards,
Hema
>
> WBR, Sergei
>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v4] usb: musb: Adding names for IRQs in resource structure
       [not found]           ` <AANLkTimF3Eotqa+jZvzCJStguGrDEeS9V-XUGOTa9qBt-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2010-12-10 12:56             ` Sergei Shtylyov
       [not found]               ` <4D02237B.2070708-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
  2010-12-10 13:20               ` Felipe Balbi
  0 siblings, 2 replies; 15+ messages in thread
From: Sergei Shtylyov @ 2010-12-10 12:56 UTC (permalink / raw)
  To: Kalliguddi, Hema
  Cc: Kevin Hilman, linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Felipe Balbi, Tony Lindgren,
	Cousson, Benoit, Paul Walmsley, Mike Frysinger

Hello.

On 10-12-2010 7:46, Kalliguddi, Hema wrote:

>>>> The resource data is getting automatically populated from a set of data
>>>> generated from TI's hardware database for the OMAP platform, 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 get_irq_byname()
>>>> api to
>>>> get the device and dma irq numbers instead of using the index.

>>>> Signed-off-by: Hema HK<hemahk-l0cyMroinI0@public.gmane.org>
>>>> Cc: Felipe Balbi<balbi-l0cyMroinI0@public.gmane.org>
>>>> Cc: Tony Lindgren<tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
>>>> Cc: Kevin Hilman<khilman-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>
>>>> Cc: Cousson, Benoit<b-cousson-l0cyMroinI0@public.gmane.org>
>>>> Cc: Paul Walmsley<paul-DWxLp4Yu+b8AvxtiuMwx3w@public.gmane.org>
>>>> Cc: Mike Frysinger<vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
>>>> ---

>>> For the davinci changes:

>>> Acked-by: Kevin Hilman<khilman-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>

>>> Kevin

>> [...]

>>>> Index: linux-omap-pm/arch/arm/mach-davinci/usb.c
>>>> ===================================================================
>>>> --- linux-omap-pm.orig/arch/arm/mach-davinci/usb.c
>>>> +++ linux-omap-pm/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"
>>>>         },
>>>>   };

>>    Argh! This failed to also modify da8xx_usb20_resources[]... :-(

> I think when I posted these patch, da8xx support was not there in mainline.

    No, it was added long ago, before the glue layer itself.

> I will send patch to add this.

    I will care about this myself now.

> Regards,
> Hema

WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v4] usb: musb: Adding names for IRQs in resource structure
       [not found]               ` <4D02237B.2070708-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
@ 2010-12-10 13:20                 ` Kalliguddi, Hema
  0 siblings, 0 replies; 15+ messages in thread
From: Kalliguddi, Hema @ 2010-12-10 13:20 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Kevin Hilman, linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Felipe Balbi, Tony Lindgren,
	Cousson, Benoit, Paul Walmsley, Mike Frysinger

On Fri, Dec 10, 2010 at 6:26 PM, Sergei Shtylyov <sshtylyov-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org> wrote:
> Hello.
>
> On 10-12-2010 7:46, Kalliguddi, Hema wrote:
>
>>>>> The resource data is getting automatically populated from a set of data
>>>>> generated from TI's hardware database for the OMAP platform, 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 get_irq_byname()
>>>>> api to
>>>>> get the device and dma irq numbers instead of using the index.
>
>>>>> Signed-off-by: Hema HK<hemahk-l0cyMroinI0@public.gmane.org>
>>>>> Cc: Felipe Balbi<balbi-l0cyMroinI0@public.gmane.org>
>>>>> Cc: Tony Lindgren<tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
>>>>> Cc: Kevin Hilman<khilman-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>
>>>>> Cc: Cousson, Benoit<b-cousson-l0cyMroinI0@public.gmane.org>
>>>>> Cc: Paul Walmsley<paul-DWxLp4Yu+b8AvxtiuMwx3w@public.gmane.org>
>>>>> Cc: Mike Frysinger<vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
>>>>> ---
>
>>>> For the davinci changes:
>
>>>> Acked-by: Kevin Hilman<khilman-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>
>
>>>> Kevin
>
>>> [...]
>
>>>>> Index: linux-omap-pm/arch/arm/mach-davinci/usb.c
>>>>> ===================================================================
>>>>> --- linux-omap-pm.orig/arch/arm/mach-davinci/usb.c
>>>>> +++ linux-omap-pm/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"
>>>>>        },
>>>>>  };
>
>>>   Argh! This failed to also modify da8xx_usb20_resources[]... :-(
>
>> I think when I posted these patch, da8xx support was not there in
>> mainline.
>
>   No, it was added long ago, before the glue layer itself.
>
>> I will send patch to add this.
>
>   I will care about this myself now.
Thanks.
Hema
>
>> Regards,
>> Hema
>
> WBR, Sergei
>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v4] usb: musb: Adding names for IRQs in resource structure
  2010-12-10 12:56             ` Sergei Shtylyov
       [not found]               ` <4D02237B.2070708-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
@ 2010-12-10 13:20               ` Felipe Balbi
       [not found]                 ` <20101210132053.GN6027-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org>
  1 sibling, 1 reply; 15+ messages in thread
From: Felipe Balbi @ 2010-12-10 13:20 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Kalliguddi, Hema, Kevin Hilman, linux-omap, linux-usb,
	Felipe Balbi, Tony Lindgren, Cousson, Benoit, Paul Walmsley,
	Mike Frysinger

On Fri, Dec 10, 2010 at 03:56:27PM +0300, Sergei Shtylyov wrote:
>Hello.
>
>On 10-12-2010 7:46, Kalliguddi, Hema wrote:
>
>>>>>The resource data is getting automatically populated from a set of data
>>>>>generated from TI's hardware database for the OMAP platform, 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 get_irq_byname()
>>>>>api to
>>>>>get the device and dma irq numbers instead of using the index.
>
>>>>>Signed-off-by: Hema HK<hemahk@ti.com>
>>>>>Cc: Felipe Balbi<balbi@ti.com>
>>>>>Cc: Tony Lindgren<tony@atomide.com>
>>>>>Cc: Kevin Hilman<khilman@deeprootsystems.com>
>>>>>Cc: Cousson, Benoit<b-cousson@ti.com>
>>>>>Cc: Paul Walmsley<paul@pwsan.com>
>>>>>Cc: Mike Frysinger<vapier@gentoo.org>
>>>>>---
>
>>>>For the davinci changes:
>
>>>>Acked-by: Kevin Hilman<khilman@deeprootsystems.com>
>
>>>>Kevin
>
>>>[...]
>
>>>>>Index: linux-omap-pm/arch/arm/mach-davinci/usb.c
>>>>>===================================================================
>>>>>--- linux-omap-pm.orig/arch/arm/mach-davinci/usb.c
>>>>>+++ linux-omap-pm/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"
>>>>>        },
>>>>>  };
>
>>>   Argh! This failed to also modify da8xx_usb20_resources[]... :-(
>
>>I think when I posted these patch, da8xx support was not there in mainline.
>
>   No, it was added long ago, before the glue layer itself.
>
>>I will send patch to add this.
>
>   I will care about this myself now.

Thanks, send me the patch and I'll put to the same branch.

-- 
balbi

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v4] usb: musb: Adding names for IRQs in resource structure
       [not found]                 ` <20101210132053.GN6027-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org>
@ 2010-12-10 13:35                   ` Sergei Shtylyov
       [not found]                     ` <4D022C92.7090308-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: Sergei Shtylyov @ 2010-12-10 13:35 UTC (permalink / raw)
  To: balbi-l0cyMroinI0
  Cc: Sergei Shtylyov, Kalliguddi, Hema, Kevin Hilman,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Tony Lindgren, Cousson, Benoit,
	Paul Walmsley, Mike Frysinger

Hello.

On 10-12-2010 16:20, Felipe Balbi wrote:

>>>>>> The resource data is getting automatically populated from a set of data
>>>>>> generated from TI's hardware database for the OMAP platform, 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 get_irq_byname()
>>>>>> api to
>>>>>> get the device and dma irq numbers instead of using the index.

>>>>>> Signed-off-by: Hema HK<hemahk-l0cyMroinI0@public.gmane.org>
>>>>>> Cc: Felipe Balbi<balbi-l0cyMroinI0@public.gmane.org>
>>>>>> Cc: Tony Lindgren<tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
>>>>>> Cc: Kevin Hilman<khilman-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>
>>>>>> Cc: Cousson, Benoit<b-cousson-l0cyMroinI0@public.gmane.org>
>>>>>> Cc: Paul Walmsley<paul-DWxLp4Yu+b8AvxtiuMwx3w@public.gmane.org>
>>>>>> Cc: Mike Frysinger<vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
>>>>>> ---

>>>>> For the davinci changes:

>>>>> Acked-by: Kevin Hilman<khilman-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>

>>>>> Kevin

>>>> [...]

>>>>>> Index: linux-omap-pm/arch/arm/mach-davinci/usb.c
>>>>>> ===================================================================
>>>>>> --- linux-omap-pm.orig/arch/arm/mach-davinci/usb.c
>>>>>> +++ linux-omap-pm/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"
>>>>>> },
>>>>>> };

>>>> Argh! This failed to also modify da8xx_usb20_resources[]... :-(

>>> I think when I posted these patch, da8xx support was not there in mainline.

>> No, it was added long ago, before the glue layer itself.

>>> I will send patch to add this.

>> I will care about this myself now.

> Thanks, send me the patch and I'll put to the same branch.

    I was thinking about pushing this thru the DaVinci tree. Well, I'll post 
to both lists and let you figure out who will apply it... :-)

WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v4] usb: musb: Adding names for IRQs in resource structure
       [not found]                     ` <4D022C92.7090308-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
@ 2010-12-10 13:58                       ` Felipe Balbi
  2010-12-10 16:43                         ` Sergei Shtylyov
  0 siblings, 1 reply; 15+ messages in thread
From: Felipe Balbi @ 2010-12-10 13:58 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: balbi-l0cyMroinI0, Kalliguddi, Hema, Kevin Hilman,
	linux-omap-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Tony Lindgren, Cousson, Benoit,
	Paul Walmsley, Mike Frysinger

Hi,

On Fri, Dec 10, 2010 at 04:35:14PM +0300, Sergei Shtylyov wrote:
>>>>>>>Index: linux-omap-pm/arch/arm/mach-davinci/usb.c
>>>>>>>===================================================================
>>>>>>>--- linux-omap-pm.orig/arch/arm/mach-davinci/usb.c
>>>>>>>+++ linux-omap-pm/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"
>>>>>>>},
>>>>>>>};
>
>>>>>Argh! This failed to also modify da8xx_usb20_resources[]... :-(
>
>>>>I think when I posted these patch, da8xx support was not there in mainline.
>
>>>No, it was added long ago, before the glue layer itself.
>
>>>>I will send patch to add this.
>
>>>I will care about this myself now.
>
>>Thanks, send me the patch and I'll put to the same branch.
>
>   I was thinking about pushing this thru the DaVinci tree. Well, I'll 
>post to both lists and let you figure out who will apply it... :-)

If Kevin picks it up, fine by me :-)

-- 
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v4] usb: musb: Adding names for IRQs in resource structure
  2010-12-10 13:58                       ` Felipe Balbi
@ 2010-12-10 16:43                         ` Sergei Shtylyov
  0 siblings, 0 replies; 15+ messages in thread
From: Sergei Shtylyov @ 2010-12-10 16:43 UTC (permalink / raw)
  To: balbi
  Cc: Kalliguddi, Hema, Kevin Hilman, linux-omap, linux-usb,
	Tony Lindgren, Cousson, Benoit, Paul Walmsley, Mike Frysinger

Hello.

Felipe Balbi wrote:

>>>>>>>> Index: linux-omap-pm/arch/arm/mach-davinci/usb.c
>>>>>>>> ===================================================================
>>>>>>>> --- linux-omap-pm.orig/arch/arm/mach-davinci/usb.c
>>>>>>>> +++ linux-omap-pm/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"
>>>>>>>> },
>>>>>>>> };

>>>>>> Argh! This failed to also modify da8xx_usb20_resources[]... :-(

>>>>> I think when I posted these patch, da8xx support was not there in 
>>>>> mainline.

>>>> No, it was added long ago, before the glue layer itself.

>>>>> I will send patch to add this.

>>>> I will care about this myself now.

>>> Thanks, send me the patch and I'll put to the same branch.

>>   I was thinking about pushing this thru the DaVinci tree. Well, I'll 
>> post to both lists and let you figure out who will apply it... :-)

> If Kevin picks it up, fine by me :-)

    Hm, I thought this patch has already been applied but it's only in Greg's 
usb-next branch yet. I guess it's too late to update it now, so a separate patch 
should still be created? However, it's not a hot fix now as I thought, and 
doesn't apply to linux-davinci.git...

WBR, Sergei

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2010-12-10 16:45 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-29 16:26 [PATCH v4] usb: musb: Adding names for IRQs in resource structure Hema HK
2010-09-29  6:59 ` Felipe Balbi
2010-09-29  8:54   ` Kalliguddi, Hema
2010-09-29 10:11     ` Felipe Balbi
2010-09-29 11:38       ` Kalliguddi, Hema
2010-09-29 13:48 ` Mike Frysinger
     [not found] ` <1285777599-24245-1-git-send-email-hemahk-l0cyMroinI0@public.gmane.org>
2010-09-29 14:40   ` Kevin Hilman
2010-12-09 19:34     ` Sergei Shtylyov
     [not found]       ` <4D012F2C.9060303-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
2010-12-10  4:46         ` Kalliguddi, Hema
     [not found]           ` <AANLkTimF3Eotqa+jZvzCJStguGrDEeS9V-XUGOTa9qBt-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-12-10 12:56             ` Sergei Shtylyov
     [not found]               ` <4D02237B.2070708-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
2010-12-10 13:20                 ` Kalliguddi, Hema
2010-12-10 13:20               ` Felipe Balbi
     [not found]                 ` <20101210132053.GN6027-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org>
2010-12-10 13:35                   ` Sergei Shtylyov
     [not found]                     ` <4D022C92.7090308-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
2010-12-10 13:58                       ` Felipe Balbi
2010-12-10 16:43                         ` Sergei Shtylyov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.