From: Ian Campbell <ijc+uboot@hellion.org.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] sunxi: musb: Improve output during probing
Date: Sun, 21 Jun 2015 09:00:06 +0100 [thread overview]
Message-ID: <1434873606.17598.2.camel@hellion.org.uk> (raw)
In-Reply-To: <1434814509-21484-2-git-send-email-hdegoede@redhat.com>
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)
next prev parent reply other threads:[~2015-06-21 8:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
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=1434873606.17598.2.camel@hellion.org.uk \
--to=ijc+uboot@hellion.org.uk \
--cc=u-boot@lists.denx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox