linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>,
	Yong Wu <yong.wu@mediatek.com>, Rob Herring <robh+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>,
	Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Tomasz Figa <tfiga@chromium.org>,
	linux-mediatek@lists.infradead.org, srv_heupstream@mediatek.com,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	iommu@lists.linux-foundation.org, youlin.pei@mediatek.com,
	anan.sun@mediatek.com, ming-fan.chen@mediatek.com,
	yi.kuo@mediatek.com, anthony.huang@mediatek.com,
	Ikjoon Jang <ikjn@chromium.org>
Subject: Re: [PATCH v4 03/13] memory: mtk-smi: Use clk_bulk clock ops
Date: Fri, 15 Oct 2021 15:47:24 +0200	[thread overview]
Message-ID: <e433d19a-8bb8-8ef5-fce8-4b3535f5bc3e@collabora.com> (raw)
In-Reply-To: <ab5c6dd1-7eed-4515-8781-c79e5317d038@canonical.com>

Il 15/10/21 15:43, Krzysztof Kozlowski ha scritto:
> On 15/10/2021 15:38, AngeloGioacchino Del Regno wrote:
>>> Use clk_bulk interface instead of the orginal one to simplify the code.
>>>
>>> For SMI larbs: Require apb/smi clocks while gals is optional.
>>> For SMI common: Require apb/smi/gals0/gal1 in has_gals case. Otherwise,
>>>                   also only require apb/smi, No optional clk here.
>>>
>>> About the "has_gals" flag, for smi larbs, the gals clock also may be
>>> optional even this platform support it. thus it always use
>>> *_bulk_get_optional, then the flag has_gals is unnecessary. Remove it.
>>> The smi_common's has_gals still keep it.
>>>
>>> Also remove clk fail logs since bulk interface already output fail log.
>>>
>>> Signed-off-by: Yong Wu <yong.wu@mediatek.com>
>>
>> Hello Yong,
>> thanks for the patch! However, I have an improvement to point out:
>>
>>> ---
>>>    drivers/memory/mtk-smi.c | 143 +++++++++++++++------------------------
>>>    1 file changed, 55 insertions(+), 88 deletions(-)
>>>
>>> diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c
>>> index c5fb51f73b34..f91eaf5c3ab0 100644
>>> --- a/drivers/memory/mtk-smi.c
>>> +++ b/drivers/memory/mtk-smi.c
>>> @@ -60,6 +60,20 @@ enum mtk_smi_gen {
>>>    	MTK_SMI_GEN2
>>>    };
>>>    
>>> +#define MTK_SMI_CLK_NR_MAX			4
>>
>> This refers to mtk_smi_common_clks[] and should be probably moved after that.
>> In any case, I don't think that there's any need to manually define this as 4,
>> as you can simply use the macro ARRAY_SIZE(mtk_smi_common_clks).
>> Using that will make you able to not update this definition everytime an update
>> occurs to the mtk_smi_common_clks array.
>>
>>> +
>>> +/* larbs: Require apb/smi clocks while gals is optional. */
>>> +static const char * const mtk_smi_larb_clks[] = {"apb", "smi", "gals"};
>>> +#define MTK_SMI_LARB_REQ_CLK_NR		2
>>> +#define MTK_SMI_LARB_OPT_CLK_NR		1
>>> +
>>> +/*
>>> + * common: Require these four clocks in has_gals case. Otherwise, only apb/smi are required.
>>> + */
>>> +static const char * const mtk_smi_common_clks[] = {"apb", "smi", "gals0", "gals1"};
>>> +#define MTK_SMI_COM_REQ_CLK_NR		2
>>> +#define MTK_SMI_COM_GALS_REQ_CLK_NR	MTK_SMI_CLK_NR_MAX
>>> +
>>
>> Apart from that,
>> Acked-By: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> 
> The patchset was merged around a month ago:
> https://lore.kernel.org/lkml/163229303729.7874.4095337797772755570.b4-ty@canonical.com/
> 
> 
> Best regards,
> Krzysztof
> 

Whoops. Sorry for that.
I'll send a patch to address what I pointed out, unless the original author of
this series wants to.

Thanks,
- Angelo

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

  reply	other threads:[~2021-10-15 14:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-14 11:36 [PATCH v4 00/13] MT8195 SMI support Yong Wu
2021-09-14 11:36 ` [PATCH v4 01/13] dt-bindings: memory: mediatek: Add mt8195 smi binding Yong Wu
2021-09-14 11:36 ` [PATCH v4 02/13] dt-bindings: memory: mediatek: Add mt8195 smi sub common Yong Wu
2021-09-21 20:36   ` Rob Herring
2021-09-14 11:36 ` [PATCH v4 03/13] memory: mtk-smi: Use clk_bulk clock ops Yong Wu
2021-10-15 13:38   ` AngeloGioacchino Del Regno
2021-10-15 13:43     ` Krzysztof Kozlowski
2021-10-15 13:47       ` AngeloGioacchino Del Regno [this message]
2021-09-14 11:36 ` [PATCH v4 04/13] memory: mtk-smi: Rename smi_gen to smi_type Yong Wu
2021-09-14 11:36 ` [PATCH v4 05/13] memory: mtk-smi: Adjust some code position Yong Wu
2021-09-14 11:36 ` [PATCH v4 06/13] memory: mtk-smi: Add error handle for smi_probe Yong Wu
2021-09-14 11:36 ` [PATCH v4 07/13] memory: mtk-smi: Add device link for smi-sub-common Yong Wu
2021-09-14 11:36 ` [PATCH v4 08/13] memory: mtk-smi: Add clocks " Yong Wu
2021-09-14 11:36 ` [PATCH v4 09/13] memory: mtk-smi: Use devm_platform_ioremap_resource Yong Wu
2021-09-14 11:37 ` [PATCH v4 10/13] memory: mtk-smi: mt8195: Add smi support Yong Wu
2021-09-14 11:37 ` [PATCH v4 11/13] memory: mtk-smi: mt8195: Add initial setting for smi-common Yong Wu
2021-09-14 11:37 ` [PATCH v4 12/13] memory: mtk-smi: mt8195: Add initial setting for smi-larb Yong Wu
2021-09-14 11:37 ` [PATCH v4 13/13] MAINTAINERS: Add entry for MediaTek SMI Yong Wu
2021-09-22  6:44 ` [PATCH v4 00/13] MT8195 SMI support Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e433d19a-8bb8-8ef5-fce8-4b3535f5bc3e@collabora.com \
    --to=angelogioacchino.delregno@collabora.com \
    --cc=anan.sun@mediatek.com \
    --cc=anthony.huang@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=ikjn@chromium.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=krzk@kernel.org \
    --cc=krzysztof.kozlowski@canonical.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=ming-fan.chen@mediatek.com \
    --cc=robh+dt@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=srv_heupstream@mediatek.com \
    --cc=tfiga@chromium.org \
    --cc=will@kernel.org \
    --cc=yi.kuo@mediatek.com \
    --cc=yong.wu@mediatek.com \
    --cc=youlin.pei@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).