All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/3] sunxi: Enable both ehci and otg in host mode on various boards
@ 2015-06-20 15:35 Hans de Goede
  2015-06-20 15:35 ` [U-Boot] [PATCH 1/3] sunxi: musb: Improve output during probing Hans de Goede
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Hans de Goede @ 2015-06-20 15:35 UTC (permalink / raw)
  To: u-boot

Hi All,

Here is a small series enabling the combined use of ehci + musb-otg on more
sunxi boards. This applies on top of my large series for making this possible
posted earlier.

As said before I believe it is best if all the sunxi bits of that series
go upstream through u-boot-sunxi/master, the same applies for these 3.

Regards,

Hans

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

* [U-Boot] [PATCH 1/3] sunxi: musb: Improve output during probing
  2015-06-20 15:35 [U-Boot] [PATCH 0/3] sunxi: Enable both ehci and otg in host mode on various boards Hans de Goede
@ 2015-06-20 15:35 ` Hans de Goede
  2015-06-21  8:00   ` Ian Campbell
  2015-06-20 15:35 ` [U-Boot] [PATCH 2/3] sunxi: musb: Stop treating not having a vbus-det gpio as an error Hans de Goede
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 14+ messages in thread
From: Hans de Goede @ 2015-06-20 15:35 UTC (permalink / raw)
  To: u-boot

When we return an error the usb core will log a message, so in this case
do not print a newline, instead print ": " after our identifier as a
seperator between our identifier and the error message logged by the core.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/usb/musb-new/sunxi.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c
index d1cb8e0..bb88687 100644
--- a/drivers/usb/musb-new/sunxi.c
+++ b/drivers/usb/musb-new/sunxi.c
@@ -301,21 +301,26 @@ int musb_usb_probe(struct udevice *dev)
 {
 	struct musb_host_data *host = dev_get_priv(dev);
 	struct usb_bus_priv *priv = dev_get_uclass_priv(dev);
+	int ret;
 
 	priv->desc_before_addr = true;
 
+	printf("MUSB OTG");
+
 	if (!host->host) {
 		host->host = musb_init_controller(&musb_plat, NULL,
 						  (void *)SUNXI_USB0_BASE);
 		if (!host->host) {
-			printf("Failed to init the controller\n");
+			printf(": ");
 			return -EIO;
 		}
 	}
 
-	printf("MUSB OTG in host-mode\n");
+	ret = musb_lowlevel_init(host);
+
+	printf((ret == 0) ? "\n" : ": ");
 
-	return musb_lowlevel_init(host);
+	return ret;
 }
 
 int musb_usb_remove(struct udevice *dev)
-- 
2.4.3

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

