summaryrefslogtreecommitdiff
path: root/drivers/usb/musb-new/sunxi.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-06-18 20:45:34 (GMT)
committerHans de Goede <hdegoede@redhat.com>2015-07-25 09:22:55 (GMT)
commit56a2085410d507c00d4bc374f9af10816638df24 (patch)
tree80012d12a4fb0f79822cb07aebba275f3a913dba /drivers/usb/musb-new/sunxi.c
parent91183babea8f36d7bea40ecbc3862913ca0eae65 (diff)
downloadu-boot-56a2085410d507c00d4bc374f9af10816638df24.tar.xz
sunxi: musb: Improve output during probing
When we return an error the usb core will print an error-message, so in this case do not print anything. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Marek Vasut <marex@denx.de> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'drivers/usb/musb-new/sunxi.c')
-rw-r--r--drivers/usb/musb-new/sunxi.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c
index 6109011..3542326 100644
--- 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)