From patchwork Thu May 18 13:01:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 100093 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp708441qge; Thu, 18 May 2017 06:01:44 -0700 (PDT) X-Received: by 10.80.195.195 with SMTP id i3mr3094903edf.83.1495112504814; Thu, 18 May 2017 06:01:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495112504; cv=none; d=google.com; s=arc-20160816; b=YJNRFPyVT7/o2MIQuyJxXl0qNF6PewC44bvtxccH7ZRaE3NkJdABKIiwRSy4/DPG// 5oHpE3Bd2BgR7M3TQDgf7ziZM09s/TIiE4o3J60WgzJHWlf3KQ9o9tS7fGgenUsmYSjh Imjza1HNSh25OlYuUlo9P69nUHH5RsECE1ShfSEK8tx2ZfyrGopE6gk58nA6/JH0GAIt Xa6Vwn8KpDswHpsacedgNxxtFYhHGk/TRVmSbCcqz9AMGqicBzA/i2/k0twl/Ej//lQG LiatbxQ8ESPG9todO6uuX7biQG2IK78QlcnpBRRND1dVvLPs1SEMAp4ZWytZ/n6X8BaX tYRQ== 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=zdW6lwzqwut6kspla+0GDqlnSExBzLUv2yC0pN3xJOs=; b=xY5BSY7d0HqYmsAOmV38xA91F9hlLm5rOvaw0G0ovwPr/nWE2xY6bXNn4gRvqaNn0W PP0m8nUoQVNbeAgTn8l/Y4CTRjd4Nl5Fg2P69zaV9CzUszhvMQTKK1cpir6xTiMHChLW 8NfUqDOOzHA3jmyjU3ulXqrVkm192bav5emmO9Ndpub6RoN3MD53Q6TyVO42h9rhO0Rn HkbEIrrGioZ0Na1VVv2U1O6QDrGDNn46XStQNUPf+oGzwWPHMpW+HhKN1Oe6jV5UMhH+ ZWINpuot3JMo/NLekIMJHKiDGccasteuiLjrPkj2x0oWS+JT1qofRUF72YpcJ/qAZ6OT sgyw== 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 p51si5731893eda.61.2017.05.18.06.01.44; Thu, 18 May 2017 06:01:44 -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 0E1AAC2249A; Thu, 18 May 2017 13:01:29 +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_H2, 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 82979C22223; Thu, 18 May 2017 13:01:11 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B675AC21BE6; Thu, 18 May 2017 13:01:09 +0000 (UTC) Received: from mail-wr0-f181.google.com (mail-wr0-f181.google.com [209.85.128.181]) by lists.denx.de (Postfix) with ESMTPS id 3CEBFC21DAA for ; Thu, 18 May 2017 13:01:09 +0000 (UTC) Received: by mail-wr0-f181.google.com with SMTP id l9so33573607wre.1 for ; Thu, 18 May 2017 06:01:09 -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=oQvi5szXCO5MNYNgij+45TswYqFZvUTtVhb6WsIUbSA=; b=Yv945wp1FfVeNYu0eclHMDgSk9IjtmbMfD4pr5lzUuMn6TAoMSkxiSzelQH/UH4Kln H876W+2EWfVAyD+RdAWxeNpx0JF/vf4CZyqeTuMMZFO+Z9zktvZJejWtuj40EhdHIrUN 2fmXyhQ47hzGiSDMBA+Q7qSzcRhxR8/JSd+Pk= 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=oQvi5szXCO5MNYNgij+45TswYqFZvUTtVhb6WsIUbSA=; b=mMs/xupFvlKdwU5nLeD1b8mA7x1/uRGLSz5cH5VUviVLZWaki6lflj3M1TnGyR5uBD 45ytz7QhM0vLojSaMN6bn4pI0CKTEpI6GMYNvAEgDYjnGAFNbuuUeKEdKepxhdCobuEW CZ6OiKA/w+5Wds1p66QUzp/DnLm0nqdwbFfbXBAy1v4A/xkGafynWzSP9ByZe1g9F6rv 3HJyp5JA8r0Dm8KTUyiIRGEatIbJ3YlZ8mk/2L34MfBMvgqDZzNGA1Yx0zKh5bX2B2Oc 1/F67+t2qC7v9mRw6eOwrvkNt3uQQXasKRK4xakqqTXsvhAstlqRMJjAN5qkPaSrvVqW 54Fg== X-Gm-Message-State: AODbwcBDOHpkCX3TQdTpoXLy9NYsKQVWsh7EVKvJpMc87EnW9hAvnexl 1CSSOqCXnfJhZu6845+6lA== X-Received: by 10.46.20.81 with SMTP id 17mr1239527lju.19.1495112468549; Thu, 18 May 2017 06:01:08 -0700 (PDT) Received: from localhost ([195.238.92.132]) by smtp.gmail.com with ESMTPSA id t4sm922153ljd.1.2017.05.18.06.01.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 May 2017 06:01:07 -0700 (PDT) From: Sam Protsenko To: u-boot@lists.denx.de Date: Thu, 18 May 2017 16:01:00 +0300 Message-Id: <20170518130102.6820-2-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170518130102.6820-1-semen.protsenko@linaro.org> References: <20170518130102.6820-1-semen.protsenko@linaro.org> Cc: Praneeth Bajjuri , Tom Rini Subject: [U-Boot] [PATCH 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 --- arch/arm/include/asm/omap_common.h | 2 + arch/arm/mach-omap2/utils.c | 134 +++++++++++++++++++++++++++++++++++++ 2 files changed, 136 insertions(+) diff --git a/arch/arm/include/asm/omap_common.h b/arch/arm/include/asm/omap_common.h index c1a70b15d0..cede2f7b28 100644 --- a/arch/arm/include/asm/omap_common.h +++ b/arch/arm/include/asm/omap_common.h @@ -643,6 +643,8 @@ void omap_die_id_get_board_serial(struct tag_serialnr *serialnr); void omap_die_id_usbethaddr(void); void omap_die_id_display(void); +void omap_set_fastboot_vars(void); + 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..0689c879b0 100644 --- a/arch/arm/mach-omap2/utils.c +++ b/arch/arm/mach-omap2/utils.c @@ -6,6 +6,16 @@ */ #include #include + +/* Device type bits in CONTROL_STATUS register */ +#define DEVICETYPE_OFFSET 6 +#define DEVICETYPE_MASK (0x7 << DEVICETYPE_OFFSET) +#define OMAP_TYPE_TEST 0x0 +#define OMAP_TYPE_EMU 0x1 +#define OMAP_TYPE_SEC 0x2 +#define OMAP_TYPE_GP 0x3 +#define OMAP_TYPE_BAD 0x4 + static void do_cancel_out(u32 *num, u32 *den, u32 factor) { while (1) { @@ -18,6 +28,122 @@ static void do_cancel_out(u32 *num, u32 *den, u32 factor) } } +static const char *omap_get_cpu_type(void) +{ + u32 type; + + type = readl((*ctrl)->control_status); + type &= DEVICETYPE_MASK; + type >>= DEVICETYPE_OFFSET; + + switch (type) { + case OMAP_TYPE_EMU: + return "EMU"; + case OMAP_TYPE_SEC: + return "HS"; + case OMAP_TYPE_GP: + return "GP"; + default: + return NULL; + } +} + +static void omap_set_fastboot_cpu(void) +{ + u32 cpu_rev; + char *cpu; + + cpu_rev = omap_revision(); + + switch (cpu_rev) { + case DRA752_ES1_0: + case DRA752_ES1_1: + case DRA752_ES2_0: + cpu = "J6"; + break; + case DRA722_ES1_0: + case DRA722_ES2_0: + cpu = "J6ECO"; + break; + default: + cpu = NULL; + printf("Warning: fastboot.cpu: unknown cpu type %u\n", cpu_rev); + } + + setenv("fastboot.cpu", cpu); +} + +static void omap_set_fastboot_secure(void) +{ + const char *secure; + + secure = omap_get_cpu_type(); + if (secure == NULL) + printf("Warning: fastboot.secure: unknown CPU type\n"); + + 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 + /* * Cancel out the denominator and numerator of a fraction * to get smaller numerator and denominator. @@ -111,3 +237,11 @@ void omap_die_id_display(void) printf("OMAP die ID: %08x%08x%08x%08x\n", die_id[3], die_id[2], die_id[1], die_id[0]); } + +void omap_set_fastboot_vars(void) +{ + omap_set_fastboot_cpu(); + omap_set_fastboot_secure(); + omap_set_fastboot_board_rev(); + omap_set_fastboot_userdata_size(); +} From patchwork Thu May 18 13:01:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 100094 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp708934qge; Thu, 18 May 2017 06:02:39 -0700 (PDT) X-Received: by 10.80.195.195 with SMTP id i3mr3098621edf.83.1495112559887; Thu, 18 May 2017 06:02:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495112559; cv=none; d=google.com; s=arc-20160816; b=dfuXcU2FJ2sbpCfwmZO5ig1bJVbuJsg84gdrJCYJMEgxaFVjkaQ9jKOW8GIDpg0DCw AZWPdxJAKOQoh7zxV9Oqn6c6wCTKF1IEvw1KBLuFRNn4feR+ITWI7OcL5iUXlKYJo08E EsDSy0OC8LYVrPzIDHS3FoUAxVCB0KiS9vxjtWrFh5xEE+jd1wZLmdPkPPic6fA2VuJE d0BBvrge1TzEL4e3QiAHc81EJ9yf/H0z4kgAd9MFpaqx7pc/wDiI+s7SUFtQalS1/YhH 78RDx/9Riv2Hs/wjqYux0dgQtSxD4yLcpOCt76l+LuKHdcBTfzV7to9x+CER/8bb+3j3 d0Dw== 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=nrFP9KLY9B1j5n4IQ2rNPyyGanzJHImYhZ3E4HBYPpA=; b=MN1dOusS8PY1KBzYzsPtpv1Ka77ntgNJe1QKBQWX1bNAhGpS/8IFbqia1dUaoQjVxC 2+OohDV2zeLRkbvkMYoSxP5yZyPO028MV7PzYw51QOw1gDN+XUpeOE0dId2+ERHPBylI D5hJYGEGY3XjzR6pavpUe/eU2KPFbYwUjt8s2Tc7Ck2UR9HgDlUjJUZwj35Q65uw8i8D FvF27gg4gdpqjqbcGUTbcOfDXTlHSc9rbtUPIx4E/zWguKRy08/jowKgHgSwXwf707Jp fpIl3WuTt5fg9hDbByaU8d+7bHmw0tp0b6qyYP3nFQLla8Eic0jkCK0CJu+UP4qcn+Mw HnHw== 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 o30si4927048edd.306.2017.05.18.06.02.39; Thu, 18 May 2017 06:02:39 -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 1661CC22334; Thu, 18 May 2017 13:01:50 +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 640A1C224A8; Thu, 18 May 2017 13:01:15 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6C7CCC22481; Thu, 18 May 2017 13:01:13 +0000 (UTC) Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by lists.denx.de (Postfix) with ESMTPS id BE5FDC21F8B for ; Thu, 18 May 2017 13:01:10 +0000 (UTC) Received: by mail-wm0-f52.google.com with SMTP id b84so201076287wmh.0 for ; Thu, 18 May 2017 06:01:10 -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=E3cqUe3n5V1KcL2Z/TPVX/aYy75A2ogtMfznC18g2O0=; b=UpWYILUOCH+FiemJG5Tm82unpjNAT2YQcO7i8dLAMOurd8HJA/ymW3fwxlvXMUWBlK W9J+x2CXMoULKoo8FHKiz0eye/JApLZ4Ia1KLmcZehz/PbbUZAABnlWNpEqUqfC7UqQm PlRPAIrbCWViAvFCGv3GcAANdcyxhiUZ4JhrQ= 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=E3cqUe3n5V1KcL2Z/TPVX/aYy75A2ogtMfznC18g2O0=; b=co9njNk5J8TPTdMMXbN0Al4EzlVruIzml+rHT8p1jo1Sr5W9kxQb2w7G688GK+VxDQ agFAzJ51PYXaINyvgrifR/gMX+uZG7AsRmbiv4PEJLY9C3inX34UxwJzklOb34IYsaqI Pth2hzmMnVFms7dG5mvWYAXoqFouZNSJVL64PPQHD8FyZMcqLm2dSp5df8XEqfQOmX7I alm0MoYH7+0YXW+rq+IACZoxRSpfX7eaFlnSrZWYfYBGPHSzntwuA8iqXet2gmTF9dKB NciUJmgd/CIMZunk4XB1DGCX8pV3qTNChR0oi/NxLH95K2jULTgo5o7t6vh9h4jzxeMi e+xw== X-Gm-Message-State: AODbwcB53+oG23YG6si/lkYLmcfJGqwzjt0qJg5qY16r5l8kPWri/MlW 3RV4iVXluzj+Paro X-Received: by 10.25.206.211 with SMTP id e202mr928844lfg.127.1495112470367; Thu, 18 May 2017 06:01:10 -0700 (PDT) Received: from localhost ([195.238.92.132]) by smtp.gmail.com with ESMTPSA id 3sm935293ljb.60.2017.05.18.06.01.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 May 2017 06:01:09 -0700 (PDT) From: Sam Protsenko To: u-boot@lists.denx.de Date: Thu, 18 May 2017 16:01:01 +0300 Message-Id: <20170518130102.6820-3-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170518130102.6820-1-semen.protsenko@linaro.org> References: <20170518130102.6820-1-semen.protsenko@linaro.org> Cc: Praneeth Bajjuri , Tom Rini Subject: [U-Boot] [PATCH 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 --- 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 Thu May 18 13:01:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 100095 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp709118qge; Thu, 18 May 2017 06:03:03 -0700 (PDT) X-Received: by 10.80.186.110 with SMTP id 43mr3218364eds.104.1495112583666; Thu, 18 May 2017 06:03:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495112583; cv=none; d=google.com; s=arc-20160816; b=ptUUcuSSGAEjcRvhzVm+oUxyBIzeDtc8awyIpOrTrWLNpMArtM8TznKjLkf1k6LPQf eb0mpgJfAmB87q1rPaYIgcFjOLsU4cYBq9K2q48HYI45UPbt7t5K8D4WZ28wozG79so4 nJEVa61fHzu0Sb+q0IYjUu6l6Y16Z3jU5kAXgkJwPS78ZeJYzOqk1U9WR31o3KM8sixd CF0o/mtzs5QV0DLoIWGfM3XAHDZda4v+dEwE12N8Nim1ukik088FjLOkBi0eHMgNMHE8 E14vE+lW0OQWYUnqc7tz9fcri8uecoSWQyoONy8oGB/SsaOwC4JYC3pIdPEie48zzEJY PLXg== 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=RIni7x9FA0MUeV09PChHnWXW5de2WJT6ocLLa4of5Oo=; b=Skcm0CtWm0yjEhpcJKk/kqCjmVRaO7LwVtQghg6VAdtCQyQveyZd5gLO7NcGQ+4twy KBcicRYsz+7794CZB1ebXd24x7IoZcCiYEpyaJlq+6kKLWp5ItPHS4vc/Wu4kMaV2oFm szNmzTyL+McXHITkeThHYhOakdpwm6xfw8v/ndtvaPlLYJ5wsL9ZoY/J7Eco0uCMSExq CNcD/rch92bVwsj0j4kIo5Zh7tzM7pja/zHxu/K7LxR6c5loGTs01iImW9+Keb5eoCHI jvGn5zkuvacE02QynuWq/jGNmxenAl1OJKft8btYU5AIWcUy1JkOKdOokDnyckQsHPrT rSLQ== 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 b45si5502332edc.76.2017.05.18.06.03.03; Thu, 18 May 2017 06:03:03 -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 2F4D1C224A8; Thu, 18 May 2017 13:02:14 +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_H2, 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 41EB0C2233C; Thu, 18 May 2017 13:01:21 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 8D171C22494; Thu, 18 May 2017 13:01:16 +0000 (UTC) Received: from mail-wr0-f171.google.com (mail-wr0-f171.google.com [209.85.128.171]) by lists.denx.de (Postfix) with ESMTPS id D8530C22372 for ; Thu, 18 May 2017 13:01:12 +0000 (UTC) Received: by mail-wr0-f171.google.com with SMTP id w50so33527741wrc.0 for ; Thu, 18 May 2017 06:01:12 -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=Mvb+Tbbi+36BSH9lY8aCwiWDKg9g2SRIOpWk3RknEBo=; b=PRhJpFvcbWdetU+ZHAVizuU189Z6KneIHfmlVsjd1/D1234u/EeWnTSQFEV3m9k8zs CzzrRDbIGjnwNpv+RW5XmX4nw2ERT2+6bID6h+wEYnk47LF2xTb4x/ar1WQwhpECN8ee Dm6rqSmwU5wwnmKJ5/0jEm6hTsTYhpfFbS9cI= 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=Mvb+Tbbi+36BSH9lY8aCwiWDKg9g2SRIOpWk3RknEBo=; b=MfJi4FKAjDklKg078Y+JWP21wniqtfEweKS0Iv8hD8qtM6+AsvvkYXehxYnoC1vc00 EV2FYL8HEUZpCRuYCZDOx2ytCcmyEHLozAfFhDd40WG17uWv2JnqpC9NzLVyqp/kTM7v dccvaorlAc31qTWoiGESahTmx+TEdoh29u/G56PaISO15o8lo8yEAvtla97Ya0EfdFuv aYezXClYAMkwyhSWuGWrlPuCss0NNcY9r/I1NMNIBBw+3CWIhZ1Ou0oMDfRF/GBRfmFt rvVfboMZ+jjU5BBSFsmZtEL3UdTbgHId9K669g7BwWDH78Smwsghf6XVp9Hbwi8pC6ah MRhA== X-Gm-Message-State: AODbwcDF94KADumzbAfVjqzUvhCUflTnG/T1FLN8vbQRq3BSDWkOSciG b7SSaON88vNKNrf2 X-Received: by 10.46.87.2 with SMTP id l2mr664542ljb.122.1495112472556; Thu, 18 May 2017 06:01:12 -0700 (PDT) Received: from localhost ([195.238.92.132]) by smtp.gmail.com with ESMTPSA id g42sm940556ljg.35.2017.05.18.06.01.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 May 2017 06:01:11 -0700 (PDT) From: Sam Protsenko To: u-boot@lists.denx.de Date: Thu, 18 May 2017 16:01:02 +0300 Message-Id: <20170518130102.6820-4-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170518130102.6820-1-semen.protsenko@linaro.org> References: <20170518130102.6820-1-semen.protsenko@linaro.org> Cc: Praneeth Bajjuri , Tom Rini Subject: [U-Boot] [PATCH 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 --- 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; }