* [U-Boot] [PATCH 2/3] sunxi: musb: Stop treating not having a vbus-det gpio as an error
  2015-06-20 15:35 [U-Boot] [PATCH 0/3] sunxi: Enable both ehci and otg in host mode on various boards Hans de Goede
  2015-06-20 15:35 ` [U-Boot] [PATCH 1/3] sunxi: musb: Improve output during probing Hans de Goede
@ 2015-06-20 15:35 ` Hans de Goede
  2015-06-21  8:00   ` Ian Campbell
  2015-06-20 15:35 ` [U-Boot] [PATCH 3/3] sunxi: Enable both ehci and otg in host mode on various boards Hans de Goede
  2015-06-20 16:08 ` [U-Boot] [PATCH 0/3] " Marek Vasut
  3 siblings, 1 reply; 14+ messages in thread
From: Hans de Goede @ 2015-06-20 15:35 UTC (permalink / raw)
  To: u-boot

On some boards the otg is wired up in host-only mode in this case we
have no vbus-det gpio.

Stop logging an error from sunxi_usb_phy_vbus_detect() in this case, and
stop treating sunxi_usb_phy_vbus_detect() returning a negative errno, as
if a charger is plugged into the otg port.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/cpu/armv7/sunxi/usb_phy.c | 4 +---
 drivers/usb/musb-new/sunxi.c       | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/cpu/armv7/sunxi/usb_phy.c b/arch/arm/cpu/armv7/sunxi/usb_phy.c
index 5e82ddc..4d63a74 100644
--- a/arch/arm/cpu/armv7/sunxi/usb_phy.c
+++ b/arch/arm/cpu/armv7/sunxi/usb_phy.c
@@ -237,10 +237,8 @@ int sunxi_usb_phy_vbus_detect(int index)
 	struct sunxi_usb_phy *phy = &sunxi_usb_phy[index];
 	int err, retries = 3;
 
-	if (phy->gpio_vbus_det < 0) {
-		eprintf("Error: invalid vbus detection pin\n");
+	if (phy->gpio_vbus_det < 0)
 		return phy->gpio_vbus_det;
-	}
 
 	err = gpio_get_value(phy->gpio_vbus_det);
 	/*
diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c
index bb88687..f091a2d 100644
--- a/drivers/usb/musb-new/sunxi.c
+++ b/drivers/usb/musb-new/sunxi.c
@@ -208,7 +208,7 @@ static int sunxi_musb_enable(struct musb *musb)
 
 	if (is_host_enabled(musb)) {
 		ret = sunxi_usb_phy_vbus_detect(0);
-		if (ret) {
+		if (ret == 1) {
 			printf("A charger is plugged into the OTG: ");
 			return -ENODEV;
 		}
-- 
2.4.3

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

* [U-Boot] [PATCH 3/3] sunxi: Enable both ehci and otg in host mode on various boards
  2015-06-20 15:35 [U-Boot] [PATCH 0/3] sunxi: Enable both ehci and otg in host mode on various boards Hans de Goede
  2015-06-20 15:35 ` [U-Boot] [PATCH 1/3] sunxi: musb: Improve output during probing Hans de Goede
  2015-06-20 15:35 ` [U-Boot] [PATCH 2/3] sunxi: musb: Stop treating not having a vbus-det gpio as an error Hans de Goede
@ 2015-06-20 15:35 ` Hans de Goede
  2015-06-21  8:01   ` Ian Campbell
  2015-06-20 16:08 ` [U-Boot] [PATCH 0/3] " Marek Vasut
  3 siblings, 1 reply; 14+ messages in thread
From: Hans de Goede @ 2015-06-20 15:35 UTC (permalink / raw)
  To: u-boot

Now that the device-model port of the musb mode makes it possible, enable
both the ehci and oth in host mode on boards where the otg is wired up in
host only mode, either via an usb-a receptacle or via an usb <-> sata
converter.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 configs/CSQ_CS908_defconfig        | 4 +++-
 configs/Mele_A1000G_quad_defconfig | 4 +++-
 configs/Mini-X_defconfig           | 5 ++++-
 configs/ba10_tv_box_defconfig      | 5 ++++-
 4 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/configs/CSQ_CS908_defconfig b/configs/CSQ_CS908_defconfig
index 850d70d..f89e67c 100644
--- a/configs/CSQ_CS908_defconfig
+++ b/configs/CSQ_CS908_defconfig
@@ -6,7 +6,9 @@ CONFIG_USB1_VBUS_PIN=""
 CONFIG_USB2_VBUS_PIN=""
 CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31s-cs908"
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="USB_EHCI,SUNXI_GMAC"
+CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC"
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_AXP221_DLDO1_VOLT=3300
 CONFIG_AXP221_ALDO1_VOLT=3300
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_MUSB_SUNXI=y
diff --git a/configs/Mele_A1000G_quad_defconfig b/configs/Mele_A1000G_quad_defconfig
index 3a746c8..3a2c155 100644
--- a/configs/Mele_A1000G_quad_defconfig
+++ b/configs/Mele_A1000G_quad_defconfig
@@ -16,9 +16,11 @@ CONFIG_USB1_VBUS_PIN="PC27"
 CONFIG_USB2_VBUS_PIN=""
 CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31-mele-a1000g-quad"
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="USB_EHCI,SUNXI_GMAC"
+CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC"
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_AXP221_DCDC1_VOLT=3300
 CONFIG_AXP221_DLDO1_VOLT=3300
 CONFIG_AXP221_DLDO4_VOLT=3300
 CONFIG_AXP221_ALDO1_VOLT=3300
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_MUSB_SUNXI=y
diff --git a/configs/Mini-X_defconfig b/configs/Mini-X_defconfig
index 918b639..3ce3272 100644
--- a/configs/Mini-X_defconfig
+++ b/configs/Mini-X_defconfig
@@ -3,4 +3,7 @@ CONFIG_ARCH_SUNXI=y
 CONFIG_MACH_SUN4I=y
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-mini-xplus"
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,USB_EHCI"
+CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER"
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB0_VBUS_PIN="PB9"
diff --git a/configs/ba10_tv_box_defconfig b/configs/ba10_tv_box_defconfig
index f2ab415..111792f 100644
--- a/configs/ba10_tv_box_defconfig
+++ b/configs/ba10_tv_box_defconfig
@@ -6,4 +6,7 @@ CONFIG_DRAM_EMR1=4
 CONFIG_USB2_VBUS_PIN="PH12"
 CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-ba10-tvbox"
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_EMAC,USB_EHCI"
+CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_EMAC"
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB0_VBUS_PIN="PB9"
-- 
2.4.3

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

* [U-Boot] [PATCH 0/3] sunxi: Enable both ehci and otg in host mode on various boards
  2015-06-20 15:35 [U-Boot] [PATCH 0/3] sunxi: Enable both ehci and otg in host mode on various boards Hans de Goede
                   ` (2 preceding siblings ...)
  2015-06-20 15:35 ` [U-Boot] [PATCH 3/3] sunxi: Enable both ehci and otg in host mode on various boards Hans de Goede
@ 2015-06-20 16:08 ` Marek Vasut
  2015-06-20 18:12   ` Hans de Goede
  3 siblings, 1 reply; 14+ messages in thread
From: Marek Vasut @ 2015-06-20 16:08 UTC (permalink / raw)
  To: u-boot

On Saturday, June 20, 2015 at 05:35:06 PM, Hans de Goede wrote:
> Hi All,
> 
> Here is a small series enabling the combined use of ehci + musb-otg on more
> sunxi boards. This applies on top of my large series for making this
> possible posted earlier.
> 
> As said before I believe it is best if all the sunxi bits of that series
> go upstream through u-boot-sunxi/master, the same applies for these 3.
> 
> Regards,

Series is

Reviewed-by: Marek Vasut <marex@denx.de>

Thanks!

Best regards,
Marek Vasut

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

* [U-Boot] [PATCH 0/3] sunxi: Enable both ehci and otg in host mode on various boards
  2015-06-20 16:08 ` [U-Boot] [PATCH 0/3] " Marek Vasut
@ 2015-06-20 18:12   ` Hans de Goede
  2015-06-20 18:26     ` Marek Vasut
  0 siblings, 1 reply; 14+ messages in thread
From: Hans de Goede @ 2015-06-20 18:12 UTC (permalink / raw)
  To: u-boot

Hi,

On 20-06-15 18:08, Marek Vasut wrote:
> On Saturday, June 20, 2015 at 05:35:06 PM, Hans de Goede wrote:
>> Hi All,
>>
>> Here is a small series enabling the combined use of ehci + musb-otg on more
>> sunxi boards. This applies on top of my large series for making this
>> possible posted earlier.
>>
>> As said before I believe it is best if all the sunxi bits of that series
>> go upstream through u-boot-sunxi/master, the same applies for these 3.
>>
>> Regards,
>
> Series is
>
> Reviewed-by: Marek Vasut <marex@denx.de>

I assume this only applies to these 3, or do you mean both the original
series adding musb device-model support as well as these 3?

Regards,

Hans

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

* [U-Boot] [PATCH 0/3] sunxi: Enable both ehci and otg in host mode on various boards
  2015-06-20 18:12   ` Hans de Goede
