From patchwork Wed Jun 28 20:30:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea Adami X-Patchwork-Id: 9815455 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 783E660383 for ; Wed, 28 Jun 2017 20:39:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 69F0D26E40 for ; Wed, 28 Jun 2017 20:39:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E4942841E; Wed, 28 Jun 2017 20:39:52 +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=unavailable 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 1B7D326E40 for ; Wed, 28 Jun 2017 20:39:52 +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=xNu1YupsR7P+YwdjMxy95U4gQ3FkLTKis/IkAmYvMTQ=; b=qprBoQGrUNq1iQdDsvfe1fgx6q 5HGthjt58djJ3T/ULfUi6c13WoUefE1cuaW9z5VDtTzy6bTky6z3En5ecjIRT7VwDhTzqHXFfrCI3 RX21nqQgWp7/2PvfYsLpFGXoGYojgMiJZuTEh0KwbMaaaEUunBx74V2Mc43nUCj3QBDrQodHP73v9 4ZJiuJgEBJT2b/mZMC5mG8V+lsEkVUR+1QrBPL9Cj7GZsC2bjhERnq7d/apYl9ps0XJXmGypX/QNY v78NhLj9Krav2/wbWXs1U77VENlZcz+a+FSfH2b1mlfHzg8jgdfFSX3Qc/3a/CFn1HbaDCSEa2JVQ LA58+aBA==; 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 1dQJkd-0003lp-BN; Wed, 28 Jun 2017 20:39:51 +0000 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dQJcF-0004CQ-UX; Wed, 28 Jun 2017 20:31:13 +0000 Received: by mail-wr0-x242.google.com with SMTP id x23so35291090wrb.0; Wed, 28 Jun 2017 13:30:51 -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=X4jQsVrDFmWqN1dlsUkA2cktO+pSHcf6dhzDsUb6vYA=; b=FVcNJ3aNhaV+2Fc0I2ooOUGg5KgtWTFtP6bVx5OaAjhNPQi2WK9SPl5GGRiMupRSca qwM8h0aHz9PMOS/tzuL7w19c2mLG7vhxXuayFl81XxOb+JUA/EsT8jxKHeeuLCpSWeLv MtqO9KH53j2qiKefabv80xMC47+hi4PYW56dTkIQkRs4FcJKeDCOZZyhlCJDviJWNj5g s2U9eLjHzURnDL7hj40HZQA4AkCvpfWY6oRqhoyqSBxQ7PTbHHZvrnz3Vy/iwJLoQDXo Z2V0XwpKL5R4s2q/qe19Ti63DPxBq46NEDLo2ZGv3oOlqEGGytUzEu9EU0MycIc61v6G PtEw== 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=X4jQsVrDFmWqN1dlsUkA2cktO+pSHcf6dhzDsUb6vYA=; b=MnhDfWYwZ4a/wbHHt21KcuHAySTlMCNUvX8DW18SB/W7mhSv93EywA7xzisxijOM3c LNfeI6zOGOC8Ouw/4z4k9t08NMznFYeX1wxOCu+QKHVE1kPME6XpMxMUyDtR3oE2BAUx vZOKZ6XSvf7WzVRMIjonrjfhx3TLen4tGn3PrfL0/T3a1eToN1f5hW/hPiATV+3bHb2k 435dfj2VQVb057H+9IPq3nQ/ADKl9RoQC3XS8m3gaoR8ciUDaWpJbQglE6GQv2CNz5jD DKDdFL+SFlU43T2FszyrPq+zE5xE4+nC6BowJYDButPfKSVDBXrv/izmoyeNSaCRFfDQ oVvA== X-Gm-Message-State: AKS2vOw2j6q/iaGXlfN4Tz/KC7WOzYfhLscISlyVvEBO2LwIcDaiaT3u LyfzQJGwEBql4L3bXFE= X-Received: by 10.223.169.169 with SMTP id b38mr13054213wrd.126.1498681849676; Wed, 28 Jun 2017 13:30:49 -0700 (PDT) Received: from andrea-ThinkPad-T520.homenet.telecomitalia.it (host251-139-dynamic.104-80-r.retail.telecomitalia.it. [80.104.139.251]) by smtp.gmail.com with ESMTPSA id h16sm10832684wma.14.2017.06.28.13.30.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Jun 2017 13:30:49 -0700 (PDT) From: Andrea Adami To: linux-mtd@lists.infradead.org Subject: [PATCH v4 8/9] ARM: pxa: spitz.c: remove hardcoded partitioning, use sharpslpart parser Date: Wed, 28 Jun 2017 22:30:35 +0200 Message-Id: <1498681836-3765-9-git-send-email-andrea.adami@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498681836-3765-1-git-send-email-andrea.adami@gmail.com> References: <1498681836-3765-1-git-send-email-andrea.adami@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170628_133112_227159_26484FFA X-CRM114-Status: GOOD ( 14.15 ) 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/spitz.c | 34 +++++++++------------------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 67d66c7..21a2e42 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c @@ -739,21 +739,6 @@ static inline void spitz_lcd_init(void) {} * NAND Flash ******************************************************************************/ #if defined(CONFIG_MTD_NAND_SHARPSL) || defined(CONFIG_MTD_NAND_SHARPSL_MODULE) -static struct mtd_partition spitz_nand_partitions[] = { - { - .name = "System Area", - .offset = 0, - .size = 7 * 1024 * 1024, - }, { - .name = "Root Filesystem", - .offset = 7 * 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 spitz_nand_bbt = { @@ -808,10 +793,16 @@ static const struct mtd_ooblayout_ops akita_ooblayout_ops = { .free = akita_ooblayout_free, }; +static const char * const probes[] = { + "cmdlinepart", + "ofpart", + "sharpslpart", + NULL, +}; + static struct sharpsl_nand_platform_data spitz_nand_pdata = { .badblock_pattern = &spitz_nand_bbt, - .partitions = spitz_nand_partitions, - .nr_partitions = ARRAY_SIZE(spitz_nand_partitions), + .types = probes, }; static struct resource spitz_nand_resources[] = { @@ -834,14 +825,7 @@ static struct platform_device spitz_nand_device = { static void __init spitz_nand_init(void) { - if (machine_is_spitz()) { - spitz_nand_partitions[1].size = 5 * 1024 * 1024; - } else if (machine_is_akita()) { - spitz_nand_partitions[1].size = 58 * 1024 * 1024; - spitz_nand_bbt.len = 1; - spitz_nand_pdata.ecc_layout = &akita_ooblayout_ops; - } else if (machine_is_borzoi()) { - spitz_nand_partitions[1].size = 32 * 1024 * 1024; + if (machine_is_akita() || machine_is_borzoi()) { spitz_nand_bbt.len = 1; spitz_nand_pdata.ecc_layout = &akita_ooblayout_ops; }