From: Yann E. MORIN <yann.morin.1998@free.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] arm: sunxi: do not force USB for arch-sunxi
Date: Thu, 10 Nov 2016 19:00:33 +0100 [thread overview]
Message-ID: <20161110180033.GB3564@free.fr> (raw)
In-Reply-To: <1477949620-31642-1-git-send-email-yann.morin.1998@free.fr>
Ian, Hans, All,
On 2016-10-31 22:33 +0100, Yann E. MORIN spake thusly:
> Currently, USB is forced-enabled for the sunxi familly, and there is no
> way to disable it.
>
> However, USB takes a long time to initiliase, delaying the boot by up to
> 5 seconds (without any USB device attached!). This is a very long delay,
> especially in cases where USB booting is not wanted at all, and where
> the device is expected to boot relatively often (even in production).
>
> Change the way the dependencies are handled, by only forcibly selecting
> USB when CONFIG_DISTRO_DEFAULTS ("defaults suitable for booting general
> purpose Linux distributions") is set. This option defaults to y for the
> sunxi familly, so the current default behaviour is kept unchanged. Users
> interested in boot time and/or size will be able to disable this to
> further disable USB.
>
> With USB disabled, the time spent in U-Boot before handing control to
> the Linux kernel is about 1s now, down from ~5s (Nanopi Neo, sunxi H3).
Just a gentle ping... ;-)
Regards,
Yann E. MORIN.
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Ian Campbell <ijc@hellion.org.uk>
> Cc: Hans De Goede <hdegoede@redhat.com>
>
> ---
> This is a tentative patch, acting as an RFC (unless it is good to go as
> is, of course!).
>
> This has been discussed on IRC with <ssvb> and <apritzel>, and this
> solution is what emerged from the discussions as a first step.
>
> The second step would be to defer intialisation of drivers until they
> are actually needed, i.e. if main boot is not from USB, then don't
> initiliase USB; if main boot fails, then initialise addtional drivers,
> like USB... Or something along those lines... That's a much tougher
> work for me, though...
>
> There are other features that are currently forced like USB, but USB
> is by far the worst "offender" and a low-hanging fruit. Those other
> "offenders" can be handled in follow up changes.
> ---
> arch/arm/Kconfig | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index d7a9b11..c13f60f 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -561,22 +561,22 @@ config ARCH_SUNXI
> bool "Support sunxi (Allwinner) SoCs"
> select CMD_GPIO
> select CMD_MMC if MMC
> - select CMD_USB
> + select CMD_USB if DISTRO_DEFAULTS
> select DM
> select DM_ETH
> select DM_GPIO
> select DM_KEYBOARD
> select DM_SERIAL
> - select DM_USB
> + select DM_USB if DISTRO_DEFAULTS
> select OF_BOARD_SETUP
> select OF_CONTROL
> select OF_SEPARATE
> select SPL_STACK_R if SUPPORT_SPL
> select SPL_SYS_MALLOC_SIMPLE if SUPPORT_SPL
> select SYS_NS16550
> - select USB
> - select USB_STORAGE
> - select USB_KEYBOARD
> + select USB if DISTRO_DEFAULTS
> + select USB_STORAGE if DISTRO_DEFAULTS
> + select USB_KEYBOARD if DISTRO_DEFAULTS
> select USE_TINY_PRINTF
>
> config TARGET_TS4800
> --
> 2.7.4
>
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2016-11-10 18:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-31 21:33 [U-Boot] [PATCH] arm: sunxi: do not force USB for arch-sunxi Yann E. MORIN
2016-11-10 18:00 ` Yann E. MORIN [this message]
2016-11-10 19:10 ` Hans de Goede
2016-11-10 19:36 ` Yann E. MORIN
2016-11-13 18:48 ` Hans de Goede
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=20161110180033.GB3564@free.fr \
--to=yann.morin.1998@free.fr \
--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 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.