From patchwork Thu Aug 23 14:52:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Sealey X-Patchwork-Id: 179667 X-Patchwork-Delegate: sbabic@denx.de 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 7A6932C00AE for ; Fri, 24 Aug 2012 00:53:41 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id ADF352809E; Thu, 23 Aug 2012 16:53:38 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 OfRBJH6ZPac7; Thu, 23 Aug 2012 16:53:38 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5CADE28090; Thu, 23 Aug 2012 16:53:37 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CDF4D28090 for ; Thu, 23 Aug 2012 16:53:34 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 nI54PzNLHpnz for ; Thu, 23 Aug 2012 16:53:32 +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 mail-ob0-f172.google.com (mail-ob0-f172.google.com [209.85.214.172]) by theia.denx.de (Postfix) with ESMTPS id 826AE2808C for ; Thu, 23 Aug 2012 16:53:30 +0200 (CEST) Received: by obbwc20 with SMTP id wc20so1736544obb.3 for ; Thu, 23 Aug 2012 07:53:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=1jZVjrELTV31vBS867bN1okA/ApKDvqF9SOI5uGMZp0=; b=cIz6FowjxrOz5i7ljVlQd7WFDqWVekbH4H6x6NDgb/YVB+BEmaX14nyiHchHG76uND trQ3P9SesvFNB2ezo2DTjOK+r9ABoSTarpIFpEsSKmVHMOeukRrPSvDhac9mMCc6NGz6 bsoJ5el5XtRoalbJUVTPKPAEroU54GJxSzVy6aD/LJpHsgpvD2wy/vI1Qdjltxy9O9Y/ oJnbzdPtDsY+qFpB604mpI4IPvkh8ayrE4snjnszAKvPbs4qhQr6CiM1jKsKtPkZmatl dKhs2z10tYS8kwSl/7IKUJ/G3bCdxH5lEJF8wn3Q8UKq0L++kFjcnnrd4LMt92gWJELh HRWA== Received: by 10.60.22.33 with SMTP id a1mr1243953oef.141.1345733609622; Thu, 23 Aug 2012 07:53:29 -0700 (PDT) Received: from shinji.genesi-usa.com ([199.193.222.22]) by mx.google.com with ESMTPS id k3sm6785089obw.4.2012.08.23.07.53.28 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 23 Aug 2012 07:53:28 -0700 (PDT) From: Matt Sealey To: U-Boot ML Date: Thu, 23 Aug 2012 09:52:33 -0500 Message-Id: <1345733554-7085-1-git-send-email-matt@genesi-usa.com> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQmnp6VE2vBqfHjwXxhG7FMja9HS68hMZXO8jxw4QLbiobXDhwwQu7L4iGCqyMo7H7iSjD2w Cc: Marek Vasut Subject: [U-Boot] [PATCH 1/2] efikamx: refine USB support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Because of the way USB pad settings are handled it doesn't make sense to be able to build the Efika MX board support without CONFIG_CMD_USB turned on. So, we change the build to always compile in USB support. We do not need to check for CONFIG_CMD_USB like we do with CONFIG_MXC_SPI since the USB subsystem will error out of the compile for us. Additionally, the following behaviors have changed; * Smartbook "preboot" should not set input and output to USB keyboard as there is no display support * board_eth_init is implemented such that it does not cause U-Boot to report an explicit failure ("CPU Net Initialization Failed"). Since Ethernet is implemented via USB (fixed on Smarttop, pluggable on Smartbook, and handled by "usb start") - the warning that is left ("No ethernet found") is perfectly reasonable at the point it is printed since the USB system hasn't been started and nothing has been probed yet. Signed-off-by: Matt Sealey Cc: Stefano Babic Cc: Marek Vasut --- board/genesi/mx51_efikamx/Makefile | 6 +----- board/genesi/mx51_efikamx/efikamx-usb.c | 12 ++++++++++++ board/genesi/mx51_efikamx/efikamx.c | 3 --- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/board/genesi/mx51_efikamx/Makefile b/board/genesi/mx51_efikamx/Makefile index bd2174f..f95356f 100644 --- a/board/genesi/mx51_efikamx/Makefile +++ b/board/genesi/mx51_efikamx/Makefile @@ -27,11 +27,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).o -COBJS := efikamx.o - -ifdef CONFIG_CMD_USB -COBJS += efikamx-usb.o -endif +COBJS := efikamx.o efikamx-usb.o SRCS := $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) diff --git a/board/genesi/mx51_efikamx/efikamx-usb.c b/board/genesi/mx51_efikamx/efikamx-usb.c index abd358a..ae6d1be 100644 --- a/board/genesi/mx51_efikamx/efikamx-usb.c +++ b/board/genesi/mx51_efikamx/efikamx-usb.c @@ -201,3 +201,15 @@ void board_ehci_hcd_postinit(struct usb_ehci *ehci, int port) IMX_GPIO_NR(2, 20)); } } + +/* + * Ethernet on the Smarttop is on the USB bus. Rather than give an error about + * "CPU Net Initialization Failed", just pass this test since no other settings + * are required. Smartbook doesn't have built-in Ethernet but we will let it + * pass anyway considering someone may have plugged in a USB stick and all + * they need to do is run "usb start". + */ +int board_eth_init(bd_t *bis) +{ + return 0; +} diff --git a/board/genesi/mx51_efikamx/efikamx.c b/board/genesi/mx51_efikamx/efikamx.c index b9064fb..d9c499d 100644 --- a/board/genesi/mx51_efikamx/efikamx.c +++ b/board/genesi/mx51_efikamx/efikamx.c @@ -484,9 +484,6 @@ int board_late_init(void) imx_iomux_v3_setup_multiple_pads(efikamx_pata_pads, ARRAY_SIZE(efikamx_pata_pads)); efikamx_usb_setup_pads(); - if (machine_is_efikasb()) - setenv("preboot", "usb reset ; setenv stdin usbkbd\0"); - return 0; }