From patchwork Tue Mar 28 20:15:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 13191518 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7C6C9C76196 for ; Tue, 28 Mar 2023 20:17:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:MIME-Version:Message-Id:Date: Subject:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=YFcZf9fPPrmvlJB/wyAed8YxmHM+pnvJz8bW5FAwhn4=; b=o1zt2rJ0JjCsEK UY+gEgIjBDDgM0vNeOZpe3UoHBx2zeLqBQ/1jVtzEF9uHCeY/MA/7Z5O8S88eznorKemey35L2OzL 2T/0wkyDH21qG1Y8Q+yrFwDU/ETvEUxn0BMkVLeiROIengFNRQXil7vAEB+WNxvzTtoMzQVP1rc/j be+pEYYLAPULibUGR47IaJE0AaQF72yotf57TjuP5E+eSbVq/8nzVE+7fsodvn0ZATcvN1rYIScQo cXmZNYIXmCKHwDWsQATRk9MfWhUjUSehjypZJ69qTBYHyVvGzpoLNizubII+iZdkLfKuEH79/8KMT sIskyx1vGswfLGFMGh1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1phFjt-00Fl2D-2O; Tue, 28 Mar 2023 20:16:17 +0000 Received: from mail-ot1-f45.google.com ([209.85.210.45]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1phFjr-00Fl0v-03 for linux-arm-kernel@lists.infradead.org; Tue, 28 Mar 2023 20:16:16 +0000 Received: by mail-ot1-f45.google.com with SMTP id d22-20020a9d5e16000000b0069b5252ced7so7042388oti.13 for ; Tue, 28 Mar 2023 13:16:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680034572; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LJY6pOPdDa4oqX5OXa+Badi5ySmgsIj2CbDDOIk/1F8=; b=IH+fQaXeui4vmMsVDnTGxM0xYcb7uCw1QhCxWp30Cwjly/R72CkOUt4U8gnuQohVlZ ntb11sfqtNwTl5wppm7hAIjy96mAuAzopAOGBJG+RWD2qAzmoymS718VNMaSkHBxz/A5 Kw/KQzDPjLs+RXu/6WMgxzoMO9zlhXTh3skyvgreopxJIPClia4BA/ivLamPErx0NTo5 B/dUetkk28UhqFkxk5/wOoKcbnhNYKtmYfGhtiL6j4p6z6lJIYuH8ZTa7KPW63KqmikY +B3Bd6PRGRr928f/AkOdpC/zNiAflks4HPg5g2LFIYVXs4Kg5wJa0RFN1ISw8FeHkBDX IU5A== X-Gm-Message-State: AO0yUKWFJ3UkjXCav5F7pYvhUIRRvfHbZMo+8pz2KJ7KjdNjN9KLQJ1d +GV78V+LUnAVqWh9iOo+aQ== X-Google-Smtp-Source: AK7set9GAgC93luzWNZuofJauP57z3vXyLI4sRAP80NLLCHRI4Txb9cd8obWGvd6gSVOAMPakodRgQ== X-Received: by 2002:a9d:6d82:0:b0:69f:8da7:5463 with SMTP id x2-20020a9d6d82000000b0069f8da75463mr8887322otp.31.1680034571938; Tue, 28 Mar 2023 13:16:11 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id l26-20020a0568301d7a00b0069fa776d3c2sm6931170oti.18.2023.03.28.13.16.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 13:16:11 -0700 (PDT) Received: (nullmailer pid 3993665 invoked by uid 1000); Tue, 28 Mar 2023 20:16:10 -0000 From: Rob Herring Subject: [PATCH 0/5] of: More address parsing helpers Date: Tue, 28 Mar 2023 15:15:55 -0500 Message-Id: <20230328-dt-address-helpers-v1-0-e2456c3e77ab@kernel.org> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAPxKI2QC/x2N0QrCMAwAf2Xk2UDXTRB/RXxI28wGSh2JDmHs3 w17vIPjdjBWYYP7sIPyJibv7jBeBsiV+otRijPEEKcwxRuWD1IpymZYua2shnEJIV/zyIlm8DC RMSalnqun/duay1V5kd95ejyP4w80lXgveQAAAA== To: Michael Ellerman , Nicholas Piggin , Christophe Leroy , Stuart Yoder , Laurentiu Tudor , Benjamin Herrenschmidt Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org X-Mailer: b4 0.13-dev X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230328_131615_052761_78088E81 X-CRM114-Status: GOOD ( 10.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series is part of some clean-ups to reduce the open coded parsing of "reg" and "ranges" in the kernel. As those are standard properties, the common DT code should be able to handle parsing them. However, there are a few gaps in the API for what some drivers need which this series addresses (pun intended). I intend to add these helpers for v6.4 and then convert the users in v6.5 to avoid any dependency issues. This series and the WIP conversions are on this branch[1]. [1] git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git dt/address-helpers Signed-off-by: Rob Herring --- Rob Herring (5): of: unittest: Add bus address range parsing tests of/address: Add of_range_to_resource() helper of/address: Add support for 3 address cell bus of/address: Add of_range_count() helper of/address: Add of_property_read_reg() helper drivers/of/address.c | 76 +++++++++++++- drivers/of/unittest-data/tests-address.dtsi | 9 +- drivers/of/unittest.c | 150 ++++++++++++++++++++++++++++ include/linux/of_address.h | 31 ++++++ 4 files changed, 262 insertions(+), 4 deletions(-) --- base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6 change-id: 20230328-dt-address-helpers-2f00c5c1eba4 Best regards,