All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] ARM: shmobile: mackerel: fixup usb module order
Date: Wed, 05 Sep 2012 01:34:52 +0000	[thread overview]
Message-ID: <1346808893-14124-3-git-send-email-horms@verge.net.au> (raw)
In-Reply-To: <1346808893-14124-1-git-send-email-horms@verge.net.au>

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

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>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
 arch/arm/mach-shmobile/board-mackerel.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index 7ea2b31..c129542 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -695,6 +695,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)
@@ -1325,8 +1326,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.10.4


WARNING: multiple messages have this Message-ID (diff)
From: horms@verge.net.au (Simon Horman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] ARM: shmobile: mackerel: fixup usb module order
Date: Wed,  5 Sep 2012 10:34:52 +0900	[thread overview]
Message-ID: <1346808893-14124-3-git-send-email-horms@verge.net.au> (raw)
In-Reply-To: <1346808893-14124-1-git-send-email-horms@verge.net.au>

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

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>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
 arch/arm/mach-shmobile/board-mackerel.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index 7ea2b31..c129542 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -695,6 +695,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)
@@ -1325,8 +1326,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.10.4

  parent reply	other threads:[~2012-09-05  1:34 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-23 23:18 [GIT PULL] Renesas ARM-based SoC fix for v3.6 Rafael J. Wysocki
2012-08-23 23:18 ` Rafael J. Wysocki
2012-08-27 23:33 ` Olof Johansson
2012-08-27 23:33   ` Olof Johansson
2012-08-30  5:38 ` Simon Horman
2012-08-30  5:38   ` Simon Horman
2012-08-30  5:38   ` [PATCH] ARM: shmobile: marzen: fixup smsc911x id for regulator Simon Horman
2012-08-30  5:38     ` Simon Horman
2012-09-02 15:23   ` [GIT PULL] Renesas ARM-based SoC fix for v3.6 Olof Johansson
2012-09-02 15:23     ` Olof Johansson
2012-09-05  1:34 ` [GIT PULL] Renesas ARM-based SoC fix for v3.6 #2 Simon Horman
2012-09-05  1:34   ` Simon Horman
2012-09-05  1:34   ` [PATCH 1/3] ARM: shmobile: armadillo800eva: fixup: sound card detection order Simon Horman
2012-09-05  1:34     ` Simon Horman
2013-02-22  4:45     ` [PATCH 1/3] ARM: shmobile: armadillo800eva: enable all errata for cache on defconfig Kuninori Morimoto
2013-02-22 22:58     ` Simon Horman
2013-03-01  6:53     ` Simon Horman
2013-03-01 10:01     ` Kuninori Morimoto
2013-03-01 13:02     ` Simon Horman
2013-03-04  0:42     ` Kuninori Morimoto
2013-03-05  5:57     ` Simon Horman
2013-03-06  4:46     ` Simon Horman
2015-01-19  9:54     ` [PATCH 1/3] ARM: shmobile: armadillo800eva: Properly specify HDMI audio link format Lars-Peter Clausen
2015-01-19  9:54       ` Lars-Peter Clausen
2015-01-19  9:54       ` Lars-Peter Clausen
2015-01-19  9:54       ` [PATCH 2/3] ASoC: sh: fsi: Fix clock inversion Lars-Peter Clausen
2015-01-19  9:54         ` Lars-Peter Clausen
2015-01-19  9:54         ` Lars-Peter Clausen
2015-01-19 12:23         ` Sergei Shtylyov
2015-01-19 12:23           ` Sergei Shtylyov
2015-01-19 12:23           ` Sergei Shtylyov
2015-01-19  9:54       ` [PATCH 3/3] ASoC: simple-card: Remove support for setting differing DAI formats Lars-Peter Clausen
2015-01-19  9:54         ` Lars-Peter Clausen
2015-01-19  9:54         ` Lars-Peter Clausen
2015-01-20  0:11         ` Kuninori Morimoto
2015-01-20  0:11           ` Kuninori Morimoto
2012-09-05  1:34   ` Simon Horman [this message]
2012-09-05  1:34     ` [PATCH 2/3] ARM: shmobile: mackerel: fixup usb module order Simon Horman
2012-09-05  1:34   ` [PATCH 3/3] ARM: shmobile: armadillo800eva: enable rw rootfs mount Simon Horman
2012-09-05  1:34     ` Simon Horman
2013-02-22  4:46     ` [PATCH 3/3] ARM: shmobile: armadillo800eva: enable NEON on defconfig Kuninori Morimoto
2013-02-22 23:09     ` Simon Horman
2013-02-25  0:17     ` Kuninori Morimoto
2013-02-25  0:21     ` Kiyoshi Ishiyama
2013-03-01  9:41     ` Simon Horman
2012-09-05  4:44   ` [GIT PULL] Renesas ARM-based SoC fix for v3.6 #2 Olof Johansson
2012-09-05  4:44     ` Olof Johansson
2012-09-05  4:53     ` Simon Horman
2012-09-05  4:53       ` Simon Horman
2012-09-18  4:46 ` [GIT PULL] Renesas ARM-based SoC fix for v3.6 #3 Simon Horman
2012-09-18  4:46   ` Simon Horman
2012-09-18  4:46   ` [PATCH] ARM: shmobile: kzm9g: bugfix: correct mmcif interrupt settings Simon Horman
2012-09-18  4:46     ` Simon Horman
2012-09-18 14:41   ` [GIT PULL] Renesas ARM-based SoC fix for v3.6 #3 Olof Johansson
2012-09-18 14:41     ` Olof Johansson

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=1346808893-14124-3-git-send-email-horms@verge.net.au \
    --to=horms@verge.net.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.