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: 878128 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="N1P0gWUe"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zqvq63lLfz9s06 for ; Tue, 27 Feb 2018 08:19:46 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id E97FAC22174; Mon, 26 Feb 2018 21:18:25 +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-Google-Smtp-Source: AH8x226gGbKDvioIYSRMWGvyKTtuRpALxSsVMN+qyo2BqKx2o43Z14ciOAsGIGzpPPArpvAjE94+Aw== 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"