From patchwork Sat Mar 28 17:26:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 455717 X-Patchwork-Delegate: hdegoede@redhat.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id C80BC14010F for ; Sun, 29 Mar 2015 16:16:33 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 733BCA74A9; Sun, 29 Mar 2015 07:16:31 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4iS-SCHmYiIu; Sun, 29 Mar 2015 07:16:30 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 922A5A7481; Sun, 29 Mar 2015 07:16:30 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5F6CDA7481 for ; Sun, 29 Mar 2015 07:16:28 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X5ID0PPRaPSI for ; Sun, 29 Mar 2015 07:16:28 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from gagarine.paulk.fr (gagarine.paulk.fr [109.190.93.129]) by theia.denx.de (Postfix) with ESMTPS id 1E42BA7438 for ; Sun, 29 Mar 2015 07:16:23 +0200 (CEST) Received: by gagarine.paulk.fr (Postfix, from userid 65534) id 614E920679; Sat, 28 Mar 2015 18:26:32 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on gagarine.paulk.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from localhost.localdomain (collins [192.168.1.129]) by gagarine.paulk.fr (Postfix) with ESMTP id 9A737203D3; Sat, 28 Mar 2015 18:26:30 +0100 (CET) From: Paul Kocialkowski To: u-boot@lists.denx.de Date: Sat, 28 Mar 2015 18:26:24 +0100 Message-Id: <1427563584-25616-1-git-send-email-contact@paulk.fr> X-Mailer: git-send-email 1.9.1 Cc: Ian Campbell Subject: [U-Boot] [PATCH v2] sunxi: Avoid any assumption between musb gadget and host but fallback to host X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 --- 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