linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] DM644x EVM: register MUSB device earlier
@ 2011-03-13 20:06 Sergei Shtylyov
  2011-03-14  8:52 ` Felipe Balbi
  0 siblings, 1 reply; 12+ messages in thread
From: Sergei Shtylyov @ 2011-03-13 20:06 UTC (permalink / raw)
  To: linux-arm-kernel

The MUSB driver doesn't see its platform device on DM644x EVM board anymore
since commit 73b089b052a69020b953312a624a6e1eb5b81fab (usb: musb: split davinci
to its own platform_driver) because the new probe is called as subsys_initcall()
now, and the device is registered later than that by the board code.  Move the
registration to davinci_evm_init() -- it's safe to do so because the MUSB core
device still gets initialized as fs_initcall() -- which is late enough for the
I2C GPIO expander (which controls VBUS) to be initialized.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

---
The patch is against the recent DaVinci tree.
It fixes post 2.6.38-rc1 regression, so should be applied immediately!

 arch/arm/mach-davinci/board-dm644x-evm.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Index: linux-davinci/arch/arm/mach-davinci/board-dm644x-evm.c
===================================================================
--- linux-davinci.orig/arch/arm/mach-davinci/board-dm644x-evm.c
+++ linux-davinci/arch/arm/mach-davinci/board-dm644x-evm.c
@@ -440,11 +440,6 @@ evm_u35_setup(struct i2c_client *client,
 	gpio_request(gpio + 7, "nCF_SEL");
 	gpio_direction_output(gpio + 7, 1);
 
-	/* irlml6401 switches over 1A, in under 8 msec;
-	 * now it can be managed by nDRV_VBUS ...
-	 */
-	davinci_setup_usb(1000, 8);
-
 	return 0;
 }
 
@@ -705,6 +700,9 @@ static __init void davinci_evm_init(void
 	davinci_serial_init(&uart_config);
 	dm644x_init_asp(&dm644x_evm_snd_data);
 
+	/* irlml6401 switches over 1A, in under 8 msec */
+	davinci_setup_usb(1000, 8);
+
 	soc_info->emac_pdata->phy_id = DM644X_EVM_PHY_ID;
 	/* Register the fixup for PHY on DaVinci */
 	phy_register_fixup_for_uid(LXT971_PHY_ID, LXT971_PHY_MASK,

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] DM644x EVM: register MUSB device earlier
  2011-03-13 20:06 [PATCH] DM644x EVM: register MUSB device earlier Sergei Shtylyov
@ 2011-03-14  8:52 ` Felipe Balbi
  2011-03-14 16:42   ` Kevin Hilman
  2011-03-14 18:52   ` Sergei Shtylyov
  0 siblings, 2 replies; 12+ messages in thread
From: Felipe Balbi @ 2011-03-14  8:52 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Mar 13, 2011 at 11:06:59PM +0300, Sergei Shtylyov wrote:
> The MUSB driver doesn't see its platform device on DM644x EVM board anymore
> since commit 73b089b052a69020b953312a624a6e1eb5b81fab (usb: musb: split davinci
> to its own platform_driver) because the new probe is called as subsys_initcall()
> now, and the device is registered later than that by the board code.  Move the
> registration to davinci_evm_init() -- it's safe to do so because the MUSB core
> device still gets initialized as fs_initcall() -- which is late enough for the
> I2C GPIO expander (which controls VBUS) to be initialized.
> 
> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

Kevin feel free to take this into your tree:

Acked-by: Felipe Balbi <balbi@ti.com>

> ---
> The patch is against the recent DaVinci tree.
> It fixes post 2.6.38-rc1 regression, so should be applied immediately!

I wonder how noone has noticed that from -rc1 until now.

-- 
balbi

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] DM644x EVM: register MUSB device earlier
  2011-03-14  8:52 ` Felipe Balbi
@ 2011-03-14 16:42   ` Kevin Hilman
  2011-03-14 17:44     ` Nori, Sekhar
  2011-03-14 18:52   ` Sergei Shtylyov
  1 sibling, 1 reply; 12+ messages in thread
From: Kevin Hilman @ 2011-03-14 16:42 UTC (permalink / raw)
  To: linux-arm-kernel

Felipe Balbi <balbi@ti.com> writes:

[...]

>
> Kevin feel free to take this into your tree:
>
> Acked-by: Felipe Balbi <balbi@ti.com>
>

OK, will queue for 2.6.39.

Thanks,

Kevin

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] DM644x EVM: register MUSB device earlier
  2011-03-14 16:42   ` Kevin Hilman
@ 2011-03-14 17:44     ` Nori, Sekhar
  2011-03-15 10:08       ` Russell King - ARM Linux
  0 siblings, 1 reply; 12+ messages in thread
From: Nori, Sekhar @ 2011-03-14 17:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Mar 14, 2011 at 22:12:54, Hilman, Kevin wrote:
> Felipe Balbi <balbi@ti.com> writes:
> 
> [...]
> 
> >
> > Kevin feel free to take this into your tree:
> >
> > Acked-by: Felipe Balbi <balbi@ti.com>
> >
> 
> OK, will queue for 2.6.39.

This will need to make into 2.6.38.

Hi Russell,

Without this fix, USB will remain broken on 2.6.38
on DM644x EVM. Any chance of this making into 2.6.38?

Shall I check this into your patch system?

Thanks,
Sekhar

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] DM644x EVM: register MUSB device earlier
  2011-03-14  8:52 ` Felipe Balbi
  2011-03-14 16:42   ` Kevin Hilman
@ 2011-03-14 18:52   ` Sergei Shtylyov
  2011-03-15  9:33     ` Felipe Balbi
  1 sibling, 1 reply; 12+ messages in thread
From: Sergei Shtylyov @ 2011-03-14 18:52 UTC (permalink / raw)
  To: linux-arm-kernel

Hello.

Felipe Balbi wrote:

>> The MUSB driver doesn't see its platform device on DM644x EVM board anymore
>> since commit 73b089b052a69020b953312a624a6e1eb5b81fab (usb: musb: split davinci
>> to its own platform_driver) because the new probe is called as subsys_initcall()
>> now, and the device is registered later than that by the board code.  Move the
>> registration to davinci_evm_init() -- it's safe to do so because the MUSB core
>> device still gets initialized as fs_initcall() -- which is late enough for the
>> I2C GPIO expander (which controls VBUS) to be initialized.

>> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

> Kevin feel free to take this into your tree:

> Acked-by: Felipe Balbi <balbi@ti.com>

    Thanks.

>> ---
>> The patch is against the recent DaVinci tree.
>> It fixes post 2.6.38-rc1 regression, so should be applied immediately!

> I wonder how noone has noticed that from -rc1 until now.

    I don't think many people run the most current DaVinci kernel. Most people 
probably use the Arago project kernels or even older MV-based TI's stuff...

WBR, Sergei

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] DM644x EVM: register MUSB device earlier
  2011-03-14 18:52   ` Sergei Shtylyov
@ 2011-03-15  9:33     ` Felipe Balbi
  2011-03-16 11:42       ` Sergei Shtylyov
  0 siblings, 1 reply; 12+ messages in thread
From: Felipe Balbi @ 2011-03-15  9:33 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Mon, Mar 14, 2011 at 09:52:58PM +0300, Sergei Shtylyov wrote:
> >I wonder how noone has noticed that from -rc1 until now.
> 
>    I don't think many people run the most current DaVinci kernel.
> Most people probably use the Arago project kernels or even older
> MV-based TI's stuff...

that's nasty :-p All those hacks on a 2.6.18 kernel... Oh well, thanks
for noticing and sending a patch :-)

