From: Felipe Balbi <felipe.balbi@nokia.com>
To: "ext Gupta, Ajay Kumar" <ajay.gupta@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"Balbi Felipe (Nokia-D/Helsinki)" <felipe.balbi@nokia.com>,
"Menon, Nishanth" <nm@ti.com>, "Gadiyar, Anand" <gadiyar@ti.com>
Subject: Re: [PATCH 3/3] omap3evm: musb: Update power capability for OMAP3EVM (Rev >= E)
Date: Thu, 29 Oct 2009 08:58:38 +0200 [thread overview]
Message-ID: <20091029065838.GA27534@nokia.com> (raw)
In-Reply-To: <19F8576C6E063C45BE387C64729E73940436EEAF59@dbde02.ent.ti.com>
Hi,
On Thu, Oct 29, 2009 at 06:56:03AM +0100, ext Gupta, Ajay Kumar wrote:
> Felipe,
> > -----Original Message-----
> > From: Menon, Nishanth
> > Sent: Thursday, October 29, 2009 11:06 AM
> > To: Gupta, Ajay Kumar; Gadiyar, Anand; linux-omap@vger.kernel.org
> > Cc: felipe.balbi@nokia.com; tony@atomide.com
> > Subject: RE: [PATCH 3/3] omap3evm: musb: Update power capability for
> > OMAP3EVM (Rev >= E)
> >
> > > From: Gupta, Ajay Kumar
> > > Sent: Thursday, October 29, 2009 7:10 AM
> > > >
> > > > > From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> > > > > > owner@vger.kernel.org] On Behalf Of Gupta, Ajay Kumar
> > > > > > Sent: Wednesday, October 28, 2009 5:13 PM
> > > > > >
> > > > > [...]
> > > > > > diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-
> > > omap2/usb-
> > > > > > musb.c
> > > > > > index a80441d..529e2b1 100644
> > > > > > --- a/arch/arm/mach-omap2/usb-musb.c
> > > > > > +++ b/arch/arm/mach-omap2/usb-musb.c
> > > > > > @@ -148,10 +148,14 @@ static struct platform_device musb_device =
> > {
> > > > > >
> > > > > > void __init usb_musb_init(void)
> > > > > > {
> > > > > > - if (cpu_is_omap243x())
> > > > > > + if (cpu_is_omap243x()) {
> > > > > > musb_resources[0].start = OMAP243X_HS_BASE;
> > > > > > - else
> > > > > > + } else {
> > > > > Do you need {} for a one liner? Checkpatch should have warned you I
> > > > think..
> > > > >
> > > >
> > > > Er, CodingStyle says you need to do this, if the else clause
> > > > has brackets.
> > >
> > > Correct and also checkpatch didn't give any warning for this.
> > Thanks..
> >
> > >
> > > >
> > > > > > musb_resources[0].start = OMAP34XX_HSUSB_OTG_BASE;
> > > > > > + /* OMAP3EVM Rev >= E can source 500mA */
> > > > > > + if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2)
> > > > > > + musb_plat.power = 250;
> > > > > > + }
>
> Felipe,
>
> How about moving the platform specific data (musb_hdrc_platform_data) moved to board-x.c file from usb-musb.c (same as ehci). This would avoid using omap3evm specific check in usb-musb.c files.
I was thinking on adding a musb_hdrc_board_data which would group
board-specific data such as this one.
Musb's init phase is quite messy as of today so we would need to clean
that up. Anyways, the main idea is:
board will call usb_musb_init() with a musb_hdrc_board_data * as
parameter. usb-musb would still hold a static struct
musb_hdrc_platform_data for the (in our case) OMAP-specific init, those
would be passed down to driver and init phase would be done as
following:
musb_init()
-> musb_platform_init()
-> musb_board_init()
we could also have board_ops and platform_ops structures for the
function pointers to be passed to musb_core.c Then all init could be
done there.
What do you say ???
--
balbi
next prev parent reply other threads:[~2009-10-29 6:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-28 15:12 [PATCH 1/3] omap3evm: ehci: Add EHCI padconfig for board Rev >= E Ajay Kumar Gupta
2009-10-28 15:12 ` [PATCH 2/3] omap3evm: ehci: Update EHCI support on OMAP3EVM (Rev >= E) Ajay Kumar Gupta
2009-10-28 15:12 ` [PATCH 3/3] omap3evm: musb: Update power capability for " Ajay Kumar Gupta
2009-10-28 20:43 ` Menon, Nishanth
2009-10-29 2:53 ` Gadiyar, Anand
2009-10-29 5:10 ` Gupta, Ajay Kumar
2009-10-29 5:35 ` Menon, Nishanth
2009-10-29 5:56 ` Gupta, Ajay Kumar
2009-10-29 6:58 ` Felipe Balbi [this message]
2009-10-29 7:03 ` Gupta, Ajay Kumar
2009-10-29 9:23 ` Felipe Balbi
2009-10-29 10:29 ` Gupta, Ajay Kumar
2009-10-29 18:12 ` Felipe Balbi
2009-10-28 20:44 ` [PATCH 1/3] omap3evm: ehci: Add EHCI padconfig for board Rev >= E Menon, Nishanth
2009-10-29 6:11 ` Gupta, Ajay Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091029065838.GA27534@nokia.com \
--to=felipe.balbi@nokia.com \
--cc=ajay.gupta@ti.com \
--cc=gadiyar@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=nm@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox