From patchwork Mon May 22 16:16:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 100310 Delivered-To: patch@linaro.org Received: by 10.182.142.97 with SMTP id rv1csp1467996obb; Mon, 22 May 2017 09:17:52 -0700 (PDT) X-Received: by 10.80.169.91 with SMTP id m27mr18526423edc.31.1495469872145; Mon, 22 May 2017 09:17:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495469872; cv=none; d=google.com; s=arc-20160816; b=lKbEzmK6nQMtsgNUhi0IncfJnpnoI8AAlD2DXAZy0H2BdRf02bGmi4VHBaBTbj6jJf 17tRv5+t60RlAEYl6JtACqXbfD7Z8nue2sA/FXlw6a1hEUWsmUfZ0lTA8u+PB9RaL4dm QQxle9F/51TI8n9wZaybGxdPlafVAb4/osYyH3lFg3WKTVQoDhvBELHtBIG6+IXn/bp+ CYuHxZS6TEqqAGdb2MfrNa6cyfEjnRDEBT3yTq+/Q+tebMuTXRczG9XT1qDa2QepJOwK nqcB+DwLZBiTinfYyHZ3i05GQnCdAGYlYtJ1Mx2VIb6GIK4cMh0225XhlLqb4GAXwqvr 37CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=Ayo4jrsqLy2kll/7Hin2IGvkULjV7+SNi1IZcquCDa8=; b=VBmcWCChpt/OT+QfhvU9dXbaDMNvvrusSQd5QzK7H9oYkGceSNfKoMu1k80flRp9iq VNvGpGywjBKOQGdSJvOF8wriRrB8LvMHCRmH8aZ6C89OQgPHZ8h149v1zNrOJBlmq6f2 +SMbbFo3U/HjZN9Php2Fdcbn8d2nttZClHmbl+it1pNeGh5xR+AqQLGYyuN3o3/+4wbA ZkUIio2SGF5+lRO6Ra295cyGIVqXMPq7m40IKRs0ogbQfOV84sou/5Oign2H1/+2KmP3 CGi1KzbBWu2HqeIkHwPnxElnnBq5975n5pxXS9Umf52JzfsnCdFctXnD5bS0+z88pxBz 2j6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; 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=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id d33si16881804edd.290.2017.05.22.09.17.51; Mon, 22 May 2017 09:17:52 -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=@linaro.org; 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=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 66FBAC21C92; Mon, 22 May 2017 16:17:30 +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=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 B2346C21C82; Mon, 22 May 2017 16:17:00 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 3B0D6C21CA6; Mon, 22 May 2017 16:16:49 +0000 (UTC) Received: from mail-lf0-f54.google.com (mail-lf0-f54.google.com [209.85.215.54]) by lists.denx.de (Postfix) with ESMTPS id DCF5CC21C6D for ; Mon, 22 May 2017 16:16:46 +0000 (UTC) Received: by mail-lf0-f54.google.com with SMTP id h4so34116121lfj.3 for ; Mon, 22 May 2017 09:16:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DAs56OZ6FR3kNQxmYjtzrs2DKz/mdQ6gQuqgEo+peN4=; b=IldsNXomCA0m+j8SB3HYnHOj7/BAObYY4Ko+8FwabHxNQaeHIf8rtDh+A86/kR5D9U GsW1loy8Bk3HPd48TVVH1RVGB4uSdXfyebDQex9Yhv4IaYh9tK1qxWXD5RTF6FL8x82c xCmhi/8P+4XuOwJ1MXT+6Ucoh4C+E2hzZRNC4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DAs56OZ6FR3kNQxmYjtzrs2DKz/mdQ6gQuqgEo+peN4=; b=Cs2p7CCKYnqiNBVICcR/78vw136BI4wt46X7C4UvsnKIXRphqsK0N7Rw4xIEbSrmh+ uV0z70/6Vre8aSGl8UHkkBxcZ0hoaoOy4H3W2Msahk21NFHjuofzGxo+Ih+GoumUMjUB 6RodMy0KZe9Hg2Ig/XwMI9ug0IGbZAiZaybtYyCg9sg5osLCOhl/ALQ3P1PKSNKfSZLM oF1W0BUjMrAuMIbsJSx2zzX2Ae6fHIr83mXE5fTzHKYzb0nwpKhvKWiDEV6BNYZLeIjf 9ldD0ScBpHpqipgPAGBNDI6Gs/qmQDJSoKokuYORKxyVHrE1KmbPVqzwQuHZNX+FCFYn Vk8w== X-Gm-Message-State: AODbwcBzlPyU+fybRoQ1wYc0S+pXoPROJWfsWAKjAls1dX0EYHnlT9qj XARAkwKcL2E+5Wmy X-Received: by 10.46.21.21 with SMTP id s21mr6298748ljd.98.1495469806431; Mon, 22 May 2017 09:16:46 -0700 (PDT) Received: from localhost ([195.238.92.132]) by smtp.gmail.com with ESMTPSA id e10sm3219891ljb.68.2017.05.22.09.16.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 May 2017 09:16:45 -0700 (PDT) From: Sam Protsenko To: u-boot@lists.denx.de Date: Mon, 22 May 2017 19:16:40 +0300 Message-Id: <20170522161642.13058-2-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170522161642.13058-1-semen.protsenko@linaro.org> References: <20170522161642.13058-1-semen.protsenko@linaro.org> Cc: Praneeth Bajjuri , Tom Rini Subject: [U-Boot] [PATCH v2 1/3] omap: Add routine for setting fastboot 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This patch reuses new option, which allows us to expose variables from environment to "fastboot getvar" command. Those variables must be of "fastboot.%s" format. Signed-off-by: Sam Protsenko --- Changes in v2: - use get_device_type() instead of omap_get_cpu_type() - guard omap_set_fastboot_vars() with CONFIG_FASTBOOT_FLASH - use correct board names arch/arm/include/asm/omap_common.h | 6 ++ arch/arm/mach-omap2/utils.c | 115 +++++++++++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+) diff --git a/arch/arm/include/asm/omap_common.h b/arch/arm/include/asm/omap_common.h index c1a70b15d0..a4bfa0c451 100644 --- a/arch/arm/include/asm/omap_common.h +++ b/arch/arm/include/asm/omap_common.h @@ -643,6 +643,12 @@ void omap_die_id_get_board_serial(struct tag_serialnr *serialnr); void omap_die_id_usbethaddr(void); void omap_die_id_display(void); +#ifdef CONFIG_FASTBOOT_FLASH +void omap_set_fastboot_vars(void); +#else +static inline void omap_set_fastboot_vars(void) { } +#endif + void recalibrate_iodelay(void); void omap_smc1(u32 service, u32 val); diff --git a/arch/arm/mach-omap2/utils.c b/arch/arm/mach-omap2/utils.c index 2d03ebfbd3..1d0b63350a 100644 --- a/arch/arm/mach-omap2/utils.c +++ b/arch/arm/mach-omap2/utils.c @@ -18,6 +18,121 @@ static void do_cancel_out(u32 *num, u32 *den, u32 factor) } } +#ifdef CONFIG_FASTBOOT_FLASH +static void omap_set_fastboot_cpu(void) +{ + char *cpu; + u32 cpu_rev = omap_revision(); + + switch (cpu_rev) { + case DRA752_ES1_0: + case DRA752_ES1_1: + case DRA752_ES2_0: + cpu = "DRA752"; + break; + case DRA722_ES1_0: + case DRA722_ES2_0: + cpu = "DRA722"; + break; + default: + cpu = NULL; + printf("Warning: fastboot.cpu: unknown CPU rev: %u\n", cpu_rev); + } + + setenv("fastboot.cpu", cpu); +} + +static void omap_set_fastboot_secure(void) +{ + const char *secure; + u32 dev = get_device_type(); + + switch (dev) { + case EMU_DEVICE: + secure = "EMU"; + break; + case HS_DEVICE: + secure = "HS"; + break; + case GP_DEVICE: + secure = "GP"; + break; + default: + secure = NULL; + printf("Warning: fastboot.secure: unknown CPU sec: %u\n", dev); + } + + setenv("fastboot.secure", secure); +} + +static void omap_set_fastboot_board_rev(void) +{ + const char *board_rev; + + board_rev = getenv("board_rev"); + if (board_rev == NULL) + printf("Warning: fastboot.board_rev: unknown board revision\n"); + + setenv("fastboot.board_rev", board_rev); +} + +#ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV +static u32 omap_mmc_get_part_size(const char *part) +{ + int res; + struct blk_desc *dev_desc; + disk_partition_t info; + u64 sz = 0; + + dev_desc = blk_get_dev("mmc", CONFIG_FASTBOOT_FLASH_MMC_DEV); + if (!dev_desc || dev_desc->type == DEV_TYPE_UNKNOWN) { + error("invalid mmc device\n"); + return 0; + } + + res = part_get_info_by_name(dev_desc, part, &info); + if (res < 0) { + error("cannot find partition: '%s'\n", part); + return 0; + } + + /* Calculate size in bytes */ + sz = (info.size * (u64)info.blksz); + /* to KiB */ + sz >>= 10; + + return (u32)sz; +} + +static void omap_set_fastboot_userdata_size(void) +{ + char buf[16]; + u32 sz_kb; + + sz_kb = omap_mmc_get_part_size("userdata"); + if (sz_kb == 0) { + buf[0] = '\0'; + printf("Warning: fastboot.userdata_size: unable to calc\n"); + } else { + sprintf(buf, "%u", sz_kb); + } + + setenv("fastboot.userdata_size", buf); +} +#else +static inline void omap_set_fastboot_userdata_size(void) +{ +} +#endif /* CONFIG_FASTBOOT_FLASH_MMC_DEV */ +void omap_set_fastboot_vars(void) +{ + omap_set_fastboot_cpu(); + omap_set_fastboot_secure(); + omap_set_fastboot_board_rev(); + omap_set_fastboot_userdata_size(); +} +#endif /* CONFIG_FASTBOOT_FLASH */ + /* * Cancel out the denominator and numerator of a fraction * to get smaller numerator and denominator. From patchwork Mon May 22 16:16:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 100309 Delivered-To: patch@linaro.org Received: by 10.182.142.97 with SMTP id rv1csp1467789obb; Mon, 22 May 2017 09:17:23 -0700 (PDT) X-Received: by 10.80.213.215 with SMTP id g23mr17731246edj.149.1495469842934; Mon, 22 May 2017 09:17:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495469842; cv=none; d=google.com; s=arc-20160816; b=lbdMlfYpktXxqQecFLW60PGGeT3zC8b2RiMB5HSOJNcGnM2VRW2NHYM8ZLUdw/8AEQ FaJvHYsnRqgqFAZ9xxB/qR2+zEtW2pUbRp4DE5gYklp2Syvh6pu0DL1UDThPZGoGG74F NH/U8g3vrXCEln3c4W646pGrGv6yf6UtKyS2nkfzoGoJbXVG76wYQMLiWw139HTCHzhs OG+z2MupVNqKLU2yU7Du58IuTUlfQ1yoiJapNWA2Qp5fyqXyDrX/iZbNUkHXvW4kZvNG m6Gs9lDJ0QFt5GYAh9e4KFXxYCMUN2gwpNrxYQqmuo2gKxhv656exB8SkUCBwGFB2Beh NCUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=f+nU9HhaUFf0t2013e2JaUkdGXB4jl/BRYKv3Min+3k=; b=tiiI+n4QW99CNDtoWiePj4rUalpAVOaXvN8MGlj4o19hFXgu0CQkxJPOws9hTs6s6J QLV8FRuQP2Sn9Y+4tI9/sH0ntum3IA/ZrDQVt6bOarhcrV9Dqek1Bhks3lWGf4/9l8/o zgqcblPBXMkjg893idLtDfFPGQblIixuAqtmFxFKUcQFX1z8jGt+zk6JZLA3SIRx+0wl crCQZ5LF2ZveJtEl9zxZTwtkI56sxPJbSDXHMvFZYvuP17q3Vq2eXk2LThuJgxiZVXPY ODMZjs+BQ66DNa2nstoPoxvQ1SrRyBm4itXuBWtRyQi0h7jV5tMY7TBkSvd0g24C11Yr 8QcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; 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=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id m7si16107349edc.118.2017.05.22.09.17.22; Mon, 22 May 2017 09:17:22 -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=@linaro.org; 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=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 77FBDC21CD9; Mon, 22 May 2017 16:17:05 +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=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 B7406C21CD2; Mon, 22 May 2017 16:16:57 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 4E9CAC21CD9; Mon, 22 May 2017 16:16:51 +0000 (UTC) Received: from mail-lf0-f51.google.com (mail-lf0-f51.google.com [209.85.215.51]) by lists.denx.de (Postfix) with ESMTPS id 8ECAAC21C9E for ; Mon, 22 May 2017 16:16:48 +0000 (UTC) Received: by mail-lf0-f51.google.com with SMTP id h4so34116526lfj.3 for ; Mon, 22 May 2017 09:16:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Keb87wqcxfSV8dQZK/lFvuVF8L0xDJua69VxnsrPiAA=; b=A2dJWOm9ljrTulVOW9jSTyBUHntNS/eovHoSSiC3SrdzkjVlH37SWkTC4RLAkylcBN nCAoZSef/qwJ/hxPXnuxkwD3k9J6uIwwee2p20Nrjx7o12OIGE9hS16ImBRpvK8o24oS zj0PSVYalEqUb3WFMu/QyB9e/ymnEk9qQVR5c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Keb87wqcxfSV8dQZK/lFvuVF8L0xDJua69VxnsrPiAA=; b=WjGzv+zrsu3xyhOgMSqXiAR9UhVQ/9qjEtmTPfLSzOmY1UeB9grIAwYybL4LUf4lHq 0PEJtQ/MfnCnER0t0VgvH6rXZV++Vp5WGNYanqQjubYOoqcW6kOYh0wKxwxqcLywBFpd szUS4bb1gazfJv0SoFbbWTcGIsElF0umYpYthiTO/nLEFqzAfyLNHMTZFMh1QawfeNxB rtTlLDDRnZ0hSTz/NR10l3acGqsZgTOim5TyoLxovzYGsI3kNyjkos0Fdf8HkhAHtoYZ cXypfEI2Xq2DAkgpObNmNMMRYiREQA+Y+8gWgn4I6ZdtwCm3orA/V13ifAhi57S3Tn5D z/Lw== X-Gm-Message-State: AODbwcC6RzCaW0+nMowVXt72M/nOjrumw7xI8nFc0iZ45TIu6QNedCVs r+ZjsbuvHzjlofwc X-Received: by 10.46.69.84 with SMTP id s81mr6479095lja.41.1495469808169; Mon, 22 May 2017 09:16:48 -0700 (PDT) Received: from localhost ([195.238.92.132]) by smtp.gmail.com with ESMTPSA id x78sm2712697lfd.41.2017.05.22.09.16.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 May 2017 09:16:47 -0700 (PDT) From: Sam Protsenko To: u-boot@lists.denx.de Date: Mon, 22 May 2017 19:16:41 +0300 Message-Id: <20170522161642.13058-3-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170522161642.13058-1-semen.protsenko@linaro.org> References: <20170522161642.13058-1-semen.protsenko@linaro.org> Cc: Praneeth Bajjuri , Tom Rini Subject: [U-Boot] [PATCH v2 2/3] arm: am57xx: Set fastboot variables in environment 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" One can obtain those variables using next commands: $ fastboot getvar cpu $ fastboot getvar secure $ fastboot getvar board_rev $ fastboot getvar userdata_size Those variables are needed for fastboot.sh script. Signed-off-by: Sam Protsenko Reviewed-by: Tom Rini --- Changes in v2: None board/ti/am57xx/board.c | 1 + 1 file changed, 1 insertion(+) diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c index 3be697a6ea..c8ebcdbcc8 100644 --- a/board/ti/am57xx/board.c +++ b/board/ti/am57xx/board.c @@ -573,6 +573,7 @@ int board_late_init(void) val); omap_die_id_serial(); + omap_set_fastboot_vars(); am57x_idk_lcd_detect(); From patchwork Mon May 22 16:16:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 100311 Delivered-To: patch@linaro.org Received: by 10.182.142.97 with SMTP id rv1csp1468447obb; Mon, 22 May 2017 09:18:52 -0700 (PDT) X-Received: by 10.80.150.38 with SMTP id y35mr18303836eda.79.1495469932585; Mon, 22 May 2017 09:18:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495469932; cv=none; d=google.com; s=arc-20160816; b=AcBei4T8s0uiiS0EkKxiAXotpp1epVF+vta8tSooTh2c98ztOFtbxIHZCund0BJ8UH qdERUYUivJTjPoYKiq9OtP/tZfVSgZk7zR7pdoF1uEAApRw3kC35x+DxAvtwsDsNwVn7 M0gxHvtVa76Eq6EXJKTSAopbl7KAxCkk+umlds/qttAEB8kN4YnvHeTih2P0hkAmn377 x/DyZBN4v9bdphXHzG9STIjtvlw5Ey8wY+9ccr1Bl/318zTNF3IR7Qmk4J4HX9XMog+x zaWmbe4lrTNvS+9eWWRd8Qcpbtc4rMEHcSJcd6bvFYqCm3xeC6HDUXsZTWqZe21krt3q JitA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=p5Jz5KJNopjvJzmJbL/ejmlVki3TzDmLg1P9pQqTTEI=; b=Nv1hkoPio13ZJiwPZyNG4f8TaqLhjbiKSrQ/O8yuJ/ZJ0kb6fJHh6foyzinGl3WVOT fXR+T7d4FR0ZmGB5KJ4ZQDCVkdbGL5P9R4Cths6KHLjToi2CzgPsRG2Fk5nQeGRuCLJs Wl4XEGqPmq6ix1fifHz9dsWNPIBeXrTBOfYE4MrnBP01H2fMyIQGvWizJn7VCvlSkaDu QWK3B/gZ7N5TAg0xBUE37OmvEmjwzIFvuK2DGaDlx04pXmX3HdDl+V2Nl+W6kZI6kbVI 7IBzslsKcrrMhGMzilSgGJcnhSJn8m5NSp0nytgRD7qDE4mJinJtKNfncKZ2IX0XJASl LXEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; 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=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id z91si17057085ede.319.2017.05.22.09.18.52; Mon, 22 May 2017 09:18:52 -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=@linaro.org; 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=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 18BD4C21C7A; Mon, 22 May 2017 16:17:49 +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=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 9702EC21CA6; Mon, 22 May 2017 16:17:15 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 24309C21CA5; Mon, 22 May 2017 16:16:53 +0000 (UTC) Received: from mail-lf0-f50.google.com (mail-lf0-f50.google.com [209.85.215.50]) by lists.denx.de (Postfix) with ESMTPS id 5AEDEC21CA2 for ; Mon, 22 May 2017 16:16:50 +0000 (UTC) Received: by mail-lf0-f50.google.com with SMTP id m18so34081146lfj.0 for ; Mon, 22 May 2017 09:16:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kjfIGFWCOKyxqAwmpNT2hmlyRI7Nm9K80xGX9WlbFiI=; b=N8hP4aYanVk9Uawq0ahbtZZOgK7OnaG1C5xy7J75HVBhiR/Ocphz71PY51QwPabHgV eyfSGWN2uHNKhlPPcbrEznDApDxaOBQfQCVbswEwCH/lA/s+61GAwebimsIaDvjnu9VS RVXKw/Sdy8CrBjasvVqRmAgeYVbimyAFjv4KA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=kjfIGFWCOKyxqAwmpNT2hmlyRI7Nm9K80xGX9WlbFiI=; b=E51/zQOlQOUuHpFDDZ059BFlsQYRGFOh8CvE2wC/tjSit3kL7OW+JuKaRL6hw+dxKh gxLBEVVta5kSnGQ0E6tVZ20Nw5UYTsuzCyej11TMboPC10R5lC1ss8P3td9pBFwXYXal B/PKu4oY+TSLXNpzb+ZMdS4QKm/g3lFZ7e3H3c941TkIOhXbq8milfxPNR9CYz+/QfGq vUodqc1wM/52qhJUbfSWs5RFUCQDDRLdBklK4zmMbp1TQOsVcerk0WLnDBVm7orP1cYJ GGaJoNh92Jum9xFRXmWoDfSraW3jD6gaIJJ9O6r7VAEc7cehqrj133CD9R2gBy19/Znu 4lcw== X-Gm-Message-State: AODbwcCCkt/zRG5QlOTjVWteb7vWmrgotpFoxJcg62E9Oc1vSbIPvMfc byem4A4zfMWKpKDF X-Received: by 10.46.32.83 with SMTP id g80mr5630992ljg.99.1495469809939; Mon, 22 May 2017 09:16:49 -0700 (PDT) Received: from localhost ([195.238.92.132]) by smtp.gmail.com with ESMTPSA id 139sm3224784ljj.16.2017.05.22.09.16.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 May 2017 09:16:49 -0700 (PDT) From: Sam Protsenko To: u-boot@lists.denx.de Date: Mon, 22 May 2017 19:16:42 +0300 Message-Id: <20170522161642.13058-4-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170522161642.13058-1-semen.protsenko@linaro.org> References: <20170522161642.13058-1-semen.protsenko@linaro.org> Cc: Praneeth Bajjuri , Tom Rini Subject: [U-Boot] [PATCH v2 3/3] arm: dra7: Set fastboot variables in environment 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" One can obtain those variables using next commands: $ fastboot getvar cpu $ fastboot getvar secure $ fastboot getvar board_rev $ fastboot getvar userdata_size Those variables are needed for fastboot.sh script. Signed-off-by: Sam Protsenko Reviewed-by: Tom Rini --- Changes in v2: None board/ti/dra7xx/evm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index 8c02addd08..7d36f03fa1 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -561,6 +561,7 @@ int board_late_init(void) setenv("boot_fit", "1"); omap_die_id_serial(); + omap_set_fastboot_vars(); #endif return 0; }