[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e6e6c16d-0415-12ad-e74d-d1faf5fb3aaf@collabora.com>
Date: Wed, 14 Jul 2021 10:32:09 +0200
From: Dafna Hirschfeld <dafna.hirschfeld@...labora.com>
To: Yong Wu <yong.wu@...iatek.com>,
Matthias Brugger <matthias.bgg@...il.com>,
Joerg Roedel <joro@...tes.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>,
David Airlie <airlied@...ux.ie>,
Mauro Carvalho Chehab <mchehab@...nel.org>
Cc: Evan Green <evgreen@...omium.org>,
Robin Murphy <robin.murphy@....com>,
Tomasz Figa <tfiga@...omium.org>,
Will Deacon <will.deacon@....com>,
linux-mediatek@...ts.infradead.org, srv_heupstream@...iatek.com,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
iommu@...ts.linux-foundation.org, youlin.pei@...iatek.com,
Nicolas Boichat <drinkcat@...omium.org>,
Matthias Kaehlcke <mka@...omium.org>, anan.sun@...iatek.com,
ming-fan.chen@...iatek.com, yi.kuo@...iatek.com,
acourbot@...omium.org, linux-media@...r.kernel.org,
dri-devel@...ts.freedesktop.org, Daniel Vetter <daniel@...ll.ch>,
Chun-Kuang Hu <chunkuang.hu@...nel.org>,
Philipp Zabel <p.zabel@...gutronix.de>,
Xia Jiang <xia.jiang@...iatek.com>,
Tiffany Lin <tiffany.lin@...iatek.com>,
Hsin-Yi Wang <hsinyi@...omium.org>,
Eizan Miyamoto <eizan@...omium.org>, anthony.huang@...iatek.com
Subject: Re: [PATCH v6 09/11] memory: mtk-smi: Get rid of mtk_smi_larb_get/put
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 <matthias.bgg@...il.com>
> Signed-off-by: Yong Wu <yong.wu@...iatek.com>
> Reviewed-by: Evan Green <evgreen@...omium.org>
> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>
> Acked-by: Matthias Brugger <matthias.bgg@...il.com>
Reviewed-by: Dafna Hirschfeld <dafna.hirschfeld@...labora.com>
> ---
> 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
>
Powered by blists - more mailing lists