From patchwork Tue Mar 24 22:34:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dileep Katta X-Patchwork-Id: 46297 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0088A2159D for ; Tue, 24 Mar 2015 22:36:28 +0000 (UTC) Received: by wggy19 with SMTP id y19sf1102377wgg.2 for ; Tue, 24 Mar 2015 15:36:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:cc:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list; bh=ZQExJgS6dIeh2WFQtPnKw38ja+9vhG9N0e8LBTPYFO8=; b=SXG9yNhW2Eyg9dPWKK2U5EBHIp2B/17RI/CLocP5CIiDMniDizTjgFkSYR0j45+apn nc4yIF8zBQUmLwHUAc6Hb08NWndKamP5KO/RUxeEV+oJSP2mZJIht5y+AXefdlEaAlyv hsE6oM/SD8gmaZgxfsrsnPad6UBIcXR9UFPtclAzi0XL4u27UW/CJb8uFbPuoDOgzGge U1t1A8ueqmgB/u6R+nhbnm7cRvJpyCbf6lxeBt7ZFWgut+T/aAUX8i5JkhS+c/pyVzNh EI0hAIyKbVJ3Of55D3ptXAs0/41wPc5jem2Y6yr6YOz/L++36k7PPzYDh/7///NkjbEf h0NQ== X-Gm-Message-State: ALoCoQmLJpgageSeXZU4xzOj0rl/IK3/hDltljiprd023iOEliQE9qtrCsxhRVe1wBG7J4rHJPTL X-Received: by 10.194.201.10 with SMTP id jw10mr1388389wjc.3.1427236587333; Tue, 24 Mar 2015 15:36:27 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.115.211 with SMTP id jq19ls31771lab.32.gmail; Tue, 24 Mar 2015 15:36:27 -0700 (PDT) X-Received: by 10.112.147.200 with SMTP id tm8mr5583410lbb.71.1427236587108; Tue, 24 Mar 2015 15:36:27 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id n5si429097lbk.166.2015.03.24.15.36.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Mar 2015 15:36:27 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by labto5 with SMTP id to5so6005043lab.0 for ; Tue, 24 Mar 2015 15:36:27 -0700 (PDT) X-Received: by 10.112.162.167 with SMTP id yb7mr5609220lbb.76.1427236587022; Tue, 24 Mar 2015 15:36:27 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.57.201 with SMTP id k9csp1734341lbq; Tue, 24 Mar 2015 15:36:26 -0700 (PDT) X-Received: by 10.180.218.200 with SMTP id pi8mr32676325wic.71.1427236586352; Tue, 24 Mar 2015 15:36:26 -0700 (PDT) Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id bo3si1771852wib.21.2015.03.24.15.36.25; Tue, 24 Mar 2015 15:36:26 -0700 (PDT) Received-SPF: none (google.com: u-boot-bounces@lists.denx.de does not designate permitted sender hosts) client-ip=85.214.87.163; Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CA3134B639; Tue, 24 Mar 2015 23:36:24 +0100 (CET) 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 Ab0gCnjw7QfY; Tue, 24 Mar 2015 23:36:24 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6F2E14A03C; Tue, 24 Mar 2015 23:36:24 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AE1134A03C for ; Tue, 24 Mar 2015 23:36:21 +0100 (CET) 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 yQrD-woWXnkE for ; Tue, 24 Mar 2015 23:36: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-pd0-f172.google.com (mail-pd0-f172.google.com [209.85.192.172]) by theia.denx.de (Postfix) with ESMTPS id 422344B652 for ; Tue, 24 Mar 2015 23:36:15 +0100 (CET) Received: by pdnc3 with SMTP id c3so7415361pdn.0 for ; Tue, 24 Mar 2015 15:36:14 -0700 (PDT) X-Received: by 10.68.220.227 with SMTP id pz3mr11582870pbc.72.1427236574054; Tue, 24 Mar 2015 15:36:14 -0700 (PDT) Received: from localhost.localdomain ([106.51.139.45]) by mx.google.com with ESMTPSA id dr5sm353082pdb.48.2015.03.24.15.36.11 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 24 Mar 2015 15:36:13 -0700 (PDT) From: Dileep Katta To: nm@ti.com, trini@konsulko.com, rob.herring@linaro.org, srae@broadcom.com, l.majewski@samsung.com, angelabaker@ti.com, robherring2@gmail.com, u-boot@lists.denx.de Date: Wed, 25 Mar 2015 04:04:52 +0530 Message-Id: <1427236492-18032-3-git-send-email-dileep.katta@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1427236492-18032-1-git-send-email-dileep.katta@linaro.org> References: <1427236492-18032-1-git-send-email-dileep.katta@linaro.org> Cc: Dileep Katta Subject: [U-Boot] [PATCH v3 3/3] fastboot: ARM: OMAP5: Enable reboot-bootloader X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: dileep.katta@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Implemented fb_set_reboot_flag() for OMAP5 to set an environment variable 'dofastboot' when reboot-bootloader called. This environment variable will be checked in boot command and fastboot will be called if the variable is set. If the bootcmd env variable of OMAP5 common is overwritten with board-specific command, then these changes will not apply. This was originally intended for DRA7 platform, but now applies to all OMAP5. Ref: http://git.omapzoom.org/?p=repo/u-boot.git;a=commit;h=19da2e436e9806259cf1f4988b9e046ab256bf2c Signed-off-by: Angela Stegmaier Signed-off-by: Dileep Katta --- Changes in v2: - None Changes in v3: - Changed the implementation to be more abstract - Used environment variable instead of board-specific registers - Moved the code to OMAP5 arch/arm/cpu/armv7/omap-common/boot-common.c | 11 +++++++++++ include/configs/ti_omap5_common.h | 7 +++++++ 2 files changed, 18 insertions(+) diff --git a/arch/arm/cpu/armv7/omap-common/boot-common.c b/arch/arm/cpu/armv7/omap-common/boot-common.c index 17500f2..1aff7c8 100644 --- a/arch/arm/cpu/armv7/omap-common/boot-common.c +++ b/arch/arm/cpu/armv7/omap-common/boot-common.c @@ -162,3 +162,14 @@ void arch_preboot_os(void) ahci_reset(DWC_AHSATA_BASE); } #endif + +#ifdef CONFIG_CMD_FASTBOOT +int fb_set_reboot_flag(void) +{ + printf("Setting reboot to fastboot flag ...\n"); + setenv("dofastboot", "1"); + saveenv(); + udelay(60); + return 0; +} +#endif diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h index cd92454..c5d97ea 100644 --- a/include/configs/ti_omap5_common.h +++ b/include/configs/ti_omap5_common.h @@ -141,13 +141,20 @@ "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile};\0" \ DFUARGS \ + #define CONFIG_BOOTCOMMAND \ + "if test ${dofastboot} -eq 1; then " \ + "echo Boot fastboot requested, resetting dofastboot ...;" \ + "setenv dofastboot 0; saveenv; sleep 1;" \ + "echo Booting into fastboot ...; fastboot;" \ + "fi;" \ "run findfdt; " \ "run mmcboot;" \ "setenv mmcdev 1; " \ "setenv bootpart 1:2; " \ "setenv mmcroot /dev/mmcblk0p2 rw; " \ "run mmcboot;" \ + "" /*