-- 
balbi

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] DM644x EVM: register MUSB device earlier
  2011-03-14 17:44     ` Nori, Sekhar
@ 2011-03-15 10:08       ` Russell King - ARM Linux
  2011-03-15 10:47         ` Nori, Sekhar
  0 siblings, 1 reply; 12+ messages in thread
From: Russell King - ARM Linux @ 2011-03-15 10:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Mar 14, 2011 at 11:14:37PM +0530, Nori, Sekhar wrote:
> On Mon, Mar 14, 2011 at 22:12:54, Hilman, Kevin wrote:
> > Felipe Balbi <balbi@ti.com> writes:
> > 
> > [...]
> > 
> > >
> > > Kevin feel free to take this into your tree:
> > >
> > > Acked-by: Felipe Balbi <balbi@ti.com>
> > >
> > 
> > OK, will queue for 2.6.39.
> 
> This will need to make into 2.6.38.
> 
> Hi Russell,
> 
> Without this fix, USB will remain broken on 2.6.38
> on DM644x EVM. Any chance of this making into 2.6.38?
> 
> Shall I check this into your patch system?

The answer to that is in Kevin's reply.  Kevin is handling the patch as
current maintainer of Davinci.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] DM644x EVM: register MUSB device earlier
  2011-03-15 10:08       ` Russell King - ARM Linux
@ 2011-03-15 10:47         ` Nori, Sekhar
  2011-03-15 15:54           ` Sergei Shtylyov
  0 siblings, 1 reply; 12+ messages in thread
From: Nori, Sekhar @ 2011-03-15 10:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Mar 15, 2011 at 15:38:56, Russell King - ARM Linux wrote:
> On Mon, Mar 14, 2011 at 11:14:37PM +0530, Nori, Sekhar wrote:
> > On Mon, Mar 14, 2011 at 22:12:54, Hilman, Kevin wrote:
> > > Felipe Balbi <balbi@ti.com> writes:
> > > 
> > > [...]
> > > 
> > > >
> > > > Kevin feel free to take this into your tree:
> > > >
> > > > Acked-by: Felipe Balbi <balbi@ti.com>
> > > >
> > > 
> > > OK, will queue for 2.6.39.
> > 
> > This will need to make into 2.6.38.
> > 
> > Hi Russell,
> > 
> > Without this fix, USB will remain broken on 2.6.38
> > on DM644x EVM. Any chance of this making into 2.6.38?
> > 
> > Shall I check this into your patch system?
> 
> The answer to that is in Kevin's reply.  Kevin is handling the patch as
> current maintainer of Davinci.

Okay. Linus has already released 2.6.38; will queue this
for Kevin to send for 2.6.39.

Thanks,
Sekhar

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] DM644x EVM: register MUSB device earlier
  2011-03-15 10:47         ` Nori, Sekhar
@ 2011-03-15 15:54           ` Sergei Shtylyov
  0 siblings, 0 replies; 12+ messages in thread
From: Sergei Shtylyov @ 2011-03-15 15:54 UTC (permalink / raw)
  To: linux-arm-kernel

Hello.

Nori, Sekhar wrote:

>>>> Felipe Balbi <balbi@ti.com> writes:

>>>> [...]

>>>>> Kevin feel free to take this into your tree:

>>>>> Acked-by: Felipe Balbi <balbi@ti.com>

>>>> OK, will queue for 2.6.39.
>>> This will need to make into 2.6.38.

>>> Hi Russell,

>>> Without this fix, USB will remain broken on 2.6.38
>>> on DM644x EVM. Any chance of this making into 2.6.38?

>>> Shall I check this into your patch system?
>> The answer to that is in Kevin's reply.  Kevin is handling the patch as
>> current maintainer of Davinci.

> Okay. Linus has already released 2.6.38; will queue this
> for Kevin to send for 2.6.39.

    Could you add "Cc: stable at kernel.org" to the patch as 2.6.38 have now been 
missed (damn that virus I've caught :-)?

WBR, Sergei

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] DM644x EVM: register MUSB device earlier
  2011-03-15  9:33     ` Felipe Balbi
@ 2011-03-16 11:42       ` Sergei Shtylyov
  2011-03-16 12:47         ` Felipe Balbi
  0 siblings, 1 reply; 12+ messages in thread
From: Sergei Shtylyov @ 2011-03-16 11:42 UTC (permalink / raw)
  To: linux-arm-kernel

Hello.

On 15-03-2011 12:33, Felipe Balbi wrote:

>>> I wonder how noone has noticed that from -rc1 until now.

>>     I don't think many people run the most current DaVinci kernel.
>> Most people probably use the Arago project kernels or even older
>> MV-based TI's stuff...

> that's nasty :-p All those hacks on a 2.6.18 kernel...

    If not 2.6.10... :-)

> Oh well, thanks for noticing and sending a patch :-)

    I have noticed that back when testing your patch series, if you remember. 
And I really should have fixed it earlier, so that it could get into 2.6.38 
(damn my illness that caused a week delay). BTW, you haven't done anything 
about the broken MUSB modules, have you?

WBR, Sergei

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] DM644x EVM: register MUSB device earlier
  2011-03-16 11:42       ` Sergei Shtylyov
@ 2011-03-16 12:47         ` Felipe Balbi
  2011-03-16 12:54           ` Felipe Balbi
  0 siblings, 1 reply; 12+ messages in thread
From: Felipe Balbi @ 2011-03-16 12:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 16, 2011 at 02:42:32PM +0300, Sergei Shtylyov wrote:
> Hello.
> 
> On 15-03-2011 12:33, Felipe Balbi wrote:
> 
> >>>I wonder how noone has noticed that from -rc1 until now.
> 
> >>    I don't think many people run the most current DaVinci kernel.
> >>Most people probably use the Arago project kernels or even older
> >>MV-based TI's stuff...
> 
> >that's nasty :-p All those hacks on a 2.6.18 kernel...
> 
>    If not 2.6.10... :-)
> 
> >Oh well, thanks for noticing and sending a patch :-)
> 
>    I have noticed that back when testing your patch series, if you
> remember. And I really should have fixed it earlier, so that it could
> get into 2.6.38 (damn my illness that caused a week delay). BTW, you
> haven't done anything about the broken MUSB modules, have you?

You mean building musb as module ? Patch is coming:

diff --git a/drivers/Makefile b/drivers/Makefile
index b423bb1..15df745 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -66,7 +66,7 @@ obj-$(CONFIG_TC)              += tc/
 obj-$(CONFIG_UWB)              += uwb/
 obj-$(CONFIG_USB_OTG_UTILS)    += usb/otg/
 obj-$(CONFIG_USB)              += usb/
-obj-$(CONFIG_USB_MUSB_HDRC)    += usb/musb/
+obj-$(CONFIG_USB_MUSB)         += usb/musb/
 obj-$(CONFIG_PCI)              += usb/
 obj-$(CONFIG_USB_GADGET)       += usb/gadget/
 obj-$(CONFIG_SERIO)            += input/serio/
diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
index 4cbb7e4..32136c4 100644
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -6,10 +6,14 @@
 comment "Enable Host or Gadget support to see Inventra options"
        depends on !USB && USB_GADGET=n
 
+config USB_MUSB
+       bool
+
 # (M)HDRC = (Multipoint) Highspeed Dual-Role Controller
 config USB_MUSB_HDRC
        depends on (USB || USB_GADGET)
        depends on (ARM || (BF54x && !BF544) || (BF52x && !BF522 && !BF523))
+       select USB_MUSB
        select NOP_USB_XCEIV if (ARCH_DAVINCI || MACH_OMAP3EVM || BLACKFIN)
        select TWL4030_USB if MACH_OMAP_3430SDP
        select TWL6030_USB if MACH_OMAP_4430SDP || MACH_OMAP4_PANDA

compiling and testing a jiffy.

-- 
balbi

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH] DM644x EVM: register MUSB device earlier
  2011-03-16 12:47         ` Felipe Balbi
@ 2011-03-16 12:54           ` Felipe Balbi
  0 siblings, 0 replies; 12+ messages in thread
