From patchwork Wed Jun 28 20:30:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea Adami X-Patchwork-Id: 9815447 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 A7E3D60383 for ; Wed, 28 Jun 2017 20:35:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 990DC280CF for ; Wed, 28 Jun 2017 20:35:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C0372838B; Wed, 28 Jun 2017 20:35:33 +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 EA477280CF for ; Wed, 28 Jun 2017 20:35:32 +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=V/vBOldKlBBB+ruZbNkaHyrVJj F2P6UOeNrpEq6y54LEPqb80myYbPxXkU12xnzYP20r55xAzoaHSrF+FZn56ENbcGT264Jzg/vpOdm mT+HAPC4YGmLrd248PC22csqcdrefLYozQvjrhtwj0uVjTCboH62sM1WbFMZ3S/eO+IcSxdvS5Rwy 2TSxx3rGUy2JoBA40637tkfgTm6HBpxGQb78/vULCyhHPVb/Bpvkfv/melIA4SX2RkH51ofVnVqH1 tEEexWcRIje0VU0LsfU8iTzldl1QDN49DwJH7zYqo1YLZMkZOybsub8MaXZ2CilHO0r7pCJlHMAyT 1LvTtVaQ==; 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 1dQJgP-000125-Ov; Wed, 28 Jun 2017 20:35:29 +0000 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dQJcE-0004CK-Kw; Wed, 28 Jun 2017 20:31:12 +0000 Received: by mail-wr0-x241.google.com with SMTP id k67so35142179wrc.1; Wed, 28 Jun 2017 13:30:49 -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=dLuZRhHWaowcEG9DHk82597NTtvEXhIDWJ8odQgDpN/pVeLIRyy+PRY+kdztMAjsez lmI7GvNQAaLH06uOXZDXjpc3wUCznKwIngFOOFT/DBZgixzmzQwBq7OH2GaoPp5AN2ZT lcDdXy4MpMccmk12ThADTG60hAcBERaLi08m1QFaCt0fZ8X46j3kBUlSuigH8IWo1E6x z/uwuvbQPuIQUEUpX87W6noWTRLQfxVkIWeQyD0vEMCef5d6Mx2+hQyE7ZkU+oJEWRqO MHpDOdBGt/O0pK64IFM2POuypkX3cjz/DaWrrwQNk5XEtr41ohqOVNd5FPwydfmKI1xJ 6FSw== 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=pf6J0DoDLo3Q82+IU92YlFn7Y1PeMKsa9hm1JSiBruao0aWu88syWr0PZsbBKJsMPm 7xvq62CsEqd7yZCUXLmy2m+LqwIV3UNeerDwps0SAomac3oVnGC/IrH4hKt+0GaW+y6q NA2FSDtl3qH4lSPDLnMxghNx2ovDzO161wvB9AIXQdGGEW8VGAvPETZ7b9xlYu+TcqNm VP7T/V5iHzgunVBjNgy8edxyUjWb587ZQvcess666WtmMv7RF10JMwYojgB3d7IYOAcQ /PDCT/5DWRMp9b9PEdXF6/dH4hhsryqjZALMauDpXY36430lKzB5GIIoqFLew/+lpal9 6V7w== X-Gm-Message-State: AKS2vOzGcuAlhIv0xCVgZUefFzPMWstlY/1F3zNjCrt9m5jhynb8LitK BNID6J1C/+YN5khGChc= X-Received: by 10.223.182.170 with SMTP id j42mr21038302wre.87.1498681848381; Wed, 28 Jun 2017 13:30:48 -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.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Jun 2017 13:30:47 -0700 (PDT) From: Andrea Adami To: linux-mtd@lists.infradead.org Subject: [PATCH v4 7/9] ARM: pxa: tosa.c: remove hardcoded partitioning, use sharpslpart parser Date: Wed, 28 Jun 2017 22:30:34 +0200 Message-Id: <1498681836-3765-8-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_133110_868902_9061D0FB X-CRM114-Status: GOOD ( 12.92 ) 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)