From patchwork Sun Mar 24 06:24:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SRICHARAN R X-Patchwork-Id: 230367 X-Patchwork-Delegate: trini@ti.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 CA84C2C00BE for ; Sun, 24 Mar 2013 17:25:01 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 557094A040; Sun, 24 Mar 2013 07:24: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 ua-aB5RJErQu; Sun, 24 Mar 2013 07:24:47 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BC12B4A041; Sun, 24 Mar 2013 07:24:29 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C01EE4A01C for ; Sun, 24 Mar 2013 07:24: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 T0yJn8IPLk1s for ; Sun, 24 Mar 2013 07:24:22 +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 bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by theia.denx.de (Postfix) with ESMTPS id 2023F4A02C for ; Sun, 24 Mar 2013 07:24:17 +0100 (CET) Received: from dbdp20.itg.ti.com ([172.24.170.38]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id r2O6OEuG018327 for ; Sun, 24 Mar 2013 01:24:15 -0500 Received: from DBDE71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id r2O6OD2i016828 for ; Sun, 24 Mar 2013 11:54:13 +0530 (IST) Received: from dbdp32.itg.ti.com (172.24.170.251) by DBDE71.ent.ti.com (172.24.170.149) with Microsoft SMTP Server id 14.1.323.3; Sun, 24 Mar 2013 11:54:13 +0530 Received: from uda0393807.apr.dhcp.ti.com (smtpvbd.itg.ti.com [172.24.170.250]) by dbdp32.itg.ti.com (8.13.8/8.13.8) with ESMTP id r2O6O8Mq009786; Sun, 24 Mar 2013 11:54:13 +0530 From: Sricharan R To: Date: Sun, 24 Mar 2013 11:54:07 +0530 Message-ID: <1364106248-6860-5-git-send-email-r.sricharan@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1364106248-6860-1-git-send-email-r.sricharan@ti.com> References: <1364106248-6860-1-git-send-email-r.sricharan@ti.com> MIME-Version: 1.0 Cc: trini@ti.com Subject: [U-Boot] [PATCH V2 4/5] ARM: OMAP4/5: Change the default boot command to work with device tree 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Now with kernel moving to all device tree, the default boot command is changed to pass the device tree blob. Also, adding the findfdt command to get the dt-blob based on the board. Thanks to Tom Rini for suggesting this. Signed-off-by: Sricharan R --- [V2] Corrected the board file name for omap4 boards in findfdt command include/configs/omap4_common.h | 13 +++++++++++-- include/configs/omap5_common.h | 11 +++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/include/configs/omap4_common.h b/include/configs/omap4_common.h index 6ae6a0f..f584403 100644 --- a/include/configs/omap4_common.h +++ b/include/configs/omap4_common.h @@ -138,6 +138,7 @@ */ #define CONFIG_BOOTDELAY 3 +#define CONFIG_ENV_VARS_UBOOT_CONFIG #define CONFIG_ENV_OVERWRITE @@ -145,6 +146,7 @@ "loadaddr=0x82000000\0" \ "console=ttyO2,115200n8\0" \ "fdt_high=0xffffffff\0" \ + "fdtaddr=0x88000000\0" \ "usbtty=cdc_acm\0" \ "vram=16M\0" \ "mmcdev=0\0" \ @@ -153,7 +155,9 @@ "mmcargs=setenv bootargs console=${console} " \ "vram=${vram} " \ "root=${mmcroot} " \ - "rootfstype=${mmcrootfstype}\0" \ + "rootfstype=${mmcrootfstype}; " \ + "run findfdt; " \ + "fatload mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \ "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \ "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \ "source ${loadaddr}\0" \ @@ -163,7 +167,12 @@ "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ "mmcboot=echo Booting from mmc${mmcdev} ...; " \ "run mmcargs; " \ - "bootm ${loadaddr}\0" \ + "bootm ${loadaddr} - ${fdtaddr}\0" \ + "findfdt="\ + "if test $board_name = sdp4430; then " \ + "setenv fdtfile omap4-sdp.dtb; fi; " \ + "if test $board_name = panda; then " \ + "setenv fdtfile omap4-panda.dtb; fi\0" \ #define CONFIG_BOOTCOMMAND \ "mmc dev ${mmcdev}; if mmc rescan; then " \ diff --git a/include/configs/omap5_common.h b/include/configs/omap5_common.h index 6d7aa7b..1576fa0 100644 --- a/include/configs/omap5_common.h +++ b/include/configs/omap5_common.h @@ -137,6 +137,7 @@ */ #define CONFIG_BOOTDELAY 3 +#define CONFIG_ENV_VARS_UBOOT_CONFIG #define CONFIG_ENV_OVERWRITE @@ -144,6 +145,7 @@ "loadaddr=0x82000000\0" \ "console=ttyO2,115200n8\0" \ "fdt_high=0xffffffff\0" \ + "fdtaddr=0x88000000\0" \ "usbtty=cdc_acm\0" \ "vram=16M\0" \ "mmcdev=0\0" \ @@ -152,7 +154,9 @@ "mmcargs=setenv bootargs console=${console} " \ "vram=${vram} " \ "root=${mmcroot} " \ - "rootfstype=${mmcrootfstype}\0" \ + "rootfstype=${mmcrootfstype}; " \ + "run findfdt; " \ + "fatload mmc ${mmcdev} ${fdtaddr} ${fdtfile}\0" \ "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \ "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \ "source ${loadaddr}\0" \ @@ -162,7 +166,10 @@ "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ "mmcboot=echo Booting from mmc${mmcdev} ...; " \ "run mmcargs; " \ - "bootm ${loadaddr}\0" \ + "bootm ${loadaddr} - ${fdtaddr}\0" \ + "findfdt="\ + "if test $board_name = omap5_uevm; then " \ + "setenv fdtfile omap5-uevm.dtb; fi;\0 " \ #define CONFIG_BOOTCOMMAND \ "mmc dev ${mmcdev}; if mmc rescan; then " \