From patchwork Mon Feb 11 13:35:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Otavio Salvador X-Patchwork-Id: 219608 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 C1A5A2C02EA for ; Tue, 12 Feb 2013 00:34:59 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C61C34A129; Mon, 11 Feb 2013 14:34:47 +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 3bTpHv9MThfJ; Mon, 11 Feb 2013 14:34:47 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A5E934A13A; Mon, 11 Feb 2013 14:33:05 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7C1E54A102 for ; Mon, 11 Feb 2013 14:32:48 +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 iwjE2kahKJ8B for ; Mon, 11 Feb 2013 14:32:45 +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-f180.google.com (mail-ye0-f180.google.com [209.85.213.180]) by theia.denx.de (Postfix) with ESMTPS id 87E174A10D for ; Mon, 11 Feb 2013 14:31:56 +0100 (CET) Received: by mail-ye0-f180.google.com with SMTP id r14so1208066yen.25 for ; Mon, 11 Feb 2013 05:31:55 -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=gKr9U731USg9kgSnD91nINJ5mD9CxVvRuUEKOPi5bg0=; b=S3+1UKlQuLTYz5bYn4+gpVSmu+06QacwjrSr3bKPu0bwiysx3e1E0zS6jc26CiKFG2 HdNGY4QmcV2NVbxwX23U+2j5OaJEOu4hpCZOJIVt/aMJzHVmyorroZnA/3DR7OCmEOZt lZ6ohmHkFzN43w/F6ew5O3fB/Z+A3wtXS7JzvmwdBxO+GD7VBnZhSwIEOc94+TylTANo eXUti402DZRmdvPvMBl9KKq4d7bB5r9QKvI/grShA6Te8BjrUuzmxNhdlWv9wcKIlbdz cXGss0Zhic1avSNPOzXdDijyWRksy2Wzij6dSzro2cGFqGqbDaNNeQqPDVw2FkP7L2rq TZFw== X-Received: by 10.236.89.7 with SMTP id b7mr17413237yhf.123.1360589515525; Mon, 11 Feb 2013 05:31:55 -0800 (PST) Received: from nano.lab.ossystems.com.br ([187.23.144.59]) by mx.google.com with ESMTPS id s34sm47008050yhe.9.2013.02.11.05.31.52 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 11 Feb 2013 05:31:54 -0800 (PST) From: Otavio Salvador To: U-Boot Mailing List Date: Mon, 11 Feb 2013 11:35:56 -0200 Message-Id: <1360589756-26355-11-git-send-email-otavio@ossystems.com.br> X-Mailer: git-send-email 1.8.1 In-Reply-To: <1360589756-26355-1-git-send-email-otavio@ossystems.com.br> References: <1360589756-26355-1-git-send-email-otavio@ossystems.com.br> Cc: Fabio Estevam , Marek Vasut , Otavio Salvador Subject: [U-Boot] [PATCH v2 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 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__ */