From patchwork Wed May 31 22:40:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea Adami X-Patchwork-Id: 9758435 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E51C860360 for ; Wed, 31 May 2017 22:51:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D567D2766D for ; Wed, 31 May 2017 22:51:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C8A8F284D2; Wed, 31 May 2017 22:51:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7EEFF2766D for ; Wed, 31 May 2017 22:51:18 +0000 (UTC) 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=SxSXBVR2RCdZb2Tl+ftT5hOdqrbNNjYVK3j2fX8/Fl4=; b=Vfuhr6zSOMOktUUojbsnLtVzwF O8ZvtuS83Obze72uLJ+gDnpm+3wtvAj8GM0rJOOpRYAvBLCs7vWuQcmviIko+CQ0QrEfnRtBrjPhq bhcMbf5SfdSSoqgsLRhR/YqvFYzZ4FXgOMCSs1JP7XqVc3+CYYKWwRqfelst4lLxMH6aitzwodJJc qOwMBTggn+zCPNKQ499JziYPAqWlhvpZW1cF1pazfMINj5J9x1q60YMkYN8pXTjdF8GJ6IgJ8nlld jdLWNLM2JZ4nkcY8equRVboh+bmIjGw2PgyoxLIjx58qDcnJ6q944DzEzfXzYjrZQa4boKQH3ue8+ sYG2UXZQ==; 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 1dGCST-0005Le-G2; Wed, 31 May 2017 22:51:17 +0000 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dGCJ3-0004gH-QK; Wed, 31 May 2017 22:41:37 +0000 Received: by mail-wm0-x241.google.com with SMTP id k15so6946880wmh.3; Wed, 31 May 2017 15:41:12 -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=8OfD5GThbZFUCMWREbPHQrJyk7tKJtP/MRTcAEZHn0Q=; b=UuWnSOu3ChBLb+YejQchuwKs3e7j3B9fl+HUZgNL283acxcJaRWFRiywDmhDQhT3Hy /xwbXwWnXYgxIpfmB6TJN2Gozii32Va2BvUCe+6bXQjogH76PWcn5AqXALAOgRJxrNaH o3hMitzs+jzlgH5mJgG7WiwK23gXbTTpPoy29iSTjXYoA4bho0SGTIYyatP8OKFmLth6 kUg+T/BE4W4M2iQAmmNmyg4pkqhukVSS2cAGMX0QKQZ5VcZM0rta1w1pQrdV2jlG/aCh x6a6rF0odpKHCdlr8wQvonH/3KmJJpStn6N7Nz7WgYcWE8bPlI8/zMVTZaIsDHTkJ0I5 C9pg== 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=8OfD5GThbZFUCMWREbPHQrJyk7tKJtP/MRTcAEZHn0Q=; b=g4TfN3PH4/GN/PjEbScRZZPYAjPANd6m/11bpdps/DJEeAYxFP2AjVzyZUkZVH9Gmb b3z3fK3qxycHxcrSGVNF+Ov3GDF25yTpwq4H5O+e9D7m52ZZF1IYeGRYlQ8ndMFEcCp/ nJo4YVeilrMPqdlbdKjHIeVekqBQVbBqovcuJzH4aJRGAUaeMwuoMI1cxIgVGTdct3V8 6/SDNszozEol/YC98g57MaU0PGLGBq2Y63NzZNtW2vx30jAiZ95FFLU3ElyOgwi/zNX/ XgGKjMulA5UM4iaf7z767kDLxL2Z94AFaAtprBnF3XYYVpKV7JMH2jCiq9+/R5f9Uz1m uwlQ== X-Gm-Message-State: AODbwcBKFIuAEheUgndPOxqlIXmQ16NlvUIMQO3ICMMqZ8+pvc4m6GnY 3B53Hkc8dcEKIzOOT6A= X-Received: by 10.28.22.12 with SMTP id 12mr6570863wmw.97.1496270470925; Wed, 31 May 2017 15:41:10 -0700 (PDT) Received: from andrea-ThinkPad-T520.homenet.telecomitalia.it (host134-11-dynamic.32-79-r.retail.telecomitalia.it. [79.32.11.134]) by smtp.gmail.com with ESMTPSA id j1sm41840356wmf.6.2017.05.31.15.41.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 31 May 2017 15:41:10 -0700 (PDT) From: Andrea Adami To: linux-mtd@lists.infradead.org Subject: [PATCH v3 6/9] arm: pxa: corgi.c: remove hardcoded partitioning, use sharpslpart parser Date: Thu, 1 Jun 2017 00:40:55 +0200 Message-Id: <1496270458-6479-7-git-send-email-andrea.adami@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1496270458-6479-1-git-send-email-andrea.adami@gmail.com> References: <1496270458-6479-1-git-send-email-andrea.adami@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170531_154134_118356_B1B3722A X-CRM114-Status: GOOD ( 13.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: 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-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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..2412add 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), + .types = 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();