From: Felipe Balbi @ 2011-03-16 12:54 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 16, 2011 at 02:47:33PM +0200, Felipe Balbi wrote:
> On Wed, Mar 16, 2011 at 02:42:32PM +0300, Sergei Shtylyov wrote:
> > Hello.
> > 
> > On 15-03-2011 12:33, Felipe Balbi wrote:
> > 
> > >>>I wonder how noone has noticed that from -rc1 until now.
> > 
> > >>    I don't think many people run the most current DaVinci kernel.
> > >>Most people probably use the Arago project kernels or even older
> > >>MV-based TI's stuff...
> > 
> > >that's nasty :-p All those hacks on a 2.6.18 kernel...
> > 
> >    If not 2.6.10... :-)
> > 
> > >Oh well, thanks for noticing and sending a patch :-)
> > 
> >    I have noticed that back when testing your patch series, if you
> > remember. And I really should have fixed it earlier, so that it could
> > get into 2.6.38 (damn my illness that caused a week delay). BTW, you
> > haven't done anything about the broken MUSB modules, have you?
> 
> You mean building musb as module ? Patch is coming:
> 
> diff --git a/drivers/Makefile b/drivers/Makefile
> index b423bb1..15df745 100644
> --- a/drivers/Makefile
> +++ b/drivers/Makefile
> @@ -66,7 +66,7 @@ obj-$(CONFIG_TC)              += tc/
>  obj-$(CONFIG_UWB)              += uwb/
>  obj-$(CONFIG_USB_OTG_UTILS)    += usb/otg/
>  obj-$(CONFIG_USB)              += usb/
> -obj-$(CONFIG_USB_MUSB_HDRC)    += usb/musb/
> +obj-$(CONFIG_USB_MUSB)         += usb/musb/
>  obj-$(CONFIG_PCI)              += usb/
>  obj-$(CONFIG_USB_GADGET)       += usb/gadget/
>  obj-$(CONFIG_SERIO)            += input/serio/
> diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
> index 4cbb7e4..32136c4 100644
> --- a/drivers/usb/musb/Kconfig
> +++ b/drivers/usb/musb/Kconfig
> @@ -6,10 +6,14 @@
>  comment "Enable Host or Gadget support to see Inventra options"
>         depends on !USB && USB_GADGET=n
>  
> +config USB_MUSB
> +       bool
> +
>  # (M)HDRC = (Multipoint) Highspeed Dual-Role Controller
>  config USB_MUSB_HDRC
>         depends on (USB || USB_GADGET)
>         depends on (ARM || (BF54x && !BF544) || (BF52x && !BF522 && !BF523))
> +       select USB_MUSB
>         select NOP_USB_XCEIV if (ARCH_DAVINCI || MACH_OMAP3EVM || BLACKFIN)
>         select TWL4030_USB if MACH_OMAP_3430SDP
>         select TWL6030_USB if MACH_OMAP_4430SDP || MACH_OMAP4_PANDA
> 
> compiling and testing a jiffy.

aaaa, had forgotten. The debug part of musb needs rework too. I guess
for now it's better to push a patch making musb bool and fix that for
2.6.40. A bigger re-work would be needed, so it's better to keep it
working for now.

-- 
balbi

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-03-16 12:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-13 20:06 [PATCH] DM644x EVM: register MUSB device earlier Sergei Shtylyov
2011-03-14  8:52 ` Felipe Balbi
2011-03-14 16:42   ` Kevin Hilman
2011-03-14 17:44     ` Nori, Sekhar
2011-03-15 10:08       ` Russell King - ARM Linux
2011-03-15 10:47         ` Nori, Sekhar
2011-03-15 15:54           ` Sergei Shtylyov
2011-03-14 18:52   ` Sergei Shtylyov
2011-03-15  9:33     ` Felipe Balbi
2011-03-16 11:42       ` Sergei Shtylyov
2011-03-16 12:47         ` Felipe Balbi
2011-03-16 12:54           ` Felipe Balbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).