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: 901505 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="GYxfFFUD"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40Rrsl6Qwvz9s3F for ; Fri, 20 Apr 2018 06:57:46 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 27879C22010; Thu, 19 Apr 2018 20:57:37 +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-Google-Smtp-Source: AB8JxZr98a8h5WKiXWtfwHvnOG4QMMd0O/2NsYoiqxdHAG6FGK7Ax4pOjOwpaZ9zT2G+XYJAoDF9nA== 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" \