From: Adrian Hunter <adrian.hunter@intel.com>
To: Tanmay Kathpalia <tanmay.kathpalia@altera.com>,
<linux-mmc@vger.kernel.org>
Cc: <ulfh@kernel.org>, <krzk+dt@kernel.org>, <robh@kernel.org>,
<conor+dt@kernel.org>, <dinguyen@kernel.org>,
<p.zabel@pengutronix.de>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 5/8] mmc: sdhci-cadence: rename SD4HC symbols for SD6HC groundwork
Date: Fri, 7 Aug 2026 15:14:36 +0300 [thread overview]
Message-ID: <fc5d734a-c02e-4e4a-ad32-a4d75b417f70@intel.com> (raw)
In-Reply-To: <20260724145009.7456-5-tanmay.kathpalia@altera.com>
On 24/07/2026 17:50, Tanmay Kathpalia wrote:
> SD4HC PHY helpers and the default ops/drv_data are not marked as
> version-specific, so it is unclear what is shared versus SD4HC-only
> ahead of SD6HC support.
>
> Rename those symbols with a cdns4 prefix to separate the SD4HC paths
> from the shared driver core and avoid clashes when SD6HC is added.
>
> Signed-off-by: Tanmay Kathpalia <tanmay.kathpalia@altera.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
> drivers/mmc/host/sdhci-cadence.c | 55 +++++++++++++++-----------------
> 1 file changed, 26 insertions(+), 29 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-cadence.c b/drivers/mmc/host/sdhci-cadence.c
> index 435603c8c00b..8a6ef6d9d1dd 100644
> --- a/drivers/mmc/host/sdhci-cadence.c
> +++ b/drivers/mmc/host/sdhci-cadence.c
> @@ -78,7 +78,7 @@
> */
> #define SDHCI_CDNS_MAX_TUNING_LOOP 40
>
> -struct sdhci_cdns_phy_param {
> +struct sdhci_cdns4_phy_param {
> u8 addr;
> u8 data;
> };
> @@ -91,10 +91,10 @@ struct sdhci_cdns_priv {
> void (*priv_writel)(struct sdhci_cdns_priv *priv, u32 val, void __iomem *reg);
> struct reset_control *rst_hw;
> unsigned int nr_phy_params;
> - struct sdhci_cdns_phy_param phy_params[];
> + struct sdhci_cdns4_phy_param phy_params[];
> };
>
> -struct sdhci_cdns_phy_cfg {
> +struct sdhci_cdns4_phy_cfg {
> const char *property;
> u8 addr;
> };
> @@ -104,7 +104,7 @@ struct sdhci_cdns_drv_data {
> const struct sdhci_pltfm_data pltfm_data;
> };
>
> -static const struct sdhci_cdns_phy_cfg sdhci_cdns_phy_cfgs[] = {
> +static const struct sdhci_cdns4_phy_cfg sdhci_cdns4_phy_cfgs[] = {
> { "cdns,phy-input-delay-sd-highspeed", SDHCI_CDNS_PHY_DLY_SD_HS, },
> { "cdns,phy-input-delay-legacy", SDHCI_CDNS_PHY_DLY_SD_DEFAULT, },
> { "cdns,phy-input-delay-sd-uhs-sdr12", SDHCI_CDNS_PHY_DLY_UHS_SDR12, },
> @@ -124,8 +124,7 @@ static inline void cdns_writel(struct sdhci_cdns_priv *priv, u32 val,
> writel(val, reg);
> }
>
> -static int sdhci_cdns_write_phy_reg(struct sdhci_cdns_priv *priv,
> - u8 addr, u8 data)
> +static int sdhci_cdns4_write_phy_reg(struct sdhci_cdns_priv *priv, u8 addr, u8 data)
> {
> void __iomem *reg = priv->hrs_addr + SDHCI_CDNS_HRS04;
> u32 tmp;
> @@ -156,44 +155,42 @@ static int sdhci_cdns_write_phy_reg(struct sdhci_cdns_priv *priv,
> return ret;
> }
>
> -static unsigned int sdhci_cdns_phy_param_count(struct device_node *np)
> +static unsigned int sdhci_cdns4_phy_param_count(struct device_node *np)
> {
> unsigned int count = 0;
> int i;
>
> - for (i = 0; i < ARRAY_SIZE(sdhci_cdns_phy_cfgs); i++)
> - if (of_property_present(np, sdhci_cdns_phy_cfgs[i].property))
> + for (i = 0; i < ARRAY_SIZE(sdhci_cdns4_phy_cfgs); i++)
> + if (of_property_present(np, sdhci_cdns4_phy_cfgs[i].property))
> count++;
>
> return count;
> }
>
> -static void sdhci_cdns_phy_param_parse(struct device_node *np,
> - struct sdhci_cdns_priv *priv)
> +static void sdhci_cdns4_phy_param_parse(struct device_node *np, struct sdhci_cdns_priv *priv)
> {
> - struct sdhci_cdns_phy_param *p = priv->phy_params;
> + struct sdhci_cdns4_phy_param *p = priv->phy_params;
> u32 val;
> int ret, i;
>
> - for (i = 0; i < ARRAY_SIZE(sdhci_cdns_phy_cfgs); i++) {
> - ret = of_property_read_u32(np, sdhci_cdns_phy_cfgs[i].property,
> - &val);
> + for (i = 0; i < ARRAY_SIZE(sdhci_cdns4_phy_cfgs); i++) {
> + ret = of_property_read_u32(np, sdhci_cdns4_phy_cfgs[i].property, &val);
> if (ret)
> continue;
>
> - p->addr = sdhci_cdns_phy_cfgs[i].addr;
> + p->addr = sdhci_cdns4_phy_cfgs[i].addr;
> p->data = val;
> p++;
> }
> }
>
> -static int sdhci_cdns_phy_init(struct sdhci_cdns_priv *priv)
> +static int sdhci_cdns4_phy_init(struct sdhci_cdns_priv *priv)
> {
> int ret, i;
>
> for (i = 0; i < priv->nr_phy_params; i++) {
> - ret = sdhci_cdns_write_phy_reg(priv, priv->phy_params[i].addr,
> - priv->phy_params[i].data);
> + ret = sdhci_cdns4_write_phy_reg(priv, priv->phy_params[i].addr,
> + priv->phy_params[i].data);
> if (ret)
> return ret;
> }
> @@ -470,7 +467,7 @@ static int elba_drv_init(struct platform_device *pdev)
> return 0;
> }
>
> -static const struct sdhci_ops sdhci_cdns_ops = {
> +static const struct sdhci_ops sdhci_cdns4_ops = {
> .set_clock = sdhci_set_clock,
> .get_timeout_clock = sdhci_cdns_get_timeout_clock,
> .set_bus_width = sdhci_set_bus_width,
> @@ -481,7 +478,7 @@ static const struct sdhci_ops sdhci_cdns_ops = {
>
> static const struct sdhci_cdns_drv_data sdhci_cdns_uniphier_drv_data = {
> .pltfm_data = {
> - .ops = &sdhci_cdns_ops,
> + .ops = &sdhci_cdns4_ops,
> .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
> },
> };
> @@ -495,14 +492,14 @@ static const struct sdhci_cdns_drv_data sdhci_elba_drv_data = {
>
> static const struct sdhci_cdns_drv_data sdhci_eyeq_drv_data = {
> .pltfm_data = {
> - .ops = &sdhci_cdns_ops,
> + .ops = &sdhci_cdns4_ops,
> .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
> },
> };
>
> -static const struct sdhci_cdns_drv_data sdhci_cdns_drv_data = {
> +static const struct sdhci_cdns_drv_data sdhci_cdns4_drv_data = {
> .pltfm_data = {
> - .ops = &sdhci_cdns_ops,
> + .ops = &sdhci_cdns4_ops,
> },
> };
>
> @@ -560,9 +557,9 @@ static int sdhci_cdns_probe(struct platform_device *pdev)
>
> data = of_device_get_match_data(dev);
> if (!data)
> - data = &sdhci_cdns_drv_data;
> + data = &sdhci_cdns4_drv_data;
>
> - nr_phy_params = sdhci_cdns_phy_param_count(dev->of_node);
> + nr_phy_params = sdhci_cdns4_phy_param_count(dev->of_node);
> host = sdhci_pltfm_init(pdev, &data->pltfm_data,
> struct_size(priv, phy_params, nr_phy_params));
> if (IS_ERR(host))
> @@ -593,9 +590,9 @@ static int sdhci_cdns_probe(struct platform_device *pdev)
> if (ret)
> return ret;
>
> - sdhci_cdns_phy_param_parse(dev->of_node, priv);
> + sdhci_cdns4_phy_param_parse(dev->of_node, priv);
>
> - ret = sdhci_cdns_phy_init(priv);
> + ret = sdhci_cdns4_phy_init(priv);
> if (ret)
> return ret;
>
> @@ -622,7 +619,7 @@ static int sdhci_cdns_resume(struct device *dev)
> if (ret)
> return ret;
>
> - ret = sdhci_cdns_phy_init(priv);
> + ret = sdhci_cdns4_phy_init(priv);
> if (ret)
> goto disable_clk;
>
next prev parent reply other threads:[~2026-08-07 12:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-24 14:50 [PATCH v3 1/8] dt-bindings: mmc: add Cadence SD6HC binding Tanmay Kathpalia
2026-07-24 14:50 ` [PATCH v3 2/8] arm64: dts: agilex5: add SD/eMMC host controller Tanmay Kathpalia
2026-07-24 14:50 ` [PATCH v3 3/8] dt-bindings: arm: altera: add Agilex5 SOCDK eMMC board variant Tanmay Kathpalia
2026-07-24 16:51 ` Conor Dooley
2026-07-24 14:50 ` [PATCH v3 4/8] arm64: dts: agilex5: add SOCDK eMMC daughter board Tanmay Kathpalia
2026-07-24 14:50 ` [PATCH v3 5/8] mmc: sdhci-cadence: rename SD4HC symbols for SD6HC groundwork Tanmay Kathpalia
2026-08-07 12:14 ` Adrian Hunter [this message]
2026-07-24 14:50 ` [PATCH v3 6/8] mmc: sdhci-cadence: refactor driver structure for V6 controller support Tanmay Kathpalia
2026-08-07 12:15 ` Adrian Hunter
2026-07-24 14:50 ` [PATCH v3 7/8] mmc: sdhci-cadence: add Cadence SD6HC support Tanmay Kathpalia
2026-08-07 12:40 ` Adrian Hunter
2026-07-24 14:50 ` [PATCH v3 8/8] mmc: sdhci-cadence: add Altera Agilex5 " Tanmay Kathpalia
2026-07-27 7:19 ` Philipp Zabel
2026-08-07 13:08 ` Adrian Hunter
2026-07-28 7:49 ` [PATCH v3 1/8] dt-bindings: mmc: add Cadence SD6HC binding 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=fc5d734a-c02e-4e4a-ad32-a4d75b417f70@intel.com \
--to=adrian.hunter@intel.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dinguyen@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=tanmay.kathpalia@altera.com \
--cc=ulfh@kernel.org \
/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