@ 2015-06-20 18:26     ` Marek Vasut
  0 siblings, 0 replies; 14+ messages in thread
From: Marek Vasut @ 2015-06-20 18:26 UTC (permalink / raw)
  To: u-boot

On Saturday, June 20, 2015 at 08:12:32 PM, Hans de Goede wrote:
> Hi,

Hi!

> On 20-06-15 18:08, Marek Vasut wrote:
> > On Saturday, June 20, 2015 at 05:35:06 PM, Hans de Goede wrote:
> >> Hi All,
> >> 
> >> Here is a small series enabling the combined use of ehci + musb-otg on
> >> more sunxi boards. This applies on top of my large series for making
> >> this possible posted earlier.
> >> 
> >> As said before I believe it is best if all the sunxi bits of that series
> >> go upstream through u-boot-sunxi/master, the same applies for these 3.
> >> 
> >> Regards,
> > 
> > Series is
> > 
> > Reviewed-by: Marek Vasut <marex@denx.de>
> 
> I assume this only applies to these 3, or do you mean both the original
> series adding musb device-model support as well as these 3?

I mean these three ;-)

Best regards,
Marek Vasut

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

* [U-Boot] [PATCH 1/3] sunxi: musb: Improve output during probing
  2015-06-20 15:35 ` [U-Boot] [PATCH 1/3] sunxi: musb: Improve output during probing Hans de Goede
@ 2015-06-21  8:00   ` Ian Campbell
  2015-06-22 15:39     ` Hans de Goede
  0 siblings, 1 reply; 14+ messages in thread
From: Ian Campbell @ 2015-06-21  8:00 UTC (permalink / raw)
  To: u-boot

On Sat, 2015-06-20 at 17:35 +0200, Hans de Goede wrote:
> When we return an error the usb core will log a message, so in this case
> do not print a newline, instead print ": " after our identifier as a
> seperator between our identifier and the error message logged by the core.

"separator".

This seems like a lot of fragile faff second guessing what some other
component does (and is going to do in the future). Can we not have musb
take over init time logging completely or just live with:
        MUSB OTG: Failed host init
        Flux capacitor has reversed polarity
which I suppose is roughly how it appears today?

> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/usb/musb-new/sunxi.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c
> index d1cb8e0..bb88687 100644
> --- a/drivers/usb/musb-new/sunxi.c
> +++ b/drivers/usb/musb-new/sunxi.c
> @@ -301,21 +301,26 @@ int musb_usb_probe(struct udevice *dev)
>  {
>  	struct musb_host_data *host = dev_get_priv(dev);
>  	struct usb_bus_priv *priv = dev_get_uclass_priv(dev);
> +	int ret;
>  
>  	priv->desc_before_addr = true;
>  
> +	printf("MUSB OTG");
> +
>  	if (!host->host) {
>  		host->host = musb_init_controller(&musb_plat, NULL,
>  						  (void *)SUNXI_USB0_BASE);
>  		if (!host->host) {
> -			printf("Failed to init the controller\n");
> +			printf(": ");
>  			return -EIO;
>  		}
>  	}
>  
> -	printf("MUSB OTG in host-mode\n");
> +	ret = musb_lowlevel_init(host);
> +
> +	printf((ret == 0) ? "\n" : ": ");
>  
> -	return musb_lowlevel_init(host);
> +	return ret;
>  }
>  
>  int musb_usb_remove(struct udevice *dev)

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

* [U-Boot] [PATCH 2/3] sunxi: musb: Stop treating not having a vbus-det gpio as an error
  2015-06-20 15:35 ` [U-Boot] [PATCH 2/3] sunxi: musb: Stop treating not having a vbus-det gpio as an error Hans de Goede
@ 2015-06-21  8:00   ` Ian Campbell
  0 siblings, 0 replies; 14+ messages in thread
From: Ian Campbell @ 2015-06-21  8:00 UTC (permalink / raw)
  To: u-boot

On Sat, 2015-06-20 at 17:35 +0200, Hans de Goede wrote:
> On some boards the otg is wired up in host-only mode in this case we
> have no vbus-det gpio.
> 
> Stop logging an error from sunxi_usb_phy_vbus_detect() in this case, and
> stop treating sunxi_usb_phy_vbus_detect() returning a negative errno, as
> if a charger is plugged into the otg port.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Acked-by: Ian Campbell <ijc@hellion.org.uk>

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

