* [patch 2.6.27-rc3-omap1] tweak musb_hdrc SOC init code
@ 2008-09-02 19:05 David Brownell
2008-09-02 19:39 ` Felipe Balbi
0 siblings, 1 reply; 4+ messages in thread
From: David Brownell @ 2008-09-02 19:05 UTC (permalink / raw)
To: linux-omap
From: David Brownell <dbrownell@users.sourceforge.net>
Minor cleanups to omap 2430/34xx/35x musb_hdrc init:
- num_eps is 16; here, each one is bidirectional
- use DMA_32BIT_MASK to prevent confusion/errors
- initialize root port power to reflect 100 mA limit
This still hard-wires some board-specific data, since there
are no hooks through which different boards can provide the
right data to the init code.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -21,12 +21,15 @@
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/clk.h>
+#include <linux/dma-mapping.h>
+
#include <asm/io.h>
-#include <mach/mux.h>
+
#include <linux/usb/musb.h>
#include <mach/hardware.h>
#include <mach/pm.h>
+#include <mach/mux.h>
#include <mach/usb.h>
#ifdef CONFIG_USB_MUSB_SOC
@@ -109,7 +112,7 @@ static struct musb_hdrc_config musb_config = {
.dyn_fifo = 1,
.soft_con = 1,
.dma = 1,
- .num_eps = 32,
+ .num_eps = 16,
.dma_channels = 7,
.dma_req_chan = (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3),
.ram_bits = 12,
@@ -129,16 +132,22 @@ static struct musb_hdrc_platform_data musb_plat = {
: "usbhs_ick",
.set_clock = musb_set_clock,
.config = &musb_config,
+
+ /* REVISIT charge pump on TWL4030 can supply up to
+ * 100 mA ... but this value is board-specific, like
+ * "mode", and should be passed to usb_musb_init().
+ */
+ .power = 50, /* up to 100 mA */
};
-static u64 musb_dmamask = ~(u32)0;
+static u64 musb_dmamask = DMA_32BIT_MASK;
static struct platform_device musb_device = {
.name = "musb_hdrc",
.id = -1,
.dev = {
.dma_mask = &musb_dmamask,
- .coherent_dma_mask = 0xffffffff,
+ .coherent_dma_mask = DMA_32BIT_MASK,
.platform_data = &musb_plat,
},
.num_resources = ARRAY_SIZE(musb_resources),
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 2.6.27-rc3-omap1] tweak musb_hdrc SOC init code
2008-09-02 19:05 [patch 2.6.27-rc3-omap1] tweak musb_hdrc SOC init code David Brownell
@ 2008-09-02 19:39 ` Felipe Balbi
2008-09-02 19:54 ` David Brownell
0 siblings, 1 reply; 4+ messages in thread
From: Felipe Balbi @ 2008-09-02 19:39 UTC (permalink / raw)
To: David Brownell; +Cc: linux-omap
On Tue, Sep 02, 2008 at 12:05:00PM -0700, David Brownell wrote:
> From: David Brownell <dbrownell@users.sourceforge.net>
>
> Minor cleanups to omap 2430/34xx/35x musb_hdrc init:
>
> - num_eps is 16; here, each one is bidirectional
> - use DMA_32BIT_MASK to prevent confusion/errors
> - initialize root port power to reflect 100 mA limit
>
> This still hard-wires some board-specific data, since there
> are no hooks through which different boards can provide the
> right data to the init code.
>
> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
> +
> + /* REVISIT charge pump on TWL4030 can supply up to
> + * 100 mA ... but this value is board-specific, like
> + * "mode", and should be passed to usb_musb_init().
> + */
> + .power = 50, /* up to 100 mA */
We can add some parameters to usb_musb_init();
Something similar should be done to hsmmc_init(), as of now it only
registers one slot and some boards have more than one.
--
balbi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 2.6.27-rc3-omap1] tweak musb_hdrc SOC init code
2008-09-02 19:39 ` Felipe Balbi
@ 2008-09-02 19:54 ` David Brownell
2008-09-10 23:50 ` Tony Lindgren
0 siblings, 1 reply; 4+ messages in thread
From: David Brownell @ 2008-09-02 19:54 UTC (permalink / raw)
To: me; +Cc: linux-omap
On Tuesday 02 September 2008, Felipe Balbi wrote:
>
> > Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
>
> Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
>
> > +
> > + /* REVISIT charge pump on TWL4030 can supply up to
> > + * 100 mA ... but this value is board-specific, like
> > + * "mode", and should be passed to usb_musb_init().
> > + */
> > + .power = 50, /* up to 100 mA */
>
> We can add some parameters to usb_musb_init();
> Something similar should be done to hsmmc_init(), as of now it only
> registers one slot and some boards have more than one.
Let's wait till the twl4030 usb init gets some board-specific
parameterization. The MUSB init code should be called after
the TWL4030 is initialized, so it can use TWL facilities right
away.
--
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] 4+ messages in thread
* Re: [patch 2.6.27-rc3-omap1] tweak musb_hdrc SOC init code
2008-09-02 19:54 ` David Brownell
@ 2008-09-10 23:50 ` Tony Lindgren
0 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2008-09-10 23:50 UTC (permalink / raw)
To: David Brownell; +Cc: me, linux-omap
* David Brownell <david-b@pacbell.net> [080902 12:58]:
> On Tuesday 02 September 2008, Felipe Balbi wrote:
> >
> > > Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
> >
> > Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
> >
> > > +
> > > + /* REVISIT charge pump on TWL4030 can supply up to
> > > + * 100 mA ... but this value is board-specific, like
> > > + * "mode", and should be passed to usb_musb_init().
> > > + */
> > > + .power = 50, /* up to 100 mA */
> >
> > We can add some parameters to usb_musb_init();
> > Something similar should be done to hsmmc_init(), as of now it only
> > registers one slot and some boards have more than one.
>
> Let's wait till the twl4030 usb init gets some board-specific
> parameterization. The MUSB init code should be called after
> the TWL4030 is initialized, so it can use TWL facilities right
> away.
Pushing this to l-o tree today.
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] 4+ messages in thread
end of thread, other threads:[~2008-09-10 23:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-02 19:05 [patch 2.6.27-rc3-omap1] tweak musb_hdrc SOC init code David Brownell
2008-09-02 19:39 ` Felipe Balbi
2008-09-02 19:54 ` David Brownell
2008-09-10 23:50 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox