Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp191684pxv; Wed, 14 Jul 2021 01:33:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoVk3L2aO/Kn9/K/w2NhCKSbaWjXI8fllZ6DSYe2UKEBOFkril9nh2tDJBv4dDzRzp31AO X-Received: by 2002:a50:ee88:: with SMTP id f8mr12134208edr.331.1626251635308; Wed, 14 Jul 2021 01:33:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626251635; cv=none; d=google.com; s=arc-20160816; b=jVCt9Lx0Cyb4P3cNnf6wMvgRphfrMXqNEpTHgdZf8YZ6QjofwJrK3IG+bdrEgl69dE MLbTddIYdgAoTGTYx/TUxfeyyyFY3i2FrChH9S73GAkQ+rRTphp9xk2/prnRbnzTBO97 NAnIz6Y4Soimndyg9bVozyHBsFkqvSOtLMpxvqWNn76OQdufHtx6CM+gt8KlRwRHGa7q BuS+rmWiqM4guX9bt7Be/gIIQ/YBnMI6iZwLp38GwDdjVWnDzCn7n/aiVXC6meRxyYvi kPVF2pJDxjCSLAx8PiCXj1ZmLizkkQAqNtrFm83ReUZM0QXKzqkdp4OkVDubrIEfhN3y o31Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=GME2cpY9x75Wz/QBGWPpBv2Kn8f8+/sPxnB6FEaSnCk=; b=zmzJZ6BphLDJNU44NZuQEmZr5F3bhqshy6ASA6q9RbmERTQEdwEAP3YYhUDZ+qviqW 6/xhbYsOHseLqx0RMFC9UIXbZauvK/eOoJ/CGgpT3sPigsa3X6spMa0tSZI9/jcbyx9T JgY44mmOLlQXGKT2eY/ZhzoQj/9PCo1V5q+LkH6NwF+czJg8a8Cj/X7FfW1kJRXp65zY tf8s3meAeqCEwCSCUkdXmbqXwyEFE6reS8llIHI2nO7bzV9egS7O9rlIhrK8opjfbfTi Pay0Ja4/ANOiMti+hNDAPJQSQXJARrAbahThDDeSU+jeQVTvpp4SozbhCY/Vc0Z0wOHU RX2g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w9si2085448edx.175.2021.07.14.01.33.31; Wed, 14 Jul 2021 01:33:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238545AbhGNIfT (ORCPT + 99 others); Wed, 14 Jul 2021 04:35:19 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:49436 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238496AbhGNIfR (ORCPT ); Wed, 14 Jul 2021 04:35:17 -0400 Received: from [IPv6:2a02:810a:880:f54:e49e:3ed0:1a77:5623] (unknown [IPv6:2a02:810a:880:f54:e49e:3ed0:1a77:5623]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dafna) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 70D611F42AB2; Wed, 14 Jul 2021 09:32:11 +0100 (BST) Subject: Re: [PATCH v6 09/11] memory: mtk-smi: Get rid of mtk_smi_larb_get/put To: Yong Wu , Matthias Brugger , Joerg Roedel , Rob Herring , Krzysztof Kozlowski , David Airlie , Mauro Carvalho Chehab Cc: Evan Green , Robin Murphy , Tomasz Figa , Will Deacon , linux-mediatek@lists.infradead.org, srv_heupstream@mediatek.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, youlin.pei@mediatek.com, Nicolas Boichat , Matthias Kaehlcke , anan.sun@mediatek.com, ming-fan.chen@mediatek.com, yi.kuo@mediatek.com, acourbot@chromium.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, Daniel Vetter , Chun-Kuang Hu , Philipp Zabel , Xia Jiang , Tiffany Lin , Hsin-Yi Wang , Eizan Miyamoto , anthony.huang@mediatek.com References: <20210714025626.5528-1-yong.wu@mediatek.com> <20210714025626.5528-10-yong.wu@mediatek.com> From: Dafna Hirschfeld Message-ID: Date: Wed, 14 Jul 2021 10:32:09 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210714025626.5528-10-yong.wu@mediatek.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14.07.21 04:56, Yong Wu wrote: > After adding device_link between the iommu consumer and smi-larb, > the pm_runtime_get(_sync) of smi-larb and smi-common will be called > automatically. we can get rid of mtk_smi_larb_get/put. > > CC: Matthias Brugger > Signed-off-by: Yong Wu > Reviewed-by: Evan Green > Acked-by: Krzysztof Kozlowski > Acked-by: Matthias Brugger Reviewed-by: Dafna Hirschfeld > --- > drivers/memory/mtk-smi.c | 14 -------------- > include/soc/mediatek/smi.h | 20 -------------------- > 2 files changed, 34 deletions(-) > > diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c > index c5fb51f73b34..7c61c924e220 100644 > --- a/drivers/memory/mtk-smi.c > +++ b/drivers/memory/mtk-smi.c > @@ -134,20 +134,6 @@ static void mtk_smi_clk_disable(const struct mtk_smi *smi) > clk_disable_unprepare(smi->clk_apb); > } > > -int mtk_smi_larb_get(struct device *larbdev) > -{ > - int ret = pm_runtime_resume_and_get(larbdev); > - > - return (ret < 0) ? ret : 0; > -} > -EXPORT_SYMBOL_GPL(mtk_smi_larb_get); > - > -void mtk_smi_larb_put(struct device *larbdev) > -{ > - pm_runtime_put_sync(larbdev); > -} > -EXPORT_SYMBOL_GPL(mtk_smi_larb_put); > - > static int > mtk_smi_larb_bind(struct device *dev, struct device *master, void *data) > { > diff --git a/include/soc/mediatek/smi.h b/include/soc/mediatek/smi.h > index 15e3397cec58..11f7d6b59642 100644 > --- a/include/soc/mediatek/smi.h > +++ b/include/soc/mediatek/smi.h > @@ -19,26 +19,6 @@ struct mtk_smi_larb_iommu { > unsigned char bank[32]; > }; > > -/* > - * mtk_smi_larb_get: Enable the power domain and clocks for this local arbiter. > - * It also initialize some basic setting(like iommu). > - * mtk_smi_larb_put: Disable the power domain and clocks for this local arbiter. > - * Both should be called in non-atomic context. > - * > - * Returns 0 if successful, negative on failure. > - */ > -int mtk_smi_larb_get(struct device *larbdev); > -void mtk_smi_larb_put(struct device *larbdev); > - > -#else > - > -static inline int mtk_smi_larb_get(struct device *larbdev) > -{ > - return 0; > -} > - > -static inline void mtk_smi_larb_put(struct device *larbdev) { } > - > #endif > > #endif >