From patchwork Thu Apr 19 20:57:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 133846 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp1082988ljf; Thu, 19 Apr 2018 13:57:38 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+oPpdyiuWJfkE+w7pWgBSev5S9f4MSmbA1I1ysTeJk6HTe8X1BWskPza2kR0K8EY5sWwvh X-Received: by 10.80.231.13 with SMTP id a13mr10241719edn.212.1524171458390; Thu, 19 Apr 2018 13:57:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524171458; cv=none; d=google.com; s=arc-20160816; b=0RTWIDb/ugiEA2r0dCFbo4nBgF0k3UsS2AfNjT93iuvzOiMQaz35U/COuHQZaUrc2x Cwowg9h68AZE6ieYqhNhbH6JVGyckeYU5fFXT0MrCCROzvlIveKx9I0PP9tIkSY4vPPj yU7sjd6D7ioXozCjg7ooXIM4pEZNbwLLTyAC9jB4ufSdMi29k4fHUVn1l8qHvNL+YDIZ /3UTXkGOPLxgrY5KWkT09BLsgcc6XdjK/49ZSLOSWcCo7SjL2YJR1Pbe8JJYsfXgOwka Z1Ujhmc0V+RSctyZxgJnoDXN+NEzJOpNVkOTDySJ0LVxAMI+DZE2GlE+lwxsozBYKhE0 TW5Q== 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:message-id:date:to:from :dkim-signature:arc-authentication-results; bh=UbrxcGE+uPSYU/heu3DOXebIZx2A2MhfJx+XZxapea0=; b=jrCrokfqji8UvoKMJ2VAVDnnVLGUD6KyhS+HmlsDD7JN1IQtjD8ie6xCNPTMRF5G7p sPcfvAH+OxQdjNfx9xeB2b/8/WT4Y7NjYi0Cf2oT5q31y0uYC9WqI+rkpc/tDNugSlGu iiV+8KYi1bUmKRksIXAQF0OJ1vI+JY7OxdfL+jIxAUQFkFUDQsPaaQ42PE5d3Om6kAxD 144H3qb2QU/tKeOenKGx+ycK7IqRSnK01ioX3T8kahrCw0oST0EDd2/94Xhfg0tx1n4w +uhxaNy6SroIQzh7Co4Gimte+To49TwVf+OJMPIj2xaPlXKusCKTFjCvWdspcaSdAvQa /wZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=GYxfFFUD; 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 h63si2913323edd.398.2018.04.19.13.57.38; Thu, 19 Apr 2018 13:57:38 -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 header.s=google header.b=GYxfFFUD; 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 D939FC21FCF; Thu, 19 Apr 2018 20:57:36 +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_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 80710C21F3F; Thu, 19 Apr 2018 20:57:34 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D06BEC21F3F; Thu, 19 Apr 2018 20:57:33 +0000 (UTC) Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) by lists.denx.de (Postfix) with ESMTPS id 74108C21C2F for ; Thu, 19 Apr 2018 20:57:33 +0000 (UTC) Received: by mail-lf0-f66.google.com with SMTP id u21-v6so514646lfu.9 for ; Thu, 19 Apr 2018 13:57:33 -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; bh=5QovSuMhYgMa+43nGfPRslZxIkQvSt+P5qcNFqBZYrk=; b=GYxfFFUDvy45ByWvMwD1iP4kEcu6ptU4i9JHNPsJEdA3YpBANkWjAE+4WcVje0bQcn W9xFps7Vs+C6Qf/IYiYnOiC++rZ42djcmUmAAKWVQ2Ewv9XGM7aWEMpignYLCaWsYONX vFS0LiOane8TrmGnBcfj38FJ9NQAIYbVCy1io= 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; bh=5QovSuMhYgMa+43nGfPRslZxIkQvSt+P5qcNFqBZYrk=; b=hR1kTws8JS55PSOGt6kkqTWkbYfekZuKyoNZGPHtdmdE5QWPwdV7A9iqotnXQug7uA gbILjwW5GnKpjLkSz4vIDftoAX6fKYLSFADH74XUo/pvjb3Mas5sbw666i5LolKsoyxb Hil6cQZMBAb82zZdmWJdCswouLNSDsSg9qefPtSWA4dFYA/ZJJduhtriWNkzahV3sPZ3 fE7I6Jcs5F4AGd5fk34gJSZqrHzsf4YmzALFDTFwo50Sl1BPCwFcdHtog6R4E4sSc+2V FyIZPlOSeywYfWOtoUYZB9QFqlgepPl73Yzl8rHti0IyQJijn14/3vdXtolc3qHN6N9a Dp/A== X-Gm-Message-State: ALQs6tBQiRnP++6NFYKcWyfxhOyZT9oxTN2t8h8lkFGcpiIqFEd6Wm3p 0c0ajG59tc/Gd+WXJ7WK5MwXSo+hcFQ= X-Received: by 2002:a19:eb5d:: with SMTP id j90-v6mr1021721lfh.86.1524171452479; Thu, 19 Apr 2018 13:57:32 -0700 (PDT) Received: from localhost ([195.238.92.132]) by smtp.gmail.com with ESMTPSA id q23sm765824ljh.10.2018.04.19.13.57.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Apr 2018 13:57:31 -0700 (PDT) From: Sam Protsenko To: u-boot@lists.denx.de Date: Thu, 19 Apr 2018 23:57:30 +0300 Message-Id: <20180419205730.8418-1-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.17.0 Cc: Amit Pundir , Tom Rini , Praneeth Bajjuri , John Stultz , Sumit Semwal Subject: [U-Boot] [PATCH v2] arm: ti: boot: Extract PARTS_DEFAULT to boot.h 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" Eliminate code duplication: the same PARTS_DEFAULT was defined in am57xx_evm.h and in dra7xx_evm.h. Extract it to environment/boot.h and use in all OMAP5-based boards. Signed-off-by: Sam Protsenko Acked-by: Andrew F. Davis --- include/configs/am57xx_evm.h | 25 ------------------------- include/configs/cl-som-am57x.h | 2 ++ include/configs/cm_t54.h | 2 ++ include/configs/dra7xx_evm.h | 25 ------------------------- include/environment/ti/boot.h | 27 +++++++++++++++++++++++++-- 5 files changed, 29 insertions(+), 52 deletions(-) diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h index d1f73f76a4..886a5696f5 100644 --- a/include/configs/am57xx_evm.h +++ b/include/configs/am57xx_evm.h @@ -38,31 +38,6 @@ #define CONFIG_SYS_OMAP_ABE_SYSCK -/* Define the default GPT table for eMMC */ -#define PARTS_DEFAULT \ - /* Linux partitions */ \ - "uuid_disk=${uuid_gpt_disk};" \ - "name=bootloader,start=384K,size=1792K,uuid=${uuid_gpt_bootloader};" \ - "name=rootfs,start=2688K,size=-,uuid=${uuid_gpt_rootfs}\0" \ - /* Android partitions */ \ - "partitions_android=" \ - "uuid_disk=${uuid_gpt_disk};" \ - "name=xloader,start=128K,size=256K,uuid=${uuid_gpt_xloader};" \ - "name=bootloader,size=1792K,uuid=${uuid_gpt_bootloader};" \ - "name=environment,size=128K,uuid=${uuid_gpt_environment};" \ - "name=misc,size=128K,uuid=${uuid_gpt_misc};" \ - "name=reserved,size=256K,uuid=${uuid_gpt_reserved};" \ - "name=efs,size=16M,uuid=${uuid_gpt_efs};" \ - "name=crypto,size=16K,uuid=${uuid_gpt_crypto};" \ - "name=recovery,size=40M,uuid=${uuid_gpt_recovery};" \ - "name=boot,size=10M,uuid=${uuid_gpt_boot};" \ - "name=system,size=768M,uuid=${uuid_gpt_system};" \ - "name=vendor,size=256M,uuid=${uuid_gpt_vendor};" \ - "name=cache,size=256M,uuid=${uuid_gpt_cache};" \ - "name=ipu1,size=1M,uuid=${uuid_gpt_ipu1};" \ - "name=ipu2,size=1M,uuid=${uuid_gpt_ipu2};" \ - "name=userdata,size=-,uuid=${uuid_gpt_userdata}" - #define DFUARGS \ "dfu_bufsiz=0x10000\0" \ DFU_ALT_INFO_MMC \ diff --git a/include/configs/cl-som-am57x.h b/include/configs/cl-som-am57x.h index 9c70cf0b37..709e0375b3 100644 --- a/include/configs/cl-som-am57x.h +++ b/include/configs/cl-som-am57x.h @@ -18,6 +18,8 @@ #define CONFIG_SYS_OMAP_ABE_SYSCK +#define PARTS_DEFAULT + #include /* misc */ diff --git a/include/configs/cm_t54.h b/include/configs/cm_t54.h index 6123cd374d..f0d76ed806 100644 --- a/include/configs/cm_t54.h +++ b/include/configs/cm_t54.h @@ -14,6 +14,8 @@ #define CONFIG_CM_T54 #define CONFIG_DRAM_2G +#define PARTS_DEFAULT + #include /* EEPROM related defines */ diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h index 917a05d701..9b3fb2c913 100644 --- a/include/configs/dra7xx_evm.h +++ b/include/configs/dra7xx_evm.h @@ -45,31 +45,6 @@ #define CONFIG_SYS_OMAP_ABE_SYSCK #ifndef CONFIG_SPL_BUILD -/* Define the default GPT table for eMMC */ -#define PARTS_DEFAULT \ - /* Linux partitions */ \ - "uuid_disk=${uuid_gpt_disk};" \ - "name=bootloader,start=384K,size=1792K,uuid=${uuid_gpt_bootloader};" \ - "name=rootfs,start=2688K,size=-,uuid=${uuid_gpt_rootfs}\0" \ - /* Android partitions */ \ - "partitions_android=" \ - "uuid_disk=${uuid_gpt_disk};" \ - "name=xloader,start=128K,size=256K,uuid=${uuid_gpt_xloader};" \ - "name=bootloader,size=1792K,uuid=${uuid_gpt_bootloader};" \ - "name=environment,size=128K,uuid=${uuid_gpt_environment};" \ - "name=misc,size=128K,uuid=${uuid_gpt_misc};" \ - "name=reserved,size=256K,uuid=${uuid_gpt_reserved};" \ - "name=efs,size=16M,uuid=${uuid_gpt_efs};" \ - "name=crypto,size=16K,uuid=${uuid_gpt_crypto};" \ - "name=recovery,size=40M,uuid=${uuid_gpt_recovery};" \ - "name=boot,size=10M,uuid=${uuid_gpt_boot};" \ - "name=system,size=768M,uuid=${uuid_gpt_system};" \ - "name=vendor,size=256M,uuid=${uuid_gpt_vendor};" \ - "name=cache,size=256M,uuid=${uuid_gpt_cache};" \ - "name=ipu1,size=1M,uuid=${uuid_gpt_ipu1};" \ - "name=ipu2,size=1M,uuid=${uuid_gpt_ipu2};" \ - "name=userdata,size=-,uuid=${uuid_gpt_userdata}" - #define DFUARGS \ "dfu_bufsiz=0x10000\0" \ DFU_ALT_INFO_MMC \ diff --git a/include/environment/ti/boot.h b/include/environment/ti/boot.h index 24b7783f88..4f3d748b5c 100644 --- a/include/environment/ti/boot.h +++ b/include/environment/ti/boot.h @@ -15,8 +15,31 @@ #endif #ifndef PARTS_DEFAULT -#define PARTS_DEFAULT -#endif +/* Define the default GPT table for eMMC */ +#define PARTS_DEFAULT \ + /* Linux partitions */ \ + "uuid_disk=${uuid_gpt_disk};" \ + "name=bootloader,start=384K,size=1792K,uuid=${uuid_gpt_bootloader};" \ + "name=rootfs,start=2688K,size=-,uuid=${uuid_gpt_rootfs}\0" \ + /* Android partitions */ \ + "partitions_android=" \ + "uuid_disk=${uuid_gpt_disk};" \ + "name=xloader,start=128K,size=256K,uuid=${uuid_gpt_xloader};" \ + "name=bootloader,size=1792K,uuid=${uuid_gpt_bootloader};" \ + "name=environment,size=128K,uuid=${uuid_gpt_environment};" \ + "name=misc,size=128K,uuid=${uuid_gpt_misc};" \ + "name=reserved,size=256K,uuid=${uuid_gpt_reserved};" \ + "name=efs,size=16M,uuid=${uuid_gpt_efs};" \ + "name=crypto,size=16K,uuid=${uuid_gpt_crypto};" \ + "name=recovery,size=40M,uuid=${uuid_gpt_recovery};" \ + "name=boot,size=10M,uuid=${uuid_gpt_boot};" \ + "name=system,size=768M,uuid=${uuid_gpt_system};" \ + "name=vendor,size=256M,uuid=${uuid_gpt_vendor};" \ + "name=cache,size=256M,uuid=${uuid_gpt_cache};" \ + "name=ipu1,size=1M,uuid=${uuid_gpt_ipu1};" \ + "name=ipu2,size=1M,uuid=${uuid_gpt_ipu2};" \ + "name=userdata,size=-,uuid=${uuid_gpt_userdata}" +#endif /* PARTS_DEFAULT */ #define DEFAULT_COMMON_BOOT_TI_ARGS \ "console=" CONSOLEDEV ",115200n8\0" \