From patchwork Tue Mar 31 22:35:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 1264951 X-Patchwork-Delegate: lokeshvutla@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=default header.b=zIxpDktl; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48sQxl6vDtz9sSr for ; Wed, 1 Apr 2020 10:48:11 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6F56581CC9; Wed, 1 Apr 2020 01:46:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="zIxpDktl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DF41E81C92; Wed, 1 Apr 2020 00:35:58 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4338481C79 for ; Wed, 1 Apr 2020 00:35:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9586120CC7; Tue, 31 Mar 2020 22:35:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585694146; bh=4PuyvOzpGJl3V7I06cN2HXVbpjAHjtJAcClzBQwFy9M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zIxpDktlpuO+pcKjlu+IFkmWcZ8HxgAXbddCnrI90CQUSFQwwt4wM+1SFzoYJp/6E 2aXN9ZSV+/AU0/r4J6lf0mEXcPY+OLpCRbDXaRqNH6/H3f4JAif+mnXlkLHJJ8DVU2 y2Yck88/inIFA4s4x1YHIadUXm1VqD4Lvnvlg7AE= Received: by pali.im (Postfix) id 88AC110C7; Wed, 1 Apr 2020 00:35:43 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass , Adam Ford , Tony Lindgren , Merlijn Wajer , "Arthur D." , Pavel Machek , Ivaylo Dimitrov , maemo-leste@lists.dyne.org Subject: [PATCH 06/11] Nokia RX-51: Remove PART* macros Date: Wed, 1 Apr 2020 00:35:13 +0200 Message-Id: <20200331223518.10936-7-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200331223518.10936-1-pali@kernel.org> References: <20200331223518.10936-1-pali@kernel.org> MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 01 Apr 2020 01:46:01 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Now when code for defining partitions is duplicated at two locations (option CONFIG_MTDPARTS_DEFAULT in nokia_rx51_defconfig file and macro OMAP_TAG_PARTITION_CONFIG in rx51.c file) there is no need to have common macros. Lets inline PART* macros to rx51.c file. Signed-off-by: Pali Rohár --- board/nokia/rx51/rx51.c | 18 ++++++---------- include/configs/nokia_rx51.h | 42 ------------------------------------ 2 files changed, 6 insertions(+), 54 deletions(-) diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c index 80a0fc2696..c8ef26f940 100644 --- a/board/nokia/rx51/rx51.c +++ b/board/nokia/rx51/rx51.c @@ -69,18 +69,12 @@ static struct tag_omap omap[] = { OMAP_TAG_GPIO_SWITCH_CONFIG("sleep_ind", 0xa2, 0x2, 0x2, 0x0), OMAP_TAG_GPIO_SWITCH_CONFIG("slide", GPIO_SLIDE, 0x0, 0x0, 0x0), OMAP_TAG_WLAN_CX3110X_CONFIG(0x25, 0xff, 87, 42, -1), - OMAP_TAG_PARTITION_CONFIG(PART1_NAME, PART1_SIZE * PART1_MULL, - PART1_OFFS, PART1_MASK), - OMAP_TAG_PARTITION_CONFIG(PART2_NAME, PART2_SIZE * PART2_MULL, - PART2_OFFS, PART2_MASK), - OMAP_TAG_PARTITION_CONFIG(PART3_NAME, PART3_SIZE * PART3_MULL, - PART3_OFFS, PART3_MASK), - OMAP_TAG_PARTITION_CONFIG(PART4_NAME, PART4_SIZE * PART4_MULL, - PART4_OFFS, PART4_MASK), - OMAP_TAG_PARTITION_CONFIG(PART5_NAME, PART5_SIZE * PART5_MULL, - PART5_OFFS, PART5_MASK), - OMAP_TAG_PARTITION_CONFIG(PART6_NAME, PART6_SIZE * PART6_MULL, - PART6_OFFS, PART6_MASK), + OMAP_TAG_PARTITION_CONFIG("bootloader", 128 * 1024, 0x00000000, 0x00000003), + OMAP_TAG_PARTITION_CONFIG("config", 384 * 1024, 0x00020000, 0x00000000), + OMAP_TAG_PARTITION_CONFIG("log", 256 * 1024, 0x00080000, 0x00000000), + OMAP_TAG_PARTITION_CONFIG("kernel", 2 * 1024*1024, 0x000c0000, 0x00000000), + OMAP_TAG_PARTITION_CONFIG("initfs", 2 * 1024*1024, 0x002c0000, 0x00000000), + OMAP_TAG_PARTITION_CONFIG("rootfs", 257280 * 1024, 0x004c0000, 0x00000000), OMAP_TAG_BOOT_REASON_CONFIG("pwr_key"), OMAP_TAG_VERSION_STR_CONFIG("product", "RX-51"), OMAP_TAG_VERSION_STR_CONFIG("hw-build", "2101"), diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h index cfc4d0c1e5..a33b0a7ac8 100644 --- a/include/configs/nokia_rx51.h +++ b/include/configs/nokia_rx51.h @@ -91,48 +91,6 @@ * Board ONENAND Info. */ -#define PART1_NAME "bootloader" -#define PART1_SIZE 128 -#define PART1_MULL 1024 -#define PART1_SUFF "k" -#define PART1_OFFS 0x00000000 -#define PART1_MASK 0x00000003 - -#define PART2_NAME "config" -#define PART2_SIZE 384 -#define PART2_MULL 1024 -#define PART2_SUFF "k" -#define PART2_OFFS 0x00020000 -#define PART2_MASK 0x00000000 - -#define PART3_NAME "log" -#define PART3_SIZE 256 -#define PART3_MULL 1024 -#define PART3_SUFF "k" -#define PART3_OFFS 0x00080000 -#define PART3_MASK 0x00000000 - -#define PART4_NAME "kernel" -#define PART4_SIZE 2 -#define PART4_MULL 1024*1024 -#define PART4_SUFF "m" -#define PART4_OFFS 0x000c0000 -#define PART4_MASK 0x00000000 - -#define PART5_NAME "initfs" -#define PART5_SIZE 2 -#define PART5_MULL 1024*1024 -#define PART5_SUFF "m" -#define PART5_OFFS 0x002c0000 -#define PART5_MASK 0x00000000 - -#define PART6_NAME "rootfs" -#define PART6_SIZE 257280 -#define PART6_MULL 1024 -#define PART6_SUFF "k" -#define PART6_OFFS 0x004c0000 -#define PART6_MASK 0x00000000 - #define CONFIG_SYS_ONENAND_BASE ONENAND_MAP /* Watchdog support */