public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Shawn Lin <shawn.lin@linux.dev>,
	"Hawkins, Nick" <nick.hawkins@hpe.com>,
	"ulf.hansson@linaro.org" <ulf.hansson@linaro.org>,
	"jszhang@kernel.org" <jszhang@kernel.org>
Cc: "robh@kernel.org" <robh@kernel.org>,
	"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	"shawn.lin@rock-chips.com" <shawn.lin@rock-chips.com>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 2/2] mmc: sdhci-of-dwcmshc: Add HPE GSC eMMC support
Date: Fri, 13 Mar 2026 08:35:34 +0200	[thread overview]
Message-ID: <e28db5b1-5552-48e3-8cd5-97e3e7bc7778@intel.com> (raw)
In-Reply-To: <76c61887-8e75-15cd-73f7-bbe3ea859472@linux.dev>

On 13/03/2026 04:10, Shawn Lin wrote:
> 在 2026/03/13 星期五 3:25, Hawkins, Nick 写道:
>> Hi Shawn, thank you for your input.
>>
>> See below:
>>
>>> -----Original Message-----
>>> From: Shawn Lin <shawn.lin@linux.dev>
>>> Sent: Thursday, March 12, 2026 3:25 AM
>>> To: Hawkins, Nick <nick.hawkins@hpe.com>; ulf.hansson@linaro.org; adrian.hunter@intel.com; jszhang@kernel.org
>>> Cc: shawn.lin@linux.dev; robh@kernel.org; krzk+dt@kernel.org; conor+dt@kernel.org; shawn.lin@rock-chips.com; linux-mmc@vger.kernel.org; devicetree@vger.kernel.org; linux-kernel@vger.kernel.org
>>> Subject: Re: [PATCH v3 2/2] mmc: sdhci-of-dwcmshc: Add HPE GSC eMMC support
>>
>>
>>>> +static int dwcmshc_hpe_gsc_init(struct device *dev, struct sdhci_host *host,
>>>> +                struct dwcmshc_priv *dwc_priv)
>>>> +{
>>>> +    struct regmap *soc_ctrl;
>>>> +    int ret;
>>>> +
>>>> +    /* Disable cmd conflict check and configure auto-tuning */
>>>> +    dwcmshc_hpe_vendor_specific(host);
>>>> +
>>>> +    /* Look up the GXP sysreg syscon for MSHCCS access */
>>>> +    soc_ctrl = syscon_regmap_lookup_by_phandle(dev->of_node, "hpe,gxp-sysreg");
>>>> +    if (IS_ERR(soc_ctrl)) {
>>>> +        dev_err(dev, "failed to get hpe,gxp-sysreg syscon\n");
>>>> +        return PTR_ERR(soc_ctrl);
>>>> +    }
>>>> +
>>>> +    /* Set SCGSyncDis (bit 18) to disable sync on HS200 RX delay lines */
>>>> +    ret = regmap_update_bits(soc_ctrl, HPE_GSC_MSHCCS_OFFSET,
>>>> +                HPE_GSC_MSHCCS_SCGSYNCDIS,
>>>> +                HPE_GSC_MSHCCS_SCGSYNCDIS);
>>>> +    if (ret) {
>>>> +        dev_err(dev, "failed to set SCGSyncDis in MSHCCS\n");
>>>> +        return ret;
>>>> +    }
>>>> +
>>>> +    sdhci_enable_v4_mode(host);
>>
>>> Sorry, I overlooked this part when in v2. But we enable it in
>>> dwcmshc_probe() based on the capabilities, isn't it? Unless your
>>> hardware didn't set SDHCI_CAN_64BIT_V4 but actually it does support
>>> it? Then it perhaps should be a quirk, although we in general would like
>>> to avoid more quirks... It depends on Adrian.
>>
>>> Btw, unlated to your patch, but th1520 did it the same way... Hmm
>>
>> The GSC's IP is configured with a 32-bit DMA AXI
>> interface, so SDHCI_CAN_64BIT_V4 (caps bit 27) is not set by the
>> hardware. However, the controller still requires Host V4 mode
>> (HOST_CTRL2_R bit 12) to be enabled. Since dwcmshc_probe()
>> only calls sdhci_enable_v4_mode() when SDHCI_CAN_64BIT_V4
>> is set, the explicit call in dwcmshc_hpe_gsc_init() is necessary.
> 
> Okay, this aligns with previous assumption. So, we should either handle it via a quirk in the probe function and remove the call here, or simply add a comment to explain the context. This depends on Adrian's preference. I have no further questions. Thanks

Since ->init() is needed anyway, adding extra logic to handle
sdhci_enable_v4_mode() separately doesn't reduce complexity,
so I would leave it.


  reply	other threads:[~2026-03-13  6:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11 18:11 [PATCH v3 0/2] mmc: sdhci-of-dwcmshc: Add HPE GSC eMMC support nick.hawkins
2026-03-11 18:11 ` [PATCH v3 1/2] dt-bindings: mmc: snps,dwcmshc-sdhci: add HPE GSC dwcmshc compatible nick.hawkins
2026-03-13  8:07   ` Krzysztof Kozlowski
2026-03-11 18:11 ` [PATCH v3 2/2] mmc: sdhci-of-dwcmshc: Add HPE GSC eMMC support nick.hawkins
2026-03-12  8:25   ` Shawn Lin
2026-03-12 19:25     ` Hawkins, Nick
2026-03-13  2:10       ` Shawn Lin
2026-03-13  6:35         ` Adrian Hunter [this message]
2026-03-13  7:10   ` Adrian Hunter

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=e28db5b1-5552-48e3-8cd5-97e3e7bc7778@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jszhang@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=nick.hawkins@hpe.com \
    --cc=robh@kernel.org \
    --cc=shawn.lin@linux.dev \
    --cc=shawn.lin@rock-chips.com \
    --cc=ulf.hansson@linaro.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