* [PATCH] musb: fix power field to hold all possible values @ 2010-02-23 9:46 Ajay Kumar Gupta 2010-02-23 9:51 ` Felipe Balbi 2010-03-24 8:11 ` Felipe Balbi 0 siblings, 2 replies; 11+ messages in thread From: Ajay Kumar Gupta @ 2010-02-23 9:46 UTC (permalink / raw) To: linux-omap; +Cc: Ajay Kumar Gupta MUSB can supply upto 500mA such as, AM3517 and OMAP3EVM Rev >=E and thus the 'power' field has to hold values above 255. Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> --- arch/arm/plat-omap/include/plat/usb.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h index 288e29e..b181297 100644 --- a/arch/arm/plat-omap/include/plat/usb.h +++ b/arch/arm/plat-omap/include/plat/usb.h @@ -46,7 +46,7 @@ struct ehci_hcd_omap_platform_data { struct omap_musb_board_data { u8 interface_type; u8 mode; - u8 power; + u16 power; }; enum musb_interface {MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI}; -- 1.6.2.4 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] musb: fix power field to hold all possible values 2010-02-23 9:46 [PATCH] musb: fix power field to hold all possible values Ajay Kumar Gupta @ 2010-02-23 9:51 ` Felipe Balbi 2010-02-23 9:57 ` Gadiyar, Anand 2010-02-23 14:31 ` Gupta, Ajay Kumar 2010-03-24 8:11 ` Felipe Balbi 1 sibling, 2 replies; 11+ messages in thread From: Felipe Balbi @ 2010-02-23 9:51 UTC (permalink / raw) To: Ajay Kumar Gupta; +Cc: linux-omap Hi, On Tue, Feb 23, 2010 at 03:16:44PM +0530, Ajay Kumar Gupta wrote: > MUSB can supply upto 500mA such as, AM3517 and OMAP3EVM Rev >=E and thus > the 'power' field has to hold values above 255. power on the arch code is same as bMaxPower it will be multiplied by two on musb_core.c. See line 150 of that file. Meaning 500mA is set to 250 on the board-file. -- balbi ^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH] musb: fix power field to hold all possible values 2010-02-23 9:51 ` Felipe Balbi @ 2010-02-23 9:57 ` Gadiyar, Anand 2010-02-23 11:04 ` Felipe Balbi 2010-02-23 14:31 ` Gupta, Ajay Kumar 1 sibling, 1 reply; 11+ messages in thread From: Gadiyar, Anand @ 2010-02-23 9:57 UTC (permalink / raw) To: me@felipebalbi.com, Gupta, Ajay Kumar; +Cc: linux-omap@vger.kernel.org Felipe Balbi wrote: > Hi, > > On Tue, Feb 23, 2010 at 03:16:44PM +0530, Ajay Kumar Gupta wrote: > > MUSB can supply upto 500mA such as, AM3517 and OMAP3EVM Rev >=E and thus > > the 'power' field has to hold values above 255. > > power on the arch code is same as bMaxPower it will be multiplied by two > on musb_core.c. See line 150 of that file. > > Meaning 500mA is set to 250 on the board-file. > Any reason we have the "multiply by 2" there? - Anand ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] musb: fix power field to hold all possible values 2010-02-23 9:57 ` Gadiyar, Anand @ 2010-02-23 11:04 ` Felipe Balbi 0 siblings, 0 replies; 11+ messages in thread From: Felipe Balbi @ 2010-02-23 11:04 UTC (permalink / raw) To: Gadiyar, Anand Cc: me@felipebalbi.com, Gupta, Ajay Kumar, linux-omap@vger.kernel.org Hi, On Tue, Feb 23, 2010 at 03:27:39PM +0530, Gadiyar, Anand wrote: > > power on the arch code is same as bMaxPower it will be multiplied by two > > on musb_core.c. See line 150 of that file. > > > > Meaning 500mA is set to 250 on the board-file. > > > > Any reason we have the "multiply by 2" there? no big reason. It's just legacy code. Maybe it's to keep consistency with the gadget framework, donno. -- balbi ^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH] musb: fix power field to hold all possible values 2010-02-23 9:51 ` Felipe Balbi 2010-02-23 9:57 ` Gadiyar, Anand @ 2010-02-23 14:31 ` Gupta, Ajay Kumar 2010-02-23 20:32 ` Felipe Balbi 1 sibling, 1 reply; 11+ messages in thread From: Gupta, Ajay Kumar @ 2010-02-23 14:31 UTC (permalink / raw) To: me@felipebalbi.com; +Cc: linux-omap@vger.kernel.org > -----Original Message----- > From: Felipe Balbi [mailto:me@felipebalbi.com] > Sent: Tuesday, February 23, 2010 3:22 PM > To: Gupta, Ajay Kumar > Cc: linux-omap@vger.kernel.org > Subject: Re: [PATCH] musb: fix power field to hold all possible values > > Hi, > > On Tue, Feb 23, 2010 at 03:16:44PM +0530, Ajay Kumar Gupta wrote: > > MUSB can supply upto 500mA such as, AM3517 and OMAP3EVM Rev >=E and thus > > the 'power' field has to hold values above 255. > > power on the arch code is same as bMaxPower it will be multiplied by two > on musb_core.c. See line 150 of that file. Agreed but see comment below. > > Meaning 500mA is set to 250 on the board-file. Board files are providing the actual mA and it is getting divided in Arch/arm/mach-omap2/usb-musb.c. See the code snippet below, musb_plat.clock = "ick"; musb_plat.board_data = board_data; --> musb_plat.power = board_data->power >> 1; musb_plat.mode = board_data->mode; So we need to either take this patch or fix this logic of dividing the mA supplied from all omap board files. -Ajay > > -- > balbi ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] musb: fix power field to hold all possible values 2010-02-23 14:31 ` Gupta, Ajay Kumar @ 2010-02-23 20:32 ` Felipe Balbi 2010-02-25 22:19 ` Tony Lindgren 0 siblings, 1 reply; 11+ messages in thread From: Felipe Balbi @ 2010-02-23 20:32 UTC (permalink / raw) To: Gupta, Ajay Kumar; +Cc: me@felipebalbi.com, linux-omap@vger.kernel.org Hi, On Tue, Feb 23, 2010 at 08:01:50PM +0530, Gupta, Ajay Kumar wrote: > Board files are providing the actual mA and it is getting divided in > Arch/arm/mach-omap2/usb-musb.c. See the code snippet below, > > musb_plat.clock = "ick"; > musb_plat.board_data = board_data; > --> musb_plat.power = board_data->power >> 1; > musb_plat.mode = board_data->mode; > > So we need to either take this patch or fix this logic of dividing the mA > supplied from all omap board files. that's true, had missed that. Sorry. -- balbi ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] musb: fix power field to hold all possible values 2010-02-23 20:32 ` Felipe Balbi @ 2010-02-25 22:19 ` Tony Lindgren 2010-02-26 4:32 ` Gupta, Ajay Kumar 0 siblings, 1 reply; 11+ messages in thread From: Tony Lindgren @ 2010-02-25 22:19 UTC (permalink / raw) To: Felipe Balbi; +Cc: Gupta, Ajay Kumar, linux-omap@vger.kernel.org * Felipe Balbi <me@felipebalbi.com> [100223 12:30]: > Hi, > > On Tue, Feb 23, 2010 at 08:01:50PM +0530, Gupta, Ajay Kumar wrote: > > Board files are providing the actual mA and it is getting divided in > > Arch/arm/mach-omap2/usb-musb.c. See the code snippet below, > > > > musb_plat.clock = "ick"; > > musb_plat.board_data = board_data; > > --> musb_plat.power = board_data->power >> 1; > > musb_plat.mode = board_data->mode; > > > > So we need to either take this patch or fix this logic of dividing the mA > > supplied from all omap board files. > > that's true, had missed that. Sorry. Hmm, I believe this value is also divided somewhere else but I forgot where. In any case, when making changes like this please run the standard USB tests for gadgets and OTG. Otherwise things are guaranteed to break for USB certs :) Tony ^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH] musb: fix power field to hold all possible values 2010-02-25 22:19 ` Tony Lindgren @ 2010-02-26 4:32 ` Gupta, Ajay Kumar 2010-03-23 11:41 ` Gupta, Ajay Kumar 0 siblings, 1 reply; 11+ messages in thread From: Gupta, Ajay Kumar @ 2010-02-26 4:32 UTC (permalink / raw) To: Tony Lindgren, Felipe Balbi; +Cc: linux-omap@vger.kernel.org Hi, > -----Original Message----- > From: Tony Lindgren [mailto:tony@atomide.com] > Sent: Friday, February 26, 2010 3:50 AM > To: Felipe Balbi > Cc: Gupta, Ajay Kumar; linux-omap@vger.kernel.org > Subject: Re: [PATCH] musb: fix power field to hold all possible values > > * Felipe Balbi <me@felipebalbi.com> [100223 12:30]: > > Hi, > > > > On Tue, Feb 23, 2010 at 08:01:50PM +0530, Gupta, Ajay Kumar wrote: > > > Board files are providing the actual mA and it is getting divided in > > > Arch/arm/mach-omap2/usb-musb.c. See the code snippet below, > > > > > > musb_plat.clock = "ick"; > > > musb_plat.board_data = board_data; > > > --> musb_plat.power = board_data->power >> 1; > > > musb_plat.mode = board_data->mode; > > > > > > So we need to either take this patch or fix this logic of dividing the > mA > > > supplied from all omap board files. > > > > that's true, had missed that. Sorry. > > Hmm, I believe this value is also divided somewhere else but > I forgot where. In any case, when making changes like this > please run the standard USB tests for gadgets and OTG. > > Otherwise things are guaranteed to break for USB certs :) Tony, Currently the flow is, 1. Actual mA provided in all omap board files. 2. mA gets divided in usb-musb.c 3. mA multiplied by two in driver/usb/musb/musb_core.c to pass it to hcd->power_budget. So the current patch fixes the logic in step [1] above to fill mA value Above 255. -Ajay > > Tony ^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH] musb: fix power field to hold all possible values 2010-02-26 4:32 ` Gupta, Ajay Kumar @ 2010-03-23 11:41 ` Gupta, Ajay Kumar 2010-03-23 12:39 ` Felipe Balbi 0 siblings, 1 reply; 11+ messages in thread From: Gupta, Ajay Kumar @ 2010-03-23 11:41 UTC (permalink / raw) To: Gupta, Ajay Kumar, Tony Lindgren, Felipe Balbi; +Cc: linux-omap@vger.kernel.org Hi, > -----Original Message----- > From: linux-omap-owner@vger.kernel.org [mailto:linux-omap- > owner@vger.kernel.org] On Behalf Of Gupta, Ajay Kumar > Sent: Friday, February 26, 2010 10:03 AM > To: Tony Lindgren; Felipe Balbi > Cc: linux-omap@vger.kernel.org > Subject: RE: [PATCH] musb: fix power field to hold all possible values > > Hi, > > -----Original Message----- > > From: Tony Lindgren [mailto:tony@atomide.com] > > Sent: Friday, February 26, 2010 3:50 AM > > To: Felipe Balbi > > Cc: Gupta, Ajay Kumar; linux-omap@vger.kernel.org > > Subject: Re: [PATCH] musb: fix power field to hold all possible values > > > > * Felipe Balbi <me@felipebalbi.com> [100223 12:30]: > > > Hi, > > > > > > On Tue, Feb 23, 2010 at 08:01:50PM +0530, Gupta, Ajay Kumar wrote: > > > > Board files are providing the actual mA and it is getting divided in > > > > Arch/arm/mach-omap2/usb-musb.c. See the code snippet below, > > > > > > > > musb_plat.clock = "ick"; > > > > musb_plat.board_data = board_data; > > > > --> musb_plat.power = board_data->power >> 1; > > > > musb_plat.mode = board_data->mode; > > > > > > > > So we need to either take this patch or fix this logic of dividing > the > > mA > > > > supplied from all omap board files. > > > > > > that's true, had missed that. Sorry. > > > > Hmm, I believe this value is also divided somewhere else but > > I forgot where. In any case, when making changes like this > > please run the standard USB tests for gadgets and OTG. > > > > Otherwise things are guaranteed to break for USB certs :) > > Tony, > > Currently the flow is, > > 1. Actual mA provided in all omap board files. > 2. mA gets divided in usb-musb.c > 3. mA multiplied by two in driver/usb/musb/musb_core.c to pass it to > hcd->power_budget. > > So the current patch fixes the logic in step [1] above to fill mA value > Above 255. Felipe/Tony, Any update on this patch ? Regards, Ajay > > -Ajay > > > > Tony > -- > To unsubscribe from this list: send the line "unsubscribe linux-omap" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] musb: fix power field to hold all possible values 2010-03-23 11:41 ` Gupta, Ajay Kumar @ 2010-03-23 12:39 ` Felipe Balbi 0 siblings, 0 replies; 11+ messages in thread From: Felipe Balbi @ 2010-03-23 12:39 UTC (permalink / raw) To: ext Gupta, Ajay Kumar Cc: Tony Lindgren, Felipe Balbi, linux-omap@vger.kernel.org On Tue, Mar 23, 2010 at 12:41:16PM +0100, ext Gupta, Ajay Kumar wrote: >Felipe/Tony, > >Any update on this patch ? It's fine by me but I was expecting Tony to pick it up since it's on the arch code. Tony, do you want me to queue it for Greg or you take it forward ? -- balbi ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] musb: fix power field to hold all possible values 2010-02-23 9:46 [PATCH] musb: fix power field to hold all possible values Ajay Kumar Gupta 2010-02-23 9:51 ` Felipe Balbi @ 2010-03-24 8:11 ` Felipe Balbi 1 sibling, 0 replies; 11+ messages in thread From: Felipe Balbi @ 2010-03-24 8:11 UTC (permalink / raw) To: ext Ajay Kumar Gupta; +Cc: linux-omap@vger.kernel.org On Tue, Feb 23, 2010 at 10:46:44AM +0100, ext Ajay Kumar Gupta wrote: >MUSB can supply upto 500mA such as, AM3517 and OMAP3EVM Rev >=E and thus >the 'power' field has to hold values above 255. > > >Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> applied, thanks -- balbi ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2010-03-24 8:12 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-02-23 9:46 [PATCH] musb: fix power field to hold all possible values Ajay Kumar Gupta 2010-02-23 9:51 ` Felipe Balbi 2010-02-23 9:57 ` Gadiyar, Anand 2010-02-23 11:04 ` Felipe Balbi 2010-02-23 14:31 ` Gupta, Ajay Kumar 2010-02-23 20:32 ` Felipe Balbi 2010-02-25 22:19 ` Tony Lindgren 2010-02-26 4:32 ` Gupta, Ajay Kumar 2010-03-23 11:41 ` Gupta, Ajay Kumar 2010-03-23 12:39 ` Felipe Balbi 2010-03-24 8:11 ` Felipe Balbi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox