Received: by 10.223.164.202 with SMTP id h10csp5675540wrb; Tue, 21 Nov 2017 13:45:13 -0800 (PST) X-Google-Smtp-Source: AGs4zMZn8+GtOWFYWeoNkcaREkNNcbFExTTE6TtcCeD0gGEpzJD2pKdLIjBp9nbb7Wr9pKIVNgAe X-Received: by 10.98.215.19 with SMTP id b19mr16478618pfh.94.1511300713501; Tue, 21 Nov 2017 13:45:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511300713; cv=none; d=google.com; s=arc-20160816; b=zguLWWgKB0NKrqZiBd0fj7vv7iChAcD5A9pZ8/fqwDBR3fCGEQJwbZvka4HlhgORo1 PNtmlIyZQQ4n4Rw1RRbwpZ8qF67LoI2NApLAnO2V/Jg8hDwMXKK/veYMSQ3lfKzBa0CJ rmrP9MZJZYrPAuKhlrv0PXY/ph0CaMaj7Ps3Fii9g/RPUq8QQUOypLgTMkyvhdG7kA8+ l1sZBBu9gYnLOGoNamSzuAJ2KXmb+/m6s9rIhYpvUpgy8iNjKyahiK+HfIiUA46IQfd8 wC/Fh7dpv0Xar9hVOqf07uKohWhVcMrJhOVTfSsoLKeD5t+68ujDdR9XOBOe0sHMe03a GnbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=+vEUOvELafIboIuIbd+xZsJ5KrO6+TWsWTVdqJj6f7k=; b=Mv24pxzcxP5hLMf/2JeCrysBxVl3V4nexUlrkIQaVJVgTmHEC/4TByt1MvKpBkhIDF iJsyMNI82WJ4A0Sgw7Zxzt4OrRA50xLhyw2ZIJIDLRNgduTi7vKX4Bjy4Z7GgVDvCP7k pINtnPDqexVI2iuZLTXuCmlTaL79dVBz5mnHFrDM/SFHTnyyB41o7YIL9jF9sA86GXop b3FrWEt8oHxhciDChbIV1qC3rg4bX3/3CakbSo7YEc5UiUyvTkCVXPJk8DWTNmFFLE+V wvKYwFDzYS0AgTBrj7DMkZbn2j6O4urhtnbkG0sa7IpWpeD6nLU7gMuJ2ymy1lkK72zN xscw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SFASUHcZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x10si5895750pll.598.2017.11.21.13.45.02; Tue, 21 Nov 2017 13:45:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SFASUHcZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751505AbdKUVoN (ORCPT + 76 others); Tue, 21 Nov 2017 16:44:13 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:46937 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751438AbdKUVn6 (ORCPT ); Tue, 21 Nov 2017 16:43:58 -0500 Received: by mail-wm0-f65.google.com with SMTP id u83so6395731wmb.5 for ; Tue, 21 Nov 2017 13:43:57 -0800 (PST) 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=+vEUOvELafIboIuIbd+xZsJ5KrO6+TWsWTVdqJj6f7k=; b=SFASUHcZZW5GcG+LnCYSW+1ef354WMPZxDqS5ea3Ge+8gPIas2dtszN89tfFkff6oL sa0es2voJGBpN9WO349yvvkcD04LdHNizJhsV/aIriM6sCGgJ8oPgB3dyM1MZLyW2mp0 FuaN3eGlRMdbHeNa2NKTkNxAuTZS/J904oKeR+cI7eztK8ozKsrVgeav0seZ3/Xe/9S+ 8y/J/pfV+okcPrz4/IiFzDOn4q//tx9cxd7lTcX64OW4nRZkPs67XThUEqyGEwXaISHV aIcGy8Txf4Tz7nk11of1yy98hZbB6RdVYq5rZzb8r6/3JduFNg0M73CFdd3Xy0KrBvR2 ZIwQ== 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=+vEUOvELafIboIuIbd+xZsJ5KrO6+TWsWTVdqJj6f7k=; b=KwZyM76E1vfhWcDYJsPoWn4Bk9gyndpYTUYmvQRVXqUPjyLyGCOzmC6X58sL386XSt FEtk/mGXa7ATnuotXi5AbEeuExIMOvIAxETqSvFUddqw31fkdWfgDDaudIdIh+LEIwyq nLtSIDaIO2RxC9jryBB2zY72zgG+ptah96fOO646wJBRiT/aJHgHDnWs6HGJYhwSUGcc W4quQx/QZa/SRj3Ia/wAlQxVScA1GmwuBgpAd1pj8QVW9Qt27nRlIHzv0SZdRdbt1+hA mhe0n1E5JeRsSbQyXpXIqiH1uev+jLZ+lM9f0kfWiwtl70bZuE32o0a5xm9XZVQc0pQC cNGQ== X-Gm-Message-State: AJaThX56ZZ3pWMWh322jsE0ENmgzxq0h4nAMvu1ShOnF6Jesb4SFYVWh OAdeBCyXNEZNUS4ky4QfptI= X-Received: by 10.28.112.22 with SMTP id l22mr2339154wmc.35.1511300637140; Tue, 21 Nov 2017 13:43:57 -0800 (PST) Received: from andrea-ThinkPad-T520.homenet.telecomitalia.it (host196-120-dynamic.180-80-r.retail.telecomitalia.it. [80.180.120.196]) by smtp.gmail.com with ESMTPSA id g7sm16804999wra.38.2017.11.21.13.43.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Nov 2017 13:43:56 -0800 (PST) From: Andrea Adami To: linux-arm-kernel@lists.infradead.org Cc: Robert Jarzmik , Haojian Zhuang , Dmitry Eremin-Solenikov , Russell King , linux-kernel@vger.kernel.org Subject: [PATCH 4/4] ARM: pxa/poodle: Remove hardcoded partitioning, use sharpslpart parser Date: Tue, 21 Nov 2017 22:43:51 +0100 Message-Id: <1511300631-1343-4-git-send-email-andrea.adami@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511300631-1343-1-git-send-email-andrea.adami@gmail.com> References: <1511300631-1343-1-git-send-email-andrea.adami@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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. Emulators like qemu will need to pass the mtdparts in the cmdline. 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[] = { -- 2.7.4 From 1584696303754157420@xxx Tue Nov 21 17:09:24 +0000 2017 X-GM-THRID: 1584696303754157420 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread