From: Felipe Balbi <me@felipebalbi.com>
To: Grazvydas Ignotas <notasas@gmail.com>
Cc: Felipe Balbi <me@felipebalbi.com>,
linux-omap@vger.kernel.org, Steve Sakoman <steve@sakoman.com>,
Anand Gadiyar <gadiyar@ti.com>
Subject: Re: [rft/rfc/patch-v2.6.29-rc5+ 16/23] usb: host: ehci: add platform_data
Date: Wed, 25 Feb 2009 00:39:38 +0200 [thread overview]
Message-ID: <20090224223937.GC4879@gandalf> (raw)
In-Reply-To: <6ed0b2680902241435j6c11e093t66722c098a9c4ed@mail.gmail.com>
On Wed, Feb 25, 2009 at 12:35:05AM +0200, Grazvydas Ignotas wrote:
> On Mon, Feb 23, 2009 at 8:55 PM, Felipe Balbi <me@felipebalbi.com> wrote:
> > Adding a platform_data to the driver allow us
> > to remove some of the ifdeferry in the code.
> >
>
> <snip>
>
> > diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
> > index b8a78c0..08215c0 100644
> > --- a/arch/arm/mach-omap2/board-omap3pandora.c
> > +++ b/arch/arm/mach-omap2/board-omap3pandora.c
> > @@ -297,7 +297,7 @@ static void __init omap3pandora_init(void)
> > spi_register_board_info(omap3pandora_spi_board_info,
> > ARRAY_SIZE(omap3pandora_spi_board_info));
> > usb_musb_init();
> > - usb_ehci_init();
> > + usb_ehci_init(EHCI_HCD_OMAP_MODE_PHY, true, true, 57, 61);
>
> Perhaps it would be better to have .chargepump and .phy_reset set to
> false by default, as pandora doesn't need that chargepump thing (I
> guess some other boards too), and phy reset GPIO is wrong not only for
> pandora I think. Board maintainers can then send patches as needed.
> There also should be a way to specify only one reset GPIO, most boards
> have only one EHCI port I think. Note that .phy_reset is required for
> EHCI to work on pandora (in case you have thoughts of removing that
> code later).
I made it true by default because those where always true in PHY mode as
of current driver. The correct way to do it, would be to move both to
board-file since those workarounds are board-specific.
We need a list of the boards that need the workarounds and a list of
those which don't need so we can move the workarounds to the
board-files.
>
> > diff --git a/arch/arm/mach-omap2/usb-ehci.c b/arch/arm/mach-omap2/usb-ehci.c
> > index 23fe857..30e1ad6 100644
> > --- a/arch/arm/mach-omap2/usb-ehci.c
> > +++ b/arch/arm/mach-omap2/usb-ehci.c
> > @@ -145,8 +145,20 @@ static void setup_ehci_io_mux(void)
> > return;
> > }
> >
> > -void __init usb_ehci_init(void)
> > +void __init usb_ehci_init(enum ehci_hcd_omap_mode phy_mode,
> > + int chargepump, int phy_reset, int reset_gpio_port1,
> > + int reset_gpio_port2)
> > {
> > + struct ehci_hcd_omap_platform_data pdata = {
> > + .phy_mode = phy_mode,
> > + .chargepump = chargepump,
> > + .phy_reset = phy_reset,
> > + .reset_gpio_port1 = reset_gpio_port1,
> > + .reset_gpio_port2 = reset_gpio_port2,
> > + };
> > +
> > + ehci_device.dev.platform_data = &pdata;
> > +
>
> hmm, doesn't pdata end up on stack here? platform_device_register()
> doesn't seem to make a copy of that structure.
hmm... should make that __initconst and use
platform_device_add_data();
Will fix, thanks a lot
--
balbi
--
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
next prev parent reply other threads:[~2009-02-24 22:39 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-23 18:55 [rft/rfc/patch-v2.6.29-rc5+ 00/23] ehci cleanup series Felipe Balbi
2009-02-23 18:55 ` [rft/rfc/patch-v2.6.29-rc5+ 01/23] usb: host: ehci: make checkpatch.pl happy with ehci-omap Felipe Balbi
2009-02-23 18:55 ` [rft/rfc/patch-v2.6.29-rc5+ 02/23] usb: host: ehci: use dev_name Felipe Balbi
2009-02-23 18:55 ` [rft/rfc/patch-v2.6.29-rc5+ 03/23] usb: host: ehci: standardize variables Felipe Balbi
2009-02-23 18:55 ` [rft/rfc/patch-v2.6.29-rc5+ 04/23] usb: host: ehci: tabify structures Felipe Balbi
2009-02-23 18:55 ` [rft/rfc/patch-v2.6.29-rc5+ 05/23] usb: host: ehci: use resource helpers Felipe Balbi
2009-02-23 18:55 ` [rft/rfc/patch-v2.6.29-rc5+ 06/23] usb: host: ehci: sanitize error path Felipe Balbi
2009-02-23 18:55 ` [rft/rfc/patch-v2.6.29-rc5+ 07/23] usb: host: ehci: get rid of pm functions Felipe Balbi
2009-02-23 18:55 ` [rft/rfc/patch-v2.6.29-rc5+ 08/23] usb: host: ehci: reorganize structures Felipe Balbi
2009-02-23 18:55 ` [rft/rfc/patch-v2.6.29-rc5+ 09/23] usb: host: ehci: better function names Felipe Balbi
2009-02-23 18:55 ` [rft/rfc/patch-v2.6.29-rc5+ 10/23] usb: host: ehci: move some comments Felipe Balbi
2009-02-23 18:55 ` [rft/rfc/patch-v2.6.29-rc5+ 11/23] usb: host: ehci: add MODULE_AUTHOR Felipe Balbi
2009-02-23 18:55 ` [rft/rfc/patch-v2.6.29-rc5+ 12/23] usb: host: ehci: include <linux/gpio.h> instead Felipe Balbi
2009-02-23 18:55 ` [rft/rfc/patch-v2.6.29-rc5+ 13/23] usb: host: ehci: remove ehci-omap.h Felipe Balbi
2009-02-23 18:55 ` [rft/rfc/patch-v2.6.29-rc5+ 14/23] usb: host: ehci: get rid of infinite loops Felipe Balbi
2009-02-23 18:55 ` [rft/rfc/patch-v2.6.29-rc5+ 15/23] usb: host: ehci: disable clocks on error Felipe Balbi
2009-02-23 18:55 ` [rft/rfc/patch-v2.6.29-rc5+ 16/23] usb: host: ehci: add platform_data Felipe Balbi
2009-02-23 18:55 ` [rft/rfc/patch-v2.6.29-rc5+ 17/23] usb: host: ehci: fix register definitions Felipe Balbi
2009-02-23 18:55 ` [rft/rfc/patch-v2.6.29-rc5+ 18/23] arm: omap: make usb base defines follow trm Felipe Balbi
2009-02-23 18:55 ` [rft/rfc/patch-v2.6.29-rc5+ 19/23] usb: host: ehci: ioremap all usb bases Felipe Balbi
2009-02-23 18:55 ` [rft/rfc/patch-v2.6.29-rc5+ 20/23] usb: host: ehci: align defines Felipe Balbi
2009-02-23 18:55 ` [rft/rfc/patch-v2.6.29-rc5+ 21/23] usb: host: ehci: don't ensure register write Felipe Balbi
2009-02-23 18:55 ` [rft/rfc/patch-v2.6.29-rc5+ 22/23] ehci-omap: Remove defines for clock names Felipe Balbi
2009-02-23 18:55 ` [rft/rfc/patch-v2.6.29-rc5+ 23/23] usb: host: ehci: add few comments and todo Felipe Balbi
2009-02-23 19:08 ` [rft/rfc/patch-v2.6.29-rc5+ 21/23] usb: host: ehci: don't ensure register write Felipe Balbi
2009-02-24 22:42 ` [rft/rfc/patch-v2.6.29-rc5+ 17/23] usb: host: ehci: fix register definitions Grazvydas Ignotas
2009-02-24 22:35 ` [rft/rfc/patch-v2.6.29-rc5+ 16/23] usb: host: ehci: add platform_data Grazvydas Ignotas
2009-02-24 22:39 ` Felipe Balbi [this message]
2009-02-23 19:32 ` [rft/rfc/patch-v2.6.29-rc5+ 00/23] ehci cleanup series Felipe Balbi
2009-04-27 9:18 ` Grazvydas Ignotas
2009-04-27 9:18 ` Felipe Balbi
-- strict thread matches above, loose matches on Subject: below --
2009-02-23 18:52 Felipe Balbi
2009-02-23 18:52 ` [rft/rfc/patch-v2.6.29-rc5+ 01/23] usb: host: ehci: make checkpatch.pl happy with ehci-omap Felipe Balbi
2009-02-23 18:52 ` [rft/rfc/patch-v2.6.29-rc5+ 02/23] usb: host: ehci: use dev_name Felipe Balbi
2009-02-23 18:52 ` [rft/rfc/patch-v2.6.29-rc5+ 03/23] usb: host: ehci: standardize variables Felipe Balbi
2009-02-23 18:52 ` [rft/rfc/patch-v2.6.29-rc5+ 04/23] usb: host: ehci: tabify structures Felipe Balbi
2009-02-23 18:52 ` [rft/rfc/patch-v2.6.29-rc5+ 05/23] usb: host: ehci: use resource helpers Felipe Balbi
2009-02-23 18:52 ` [rft/rfc/patch-v2.6.29-rc5+ 06/23] usb: host: ehci: sanitize error path Felipe Balbi
2009-02-23 18:52 ` [rft/rfc/patch-v2.6.29-rc5+ 07/23] usb: host: ehci: get rid of pm functions Felipe Balbi
2009-02-23 18:52 ` [rft/rfc/patch-v2.6.29-rc5+ 08/23] usb: host: ehci: reorganize structures Felipe Balbi
2009-02-23 18:52 ` [rft/rfc/patch-v2.6.29-rc5+ 09/23] usb: host: ehci: better function names Felipe Balbi
2009-02-23 18:52 ` [rft/rfc/patch-v2.6.29-rc5+ 10/23] usb: host: ehci: move some comments Felipe Balbi
2009-02-23 18:52 ` [rft/rfc/patch-v2.6.29-rc5+ 11/23] usb: host: ehci: add MODULE_AUTHOR Felipe Balbi
2009-02-23 18:52 ` [rft/rfc/patch-v2.6.29-rc5+ 12/23] usb: host: ehci: include <linux/gpio.h> instead Felipe Balbi
2009-02-23 18:52 ` [rft/rfc/patch-v2.6.29-rc5+ 13/23] usb: host: ehci: remove ehci-omap.h Felipe Balbi
2009-02-23 18:52 ` [rft/rfc/patch-v2.6.29-rc5+ 14/23] usb: host: ehci: get rid of infinite loops Felipe Balbi
2009-02-23 18:52 ` [rft/rfc/patch-v2.6.29-rc5+ 15/23] usb: host: ehci: disable clocks on error Felipe Balbi
2009-02-23 18:52 ` [rft/rfc/patch-v2.6.29-rc5+ 16/23] usb: host: ehci: add platform_data Felipe Balbi
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=20090224223937.GC4879@gandalf \
--to=me@felipebalbi.com \
--cc=gadiyar@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=notasas@gmail.com \
--cc=steve@sakoman.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 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.