From: sashiko-bot@kernel.org
To: "Tim Kuo" <Tim.Kuo@mediatek.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 2/2] spi: mt65xx: support wider tick delay field on IPM v59
Date: Thu, 24 Sep 2026 03:19:49 +0000 [thread overview]
Message-ID: <20260924031949.8F9A21F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260924031211.2199921-2-Tim.Kuo@mediatek.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] spi: mt65xx: unused macro SPI_CMD_IPM_GET_TICKDLY_OFFSET
--
commit 7585a8851ec5ccd32f23459c09b756cd0dc48ccd
Author: Tim Kuo <Tim.Kuo@mediatek.com>
spi: mt65xx: support wider tick delay field on IPM v59
This commit adds support for the wider 7-bit tick delay field in IPM v59 by
introducing a per-SoC mask. It updates the driver to use field_prep()
instead of hardcoded shifts and masks.
> diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c
> index b845a599f7c6c..27ed9be1b1213 100644
> --- a/drivers/spi/spi-mt65xx.c
> +++ b/drivers/spi/spi-mt65xx.c
[ ... ]
> @@ -81,6 +82,7 @@
> #define SPI_CMD_IPM_GET_TICKDLY_OFFSET 22
[Severity: Low]
Should SPI_CMD_IPM_GET_TICKDLY_OFFSET be removed here? Since this patch
migrates the tick delay handling to field_prep() below, this macro appears
to be left as unused dead code.
> #define SPI_CMD_IPM_GET_TICKDLY_MASK GENMASK(24, 22)
> +#define SPI_CMD_IPM_V59_GET_TICKDLY_MASK GENMASK(28, 22)
>
> #define PIN_MODE_CFG(x) ((x) / 2)
[ ... ]
> @@ -443,10 +460,10 @@ static int mtk_spi_hw_init(struct spi_controller *host,
> /* tick delay */
> if (mdata->dev_comp->enhance_timing) {
> if (mdata->dev_comp->ipm_design) {
> + mask = mdata->dev_comp->tick_dly_mask;
> reg_val = readl(mdata->base + SPI_CMD_REG);
> - reg_val &= ~SPI_CMD_IPM_GET_TICKDLY_MASK;
> - reg_val |= ((chip_config->tick_delay & 0x7)
> - << SPI_CMD_IPM_GET_TICKDLY_OFFSET);
> + reg_val &= ~mask;
> + reg_val |= field_prep(mask, chip_config->tick_delay);
> writel(reg_val, mdata->base + SPI_CMD_REG);
> } else {
> reg_val = readl(mdata->base + SPI_CFG1_REG);
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260924031211.2199921-1-Tim.Kuo@mediatek.com?part=2
next prev parent reply other threads:[~2026-09-24 3:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 3:12 [PATCH 1/2] dt-bindings: spi: mediatek: add mediatek,spi-ipm-v59 compatible Tim Kuo
2026-09-24 3:12 ` [PATCH 2/2] spi: mt65xx: support wider tick delay field on IPM v59 Tim Kuo
2026-09-24 3:19 ` sashiko-bot [this message]
2026-09-24 3:19 ` [PATCH 1/2] dt-bindings: spi: mediatek: add mediatek,spi-ipm-v59 compatible sashiko-bot
2026-09-24 12:17 ` Mark Brown
2026-09-24 17:28 ` Conor Dooley
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=20260924031949.8F9A21F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Tim.Kuo@mediatek.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.