From patchwork Mon Feb 18 00:45:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Otavio Salvador X-Patchwork-Id: 221135 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 C0F4E2C007E for ; Mon, 18 Feb 2013 11:43:14 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DBA474AA2E; Mon, 18 Feb 2013 01:42:46 +0100 (CET) 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 KmphsbTWxfgK; Mon, 18 Feb 2013 01:42:46 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C12684A9B8; Mon, 18 Feb 2013 01:42:27 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8C4CC4A9A9 for ; Mon, 18 Feb 2013 01:42:24 +0100 (CET) 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 kWxqmfcS6qEp for ; Mon, 18 Feb 2013 01:42:21 +0100 (CET) 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-ye0-f172.google.com (mail-ye0-f172.google.com [209.85.213.172]) by theia.denx.de (Postfix) with ESMTPS id DC3054A8A1 for ; Mon, 18 Feb 2013 01:41:55 +0100 (CET) Received: by mail-ye0-f172.google.com with SMTP id m10so928946yen.31 for ; Sun, 17 Feb 2013 16:41:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=i8uVl+6Q+zO2d9wQHa6paFlw58y1LcrjpCj3vtEg8Xk=; b=pSkdqDAh0x+YtMImcsJvLAdPbWIPvn4p/gnO+MZu1Atu5W51VnbiWtVSOsNDEHZJxI TrpmmSRG2hkyxsCp5u+Cj9s3FWKiJ71fUTeS7lLe78j0EARxIPRsXFQvEEZQYxhr+JAR /xOqbBu8qQw6H8uBIpybfMtccJgBuRYhDjVm723HUHuyW46x2g5rO3xqRIgzkTdg1Qhz AD0S5/WSl1eclfDDr/2c2n9tlFuh5/XRXPGVMgW8sqC3pp+e/tYMRA8MdWbfrONH5qYF baL+7KVqaea1s7LcDXWGhIoEuezTCVIDdc1/xW3GCXD4WphZZAot9hWx73lXwgo+GCgR +hsw== X-Received: by 10.236.142.101 with SMTP id h65mr16999006yhj.95.1361148114032; Sun, 17 Feb 2013 16:41:54 -0800 (PST) Received: from nano.lab.ossystems.com.br ([187.23.144.59]) by mx.google.com with ESMTPS id j1sm111429376yhn.3.2013.02.17.16.41.50 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 17 Feb 2013 16:41:53 -0800 (PST) From: Otavio Salvador To: U-Boot Mailing List Date: Sun, 17 Feb 2013 21:45:35 -0300 Message-Id: <1361148335-19197-11-git-send-email-otavio@ossystems.com.br> X-Mailer: git-send-email 1.8.1 In-Reply-To: <1361148335-19197-1-git-send-email-otavio@ossystems.com.br> References: <1361148335-19197-1-git-send-email-otavio@ossystems.com.br> Cc: Fabio Estevam , Marek Vasut , Otavio Salvador Subject: [U-Boot] [PATCH v4 10/10] mx23_olinuxino: Add ethernet 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 This adds support to the LAN9512 chip included in the board and extend the environment to easy netboot use. Signed-off-by: Otavio Salvador --- Changes in v4: None Changes in v3: None Changes in v2: - Remove extra newline include/configs/mx23_olinuxino.h | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/include/configs/mx23_olinuxino.h b/include/configs/mx23_olinuxino.h index e081c49..dfba0fc 100644 --- a/include/configs/mx23_olinuxino.h +++ b/include/configs/mx23_olinuxino.h @@ -55,11 +55,13 @@ #define CONFIG_DOS_PARTITION #define CONFIG_CMD_CACHE +#define CONFIG_CMD_DHCP #define CONFIG_CMD_EXT2 #define CONFIG_CMD_FAT #define CONFIG_CMD_GPIO #define CONFIG_CMD_LED #define CONFIG_CMD_MMC +#define CONFIG_CMD_NET #define CONFIG_CMD_USB /* @@ -150,6 +152,12 @@ #define CONFIG_USB_STORAGE #endif +/* Ethernet */ +#ifdef CONFIG_CMD_NET +#define CONFIG_USB_HOST_ETHER +#define CONFIG_USB_ETHER_SMSC95XX +#endif + /* * Boot Linux */ @@ -191,6 +199,7 @@ "fdt_file=imx23-olinuxino.dtb\0" \ "fdt_addr=0x41000000\0" \ "boot_fdt=try\0" \ + "ip_dyn=yes\0" \ "mmcdev=0\0" \ "mmcpart=2\0" \ "mmcroot=/dev/mmcblk0p3 rw rootwait\0" \ @@ -216,6 +225,31 @@ "fi; " \ "else " \ "bootm; " \ + "fi;\0" \ + "netargs=setenv bootargs console=${console_mainline},${baudrate} " \ + "root=/dev/nfs " \ + "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ + "netboot=echo Booting from net ...; " \ + "usb start; " \ + "run netargs; " \ + "if test ${ip_dyn} = yes; then " \ + "setenv get_cmd dhcp; " \ + "else " \ + "setenv get_cmd tftp; " \ + "fi; " \ + "${get_cmd} ${uimage}; " \ + "if test ${boot_fdt} = yes; then " \ + "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ + "bootm ${loadaddr} - ${fdt_addr}; " \ + "else " \ + "if test ${boot_fdt} = try; then " \ + "bootm; " \ + "else " \ + "echo WARN: Cannot load the DT; " \ + "fi;" \ + "fi; " \ + "else " \ + "bootm; " \ "fi;\0" #define CONFIG_BOOTCOMMAND \ @@ -225,10 +259,9 @@ "else " \ "if run loaduimage; then " \ "run mmcboot; " \ - "else " \ - "echo ERR: Fail to boot from MMC; " \ + "else run netboot; " \ "fi; " \ "fi; " \ - "else exit; fi" + "else run netboot; fi" #endif /* __MX23_OLINUXINO_CONFIG_H__ */