Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Sachin Gupta <quic_sachgupt@quicinc.com>,
	Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-arm-msm@vger.kernel.org, linux-mmc@vger.kernel.org,
	linux-kernel@vger.kernel.org, quic_cang@quicinc.com,
	quic_nguyenb@quicinc.com, quic_bhaskarv@quicinc.com,
	quic_mapa@quicinc.com, quic_narepall@quicinc.com,
	quic_nitirawa@quicinc.com, quic_rampraka@quicinc.com,
	quic_sartgarg@quicinc.com
Subject: Re: [PATCH] mmc: sdhci-msm: Slot indexing for distinguishing multiple SDCC instances
Date: Fri, 25 Oct 2024 15:33:41 +0300	[thread overview]
Message-ID: <be483786-d8d2-4d46-9ca2-fbb629ba0674@intel.com> (raw)
In-Reply-To: <1cb1e8c1-63f4-4752-8358-b5c7078f9c6b@quicinc.com>

On 25/10/24 13:37, Sachin Gupta wrote:
> 
> 
> On 10/24/2024 4:38 PM, Adrian Hunter wrote:
>> On 22/10/24 17:18, Sachin Gupta wrote:
>>> This update addresses the requirement for accurate slot indexing
>>> in the sdhci-msm driver to differentiate between multiple SDCC
>>> (Secure Digital Card Controller) instances, such as eMMC, SD card,
>>> and SDIO.
>>>
>>> Additionally, it revises the slot indexing logic to comply with
>>> the new device tree (DT) specifications.
>>
>> This patch seems incomplete because all it does is assign a global
>> variable which is never used again.
>>
> 
> Qualcomm internal debugging tools utilize this global variable to
> access and differentiate between all the instance's sdhci_msm_host
> data structure (eMMC, SD card, and SDIO).

The kernel does not accept code that does not serve a functional
purpose.

You could look at using eBPF or KGDB to get the information,
otherwise you might just have to carry that kind of patch in
your internal tree.

> 
>>>
>>> Signed-off-by: Ram Prakash Gupta <quic_rampraka@quicinc.com>
>>> Signed-off-by: Sarthak Garg <quic_sartgarg@quicinc.com>
>>> Signed-off-by: Maramaina Naresh <quic_mnaresh@quicinc.com>
>>> Signed-off-by: Ziqi Chen <quic_ziqichen@quicinc.com>
>>> Signed-off-by: Sachin Gupta <quic_sachgupt@quicinc.com>
>>> ---
>>>   drivers/mmc/host/sdhci-msm.c | 10 ++++++++++
>>>   1 file changed, 10 insertions(+)
>>>
>>> diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
>>> index e113b99a3eab..3cb79117916f 100644
>>> --- a/drivers/mmc/host/sdhci-msm.c
>>> +++ b/drivers/mmc/host/sdhci-msm.c
>>> @@ -292,6 +292,8 @@ struct sdhci_msm_host {
>>>       bool vqmmc_enabled;
>>>   };
>>>   +static struct sdhci_msm_host *sdhci_slot[3];
>>> +
>>>   static const struct sdhci_msm_offset *sdhci_priv_msm_offset(struct sdhci_host *host)
>>>   {
>>>       struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
>>> @@ -2426,6 +2428,14 @@ static int sdhci_msm_probe(struct platform_device *pdev)
>>>       if (ret)
>>>           goto pltfm_free;
>>>   +    if (node) {
>>> +        ret = of_alias_get_id(pdev->dev.of_node, "mmc");
>>> +        if (ret < 0)
>>> +            dev_err(&pdev->dev, "get slot index failed %d\n", ret);
>>> +        else
>>> +            sdhci_slot[ret] = msm_host;
>>> +    }
>>> +
>>>       /*
>>>        * Based on the compatible string, load the required msm host info from
>>>        * the data associated with the version info.
>>
> 


  parent reply	other threads:[~2024-10-25 12:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-22 14:18 [PATCH] mmc: sdhci-msm: Slot indexing for distinguishing multiple SDCC instances Sachin Gupta
2024-10-24 11:08 ` Adrian Hunter
2024-10-25 10:37   ` Sachin Gupta
2024-10-25 10:53     ` Dmitry Baryshkov
2024-10-25 12:33     ` Adrian Hunter [this message]
2024-10-28 10:40       ` Sachin Gupta
2024-10-28 12:26         ` Dmitry Baryshkov
2024-11-20 12:07           ` Sachin Gupta

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=be483786-d8d2-4d46-9ca2-fbb629ba0674@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=quic_bhaskarv@quicinc.com \
    --cc=quic_cang@quicinc.com \
    --cc=quic_mapa@quicinc.com \
    --cc=quic_narepall@quicinc.com \
    --cc=quic_nguyenb@quicinc.com \
    --cc=quic_nitirawa@quicinc.com \
    --cc=quic_rampraka@quicinc.com \
    --cc=quic_sachgupt@quicinc.com \
    --cc=quic_sartgarg@quicinc.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