From patchwork Wed Jan 17 08:15:21 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: 862076 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=65.50.211.133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="XRa9soYg"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="eNl7Em1Z"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 3zM0KW6CFhz9s7n for ; Wed, 17 Jan 2018 19:16:15 +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=zHlm8KgqtehiPOuT39GyPXauhYKxkj5/7UUE7ZBths8=; b=XRa9soYgg0Zjfc PDHCckVM5ZbZRPjWcht9woSEf2t0cMloVNVqO4/cCVugtPIW5RwLFk4ZpG4TTFNLLoKy2hwwCMzqV qjCSPcEkpK2U2X4w2AUgt4+A5drxr1Q7rnDgO4QpSZLkqKZ/qnuqa1hJPaMtjNcDVZW/2LJnK1tgr DpB5H3zrwDo0q42aw+32akkWxaYADn9Br8U4CQdlTaNrEWH40Q7lK6/EY5c5m8rpWR+tcfOghF+7b EmyFj2vBzjUBURcoDfACrNXZwYXh60IDlJtkKtWHrKwv8uL1v364aR8k120O1OoxmH+K2pw3uDjgm WSMa+QVM8A7VlHXfVvYg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1ebitH-0006KM-8f; Wed, 17 Jan 2018 08:16:11 +0000 Received: from mail-lf0-x243.google.com ([2a00:1450:4010:c07::243]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ebit9-000698-0k for linux-mtd@lists.infradead.org; Wed, 17 Jan 2018 08:16:08 +0000 Received: by mail-lf0-x243.google.com with SMTP id o89so16639029lfg.10 for ; Wed, 17 Jan 2018 00:15:52 -0800 (PST) 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=UqP7dqIJWvWRAyR/26GDDGYxve8+oDgmKsslkdMpdaw=; b=eNl7Em1Zbo6WO+X08p+RXK7spVDtpNfSIxkxjeeQYhenAttajgnqq310wuE/Vb37lg BBORNABfNv489c6mX2w97kQW6aVnJWZbHctgmtsSH6qS5lGP1cL3LHYLk/jzETQmGDOU aolYO+b72cvuFi4Sso9EmKXgUIraa6HpiXlOhjeInARWP64s4i8ZLNz+nzUVZw++70nr mShnjC01o8VYy8DHryRjYDJdiTCIrgnu+pBKd9Vo+43pUj9YliL3Sg8ObkVX4XCmPDjh fqSiebTy3FE6I/953kvUXOGRiHrjnbchIX3FLVxdMIzvPolm1Na4b9O2/8MmlsPUxUl1 lDoA== 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=UqP7dqIJWvWRAyR/26GDDGYxve8+oDgmKsslkdMpdaw=; b=UTp/RgPFlTdvj4H3V7jdXpEFlPHPu6cIUne0x2nsvh6j82hI5QBgqvooHsdnyimQw6 Xse54vzoHTI5onkLmpmptJffJQTINm45PVLw3xkpe7wSfaLcNyqSFqT99J/TwQAU1hQT B65Am3IXxxeRDciq79mLfxnkFoy1eli2ZsetfNTovqYgwc68f2cZApH6QLHC7LqZWLen Zek7ppLIDD8QW7e6i1mh8FRcKJmqUWPFZowJUvYeGIMnPFOC7cMU8s9Y0kPUPaqucB6S A/6RhEBnJWoSjTwBPCOHqou1Y0NS3MP1on7g+2X/Me5AHZly1FFPBM5VgBxdN0fVBTA0 Jylw== X-Gm-Message-State: AKwxyte18TdSeeeJbaa3IoQRRPPI5Y9cgUOFVSD+Rb/GmuLd8NzQT0Tj UVOFbFcGLL9kofGVWFmhfzA= X-Google-Smtp-Source: ACJfBos8CrUhVU+p5Pw5FAWZzUqomSFVUduEVcTWzO7DE6fsoYzGs3ePVShOPGMzVRbQZ8tU/dQ0QA== X-Received: by 10.25.33.70 with SMTP id h67mr7123572lfh.128.1516176950873; Wed, 17 Jan 2018 00:15:50 -0800 (PST) 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 j34sm689911lfi.80.2018.01.17.00.15.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Jan 2018 00:15:50 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Brian Norris , David Woodhouse , Boris Brezillon , Marek Vasut , Richard Weinberger , Cyrille Pitchen , Rob Herring Subject: [PATCH V8 2/2] mtd: ofpart: add of_match_table with "fixed-partitions" Date: Wed, 17 Jan 2018 09:15:21 +0100 Message-Id: <20180117081521.2463-2-zajec5@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180117081521.2463-1-zajec5@gmail.com> References: <20180104070534.16248-1-zajec5@gmail.com> <20180117081521.2463-1-zajec5@gmail.com> MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.8 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:4010:c07:0:0:0:243 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zajec5[at]gmail.com) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (zajec5[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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 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 6bdf4e525677..92fcbac046d9 100644 --- a/drivers/mtd/ofpart.c +++ b/drivers/mtd/ofpart.c @@ -140,9 +140,16 @@ static int parse_ofpart_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_ofpart_partitions, .name = "ofpart", + .of_match_table = parse_ofpart_match_table, }; static int parse_ofoldpart_partitions(struct mtd_info *master,