Received: by 10.223.164.202 with SMTP id h10csp5675532wrb; Tue, 21 Nov 2017 13:45:12 -0800 (PST) X-Google-Smtp-Source: AGs4zMYRm3mTB7DAE8FM9cC0kGypHd0sD5Cn2Ra285T71JYB5IKmDGaMElirJFdz7t79amru8S9n X-Received: by 10.101.100.199 with SMTP id t7mr18952027pgv.316.1511300712696; Tue, 21 Nov 2017 13:45:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511300712; cv=none; d=google.com; s=arc-20160816; b=VHnKW2b4uoQ54Rb5rZsL6SAVjGMow+tgGCuZV44E1mpREmki2GHOISZoL+JTCv91d2 6jzi3hDYN/TSNO2hol68FPbdea6nqhyeYYQLTTAGHC8p+xsU1/LO8wUcbsLFhdHP8J7k eJy+1shWOdXsm128fvFlNCwZSr2XrAAAcsuqlCDpkbR8OBaxrJjOWnYMAH0f5W34TrVi j4xkawuGSRjW6r0+bs1FLFZ8sf6efty8GYBhMqx/SIAI4FrGZBojqwAjj+efX9mJXOFR Y7Fe4HMkmkaTvKjy6BuW0sn7NSIIRxSpcN1eJo6nSliOzbyn6T9kfrG9VIQaQGVkHx4P t53w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=jgELxgKmwgW6Pk/fHrw7IYWSi9U9bfQYjPl3Wz31rHo=; b=DX6WJwPnZUfx3QJx7qdH7bWuBAe1gp3lJ/H0833Im8aI4q7wH1G/+Ru9yUha7bF0hI rgP/IVmhbTMjwLNpGPorcNdXoO10RRQXzSzqiE48AEOqtvWmlkwHcGT3n5dB5muUmAD9 GPQ1MYSxGyGtY5Q0GS3mPMl6BFK+ehsk5o+xosOVgjHdO8ZOc8ICUkYor7NcSJh6x6Il klECUf8FVTRVYcLTu0BTk2APN113IRDKL54QpT2bu+Vdu3mch3604IuX2kMc5Uoh6OZ5 LPie3CSCGvpW5yMVKULZ0pCFldXUxX6ZQz7nmwAOklbx6ScYkaQ1ncMU0ZFugMpHdaO6 tKgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MPC16KXu; 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 a10si11820162pgf.48.2017.11.21.13.45.01; Tue, 21 Nov 2017 13:45:12 -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=MPC16KXu; 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 S1751429AbdKUVn4 (ORCPT + 76 others); Tue, 21 Nov 2017 16:43:56 -0500 Received: from mail-wr0-f196.google.com ([209.85.128.196]:37712 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751229AbdKUVnz (ORCPT ); Tue, 21 Nov 2017 16:43:55 -0500 Received: by mail-wr0-f196.google.com with SMTP id k61so12651144wrc.4 for ; Tue, 21 Nov 2017 13:43:54 -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; bh=jgELxgKmwgW6Pk/fHrw7IYWSi9U9bfQYjPl3Wz31rHo=; b=MPC16KXumvjNrsmyglXRfUlibGOxokGmRSo9AlLKb9SBoILuiXSDlG+aTyfMPpxOOE GMXyYpfT/8zIBmqp+9muDhZ9KkXq+0PyfId2PEn8Qc7/NM7FdGDXvowZZDWsT+8nE22R FFEQ4RnBdmQNBPaEEp1r71MfP7STmXbh+e569C+4PPPf75CrxPG/AO3FDdD6pcuaNa9o 1+w5nx1SIs4dIOWpPCGrqNkT3aMz9iDAHkz+j1TPinry44zLiOwriuXxy83jaswOYqXO EfUnhKs1Y4WQBmeVQAdGHDpugTeljQGFNtqRTqj3ggLUSt5Jqv0G8wvx2qO+AvJP7sAE unjQ== 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=jgELxgKmwgW6Pk/fHrw7IYWSi9U9bfQYjPl3Wz31rHo=; b=Jzc9bcIeVZQf7d5BXkop/VQKjeohzE5jfkwZlzwHvhwordW2gXYrv03dNJ15Uksv5X okXfe231NseRX7XNSanP9chkEjrXynlLmbI70a1ojW9HENPtoY9bilwf91jMlK2Xj8cS o6gI8c/0mOk7N2e5x+G0X3Hbg6fXi10M3EENw9Zvl26PFd67RrAIfubrbUVcO9x3ary7 kOjD8SxBIl1KzW0RQ3xT49ByedZc4uxbEnOaSUVFpsTRdUutq6LtFEMgAV7YTL1XXZNz xgqRnDiXGDQB2BVyMHdff/WLsmD/Qfckfrb5T5KCFAt++QGViEzWaWyBXF+T7IZ77CtM HHXg== X-Gm-Message-State: AJaThX5BwtGoVSaACYm9kYHxdjBsIQxJw4XfvbHdhyXIV6mvAWGNyq1l dReTlftptYfmtPoKWcuSL28= X-Received: by 10.223.153.162 with SMTP id y31mr15072698wrb.216.1511300633881; Tue, 21 Nov 2017 13:43:53 -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.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Nov 2017 13:43:52 -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 1/4] ARM: pxa/corgi: Remove hardcoded partitioning, use sharpslpart parser Date: Tue, 21 Nov 2017 22:43:48 +0100 Message-Id: <1511300631-1343-1-git-send-email-andrea.adami@gmail.com> X-Mailer: git-send-email 2.7.4 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/corgi.c | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index 7270f0d..9546452 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c @@ -606,24 +606,6 @@ static void __init corgi_init_spi(void) static inline void corgi_init_spi(void) {} #endif -static struct mtd_partition sharpsl_nand_partitions[] = { - { - .name = "System Area", - .offset = 0, - .size = 7 * 1024 * 1024, - }, - { - .name = "Root Filesystem", - .offset = 7 * 1024 * 1024, - .size = 25 * 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 = { @@ -633,10 +615,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[] = { @@ -750,9 +738,6 @@ static void __init corgi_init(void) platform_scoop_config = &corgi_pcmcia_config; - if (machine_is_husky()) - sharpsl_nand_partitions[1].size = 53 * 1024 * 1024; - platform_add_devices(devices, ARRAY_SIZE(devices)); regulator_has_full_constraints(); -- 2.7.4 From 1585409432198952975@xxx Wed Nov 29 14:04:16 +0000 2017 X-GM-THRID: 1585409432198952975 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread