From patchwork Thu Apr 6 09:22:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sekhar Nori X-Patchwork-Id: 96913 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp642036qgd; Thu, 6 Apr 2017 02:23:53 -0700 (PDT) X-Received: by 10.223.178.66 with SMTP id y2mr30051839wra.161.1491470633224; Thu, 06 Apr 2017 02:23:53 -0700 (PDT) Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id 201si2140790wma.2.2017.04.06.02.23.52; Thu, 06 Apr 2017 02:23:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ti.com Received: by lists.denx.de (Postfix, from userid 105) id B745FC21C70; Thu, 6 Apr 2017 09:23:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 57619C21C49; Thu, 6 Apr 2017 09:23:17 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D5E3BC21BE5; Thu, 6 Apr 2017 09:23:13 +0000 (UTC) Received: from fllnx210.ext.ti.com (fllnx210.ext.ti.com [198.47.19.17]) by lists.denx.de (Postfix) with ESMTPS id BCCAFC21BE5 for ; Thu, 6 Apr 2017 09:23:08 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id v369N3eo009670; Thu, 6 Apr 2017 04:23:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1491470583; bh=GJqPxAx+dEP0w0O7HJcfekKbKu+kzRcxalC/BR7In+0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=hvSXiuE6p7n+v6sf6lPu50wDpevNxxXCRp0xWJTBTSoXJTJyrZIFCkCYNxqH7kl8T yhK4BsljIW6gYsEI2LMxgeYZug5oYK7UgbfW0O/vVjJGRN+4PwSO3YUkVENliguQpO LkMXMc94VSHXjoM7jyzyQR8NUwO4U+26igDh6tAk= Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v369N3nt028312; Thu, 6 Apr 2017 04:23:03 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.294.0; Thu, 6 Apr 2017 04:23:02 -0500 Received: from psplinux063.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v369MvS1011120; Thu, 6 Apr 2017 04:23:01 -0500 From: Sekhar Nori To: Tom Rini , Peter Howard , Lokesh Vutla , Vitaly Andrianov Date: Thu, 6 Apr 2017 14:52:53 +0530 Message-ID: <20170406092257.15541-2-nsekhar@ti.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170406092257.15541-1-nsekhar@ti.com> References: <20170406092257.15541-1-nsekhar@ti.com> MIME-Version: 1.0 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH 1/5] davinci: omapl138_lcdk: remove spiboot X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" OMAP-L138 LCDK board does not have a SPI flash. Remove spiboot related environment variable definitions. Signed-off-by: Sekhar Nori Reviewed-by: Lukasz Majewski Reviewed-by: Tom Rini --- include/configs/omapl138_lcdk.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h index 6700073aa203..f6aca0482527 100644 --- a/include/configs/omapl138_lcdk.h +++ b/include/configs/omapl138_lcdk.h @@ -264,9 +264,7 @@ #define CONFIG_BOOTARGS "console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait ip=off" #define CONFIG_BOOTCOMMAND \ "if mmc rescan; then " \ - "run mmcboot; " \ - "else " \ - "run spiboot; " \ + "run mmcboot; " "fi" #define CONFIG_EXTRA_ENV_SETTINGS \ "fdtaddr=0xc0600000\0" \ @@ -280,11 +278,7 @@ __stringify(CONFIG_BOOTFILE) "; " \ "fatload mmc 0 ${fdtaddr} ${fdtfile}; " \ "run fdtboot; " \ - "fi;\0" \ - "spiboot=" \ - "sf probe 0; " \ - "sf read 0xc0700000 0x80000 0x220000; " \ - "bootz 0xc0700000;\0" + "fi;\0" /* * U-Boot commands From patchwork Thu Apr 6 09:22:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sekhar Nori X-Patchwork-Id: 96915 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp642816qgd; Thu, 6 Apr 2017 02:26:09 -0700 (PDT) X-Received: by 10.223.167.145 with SMTP id j17mr23904114wrc.178.1491470769592; Thu, 06 Apr 2017 02:26:09 -0700 (PDT) Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id m16si1731104wrb.72.2017.04.06.02.26.09; Thu, 06 Apr 2017 02:26:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ti.com Received: by lists.denx.de (Postfix, from userid 105) id 2A265C21C91; Thu, 6 Apr 2017 09:24:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 4F1C7C21C6B; Thu, 6 Apr 2017 09:23:27 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E7765C21C88; Thu, 6 Apr 2017 09:23:18 +0000 (UTC) Received: from fllnx210.ext.ti.com (fllnx210.ext.ti.com [198.47.19.17]) by lists.denx.de (Postfix) with ESMTPS id 73BC3C21C32 for ; Thu, 6 Apr 2017 09:23:10 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id v369N5ie009678; Thu, 6 Apr 2017 04:23:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1491470585; bh=4V64CzU9B6njncgBeLdDgIzcY+Sjklah4Jas6GQU3F8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=U2NOgNPeN6kHVIvg8AyE4/y/S/l02OXYwouYhzI5VVXlwNt7dC8aeKojgN3qYFBf2 yLXEjhIQCjuGZ+TBwiGDoufSGPzkdvjKaEoxBMY8RFzfsDh8jvgv2EY8CpPVH84Gfj GyvR2riBRrNQKnF4j0vyl1Cdo1P3CNaVZQFqhfH4= Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v369N5h7028401; Thu, 6 Apr 2017 04:23:05 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.294.0; Thu, 6 Apr 2017 04:23:04 -0500 Received: from psplinux063.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v369MvS2011120; Thu, 6 Apr 2017 04:23:03 -0500 From: Sekhar Nori To: Tom Rini , Peter Howard , Lokesh Vutla , Vitaly Andrianov Date: Thu, 6 Apr 2017 14:52:54 +0530 Message-ID: <20170406092257.15541-3-nsekhar@ti.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170406092257.15541-1-nsekhar@ti.com> References: <20170406092257.15541-1-nsekhar@ti.com> MIME-Version: 1.0 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH 2/5] davinci: omapl138_lcdk: enable some filesystem related commands X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Enable some generic filesystem commands as well as disk partition related commands for OMAP-L138 LCDK board. These help in booting Linux from MMC/SD, for example. Signed-off-by: Sekhar Nori Reviewed-by: Lukasz Majewski Reviewed-by: Tom Rini --- configs/omapl138_lcdk_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig index 352c9b462544..7c8228bf5bcb 100644 --- a/configs/omapl138_lcdk_defconfig +++ b/configs/omapl138_lcdk_defconfig @@ -27,6 +27,8 @@ CONFIG_CMD_PING=y CONFIG_CMD_EXT2=y CONFIG_CMD_FAT=y CONFIG_CMD_UBI=y +CONFIG_CMD_FS_GENERIC=y +CONFIG_CMD_PART=y CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y CONFIG_SYS_NAND_U_BOOT_OFFS=0x28000 CONFIG_SPI_FLASH=y From patchwork Thu Apr 6 09:22:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sekhar Nori X-Patchwork-Id: 96914 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp642317qgd; Thu, 6 Apr 2017 02:24:41 -0700 (PDT) X-Received: by 10.28.61.198 with SMTP id k189mr23894766wma.71.1491470681655; Thu, 06 Apr 2017 02:24:41 -0700 (PDT) Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id m7si28217964wma.89.2017.04.06.02.24.41; Thu, 06 Apr 2017 02:24:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ti.com Received: by lists.denx.de (Postfix, from userid 105) id 1D4C7C21C3F; Thu, 6 Apr 2017 09:23:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 4E2DCC21C59; Thu, 6 Apr 2017 09:23:16 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id CA12FC21C41; Thu, 6 Apr 2017 09:23:13 +0000 (UTC) Received: from lelnx193.ext.ti.com (lelnx193.ext.ti.com [198.47.27.77]) by lists.denx.de (Postfix) with ESMTPS id 2AA97C21C37 for ; Thu, 6 Apr 2017 09:23:11 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id v369N72W005789; Thu, 6 Apr 2017 04:23:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1491470587; bh=k6rjqXU3OMjCqXsjD39uutZjjK4YduXo0b4N5el8zd4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=tEYoon31vRP0uo/m4xlC2G78Wliiv51nnIvluuWLMvt8lRHUBraDL2cayGrZ2f9mh g/9qHjoxOHoY6UhXGdvlLwinv0J8JTWaksrKogqcqvLyVFVM8PeO3DHgWWur+gpAvY BuPAHcN9egynBCQ3oefxI6dgqzX7F0KUyIN2Wt3I= Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v369N7FL028432; Thu, 6 Apr 2017 04:23:07 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.294.0; Thu, 6 Apr 2017 04:23:07 -0500 Received: from psplinux063.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v369MvS3011120; Thu, 6 Apr 2017 04:23:05 -0500 From: Sekhar Nori To: Tom Rini , Peter Howard , Lokesh Vutla , Vitaly Andrianov Date: Thu, 6 Apr 2017 14:52:55 +0530 Message-ID: <20170406092257.15541-4-nsekhar@ti.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170406092257.15541-1-nsekhar@ti.com> References: <20170406092257.15541-1-nsekhar@ti.com> MIME-Version: 1.0 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH 3/5] davinci: omapl138_lcdk: use environment variables for memory addresses X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Use environment variables for various memory addresses used on OMAP-L138 LCDK board. This makes it easy to customize the boot process. Signed-off-by: Sekhar Nori Reviewed-by: Lukasz Majewski Reviewed-by: Tom Rini --- include/configs/omapl138_lcdk.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h index f6aca0482527..599fd5b7a874 100644 --- a/include/configs/omapl138_lcdk.h +++ b/include/configs/omapl138_lcdk.h @@ -266,15 +266,21 @@ "if mmc rescan; then " \ "run mmcboot; " "fi" -#define CONFIG_EXTRA_ENV_SETTINGS \ + +#define DEFAULT_LINUX_BOOT_ENV \ + "loadaddr=0xc0700000\0" \ "fdtaddr=0xc0600000\0" \ + "scriptaddr=0xc0600000\0" + +#define CONFIG_EXTRA_ENV_SETTINGS \ + DEFAULT_LINUX_BOOT_ENV \ "fdtfile=da850-lcdk.dtb\0" \ - "fdtboot=bootz 0xc0700000 - ${fdtaddr};\0" \ + "fdtboot=bootz ${loadaddr} - ${fdtaddr};\0" \ "mmcboot=" \ - "if fatload mmc 0 0xc0600000 boot.scr; then " \ - "source 0xc0600000; " \ + "if fatload mmc 0 ${scriptaddr} boot.scr; then " \ + "source ${scriptaddr}; " \ "else " \ - "fatload mmc 0 0xc0700000 " \ + "fatload mmc 0 ${loadaddr} " \ __stringify(CONFIG_BOOTFILE) "; " \ "fatload mmc 0 ${fdtaddr} ${fdtfile}; " \ "run fdtboot; " \ From patchwork Thu Apr 6 09:22:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sekhar Nori X-Patchwork-Id: 96916 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp642955qgd; Thu, 6 Apr 2017 02:26:42 -0700 (PDT) X-Received: by 10.28.37.135 with SMTP id l129mr21467817wml.49.1491470802841; Thu, 06 Apr 2017 02:26:42 -0700 (PDT) Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id q10si2135568wmg.61.2017.04.06.02.26.42; Thu, 06 Apr 2017 02:26:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ti.com Received: by lists.denx.de (Postfix, from userid 105) id 76E67C21CA4; Thu, 6 Apr 2017 09:24:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 37B38C21C99; Thu, 6 Apr 2017 09:23:48 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 5FB7AC21C81; Thu, 6 Apr 2017 09:23:19 +0000 (UTC) Received: from fllnx210.ext.ti.com (fllnx210.ext.ti.com [198.47.19.17]) by lists.denx.de (Postfix) with ESMTPS id D4A54C21C58 for ; Thu, 6 Apr 2017 09:23:14 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id v369NAGi009694; Thu, 6 Apr 2017 04:23:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1491470590; bh=4UPtbKIWGzMYCAEA4/+dCdvsqPPHXGQ4RoRYLGr84Ro=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=pwm7xe3YglwCPDl21lVofmOtN+M9IWsYmnBiL5gpGLsDv14NKizeOVEqfOInwSjK1 Zq74l2tX5WMgN6N2nbfixsxG18+vFohm3IgYKW0zwLqfWp39ByvgJa3nyZli7VhZB5 e8eYM923nNw7wDLBX7X7hHdN2mGrAU7cqFpxVCCU= Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id v369NAwO010311; Thu, 6 Apr 2017 04:23:10 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.294.0; Thu, 6 Apr 2017 04:23:09 -0500 Received: from psplinux063.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v369MvS4011120; Thu, 6 Apr 2017 04:23:07 -0500 From: Sekhar Nori To: Tom Rini , Peter Howard , Lokesh Vutla , Vitaly Andrianov Date: Thu, 6 Apr 2017 14:52:56 +0530 Message-ID: <20170406092257.15541-5-nsekhar@ti.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170406092257.15541-1-nsekhar@ti.com> References: <20170406092257.15541-1-nsekhar@ti.com> MIME-Version: 1.0 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH 4/5] ARM: ti: consolidate mmc environment variables X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Introduce include/environment/ti/mmc.h that consolidates environment variable definitions for various TI boards that support MMC/SD. This allows reuse of same environment variables on non-ARMv7 TI platforms like OMAP-L138 for example. While at it, move DFU-related environment variable includes to only non-SPL builds for AM335x and AM437x since they are not really used for SPL today. Signed-off-by: Sekhar Nori Reviewed-by: Lukasz Majewski Reviewed-by: Tom Rini --- include/configs/am335x_evm.h | 4 ++- include/configs/am43xx_evm.h | 4 ++- include/configs/k2g_evm.h | 2 ++ include/configs/ti_armv7_common.h | 61 ----------------------------------- include/configs/ti_omap4_common.h | 1 + include/configs/ti_omap5_common.h | 2 ++ include/environment/ti/mmc.h | 68 +++++++++++++++++++++++++++++++++++++++ 7 files changed, 79 insertions(+), 63 deletions(-) create mode 100644 include/environment/ti/mmc.h diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 27126871f731..d16b33f6da46 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -17,7 +17,6 @@ #define __CONFIG_AM335X_EVM_H #include -#include #ifndef CONFIG_SPL_BUILD # define CONFIG_TIMESTAMP @@ -96,6 +95,9 @@ #include #ifndef CONFIG_SPL_BUILD +#include +#include + #define CONFIG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ DEFAULT_MMC_TI_ARGS \ diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h index ec99958fcd50..1feb94683435 100644 --- a/include/configs/am43xx_evm.h +++ b/include/configs/am43xx_evm.h @@ -13,7 +13,6 @@ #define CONFIG_MAX_RAM_BANK_SIZE (1024 << 21) /* 2GB */ #define CONFIG_SYS_TIMERBASE 0x48040000 /* Use Timer2 */ -#include #include /* NS16550 Configuration */ @@ -162,6 +161,9 @@ #define CONFIG_TI_EDMA3 #ifndef CONFIG_SPL_BUILD +#include +#include + #define CONFIG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ DEFAULT_MMC_TI_ARGS \ diff --git a/include/configs/k2g_evm.h b/include/configs/k2g_evm.h index bd252312a20b..cb63bef6fcea 100644 --- a/include/configs/k2g_evm.h +++ b/include/configs/k2g_evm.h @@ -10,6 +10,8 @@ #ifndef __CONFIG_K2G_EVM_H #define __CONFIG_K2G_EVM_H +#include + /* Platform type */ #define CONFIG_SOC_K2G diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h index a4ec4ce00a88..c0cf35e5342a 100644 --- a/include/configs/ti_armv7_common.h +++ b/include/configs/ti_armv7_common.h @@ -51,67 +51,6 @@ "bootm_size=0x10000000\0" \ "boot_fdt=try\0" -#define DEFAULT_MMC_TI_ARGS \ - "mmcdev=0\0" \ - "mmcrootfstype=ext4 rootwait\0" \ - "finduuid=part uuid mmc ${bootpart} uuid\0" \ - "args_mmc=run finduuid;setenv bootargs console=${console} " \ - "${optargs} " \ - "root=PARTUUID=${uuid} rw " \ - "rootfstype=${mmcrootfstype}\0" \ - "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \ - "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \ - "source ${loadaddr}\0" \ - "bootenvfile=uEnv.txt\0" \ - "importbootenv=echo Importing environment from mmc${mmcdev} ...; " \ - "env import -t ${loadaddr} ${filesize}\0" \ - "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}\0" \ - "loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ - "loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \ - "envboot=mmc dev ${mmcdev}; " \ - "if mmc rescan; then " \ - "echo SD/MMC found on device ${mmcdev};" \ - "if run loadbootscript; then " \ - "run bootscript;" \ - "else " \ - "if run loadbootenv; then " \ - "echo Loaded env from ${bootenvfile};" \ - "run importbootenv;" \ - "fi;" \ - "if test -n $uenvcmd; then " \ - "echo Running uenvcmd ...;" \ - "run uenvcmd;" \ - "fi;" \ - "fi;" \ - "fi;\0" \ - "mmcloados=run args_mmc; " \ - "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ - "if run loadfdt; then " \ - "bootz ${loadaddr} - ${fdtaddr}; " \ - "else " \ - "if test ${boot_fdt} = try; then " \ - "bootz; " \ - "else " \ - "echo WARN: Cannot load the DT; " \ - "fi; " \ - "fi; " \ - "else " \ - "bootz; " \ - "fi;\0" \ - "mmcboot=mmc dev ${mmcdev}; " \ - "setenv devnum ${mmcdev}; " \ - "setenv devtype mmc; " \ - "if mmc rescan; then " \ - "echo SD/MMC found on device ${mmcdev};" \ - "if run loadimage; then " \ - "if test ${boot_fit} -eq 1; then " \ - "run loadfit; " \ - "else " \ - "run mmcloados;" \ - "fi;" \ - "fi;" \ - "fi;\0" \ - #define DEFAULT_FIT_TI_ARGS \ "boot_fit=0\0" \ "fit_loadaddr=0x88000000\0" \ diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h index d07cb9ffb4b3..b85db500b574 100644 --- a/include/configs/ti_omap4_common.h +++ b/include/configs/ti_omap4_common.h @@ -104,6 +104,7 @@ "run distro_bootcmd" #include +#include #define CONFIG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h index 97bd874e6cdd..d45baabf0b60 100644 --- a/include/configs/ti_omap5_common.h +++ b/include/configs/ti_omap5_common.h @@ -58,6 +58,8 @@ #define DFUARGS #endif +#include + #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG #define CONFIG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ diff --git a/include/environment/ti/mmc.h b/include/environment/ti/mmc.h new file mode 100644 index 000000000000..b987f71516db --- /dev/null +++ b/include/environment/ti/mmc.h @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com + * + * Environment variable definitions for MMC/SD on TI boards. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#define DEFAULT_MMC_TI_ARGS \ + "mmcdev=0\0" \ + "mmcrootfstype=ext4 rootwait\0" \ + "finduuid=part uuid mmc ${bootpart} uuid\0" \ + "args_mmc=run finduuid;setenv bootargs console=${console} " \ + "${optargs} " \ + "root=PARTUUID=${uuid} rw " \ + "rootfstype=${mmcrootfstype}\0" \ + "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \ + "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \ + "source ${loadaddr}\0" \ + "bootenvfile=uEnv.txt\0" \ + "importbootenv=echo Importing environment from mmc${mmcdev} ...; " \ + "env import -t ${loadaddr} ${filesize}\0" \ + "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}\0" \ + "loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ + "loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \ + "envboot=mmc dev ${mmcdev}; " \ + "if mmc rescan; then " \ + "echo SD/MMC found on device ${mmcdev};" \ + "if run loadbootscript; then " \ + "run bootscript;" \ + "else " \ + "if run loadbootenv; then " \ + "echo Loaded env from ${bootenvfile};" \ + "run importbootenv;" \ + "fi;" \ + "if test -n $uenvcmd; then " \ + "echo Running uenvcmd ...;" \ + "run uenvcmd;" \ + "fi;" \ + "fi;" \ + "fi;\0" \ + "mmcloados=run args_mmc; " \ + "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ + "if run loadfdt; then " \ + "bootz ${loadaddr} - ${fdtaddr}; " \ + "else " \ + "if test ${boot_fdt} = try; then " \ + "bootz; " \ + "else " \ + "echo WARN: Cannot load the DT; " \ + "fi; " \ + "fi; " \ + "else " \ + "bootz; " \ + "fi;\0" \ + "mmcboot=mmc dev ${mmcdev}; " \ + "setenv devnum ${mmcdev}; " \ + "setenv devtype mmc; " \ + "if mmc rescan; then " \ + "echo SD/MMC found on device ${mmcdev};" \ + "if run loadimage; then " \ + "if test ${boot_fit} -eq 1; then " \ + "run loadfit; " \ + "else " \ + "run mmcloados;" \ + "fi;" \ + "fi;" \ + "fi;\0" From patchwork Thu Apr 6 09:22:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sekhar Nori X-Patchwork-Id: 96917 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp642992qgd; Thu, 6 Apr 2017 02:26:51 -0700 (PDT) X-Received: by 10.28.13.69 with SMTP id 66mr22394699wmn.137.1491470811139; Thu, 06 Apr 2017 02:26:51 -0700 (PDT) Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id 194si2149131wmt.32.2017.04.06.02.26.50; Thu, 06 Apr 2017 02:26:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ti.com Received: by lists.denx.de (Postfix, from userid 105) id B708BC21C72; Thu, 6 Apr 2017 09:24:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 3DF45C21C7F; Thu, 6 Apr 2017 09:23:35 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 10A35C21C59; Thu, 6 Apr 2017 09:23:25 +0000 (UTC) Received: from fllnx210.ext.ti.com (fllnx210.ext.ti.com [198.47.19.17]) by lists.denx.de (Postfix) with ESMTPS id BB29FC21C58 for ; Thu, 6 Apr 2017 09:23:20 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id v369NCvZ009698; Thu, 6 Apr 2017 04:23:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1491470592; bh=eO+ybMZ8Qa5tzhkcRSmz5Q0gkJBo/MB0inMO3rLt+MY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=V60kK2f14JCBAExCewPZJOsOehF10hyglEE7Ixkt3Qjx9CVTY65VT3KbvdHV8eb5A UN5qMGd1VFbQdiXgFtcfUBJoPpKZTdChK2LXJzWymC7j5sQSBrHt5OW/KyrGu1AHzJ hZh47I8u+Iovo9MqT5BmDrBRG5WZiVUH/Pd0Ewno= Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id v369NC9Z010332; Thu, 6 Apr 2017 04:23:12 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.294.0; Thu, 6 Apr 2017 04:23:11 -0500 Received: from psplinux063.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v369MvS5011120; Thu, 6 Apr 2017 04:23:10 -0500 From: Sekhar Nori To: Tom Rini , Peter Howard , Lokesh Vutla , Vitaly Andrianov Date: Thu, 6 Apr 2017 14:52:57 +0530 Message-ID: <20170406092257.15541-6-nsekhar@ti.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170406092257.15541-1-nsekhar@ti.com> References: <20170406092257.15541-1-nsekhar@ti.com> MIME-Version: 1.0 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH 5/5] davinci: omapl138_lcdk: switch to using common mmc args X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Now that we have common MMC/SD boot environment variables that can be used across TI platforms, switch OMAP-L138 LCDK to use them. As a nice side-effect, we get support for using uEnv.txt on this platform. Signed-off-by: Sekhar Nori Reviewed-by: Lukasz Majewski Reviewed-by: Tom Rini --- include/configs/omapl138_lcdk.h | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h index 599fd5b7a874..e70760402b43 100644 --- a/include/configs/omapl138_lcdk.h +++ b/include/configs/omapl138_lcdk.h @@ -261,30 +261,27 @@ #define CONFIG_CMDLINE_TAG #define CONFIG_REVISION_TAG #define CONFIG_SETUP_MEMORY_TAGS -#define CONFIG_BOOTARGS "console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait ip=off" #define CONFIG_BOOTCOMMAND \ - "if mmc rescan; then " \ + "run envboot; " \ "run mmcboot; " - "fi" #define DEFAULT_LINUX_BOOT_ENV \ "loadaddr=0xc0700000\0" \ "fdtaddr=0xc0600000\0" \ "scriptaddr=0xc0600000\0" +#include + #define CONFIG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ + DEFAULT_MMC_TI_ARGS \ + "bootpart=0:2\0" \ + "bootdir=/boot\0" \ + "bootfile=zImage\0" \ "fdtfile=da850-lcdk.dtb\0" \ - "fdtboot=bootz ${loadaddr} - ${fdtaddr};\0" \ - "mmcboot=" \ - "if fatload mmc 0 ${scriptaddr} boot.scr; then " \ - "source ${scriptaddr}; " \ - "else " \ - "fatload mmc 0 ${loadaddr} " \ - __stringify(CONFIG_BOOTFILE) "; " \ - "fatload mmc 0 ${fdtaddr} ${fdtfile}; " \ - "run fdtboot; " \ - "fi;\0" + "boot_fdt=yes\0" \ + "boot_fit=0\0" \ + "console=ttyS2,115200n8\0" /* * U-Boot commands