* [PATCH] ARM: shmobile: mackerel: fixup usb module order
@ 2012-08-06 5:47 Kuninori Morimoto
2012-08-06 8:19 ` Simon Horman
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Kuninori Morimoto @ 2012-08-06 5:47 UTC (permalink / raw)
To: linux-sh
renesas_usbhs driver can play role as both Host and Gadget.
In case of Gadget, it requires not only renesas_usbhs
but also usb gadget module (like g_ether).
So, renesas_usbhs driver calls usb_add_gadget_udc() on probe time.
Because of this behavior,
Host port plays also Gadget role if kernel has both Host/Gadget support.
In mackerel case, from 0ada2da51800a4914887a9bcf22d563be80e50be
(ARM: mach-shmobile: mackerel: use renesas_usbhs instead of r8a66597_hcd)
usb0 plays Gadget role, and usb1 plays Host role,
and current mackerel board probes as usb1 -> usb0.
Thus, 1st installed usb gadget module (like g_ether) will be
assigned to usb1 (= usb Host port), and 2nd module to usb0 (= usb Gadget port).
It is very confusable for user.
This patch fixup usb modes probing order as usb0 -> usb1.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
arch/arm/mach-shmobile/board-mackerel.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index 7b53cda..725bff5 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -679,6 +679,7 @@ static struct platform_device usbhs0_device = {
* - J30 "open"
* - modify usbhs1_get_id() USBHS_HOST -> USBHS_GADGET
* - add .get_vbus = usbhs_get_vbus in usbhs1_private
+ * - check usbhs0_device(pio)/usbhs1_device(irq) order in mackerel_devices.
*/
#define IRQ8 evt2irq(0x0300)
#define USB_PHY_MODE (1 << 4)
@@ -1262,8 +1263,8 @@ static struct platform_device *mackerel_devices[] __initdata = {
&nor_flash_device,
&smc911x_device,
&lcdc_device,
- &usbhs1_device,
&usbhs0_device,
+ &usbhs1_device,
&leds_device,
&fsi_device,
&fsi_ak4643_device,
--
1.7.5.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: shmobile: mackerel: fixup usb module order
2012-08-06 5:47 [PATCH] ARM: shmobile: mackerel: fixup usb module order Kuninori Morimoto
@ 2012-08-06 8:19 ` Simon Horman
2012-08-27 8:41 ` Simon Horman
2012-08-31 6:33 ` Simon Horman
2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2012-08-06 8:19 UTC (permalink / raw)
To: linux-sh
On Sun, Aug 05, 2012 at 10:47:00PM -0700, Kuninori Morimoto wrote:
> renesas_usbhs driver can play role as both Host and Gadget.
> In case of Gadget, it requires not only renesas_usbhs
> but also usb gadget module (like g_ether).
> So, renesas_usbhs driver calls usb_add_gadget_udc() on probe time.
>
> Because of this behavior,
> Host port plays also Gadget role if kernel has both Host/Gadget support.
>
> In mackerel case, from 0ada2da51800a4914887a9bcf22d563be80e50be
> (ARM: mach-shmobile: mackerel: use renesas_usbhs instead of r8a66597_hcd)
> usb0 plays Gadget role, and usb1 plays Host role,
> and current mackerel board probes as usb1 -> usb0.
> Thus, 1st installed usb gadget module (like g_ether) will be
> assigned to usb1 (= usb Host port), and 2nd module to usb0 (= usb Gadget port).
> It is very confusable for user.
> This patch fixup usb modes probing order as usb0 -> usb1.
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Simon Horman <horms@verge.net.au>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: shmobile: mackerel: fixup usb module order
2012-08-06 5:47 [PATCH] ARM: shmobile: mackerel: fixup usb module order Kuninori Morimoto
2012-08-06 8:19 ` Simon Horman
@ 2012-08-27 8:41 ` Simon Horman
2012-08-31 6:33 ` Simon Horman
2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2012-08-27 8:41 UTC (permalink / raw)
To: linux-sh
On Mon, Aug 06, 2012 at 05:19:12PM +0900, Simon Horman wrote:
> On Sun, Aug 05, 2012 at 10:47:00PM -0700, Kuninori Morimoto wrote:
> > renesas_usbhs driver can play role as both Host and Gadget.
> > In case of Gadget, it requires not only renesas_usbhs
> > but also usb gadget module (like g_ether).
> > So, renesas_usbhs driver calls usb_add_gadget_udc() on probe time.
> >
> > Because of this behavior,
> > Host port plays also Gadget role if kernel has both Host/Gadget support.
> >
> > In mackerel case, from 0ada2da51800a4914887a9bcf22d563be80e50be
> > (ARM: mach-shmobile: mackerel: use renesas_usbhs instead of r8a66597_hcd)
> > usb0 plays Gadget role, and usb1 plays Host role,
> > and current mackerel board probes as usb1 -> usb0.
> > Thus, 1st installed usb gadget module (like g_ether) will be
> > assigned to usb1 (= usb Host port), and 2nd module to usb0 (= usb Gadget port).
> > It is very confusable for user.
> > This patch fixup usb modes probing order as usb0 -> usb1.
> >
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> Reviewed-by: Simon Horman <horms@verge.net.au>
I have pushed this to the mackerel branch of my renesas tree,
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git
I will endeavour to get it included in 3.7.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: shmobile: mackerel: fixup usb module order
2012-08-06 5:47 [PATCH] ARM: shmobile: mackerel: fixup usb module order Kuninori Morimoto
2012-08-06 8:19 ` Simon Horman
2012-08-27 8:41 ` Simon Horman
@ 2012-08-31 6:33 ` Simon Horman
2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2012-08-31 6:33 UTC (permalink / raw)
To: linux-sh
On Mon, Aug 27, 2012 at 05:41:13PM +0900, Simon Horman wrote:
> On Mon, Aug 06, 2012 at 05:19:12PM +0900, Simon Horman wrote:
> > On Sun, Aug 05, 2012 at 10:47:00PM -0700, Kuninori Morimoto wrote:
> > > renesas_usbhs driver can play role as both Host and Gadget.
> > > In case of Gadget, it requires not only renesas_usbhs
> > > but also usb gadget module (like g_ether).
> > > So, renesas_usbhs driver calls usb_add_gadget_udc() on probe time.
> > >
> > > Because of this behavior,
> > > Host port plays also Gadget role if kernel has both Host/Gadget support.
> > >
> > > In mackerel case, from 0ada2da51800a4914887a9bcf22d563be80e50be
> > > (ARM: mach-shmobile: mackerel: use renesas_usbhs instead of r8a66597_hcd)
> > > usb0 plays Gadget role, and usb1 plays Host role,
> > > and current mackerel board probes as usb1 -> usb0.
> > > Thus, 1st installed usb gadget module (like g_ether) will be
> > > assigned to usb1 (= usb Host port), and 2nd module to usb0 (= usb Gadget port).
> > > It is very confusable for user.
> > > This patch fixup usb modes probing order as usb0 -> usb1.
> > >
> > > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> >
> > Reviewed-by: Simon Horman <horms@verge.net.au>
>
> I have pushed this to the mackerel branch of my renesas tree,
> git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git
>
> I will endeavour to get it included in 3.7.
On further consideration I have moved this patch to the
fixes branch (and removed the now empty mackerel branch).
I will endeavour to get it included in 3.6.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-08-31 6:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-06 5:47 [PATCH] ARM: shmobile: mackerel: fixup usb module order Kuninori Morimoto
2012-08-06 8:19 ` Simon Horman
2012-08-27 8:41 ` Simon Horman
2012-08-31 6:33 ` Simon Horman
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).