All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Kocialkowski <contact@paulk.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] sunxi: Avoid any assumption between musb gadget and host but fallback to host
Date: Sat, 04 Apr 2015 15:42:51 +0200	[thread overview]
Message-ID: <1428154971.2418.8.camel@collins> (raw)
In-Reply-To: <5517DF87.1060904@redhat.com>

Le dimanche 29 mars 2015 ? 13:18 +0200, Hans de Goede a ?crit :
> Hi,
> 
> On 28-03-15 18:26, Paul Kocialkowski wrote:
> > musb might be used in gadget mode on sunxi, so we don't want to assume anything
> > related to host mode, especially USB keyboard support. Thus, there is no reason
> > to keep USB_KEYBOARD always enabled and in Kconfig: it is much better fit to
> > enable it in the common sunxi config header, when needed (some devices also have
> > no USB support at all).
> >
> > In case gadget mode is not explicitly enabled, this will fallback to host mode.
> >
> > Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
> 
> Nack, I'm not going to take any patch which removes config USB_KEYBOARD,
> having USB_KEYBOARD always enabled on devices with usb host capability
> causes a significant penalty in boot time, and some people may want to turn
> it off because of that.

Actually, I said I would give up on this, but there are still parts of
that patch that I need for USB gadget (not related to USB keyboard).

Regarding USB keyboard, the best solution IMO would be to set it
disabled by default in board/sunxi/Kconfig (both because of the boot
time penality and because it's not relevant when using gadget mode) and
have it enabled individually in each configs/*_defconfig that uses USB
in host mode.

> Regards,
> 
> Hans
> 
> 
> 
> > ---
> >   board/sunxi/Kconfig            | 7 -------
> >   configs/MSI_Primo73_defconfig  | 1 -
> >   configs/MSI_Primo81_defconfig  | 1 -
> >   include/configs/sunxi-common.h | 5 ++++-
> >   4 files changed, 4 insertions(+), 10 deletions(-)
> >
> > diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
> > index 57e7529..75e3fb3 100644
> > --- a/board/sunxi/Kconfig
> > +++ b/board/sunxi/Kconfig
> > @@ -452,13 +452,6 @@ config USB_MUSB_SUNXI
> >   	one usb host controller enabled at a time, so enabling this on boards
> >   	which also use the ehci host controller will result in build errors.
> >
> > -config USB_KEYBOARD
> > -	boolean "Enable USB keyboard support"
> > -	default y
> > -	---help---
> > -	Say Y here to add support for using a USB keyboard (typically used
> > -	in combination with a graphical console).
> > -
> >   config GMAC_TX_DELAY
> >   	int "GMAC Transmit Clock Delay Chain"
> >   	default 0
> > diff --git a/configs/MSI_Primo73_defconfig b/configs/MSI_Primo73_defconfig
> > index 5227b6f..f621237 100644
> > --- a/configs/MSI_Primo73_defconfig
> > +++ b/configs/MSI_Primo73_defconfig
> > @@ -14,7 +14,6 @@ CONFIG_VIDEO_LCD_DCLK_PHASE=0
> >   CONFIG_VIDEO_LCD_POWER="PH8"
> >   CONFIG_VIDEO_LCD_BL_EN="PH7"
> >   CONFIG_VIDEO_LCD_BL_PWM="PB2"
> > -CONFIG_USB_KEYBOARD=n
> >   CONFIG_ARM=y
> >   CONFIG_ARCH_SUNXI=y
> >   CONFIG_MACH_SUN7I=y
> > diff --git a/configs/MSI_Primo81_defconfig b/configs/MSI_Primo81_defconfig
> > index b6aa876..4e1d167 100644
> > --- a/configs/MSI_Primo81_defconfig
> > +++ b/configs/MSI_Primo81_defconfig
> > @@ -20,7 +20,6 @@ CONFIG_VIDEO_LCD_SPI_MOSI="PH11"
> >   CONFIG_VIDEO_LCD_SPI_MISO="PH12"
> >   CONFIG_VIDEO_LCD_BL_EN="PA25"
> >   CONFIG_VIDEO_LCD_BL_PWM="PH13"
> > -CONFIG_USB_KEYBOARD=n
> >   CONFIG_ARM=y
> >   CONFIG_ARCH_SUNXI=y
> >   CONFIG_MACH_SUN6I=y
> > diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
> > index b9bb971..61a45e1 100644
> > --- a/include/configs/sunxi-common.h
> > +++ b/include/configs/sunxi-common.h
> > @@ -298,13 +298,16 @@ extern int soft_i2c_gpio_scl;
> >   #endif
> >
> >   #ifdef CONFIG_USB_MUSB_SUNXI
> > +#ifndef CONFIG_MUSB_GADGET
> >   #define CONFIG_MUSB_HOST
> > +#endif
> >   #define CONFIG_MUSB_PIO_ONLY
> >   #endif
> >
> > -#if defined CONFIG_USB_EHCI || defined CONFIG_USB_MUSB_SUNXI
> > +#if defined CONFIG_USB_EHCI || defined CONFIG_MUSB_HOST
> >   #define CONFIG_CMD_USB
> >   #define CONFIG_USB_STORAGE
> > +#define CONFIG_USB_KEYBOARD
> >   #endif
> >
> >   #ifdef CONFIG_USB_KEYBOARD
> >

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150404/29f6c2ae/attachment.sig>

  parent reply	other threads:[~2015-04-04 13:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-28 17:26 [U-Boot] [PATCH v2] sunxi: Avoid any assumption between musb gadget and host but fallback to host Paul Kocialkowski
2015-03-29 11:18 ` Hans de Goede
2015-03-29 12:06   ` Paul Kocialkowski
2015-04-04 13:42   ` Paul Kocialkowski [this message]
2015-04-04 13:48     ` Hans de Goede
2015-04-04 14:02       ` Paul Kocialkowski
2015-04-04 14:14         ` 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=1428154971.2418.8.camel@collins \
    --to=contact@paulk.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.