From patchwork Wed May 31 22:40:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea Adami X-Patchwork-Id: 9758413 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 318CF602BF for ; Wed, 31 May 2017 22:44:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 22EF928453 for ; Wed, 31 May 2017 22:44:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 17C58284D2; Wed, 31 May 2017 22:44:59 +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 C476028453 for ; Wed, 31 May 2017 22:44:58 +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=xb8oRVYqSvaeNYjish/BpD+qtUjfnLxcGuUQWyCO6G0=; b=mZWXLLWbZ9eCHWBuUHSGV46xv0 EkiKqn4eCVvg9pwb7u455atPpgp6Vh4BtmDc6z+GHkUTH+1wK7GLueLZgc5WCyCyAjFRPA/9CZzLU t60p4iJYuUoYRxehnjcy5gfsUFTIC0+u+mWtMP4U3flNLRoWvrHGyW9ufjOCa4+ILAJwNfCxNpzVX MQVWWjn7F1edT1KvZ1AmGPFLeS/5GdEUPBiUKSSzfaruYgpd7i388yZyodWHuAtdNtLVqUKnqH62P QBabSCPeR0AxjYb/JC47140EGnJ6bAyDKzRlA1bbCG2f7OIlUD6jzYtmPCX2ZsmMfqI7ofj+KiVls /aP4dbgQ==; 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 1dGCML-0000od-7Q; Wed, 31 May 2017 22:44:57 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dGCJ3-0004gP-De; Wed, 31 May 2017 22:41:35 +0000 Received: by mail-wm0-x244.google.com with SMTP id k15so6947037wmh.3; Wed, 31 May 2017 15:41:13 -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=7QfmLROvUBVOmu/Cga+xUO0aV6kr8I2dNsjdxLAPP6w=; b=q9Pw7gWjU4uMe/Gh/Cj308K1DXVu1NaU+JAWIpv4ntbPxTYNfXSz3hJv68Cq8qvIOL jQP4MacNuxrY+4Pe4ZqccobGMmNxDbbRGqp8kpkNYPrxq3lXVs9jRZfly2IAmxKFc8uf p3aRoSZoU7JEi8UuA8Dir/QlPfa9fEwYIbmJsVJdhhgPC+yPoOb0X13QN6c7x3w1YO+v pUWEKoxaFmfSNbn9UYlLq4efSo/PBuDDeuYpdLrvT3vkD4jncCgHVJOJbuOh9NMwbkKH YBmtXxVOuMbMjfnci7m1SUoRghTXxDsR6cDBvXtLbmQifZrwSQtub7pytSOymqgGhXXt o4bw== 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=7QfmLROvUBVOmu/Cga+xUO0aV6kr8I2dNsjdxLAPP6w=; b=qN/ABA+RSngemkC1xB//iMTrLwlCnzjNI9wCFXrjNgqudfOHimpi23gDuM9K/nvLQE DJX5U/P8uJM2EDw6l9JEGlp+YlXQNqgKaL9tws3GLpUrSNR/C+PPeDFkXj3HxMOmWn09 vo5nJQ0aFrdbCNAamLaqGOkcCa7DmmRAd6aDbdvDXCc1hdrLHdXcFoNFxbBfwcPvPyNx xoil/w6Ph8yqdHBnR5GWgXk5Mk8R3NJp7CNFDFhJVFbSIgDHpEBAU7799a6e5WEEurEk 2ZeEsvUNOYL6L8TA7FlXPIz+2apCLSKdVt7GOY6hzrnphjWxHf2+cnXgnzv9DRKlUEs7 CiIg== X-Gm-Message-State: AODbwcBgKrnu4rArAFBXqRf8/CoC6DqCrpyJ68Iyo8qSeWg7EbxKdJzA ns3VPJKUPrCkz1dVmbo= X-Received: by 10.223.155.214 with SMTP id e22mr2123836wrc.33.1496270472341; Wed, 31 May 2017 15:41:12 -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.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 31 May 2017 15:41:11 -0700 (PDT) From: Andrea Adami To: linux-mtd@lists.infradead.org Subject: [PATCH v3 7/9] arm: pxa: tosa.c: remove hardcoded partitioning, use sharpslpart parser Date: Thu, 1 Jun 2017 00:40:56 +0200 Message-Id: <1496270458-6479-8-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_154133_637003_5CB17A80 X-CRM114-Status: GOOD ( 13.01 ) 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/tosa.c | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index 13de660..3074aae 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c @@ -673,24 +673,6 @@ static int tosa_tc6393xb_suspend(struct platform_device *dev) return 0; } -static struct mtd_partition tosa_nand_partition[] = { - { - .name = "smf", - .offset = 0, - .size = 7 * 1024 * 1024, - }, - { - .name = "root", - .offset = MTDPART_OFS_APPEND, - .size = 28 * 1024 * 1024, - }, - { - .name = "home", - .offset = MTDPART_OFS_APPEND, - .size = MTDPART_SIZ_FULL, - }, -}; - static uint8_t scan_ff_pattern[] = { 0xff, 0xff }; static struct nand_bbt_descr tosa_tc6393xb_nand_bbt = { @@ -700,10 +682,16 @@ static struct nand_bbt_descr tosa_tc6393xb_nand_bbt = { .pattern = scan_ff_pattern }; +static const char * const probes[] = { + "cmdlinepart", + "ofpart", + "sharpslpart", + NULL, +}; + static struct tmio_nand_data tosa_tc6393xb_nand_config = { - .num_partitions = ARRAY_SIZE(tosa_nand_partition), - .partition = tosa_nand_partition, .badblock_pattern = &tosa_tc6393xb_nand_bbt, + .types = probes, }; static int tosa_tc6393xb_setup(struct platform_device *dev)