From patchwork Thu Mar 28 14:19:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Gorski X-Patchwork-Id: 1068252 X-Patchwork-Delegate: richard@nod.at 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="S5WKM0Uq"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="eejvCUol"; 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 44VRpS3Mr3z9sRG for ; Fri, 29 Mar 2019 01:20:00 +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: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=YBUAlDJ5Jyn+o7p92DEo3QborwfAk0r72OhxVKgP840=; b=S5WKM0Uq14SV5gWzfPP+kG/tES I1wB/dNfMbsaFqA2NAEIVq+gEmZKVm9dq8C9IUJBMoGpH+a6cQ7yQvhJFkDMaqmzdnFBMdvuyJJeV mwBk2YsYdDMsF5OY1BEm3BRSnk43752QSHM0BSYabRKOO+lYkVkhJjeWXbzjTvQeNaungzGtNsEv+ s2+29q8PY+MnlkTC26Lc8RHRa4B8pq7/j9Z6SMccZtLWAoK8RTkftnJNcBQ0g3MQuEWHTJoimI6tP 4HTgb7h0ZGMqhQvMALtthLhM5loxMPtJ8d9dGmykPada7QA91UVua8E29Jtqj5miO5wZmcuRgu+GQ pXofTTfg==; 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 1h9Vsn-0002hG-6z; Thu, 28 Mar 2019 14:19:53 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9VsF-0001vl-P9 for linux-mtd@lists.infradead.org; Thu, 28 Mar 2019 14:19:25 +0000 Received: by mail-wm1-x341.google.com with SMTP id n25so1473848wmk.4 for ; Thu, 28 Mar 2019 07:19:19 -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=5SDmaay2PipicUYSZvHglq+HG44PekQJ0piwteiL9L0=; b=eejvCUolEysHGqzH8de5mqsot14FOnHV6FOzGR/b97GQ1j19aui7unMT/aP6uKDp5u L87rtTxdr2TDbnNXJEGjWVFPWBlUw9L4SzmbWjGT+M36gQKu6IttCTp573TCRagw6Ghj xWdbqf6xEnjWThgSoKiH5FrihFdrS9iA2fxjYCujEZCLjmHIYdtGHJGhM35uPmflkPjK rKhxhNX0PBRkD9N6g9H1bbnBmlv+sPYK5/LmMaPw15IGov8p5N80xJaedlhlrXhb+4ev NA9rmLnDi6hd75snjBzeGWhgLKYPHffvuHXXWLd+OWtOYd54dYtyGugKSQt+mN9WNdVh eN7w== 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=5SDmaay2PipicUYSZvHglq+HG44PekQJ0piwteiL9L0=; b=oY0opIJPMIHP33JEcHjRG05TiJWOC7+gyabaJPZK5LmaAiOjRVPEel57WkN22nAZsU DhHAo0KSz694mbvf6TU4OrGturw6915opg8eHrWtCoRSUPk4RVGf1JRJcBeGxdG6totB Y5wbi/af+8OBmA2ErGPAY1l5zod0vmcmzZw7euColQx97Z+JLG5muq/rpbbWjFHfDW1y JVlXoVgI0woj5PM+JFANkHE3aTeSwaonnmdHWwjIeePNMf005qNkhBJIBLyWZTdFXbpA JTsc4ytk9CbRR6hbqTL+XwYnnoB5FeAJ4l1eZs6jJyoTbFZEjwlJBn2syLSvchA3tKIB yjPw== X-Gm-Message-State: APjAAAVrDNcLlBpRXoH97yHkT7hBuaIVgoKt5iyHv3WPYt3zY+MZaQ2L DOPjIUdSZs6go2d75zhUWUk= X-Google-Smtp-Source: APXvYqw3064co9Xwn6q2uRwBFf+tRlmYmV6nGwG5EfVRz48DXRUZ9f14iDxVaBgHK3/IkBCubSsFHA== X-Received: by 2002:a7b:c382:: with SMTP id s2mr177301wmj.56.1553782758255; Thu, 28 Mar 2019 07:19:18 -0700 (PDT) Received: from localhost.localdomain ([2001:470:9e39::64]) by smtp.gmail.com with ESMTPSA id t2sm51802879wra.9.2019.03.28.07.19.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Mar 2019 07:19:17 -0700 (PDT) From: Jonas Gorski To: devicetree@vger.kernel.org, linux-mtd@lists.infradead.org Subject: [PATCH V2 5/5] mtd: parser_imagetag: add of_match_table support Date: Thu, 28 Mar 2019 15:19:10 +0100 Message-Id: <20190328141910.5723-6-jonas.gorski@gmail.com> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20190328141910.5723-1-jonas.gorski@gmail.com> References: <20190328141910.5723-1-jonas.gorski@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190328_071920_369975_A1AB806F X-CRM114-Status: GOOD ( 17.73 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:341 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (jonas.gorski[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -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 , Florian Fainelli , Boris Brezillon , Richard Weinberger , Marek Vasut , Rob Herring , bcm-kernel-feedback-list@broadcom.com, Brian Norris , David Woodhouse MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Allow matching the imagetag parser for fixed partitions defined in the device tree. Reviewed-by: Rob Herring Signed-off-by: Jonas Gorski Reviewed-by: Florian Fainelli --- drivers/mtd/parsers/parser_imagetag.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/mtd/parsers/parser_imagetag.c b/drivers/mtd/parsers/parser_imagetag.c index 74b66d009b5c..9537c183a3be 100644 --- a/drivers/mtd/parsers/parser_imagetag.c +++ b/drivers/mtd/parsers/parser_imagetag.c @@ -24,6 +24,7 @@ #include #include #include +#include /* Ensure strings read from flash structs are null terminated */ #define STR_NULL_TERMINATE(x) \ @@ -200,9 +201,16 @@ static int bcm963xx_parse_imagetag_partitions(struct mtd_info *master, return nrparts; } +static const struct of_device_id parse_bcm963xx_imagetag_match_table[] = { + { .compatible = "brcm,bcm963xx-imagetag" }, + {}, +}; +MODULE_DEVICE_TABLE(of, parse_bcm963xx_imagetag_match_table); + static struct mtd_part_parser bcm963xx_imagetag_parser = { .parse_fn = bcm963xx_parse_imagetag_partitions, .name = "bcm963xx-imagetag", + .of_match_table = parse_bcm963xx_imagetag_match_table, }; module_mtd_part_parser(bcm963xx_imagetag_parser);