* [U-Boot] [PATCH 3/3] sunxi: Enable both ehci and otg in host mode on various boards
  2015-06-20 15:35 ` [U-Boot] [PATCH 3/3] sunxi: Enable both ehci and otg in host mode on various boards Hans de Goede
@ 2015-06-21  8:01   ` Ian Campbell
  2015-06-22 15:40     ` Hans de Goede
  0 siblings, 1 reply; 14+ messages in thread
From: Ian Campbell @ 2015-06-21  8:01 UTC (permalink / raw)
  To: u-boot

On Sat, 2015-06-20 at 17:35 +0200, Hans de Goede wrote:
> Now that the device-model port of the musb mode makes it possible, enable
> both the ehci and oth in host mode on boards where the otg is wired up in

"otg"?

> host only mode, either via an usb-a receptacle or via an usb <-> sata
> converter.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Acked-by: Ian Campbell <ijc@hellion.org.uk>

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

* [U-Boot] [PATCH 1/3] sunxi: musb: Improve output during probing
  2015-06-21  8:00   ` Ian Campbell
@ 2015-06-22 15:39     ` Hans de Goede
  2015-06-22 16:11       ` Ian Campbell
  0 siblings, 1 reply; 14+ messages in thread
From: Hans de Goede @ 2015-06-22 15:39 UTC (permalink / raw)
  To: u-boot

Hi,

On 21-06-15 10:00, Ian Campbell wrote:
> On Sat, 2015-06-20 at 17:35 +0200, Hans de Goede wrote:
>> When we return an error the usb core will log a message, so in this case
>> do not print a newline, instead print ": " after our identifier as a
>> seperator between our identifier and the error message logged by the core.
>
> "separator".

Fixed in my personal tree.

> This seems like a lot of fragile faff second guessing what some other
> component does (and is going to do in the future).

Right, but if that other component changes all we end up with is less
then optimal console output it will not really break anything.

  Can we not have musb
> take over init time logging completely

The problem is that all the other usb host drivers also depend on this
behavior of the usb core.

> or just live with:
>          MUSB OTG: Failed host init
>          Flux capacitor has reversed polarity
> which I suppose is roughly how it appears today?

I do not like just living with it, I believe a certain amount of spit
and polish is important, even for text messages like these.

I would not have written this if I did not consider the current situation
ugly :)

How about the following:


Subject: [PATCH 1/3] sunxi: musb: Improve output during probing

When we return an error the usb core will log a message, so in this case
do not print anything.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>

--- a/drivers/usb/musb-new/sunxi.c
+++ b/drivers/usb/musb-new/sunxi.c
@@ -301,21 +301,22 @@ int musb_usb_probe(struct udevice *dev)
  {
         struct musb_host_data *host = dev_get_priv(dev);
         struct usb_bus_priv *priv = dev_get_uclass_priv(dev);
+       int ret;

         priv->desc_before_addr = true;

         if (!host->host) {
                 host->host = musb_init_controller(&musb_plat, NULL,
                                                   (void *)SUNXI_USB0_BASE);
-               if (!host->host) {
-                       printf("Failed to init the controller\n");
+               if (!host->host)
                         return -EIO;
-               }
         }

-       printf("MUSB OTG in host-mode\n");
+       ret = musb_lowlevel_init(host);
+       if (ret == 0)
+               printf("MUSB OTG\n");

-       return musb_lowlevel_init(host);
+       return ret;
  }

  int musb_usb_remove(struct udevice *dev)


This is exactly what the other host drivers do, only print
something on success, and leave printing errors up to the
caller.


Regards,

Hans

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

* [U-Boot] [PATCH 3/3] sunxi: Enable both ehci and otg in host mode on various boards
  2015-06-21  8:01   ` Ian Campbell
@ 2015-06-22 15:40     ` Hans de Goede
  0 siblings, 0 replies; 14+ messages in thread
From: Hans de Goede @ 2015-06-22 15:40 UTC (permalink / raw)
  To: u-boot

Hi,

On 21-06-15 10:01, Ian Campbell wrote:
> On Sat, 2015-06-20 at 17:35 +0200, Hans de Goede wrote:
>> Now that the device-model port of the musb mode makes it possible, enable
>> both the ehci and oth in host mode on boards where the otg is wired up in
>
> "otg"?

Replaced with "musb" in my personal tree.

