Message ID | 20230319163217.226144-1-robh@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp787795wrt; Sun, 19 Mar 2023 09:34:17 -0700 (PDT) X-Google-Smtp-Source: AK7set94dHQNhLGaKITYXPzCJM4E7TDPhXQNu3Gbjl4xTOHBx0W2Omf4CLgI0sZ/KR8uI4GpZttG X-Received: by 2002:a17:902:dacf:b0:1a0:712e:1c8f with SMTP id q15-20020a170902dacf00b001a0712e1c8fmr17056255plx.34.1679243657229; Sun, 19 Mar 2023 09:34:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679243657; cv=none; d=google.com; s=arc-20160816; b=BqRyM7mgO/KE95XNofCtVfieby3VsN630OaVkOZ8KjLzDr4ZtwChlX7jzE3Anwe8S9 WOu6a6/+v+UqZUSgguZJTg1cVMaAizsA+cahhXJzNBxapgM8dR2g48Ia+jwh3GKWIt73 5Yh4TSfvMPri285ngXYvnYm9GC6+ouTtrsKFz5cNskhdy3Jl7i80k+GGqnrNLTERZDwa pzElt4mWA0EYBcUqCKEZdYeZxb/4n0TW607546jcJcOlchKoG2pCJDgMEGXd6b3yqh6E 6xHjK1npvjU4Wm+pM5mEGPR5z4WlUl/OkUkUoIb/qiB0VgbH2KuD4PpNX1BlT4Oitfnm UEyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=oOo8FyF7jwRP0L0/DCsqOtLfD9IQ2Dgjo9DgIapHOWc=; b=GLzpaAMW9ciX4OhL5JYeR46X+cnofU0g4TfH/w55QBZ0HBTiHAEzWrgPypEM1cs3o5 x7vWxskOAbWmDAeiS+IbFtZkhyKPxQe0rbrkj6tI8RIZ63ilPQL8VSdstubpoouKiLly XGG3j5z5aNVykettdDXSkGTV4WTckg3zgKM82/SQeE3e9EDt+Lcwu958myzuB+2Ia5If iPs8qUxtkZoIR7gvHwOp3LPeOzHiSWdoqauJ+tgMGcmyJdwrNkp+vl45/QFIdwXE4MUf gir2VDUZv8vJqHiIB5Bg7A7bKkHydAZ2JAAoaHH6H9rOiln1bddbC+cLlEwVGKtCocE+ GPFA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i4-20020a654844000000b004fb9504a5e7si7945423pgs.730.2023.03.19.09.34.02; Sun, 19 Mar 2023 09:34:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230502AbjCSQcx (ORCPT <rfc822;pusanteemu@gmail.com> + 99 others); Sun, 19 Mar 2023 12:32:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230483AbjCSQcq (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 19 Mar 2023 12:32:46 -0400 Received: from mail-io1-f50.google.com (mail-io1-f50.google.com [209.85.166.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0D6720060; Sun, 19 Mar 2023 09:32:24 -0700 (PDT) Received: by mail-io1-f50.google.com with SMTP id d14so1590387ion.9; Sun, 19 Mar 2023 09:32:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679243542; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=oOo8FyF7jwRP0L0/DCsqOtLfD9IQ2Dgjo9DgIapHOWc=; b=uXQ0h2PXFFUToEQYwe1CLRPpbenlLmvujEZ0LQLC9qtjkM9ZaNszJn3a89qYdetJrH HOgt4O3v6aPqyHnzsmYwv272pvOxhSmJ0cPXaOLiXR4NvdbA/1QBOy0W6+TYiEPBYUb2 yMne02lgdA25NSk7r85jAv0bOxj1DXDR20ftlrloyI81aBT+JQk3zYBzkDFPCQjWKSsS AA7LG/oIcgxhowCMTFxpfAClFcOYX5U4T6v6BlXAk8FQeXpNM7/hhYrEM5sc/X5uLct4 bwgCTv/RRjUkUDadkJAvi876TWCL+uTXILGQJ7VL/QZs104w29xSY/uc/4app8RcRAiP SW3Q== X-Gm-Message-State: AO0yUKXjvLsZBrKB3etisBtXcOSYGcdbEYZ2WBdpNPtrYa1gIpn28XDT ZcifW4lCHfla/MJ6Jcmw5ovkuHMfQA== X-Received: by 2002:a6b:f01a:0:b0:743:7742:1bc2 with SMTP id w26-20020a6bf01a000000b0074377421bc2mr3523486ioc.16.1679243542321; Sun, 19 Mar 2023 09:32:22 -0700 (PDT) Received: from robh_at_kernel.org ([2605:ef80:80c7:2689:137d:d795:47e4:3de1]) by smtp.gmail.com with ESMTPSA id a6-20020a5d9ec6000000b0074ca5ac5037sm2262348ioe.26.2023.03.19.09.32.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Mar 2023 09:32:21 -0700 (PDT) Received: (nullmailer pid 226230 invoked by uid 1000); Sun, 19 Mar 2023 16:32:19 -0000 From: Rob Herring <robh@kernel.org> To: Tero Kristo <kristo@kernel.org>, Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org> Cc: linux-omap@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] clk: ti: Use of_address_to_resource() Date: Sun, 19 Mar 2023 11:32:17 -0500 Message-Id: <20230319163217.226144-1-robh@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760814596606110953?= X-GMAIL-MSGID: =?utf-8?q?1760814596606110953?= |
Series |
clk: ti: Use of_address_to_resource()
|
|
Commit Message
Rob Herring
March 19, 2023, 4:32 p.m. UTC
Replace of_get_address() and of_translate_address() calls with single
call to of_address_to_resource().
Signed-off-by: Rob Herring <robh@kernel.org>
---
drivers/clk/ti/clkctrl.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Comments
* Rob Herring <robh@kernel.org> [230319 18:32]: > Replace of_get_address() and of_translate_address() calls with single > call to of_address_to_resource(). Applying into omap-for-v6.4/ti-sysc thanks. Tony
* Tony Lindgren <tony@atomide.com> [230327 10:29]: > * Rob Herring <robh@kernel.org> [230319 18:32]: > > Replace of_get_address() and of_translate_address() calls with single > > call to of_address_to_resource(). > > Applying into omap-for-v6.4/ti-sysc thanks. Oops, sorry, was not planning on applying clock patches :) Up to Stephen to apply it. Reviewed-by: Tony Lindgren <tony@atomide.com>
Quoting Rob Herring (2023-03-19 09:32:17) > Replace of_get_address() and of_translate_address() calls with single > call to of_address_to_resource(). > > Signed-off-by: Rob Herring <robh@kernel.org> > --- Applied to clk-next
diff --git a/drivers/clk/ti/clkctrl.c b/drivers/clk/ti/clkctrl.c index f73f402ff7de..b6fce916967c 100644 --- a/drivers/clk/ti/clkctrl.c +++ b/drivers/clk/ti/clkctrl.c @@ -512,16 +512,16 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node) struct clk_hw_omap *hw; struct clk *clk; struct omap_clkctrl_clk *clkctrl_clk = NULL; - const __be32 *addrp; bool legacy_naming; const char *clkctrl_name; u32 addr; int ret; char *c; u16 soc_mask = 0; + struct resource res; - addrp = of_get_address(node, 0, NULL, NULL); - addr = (u32)of_translate_address(node, addrp); + of_address_to_resource(node, 0, &res); + addr = (u32)res.start; #ifdef CONFIG_ARCH_OMAP4 if (of_machine_is_compatible("ti,omap4"))