* [PATCH] MUSB: Remove usb_musb_pm_init() call
@ 2009-08-24 12:06 Anand Gadiyar
2009-08-24 12:23 ` Kevin Hilman
0 siblings, 1 reply; 4+ messages in thread
From: Anand Gadiyar @ 2009-08-24 12:06 UTC (permalink / raw)
To: linux-omap; +Cc: Anand Gadiyar
MUSB: Remove usb_musb_pm_init() call
In usb_musb_pm_init, we attempt to access an MUSB register
when the i-clock may not be on, or the module is otherwise
not accessible.
We need to either:
- enable the clock before this access, or
- remove this code and move it to the bootloader, or
- enable the clock in the bootloader
If we enable the clock in the bootloader, we might as well
add the workaround in the bootloader itself. This code will
anyway be changed once hwmod is in place, so remove it for now
This allows us to boot the kernel on certain OMAP3 boards with
a bootloader that doesn't enable this clock. Without this, we
will need to upgrade the bootloaders on these boards.
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
---
arch/arm/mach-omap2/usb-musb.c | 12 ------------
1 files changed, 12 deletions(-)
Index: linux-2.6/arch/arm/mach-omap2/usb-musb.c
===================================================================
--- linux-2.6.orig/arch/arm/mach-omap2/usb-musb.c
+++ linux-2.6/arch/arm/mach-omap2/usb-musb.c
@@ -31,15 +31,6 @@
#include <mach/mux.h>
#include <mach/usb.h>
-#define OTG_SYSCONFIG (OMAP34XX_HSUSB_OTG_BASE + 0x404)
-
-static void __init usb_musb_pm_init(void)
-{
- /* Ensure force-idle mode for OTG controller */
- if (cpu_is_omap34xx())
- omap_writel(0, OTG_SYSCONFIG);
-}
-
#ifdef CONFIG_USB_MUSB_SOC
static struct resource musb_resources[] = {
@@ -194,13 +185,10 @@ void __init usb_musb_init(void)
printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n");
return;
}
-
- usb_musb_pm_init();
}
#else
void __init usb_musb_init(void)
{
- usb_musb_pm_init();
}
#endif /* CONFIG_USB_MUSB_SOC */
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] MUSB: Remove usb_musb_pm_init() call
2009-08-24 12:06 [PATCH] MUSB: Remove usb_musb_pm_init() call Anand Gadiyar
@ 2009-08-24 12:23 ` Kevin Hilman
2009-08-24 12:26 ` Gadiyar, Anand
0 siblings, 1 reply; 4+ messages in thread
From: Kevin Hilman @ 2009-08-24 12:23 UTC (permalink / raw)
To: Anand Gadiyar; +Cc: linux-omap
Anand Gadiyar <gadiyar@ti.com> writes:
> MUSB: Remove usb_musb_pm_init() call
>
> In usb_musb_pm_init, we attempt to access an MUSB register
> when the i-clock may not be on, or the module is otherwise
> not accessible.
>
> We need to either:
> - enable the clock before this access, or
> - remove this code and move it to the bootloader, or
> - enable the clock in the bootloader
>
> If we enable the clock in the bootloader, we might as well
> add the workaround in the bootloader itself. This code will
> anyway be changed once hwmod is in place, so remove it for now
>
> This allows us to boot the kernel on certain OMAP3 boards with
> a bootloader that doesn't enable this clock. Without this, we
> will need to upgrade the bootloaders on these boards.
>
> Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
NAK.
The PM branch already has a fix from Jon Hunter[1] for this which enables
the clock, and in the thread where we discussed this I mentioned I would
carry it in the PM branch until the hwmod for OTG is ready.
Kevin
[1] http://marc.info/?l=linux-omap&m=125020202601759&w=2
> arch/arm/mach-omap2/usb-musb.c | 12 ------------
> 1 files changed, 12 deletions(-)
>
> Index: linux-2.6/arch/arm/mach-omap2/usb-musb.c
> ===================================================================
> --- linux-2.6.orig/arch/arm/mach-omap2/usb-musb.c
> +++ linux-2.6/arch/arm/mach-omap2/usb-musb.c
> @@ -31,15 +31,6 @@
> #include <mach/mux.h>
> #include <mach/usb.h>
>
> -#define OTG_SYSCONFIG (OMAP34XX_HSUSB_OTG_BASE + 0x404)
> -
> -static void __init usb_musb_pm_init(void)
> -{
> - /* Ensure force-idle mode for OTG controller */
> - if (cpu_is_omap34xx())
> - omap_writel(0, OTG_SYSCONFIG);
> -}
> -
> #ifdef CONFIG_USB_MUSB_SOC
>
> static struct resource musb_resources[] = {
> @@ -194,13 +185,10 @@ void __init usb_musb_init(void)
> printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n");
> return;
> }
> -
> - usb_musb_pm_init();
> }
>
> #else
> void __init usb_musb_init(void)
> {
> - usb_musb_pm_init();
> }
> #endif /* CONFIG_USB_MUSB_SOC */
> --
> 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] MUSB: Remove usb_musb_pm_init() call
2009-08-24 12:23 ` Kevin Hilman
@ 2009-08-24 12:26 ` Gadiyar, Anand
2009-08-24 12:34 ` Kevin Hilman
0 siblings, 1 reply; 4+ messages in thread
From: Gadiyar, Anand @ 2009-08-24 12:26 UTC (permalink / raw)
To: Kevin Hilman; +Cc: linux-omap@vger.kernel.org
> > MUSB: Remove usb_musb_pm_init() call
> >
> > In usb_musb_pm_init, we attempt to access an MUSB register
> > when the i-clock may not be on, or the module is otherwise
> > not accessible.
> >
> > We need to either:
> > - enable the clock before this access, or
> > - remove this code and move it to the bootloader, or
> > - enable the clock in the bootloader
> >
> > If we enable the clock in the bootloader, we might as well
> > add the workaround in the bootloader itself. This code will
> > anyway be changed once hwmod is in place, so remove it for now
> >
> > This allows us to boot the kernel on certain OMAP3 boards with
> > a bootloader that doesn't enable this clock. Without this, we
> > will need to upgrade the bootloaders on these boards.
> >
> > Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
>
> NAK.
>
> The PM branch already has a fix from Jon Hunter[1] for this which enables
> the clock, and in the thread where we discussed this I mentioned I would
> carry it in the PM branch until the hwmod for OTG is ready.
Right, but at least merge this into master and mainline for now,
so that boards that used to boot up okay before can continue to do so now.
Not everybody is working on the pm branch.
- Anand
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] MUSB: Remove usb_musb_pm_init() call
2009-08-24 12:26 ` Gadiyar, Anand
@ 2009-08-24 12:34 ` Kevin Hilman
0 siblings, 0 replies; 4+ messages in thread
From: Kevin Hilman @ 2009-08-24 12:34 UTC (permalink / raw)
To: Gadiyar, Anand; +Cc: linux-omap@vger.kernel.org
"Gadiyar, Anand" <gadiyar@ti.com> writes:
>> > MUSB: Remove usb_musb_pm_init() call
>> >
>> > In usb_musb_pm_init, we attempt to access an MUSB register
>> > when the i-clock may not be on, or the module is otherwise
>> > not accessible.
>> >
>> > We need to either:
>> > - enable the clock before this access, or
>> > - remove this code and move it to the bootloader, or
>> > - enable the clock in the bootloader
>> >
>> > If we enable the clock in the bootloader, we might as well
>> > add the workaround in the bootloader itself. This code will
>> > anyway be changed once hwmod is in place, so remove it for now
>> >
>> > This allows us to boot the kernel on certain OMAP3 boards with
>> > a bootloader that doesn't enable this clock. Without this, we
>> > will need to upgrade the bootloaders on these boards.
>> >
>> > Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
>>
>> NAK.
>>
>> The PM branch already has a fix from Jon Hunter[1] for this which enables
>> the clock, and in the thread where we discussed this I mentioned I would
>> carry it in the PM branch until the hwmod for OTG is ready.
>
> Right, but at least merge this into master and mainline for now,
> so that boards that used to boot up okay before can continue to do so now.
>
> Not everybody is working on the pm branch.
ok, I understand now. Was thinking you meant this for the PM branch.
Sorry for the confusion.
I'll pull this into my fixes queue for the next merge window.
Thanks,
Kevin
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-08-24 12:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-24 12:06 [PATCH] MUSB: Remove usb_musb_pm_init() call Anand Gadiyar
2009-08-24 12:23 ` Kevin Hilman
2009-08-24 12:26 ` Gadiyar, Anand
2009-08-24 12:34 ` Kevin Hilman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox