From patchwork Mon Feb 26 21:18:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 129726 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp654280lja; Mon, 26 Feb 2018 13:19:48 -0800 (PST) X-Google-Smtp-Source: AG47ELvB/rXiFRhDQ1ggmlzhcPWGMDMBZPZQeXtJg70koPMeijvnkxb/DMZeKsQPpR++PgACEpfg X-Received: by 10.80.190.133 with SMTP id b5mr6245813edk.246.1519679987594; Mon, 26 Feb 2018 13:19:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519679987; cv=none; d=google.com; s=arc-20160816; b=ea9TqXmZKbxCjsWzQLixjgKNxNyggnZPpcv6hHG9bbyW9XbXFv4FtJuBghrOll0uWx 5CTmJZp/2+Ua+kDxBWxh4Ve+2mxoh3yQVrPy90pQF0N/WhEPKn50TFnGwnCSUlcmDTnL fqo9GWJ3cMUsnabwN9MtVLO3Ji98tKXInF3AfpF9iHClFjyJi8AotCFO2yaQ4L8VPxeL xVe/8mZzyB4RRdirHFK2jVTiTz33B/C9KZ7FFKiAxkvrmlzX5swpxiqkkMuEU+pZDDYD fBdu6cNCaQioQyll1cY7hLFLL+sHN9LFOv667c10c+HXpV5RbwNguKxD3wGVkJ75YfCI LIEQ== 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=QNMkZnE4xwACerUQxZHqT2Q+oZfh5DUkcfkypgO8puQ=; b=fTOrJBSle39VKF0076o0HYQH5OQPMngtitF4CBBEAFBcoNGtp6Z5by82ebvmwvCUVJ 94vb9OyFsrkRrjCoerdzuFCpZMe8CeduQbXIOLHX6jaPEiYlkRcPhouidZz7qz4QoB5U /aENvXAfteVnI8agJeX+6zRXTRsOdV2YkDmjECBFaXSA/YEERaWVjME+WhKVV1P5X7jf asD/3l25p/AOhcMeKRaPAHx90uAXImcgyRadhhf6Ngt/HDdl7gv0OPX3+xExlWcDnxgD sHO1pW93tJHJU+vD1jwIxeMnWYxkegH/OC0sFQIyLKoXC18EJjb1WKDQL0+LDkuOTCA/ pM1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=N1P0gWUe; 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 o91si383599eda.345.2018.02.26.13.19.47; Mon, 26 Feb 2018 13:19:47 -0800 (PST) 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 header.s=google header.b=N1P0gWUe; 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 33313C22172; Mon, 26 Feb 2018 21:18:24 +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_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 24952C220EB; Mon, 26 Feb 2018 21:18:18 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 743A8C21FB3; Mon, 26 Feb 2018 21:18:12 +0000 (UTC) Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by lists.denx.de (Postfix) with ESMTPS id B2DB6C22145 for ; Mon, 26 Feb 2018 21:18:08 +0000 (UTC) Received: by mail-wr0-f193.google.com with SMTP id p104so22677615wrc.12 for ; Mon, 26 Feb 2018 13:18:08 -0800 (PST) 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=P/jLUNloO3HNxo4cFy8vNNI12+kkhOdEAzMjgp32ph8=; b=N1P0gWUeMx9rEcHvgUqo7ku9pdPE6+S7o9KhhGuUFE1HgsaO4+GmHyCJmCEE9ucwiC O7FyGSaWfGix9lrUZ698qsBSSWgwzyCDtbbroxvLjAbX1UwsDF0yUGF+BBbG2jRwZN0e q8iOdh1PeZbX5GFmy6Gow44Mx9qws9RoDSQCU= 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=P/jLUNloO3HNxo4cFy8vNNI12+kkhOdEAzMjgp32ph8=; b=Zu3rhV4yWICQvRcUS5jFCo9xJZ7Cc2EUrYGwq4qfs238GjpMEw9GPRjeMzvspreZaZ 1QUj9bD4UewT6NU7k7pnLzlTgpzuAc5MfkFpZl5UQ1vn3/g61LzciI09wlIWLEBIjDe0 d8O3Qt2aIdu/vtVPtkWa+hLUZmMguS5kmDjJTIgUda5mqGIFY7EEyJHcnH8AkJ2RtdvM BVem+noGK0FjHit59rI1rrIDXIDUj6di72SRINls0uBwW9/Il0CKe0sGZiESkAVkEMFO 7vxVbjOg/3nU7xfcjTaojkYKgzGOCx7zSUBEpG3Qt64THIX7kQoS0xOe1hSX5YTzI+37 wrJQ== X-Gm-Message-State: APf1xPBbzrjeL6cWfbJ4hJJpIn/UILMKgQW1FFnKdoG7HCKFQti+8Vh9 ZgF6NHL0TAloMMsA6PIJWFJHhOOOggU= X-Received: by 10.223.136.236 with SMTP id g41mr10477175wrg.103.1519679887952; Mon, 26 Feb 2018 13:18:07 -0800 (PST) Received: from localhost ([195.238.92.76]) by smtp.gmail.com with ESMTPSA id c14sm10095127wrd.17.2018.02.26.13.18.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Feb 2018 13:18:07 -0800 (PST) From: Sam Protsenko To: u-boot@lists.denx.de Date: Mon, 26 Feb 2018 23:18:01 +0200 Message-Id: <20180226211801.16060-4-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180226211801.16060-1-semen.protsenko@linaro.org> References: <20180226211801.16060-1-semen.protsenko@linaro.org> Cc: Tom Rini , igor.opaniuk@linaro.org, Praneeth Bajjuri , Neil Williams Subject: [U-Boot] [PATCH 3/3] env: ti: boot: Get rid of magic numbers 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" Get the start address and the size of partitions using partition names rather than partition numbers. This way we can change the partition table further without changing the boot code. Signed-off-by: Sam Protsenko --- include/environment/ti/boot.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/include/environment/ti/boot.h b/include/environment/ti/boot.h index 0a2342061c..24b7783f88 100644 --- a/include/environment/ti/boot.h +++ b/include/environment/ti/boot.h @@ -40,15 +40,13 @@ "setenv eval_bootargs setenv bootargs $bootargs; " \ "run eval_bootargs; " \ "setenv mmcdev 1; " \ - "setenv fdt_part 3; " \ - "setenv boot_part 9; " \ "setenv machid fe6; " \ "mmc dev $mmcdev; " \ "mmc rescan; " \ - "part start mmc ${mmcdev} ${fdt_part} fdt_start; " \ - "part size mmc ${mmcdev} ${fdt_part} fdt_size; " \ - "part start mmc ${mmcdev} ${boot_part} boot_start; " \ - "part size mmc ${mmcdev} ${boot_part} boot_size; " \ + "part start mmc ${mmcdev} environment fdt_start; " \ + "part size mmc ${mmcdev} environment fdt_size; " \ + "part start mmc ${mmcdev} boot boot_start; " \ + "part size mmc ${mmcdev} boot boot_size; " \ "mmc read ${fdtaddr} ${fdt_start} ${fdt_size}; " \ "mmc read ${loadaddr} ${boot_start} ${boot_size}; " \ "bootm $loadaddr $loadaddr $fdtaddr;\0"