Regards,

Hans

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

* [U-Boot] [PATCH 1/3] sunxi: musb: Improve output during probing
  2015-06-22 15:39     ` Hans de Goede
@ 2015-06-22 16:11       ` Ian Campbell
  2015-06-23 10:02         ` Hans de Goede
  0 siblings, 1 reply; 14+ messages in thread
From: Ian Campbell @ 2015-06-22 16:11 UTC (permalink / raw)
  To: u-boot

On Mon, 2015-06-22 at 17:39 +0200, Hans de Goede wrote:
> How about the following:
> 
> 
> Subject: [PATCH 1/3] sunxi: musb: Improve output during probing
> 
> When we return an error the usb core will log a message, so in this case
> do not print anything.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Much better, especially given the below.

Acked-by: Ian Campbell <ian.campbell@citrix.com>

> 
> --- a/drivers/usb/musb-new/sunxi.c
> +++ b/drivers/usb/musb-new/sunxi.c
> @@ -301,21 +301,22 @@ int musb_usb_probe(struct udevice *dev)
>   {
>          struct musb_host_data *host = dev_get_priv(dev);
>          struct usb_bus_priv *priv = dev_get_uclass_priv(dev);
> +       int ret;

Wrong sort of w/space I suspect.

[...]
> This is exactly what the other host drivers do, only print
> something on success, and leave printing errors up to the
> caller.

If all others do this I think doing this is the best compromise too.

Ian.

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

* [U-Boot] [PATCH 1/3] sunxi: musb: Improve output during probing
  2015-06-22 16:11       ` Ian Campbell
@ 2015-06-23 10:02         ` Hans de Goede
  0 siblings, 0 replies; 14+ messages in thread
From: Hans de Goede @ 2015-06-23 10:02 UTC (permalink / raw)
  To: u-boot

Hi,

On 22-06-15 18:11, Ian Campbell wrote:
> On Mon, 2015-06-22 at 17:39 +0200, Hans de Goede wrote:
>> How about the following:
>>
>>
>> Subject: [PATCH 1/3] sunxi: musb: Improve output during probing
>>
>> When we return an error the usb core will log a message, so in this case
>> do not print anything.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>
> Much better, especially given the below.
>
> Acked-by: Ian Campbell <ian.campbell@citrix.com>

Thanks.

>
>>
>> --- a/drivers/usb/musb-new/sunxi.c
>> +++ b/drivers/usb/musb-new/sunxi.c
>> @@ -301,21 +301,22 @@ int musb_usb_probe(struct udevice *dev)
>>    {
>>           struct musb_host_data *host = dev_get_priv(dev);
>>           struct usb_bus_priv *priv = dev_get_uclass_priv(dev);
>> +       int ret;
>
> Wrong sort of w/space I suspect.

Nope, this comes from me copy and pasting the diff output
from a xterm, I just double checked and the whitespace is as
it should be in my tree :)

Regards,

Hans

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

end of thread, other threads:[~2015-06-23 10:02 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-20 15:35 [U-Boot] [PATCH 0/3] sunxi: Enable both ehci and otg in host mode on various boards Hans de Goede
2015-06-20 15:35 ` [U-Boot] [PATCH 1/3] sunxi: musb: Improve output during probing Hans de Goede
2015-06-21  8:00   ` Ian Campbell
2015-06-22 15:39     ` Hans de Goede
2015-06-22 16:11       ` Ian Campbell
2015-06-23 10:02         ` Hans de Goede
2015-06-20 15:35 ` [U-Boot] [PATCH 2/3] sunxi: musb: Stop treating not having a vbus-det gpio as an error Hans de Goede
2015-06-21  8:00   ` Ian Campbell
2015-06-20 15:35 ` [U-Boot] [PATCH 3/3] sunxi: Enable both ehci and otg in host mode on various boards Hans de Goede
2015-06-21  8:01   ` Ian Campbell
2015-06-22 15:40     ` Hans de Goede
2015-06-20 16:08 ` [U-Boot] [PATCH 0/3] " Marek Vasut
2015-06-20 18:12   ` Hans de Goede
2015-06-20 18:26     ` Marek Vasut

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.