From patchwork Wed Mar 14 12:10:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 885735 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ICnSN4WP"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FlGF8ROm"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 401Vxt0V3Nz9sVh for ; Wed, 14 Mar 2018 23:13:54 +1100 (AEDT) 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=RUIGQOLf00j6QAkhlEII8LQud1Ube9Js8JNzm5b1cck=; b=ICnSN4WPuWGil0 hFursnOE7rWm54MiI5ygQpO9CwXVBTXxkqAKjPm1uEBmUo+gb2cuTQ0u1ddcG6U9Og+KPW7GB5rp0 GTg/d3jkbr+bgKrxd9zrQHzBFpt2hoHHPzOnoQDgpAkndTVnUsR+qJsrqYOQv3IIkI9fxSkiviXvD +3wMvGA+d5yu0ua49fmHDt+Bj0pJz3ntzmr1exE5/qJCYf+83q+dp6i08dPQiThHh94pnRVsRQPG4 JhqKX5GpsiuKbn8m+5175K63AdPT0oahjPKkjvAS+6MU8qZmO6tcht2eyoMiq8hhPKsS+vehBFEhu Otkog+Y8EE3S5GJtUv1g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ew5Hx-0002uB-IX; Wed, 14 Mar 2018 12:13:49 +0000 Received: from mail-lf0-x242.google.com ([2a00:1450:4010:c07::242]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ew5FR-0001MW-MH for linux-mtd@lists.infradead.org; Wed, 14 Mar 2018 12:11:20 +0000 Received: by mail-lf0-x242.google.com with SMTP id v9-v6so4397203lfa.11 for ; Wed, 14 Mar 2018 05:11:03 -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 :mime-version:content-transfer-encoding; bh=Mt+Rvfwh6VC+YWT2IemlkHiDKw5Jknu+3GNyRPn1jG4=; b=FlGF8ROmFgBGP+6qa3QoZaiGcH99XixTkLZmrcnW7iRjivaXVUl7Wzg0MjS3LXPQYz dmkLFqovEbEDYntHEfuSfnbaI1SfD99W0o7xOFpo83new1Ee4TdiynoBZyG0Lhv3Gptq rd8BmK+DSPJMvT2GnAfUJYp7TzFStqT/RNeMpJdHi1qNFfxC6BnUENzetOAgIwlDXFbO ykkM5AyiR09bukA4/Da1k1B8Q44nX4H3D/kkzq/9XvRFU5B1v4NZyOygK5PbxSM5erTX F2Ogl24/d/MrZNwbDB1i3der6H/pGYrFTnpszl6SaYlH68hsNKtvmj9vZSyFmBU3HKV6 V4XQ== 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:mime-version:content-transfer-encoding; bh=Mt+Rvfwh6VC+YWT2IemlkHiDKw5Jknu+3GNyRPn1jG4=; b=p5IqDQE48CfELGDQufdPs64wAaaY4QvLzoh2L6T3aw/Bn8lWYu4FzhoUIbtbW8S3i+ 3kGp6GLfvEs6xx42mX4ixUvROAc77ugnj2H0/e2zB9Ozti/gd245/9l0VVB8BAf3qgHR Qsv4aojSE/MYqzqpCDADHBqcpdPCG01L5Ps3h4zAs5aeVqoPKAF7+aqbThAgvJ8pDc6N FdGC2W1rg8K4z/2C/XTOelPOH0VDDDDaz9VvRfDuKhqZF3OKncDAk/GQRS5KmRw0qP9F ixT9/CAm7dB7xKIj1Fz97CIA6qkQ5cuMbVwPHYPXmskMGhoBAj/sKscbPI+YqCOq9C20 spFQ== X-Gm-Message-State: AElRT7ETrHhSMR4Js0cJcvhxAHdLdZFlHcdgrLnZyJQe6F6isK1DB4ny MpXbeQgDQmK7Kn4uI0waYgrNgw== X-Google-Smtp-Source: AG47ELuaVCc6L3uM64SGYLd/dFLg95SSYKgfBTJ3d6Q8TFctobkoC6rsEUT6lKIiP2Ux8Vpc7A8ILg== X-Received: by 2002:a19:8f91:: with SMTP id s17-v6mr3423460lfk.56.1521029461729; Wed, 14 Mar 2018 05:11:01 -0700 (PDT) Received: from linux-samsung.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id o132-v6sm594597lfe.91.2018.03.14.05.11.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Mar 2018 05:11:01 -0700 (PDT) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Brian Norris , David Woodhouse , Boris Brezillon , Marek Vasut , Richard Weinberger , Cyrille Pitchen , Rob Herring Subject: [PATCH V10 3/3] mtd: ofpart: add of_match_table with "fixed-partitions" Date: Wed, 14 Mar 2018 13:10:44 +0100 Message-Id: <20180314121044.12033-4-zajec5@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180314121044.12033-1-zajec5@gmail.com> References: <20180130201059.4424-1-zajec5@gmail.com> <20180314121044.12033-1-zajec5@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180314_051114_565107_74669A4D X-CRM114-Status: GOOD ( 16.03 ) X-Spam-Score: -0.6 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:4010:c07:0:0:0:242 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zajec5[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (zajec5[at]gmail.com) -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Florian Fainelli , Geert Uytterhoeven , Linus Walleij , John Crispin , linux-mtd@lists.infradead.org, Jonas Gorski , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Frank Rowand , Peter Rosin Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Rafał Miłecki This allows using this parser with any flash driver that takes care of setting of_node (using mtd_set_of_node helper) correctly. Up to now support for "fixed-partitions" DT compatibility string was working only with flash drivers that were specifying "ofpart" (manually or by letting mtd use the default set of parsers). This matches existing bindings documentation. Signed-off-by: Rafał Miłecki Reviewed-by: Brian Norris Tested-by: Brian Norris --- drivers/mtd/ofpart.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/mtd/ofpart.c b/drivers/mtd/ofpart.c index 9f497315e65d..615f8c173162 100644 --- a/drivers/mtd/ofpart.c +++ b/drivers/mtd/ofpart.c @@ -140,9 +140,16 @@ static int parse_fixed_partitions(struct mtd_info *master, return ret; } +static const struct of_device_id parse_ofpart_match_table[] = { + { .compatible = "fixed-partitions" }, + {}, +}; +MODULE_DEVICE_TABLE(of, parse_ofpart_match_table); + static struct mtd_part_parser ofpart_parser = { .parse_fn = parse_fixed_partitions, .name = "fixed-partitions", + .of_match_table = parse_ofpart_match_table, }; static int parse_ofoldpart_partitions(struct mtd_info *master,