From patchwork Mon Aug 14 20:48:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea Adami X-Patchwork-Id: 801328 X-Patchwork-Delegate: boris.brezillon@free-electrons.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.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="uAht1aV8"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="OsSCZLMy"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xWSTd5Tr4z9t24 for ; Tue, 15 Aug 2017 06:52:05 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=RO6N/DY6+VGRk63jV1upoTw5gHeGlb047VKzGvGAKbE=; b=uAht1aV81L6FRMX/xpmKr66FH5 ZXGkj0QNEIkBxsoSXomGrXjYCSGn4wD+ffVv6zxwCTASX3AlIPb3WkC4ix5GUcS+NPs/79+i4FByY gyelTw/zNE0WFQWb6xrYIJdhj734Stu0xVjOnrA3rIEz+7ccodAXfhTCARaVfuQHHexJSSSIdJ+u0 lBN7rZtC8VB1ck06OosDpFjANlt3qN7jzSDk4v/oW/RgVzCmMx5VOSY9Ksdnv8WQ/kwptwKlfCj7n 8zl1me+x2C++nCcTCDECFybLoamCQ/GuWivZh4BZmmYBvaPua7O7q9FM8S97iXI7+ZWFlc9wAtpkv e13tsN0Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dhML4-0004Je-4S; Mon, 14 Aug 2017 20:51:54 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dhMIX-0000Hl-TR; Mon, 14 Aug 2017 20:49:27 +0000 Received: by mail-wm0-x242.google.com with SMTP id y206so15692777wmd.5; Mon, 14 Aug 2017 13:48:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fmkQBh1mbjsIE//VUtAb8JatDEo0KU0P7VVLxoBdUp8=; b=OsSCZLMyaJ0kmiGNXG5od06cupOrVp0B5D+KkdSXyON6EvOP/o/VvRJa1kaomnhQHM T9cfjtBQIZ1C0wiwWGqQvr+Gxp1c6PAiDzUEUjE3Q2bf/8BP2lMJi8n11MFUaI0Omw2y AhSaL84/wk3Fnd0i2WWdNOjz0cx5mKpWgFZBm68auwaDVe1WP1/pbyGRC+GCkmQhMQNx +58/0E/hn+D32cNCYeuEn4URf8tuINrGbhnldsRJgwLA+42wE3/3GDWGC3nMHmng7OLj NgAmahLAQeQ+HwxeP/c8KVAgWElXoHFxGk15HvcwVOZQ6DjnsX8qDPvt9pFJSOR/dedF JRNg== 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=fmkQBh1mbjsIE//VUtAb8JatDEo0KU0P7VVLxoBdUp8=; b=UsFW6c6n48w5EozNP//GnWOSmvwPn8cC1MFB3OcERyEHZH2e71ZTuJJ1f9bQxZfed9 968gOEW8CCe/2FREVH0ZFg82+M6c2omq/Pmy8yFqseY350f4OCl4qNdPwZqDlU+8Fzse Ym8yTgkDqOFG9MlGXD6+sVRp+Alv50Pnfx07NirCnCzFg7dc30ZcKDynB2EAlGFZQvoC 0+johLtK3J3iZZjrhJF6S86dq8t2Orsc05jEQooLYBCvdzpdxLSEVxyT/ODdp9Ed8njq USJSS8YHKytDA8bnSag0QO3AfdLFnVRaANzdaOQsxGXYmV3Eq8rxdJSgaXD+8Xk4UWMl bQNQ== X-Gm-Message-State: AHYfb5g6LdKrOJbooif4+1A6nfJ6ipRtqDUlmiBrxdfNGhDe5BX9AChk Mr4gNZlrxT6fgbJTQ1M= X-Received: by 10.28.143.206 with SMTP id r197mr105984wmd.69.1502743738178; Mon, 14 Aug 2017 13:48:58 -0700 (PDT) Received: from andrea-ThinkPad-T520.homenet.telecomitalia.it (host228-232-dynamic.45-213-r.retail.telecomitalia.it. [213.45.232.228]) by smtp.gmail.com with ESMTPSA id 12sm172933wmy.44.2017.08.14.13.48.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 Aug 2017 13:48:57 -0700 (PDT) From: Andrea Adami To: linux-mtd@lists.infradead.org Subject: [PATCH v5 9/9] ARM: pxa/poodle: Remove hardcoded partitioning, use sharpslpart parser Date: Mon, 14 Aug 2017 22:48:40 +0200 Message-Id: <1502743720-28672-10-git-send-email-andrea.adami@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1502743720-28672-1-git-send-email-andrea.adami@gmail.com> References: <1502743720-28672-1-git-send-email-andrea.adami@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170814_134918_893877_77D4346C X-CRM114-Status: GOOD ( 12.49 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:400c:c09:0:0:0:242 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (andrea.adami[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Boris Brezillon , Wolfram Sang , Dmitry Eremin-Solenikov , Richard Weinberger , Robert Jarzmik , linux-mmc@vger.kernel.org, Russell King , Haojian Zhuang , linux-kernel@vger.kernel.org, Marek Vasut , linux-arm-kernel@lists.infradead.org, Cyrille Pitchen , Lee Jones , Brian Norris , David Woodhouse , Linus Walleij , Daniel Mack MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org With the introduction of sharpslpart partition parser we can now read the offsets from NAND: we specify the list of the parsers as platform data, with cmdlinepart and ofpart parsers first allowing to override the part. table written in NAND. This is done here in the board file. Signed-off-by: Andrea Adami --- arch/arm/mach-pxa/poodle.c | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index 62a1191..fd01d6b 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c @@ -333,24 +333,6 @@ static struct pxafb_mach_info poodle_fb_info = { .lcd_conn = LCD_COLOR_TFT_16BPP, }; -static struct mtd_partition sharpsl_nand_partitions[] = { - { - .name = "System Area", - .offset = 0, - .size = 7 * 1024 * 1024, - }, - { - .name = "Root Filesystem", - .offset = 7 * 1024 * 1024, - .size = 22 * 1024 * 1024, - }, - { - .name = "Home Filesystem", - .offset = MTDPART_OFS_APPEND, - .size = MTDPART_SIZ_FULL, - }, -}; - static uint8_t scan_ff_pattern[] = { 0xff, 0xff }; static struct nand_bbt_descr sharpsl_bbt = { @@ -360,10 +342,16 @@ static struct nand_bbt_descr sharpsl_bbt = { .pattern = scan_ff_pattern }; +static const char * const probes[] = { + "cmdlinepart", + "ofpart", + "sharpslpart", + NULL, +}; + static struct sharpsl_nand_platform_data sharpsl_nand_platform_data = { .badblock_pattern = &sharpsl_bbt, - .partitions = sharpsl_nand_partitions, - .nr_partitions = ARRAY_SIZE(sharpsl_nand_partitions), + .part_parsers = probes, }; static struct resource sharpsl_nand_resources[] = {