From: Peter Wang <peter.wang@mediatek.com>
To: <iasnezhkov@gmail.com>, <stanley.chu@mediatek.com>,
<martin.petersen@oracle.com>,
<James.Bottomley@HansenPartnership.com>
Cc: <matthias.bgg@gmail.com>,
<angelogioacchino.delregno@collabora.com>,
<louisalexis.eyraud@collabora.com>, <linux-scsi@vger.kernel.org>,
<linux-mediatek@lists.infradead.org>,
<phone-devel@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 2/3] scsi: ufs: mediatek: allow clock scaling when ufs_fde is absent
Date: Mon, 30 Nov 2026 19:54:19 +0800 [thread overview]
Message-ID: <b1130bd533ed2f5bf6a4c28e48cf2d9c9f685c44.camel@mediatek.com> (raw)
In-Reply-To: <20261130103406.96018-3-iasnezhkov@gmail.com>
On Mon, 2026-11-30 at 10:34 +0000, Ilia Snezhkov via B4 Relay wrote:
> From: Ilia Snezhkov <iasnezhkov@gmail.com>
>
> ufs_mtk_is_clk_scale_ready() only requires ufs_sel, ufs_sel_max_src,
> and
> ufs_sel_min_src, and _ufs_mtk_clk_scale() already gates FDE clock
> scaling behind clk_fde_scale (mclk->ufs_fde_max_clki &&
> mclk->ufs_fde_min_clki). However, _ufs_mtk_clk_scale() still returns
> early on !fde_clki.
>
> Because of that check, platforms without FDE clock scaling currently
> have to provide dummy ufs_fde entries in DT (pointing ufs_fde_min_src
> and ufs_fde_max_src to the same clock); otherwise
> _ufs_mtk_clk_scale()
> silently becomes a no-op and neither switches ufs_sel nor updates
> dvfsrc-vcore when called from devfreq scaling, suspend/resume, or
> ufs_mtk_fix_clock_scaling().
>
> Only require clki (ufs_sel) in _ufs_mtk_clk_scale(), and gate
> clk_fde_scale on fde_clki being non-NULL alongside its min/max
> parents
> so platforms that do not use FDE scaling can omit the ufs_fde clock
> settings.
>
> Fixes: 5e5976f5242d ("scsi: ufs: host: mediatek: Support FDE (AES)
> clock scaling")
> Signed-off-by: Ilia Snezhkov <iasnezhkov@gmail.com>
> ---
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
next prev parent reply other threads:[~2026-11-30 11:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 10:34 [PATCH v3 0/3] scsi: ufs: mediatek: pre-UniPro-1.8 adapt and clock scaling fixes Ilia Snezhkov via B4 Relay
2026-11-30 10:34 ` [PATCH v3 1/3] scsi: ufs: mediatek: skip PA_TXHSADAPTTYPE on pre-UniPro-1.8 hosts Ilia Snezhkov via B4 Relay
2026-11-30 10:34 ` [PATCH v3 2/3] scsi: ufs: mediatek: allow clock scaling when ufs_fde is absent Ilia Snezhkov via B4 Relay
2026-11-30 11:54 ` Peter Wang [this message]
2026-11-30 10:34 ` [PATCH v3 3/3] scsi: ufs: mediatek: round scalable clock bounds to clk_round_rate() Ilia Snezhkov via B4 Relay
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=b1130bd533ed2f5bf6a4c28e48cf2d9c9f685c44.camel@mediatek.com \
--to=peter.wang@mediatek.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=iasnezhkov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=louisalexis.eyraud@collabora.com \
--cc=martin.petersen@oracle.com \
--cc=matthias.bgg@gmail.com \
--cc=phone-devel@vger.kernel.org \
--cc=stanley.chu@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
all inboxes | Powered by JetHome®