public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
To: Sumit Garg <sumit.garg@kernel.org>
Cc: u-boot-qcom@groups.io, u-boot@lists.denx.de,
	Lukasz Majewski <lukma@denx.de>,
	Casey Connolly <casey.connolly@linaro.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Tom Rini <trini@konsulko.com>,
	Aswin Murugan <aswin.murugan@oss.qualcomm.com>,
	Stephan Gerhold <stephan.gerhold@linaro.org>,
	Varadarajan Narayanan <quic_varada@quicinc.com>,
	Peng Fan <peng.fan@nxp.com>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	Tanmay Kathpalia <tanmay.kathpalia@altera.com>,
	Simon Glass <sjg@chromium.org>,
	Jean-Jacques Hiblot <jjhiblot@ti.com>,
	Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Subject: Re: [PATCH 2/3] drivers: mmc: uclass: Set removable flag based on device tree property
Date: Tue, 21 Apr 2026 18:35:59 +0530	[thread overview]
Message-ID: <c87bb381-eccd-461c-a912-a84eb1407b6c@oss.qualcomm.com> (raw)
In-Reply-To: <ady7Q-acflFr07v-@sumit-xelite>


On 4/13/2026 3:15 PM, Sumit Garg wrote:
> On Tue, Mar 24, 2026 at 11:22:35AM +0530, Balaji Selvanathan wrote:
>> The block device removable flag should reflect whether the MMC
>> device is physically removable (SD card) or soldered (eMMC). This
>> information is specified in the device tree via the "non-removable"
>> property and stored in the MMC_CAP_NONREMOVABLE capability flag.
>>
>> Update the removable flag in the block device descriptor after
>> successful MMC initialization to properly reflect the device's
>> removable status. This allows the block layer and upper layers to
>> distinguish between eMMC and SD cards for appropriate handling.
>>
>> The default removable=1 is set in mmc_bind(), and this change
>> overrides it only for non-removable devices after confirming
>> successful initialization.
>>
>> Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
>> ---
>>   drivers/mmc/mmc-uclass.c | 5 +++++
>>   1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
>> index 698530088fe..b218c69b494 100644
>> --- a/drivers/mmc/mmc-uclass.c
>> +++ b/drivers/mmc/mmc-uclass.c
>> @@ -507,6 +507,7 @@ static int mmc_blk_probe(struct udevice *dev)
>>   	struct udevice *mmc_dev = dev_get_parent(dev);
>>   	struct mmc_uclass_priv *upriv = dev_get_uclass_priv(mmc_dev);
>>   	struct mmc *mmc = upriv->mmc;
>> +	struct blk_desc *bdesc = dev_get_uclass_plat(dev);
>>   	int ret;
>>   
>>   	ret = mmc_init(mmc);
>> @@ -515,6 +516,10 @@ static int mmc_blk_probe(struct udevice *dev)
>>   		return ret;
>>   	}
>>   
>> +	/* Update removable flag based on device capabilities */
>> +	if (mmc->cfg->host_caps & MMC_CAP_NONREMOVABLE)
>> +		bdesc->removable = 0;
> Looking at other MMC drivers, this update happens in platform specific
> driver. Check if this rather belongs to msm_sdhci.c.
>
> -Sumit

Hi Sumit,

Thanks for the feedback, moved the codes to msm specific codes in v2: 
https://lore.kernel.org/u-boot/20260421-emmc-v2-0-0ebd3322b676@oss.qualcomm.com/

Thanks,

Balaji


  reply	other threads:[~2026-04-21 13:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-24  5:52 [PATCH 0/3] Enable eMMC and SD card support for QCS615 Balaji Selvanathan
2026-03-24  5:52 ` [PATCH 1/3] clk: qcom: qcs615: Add SDCC1 and SDCC2 clock support Balaji Selvanathan
2026-03-24 10:06   ` Varadarajan Narayanan
2026-04-13  9:35   ` Sumit Garg
2026-03-24  5:52 ` [PATCH 2/3] drivers: mmc: uclass: Set removable flag based on device tree property Balaji Selvanathan
2026-03-24 10:14   ` Varadarajan Narayanan
2026-04-13  9:45   ` Sumit Garg
2026-04-21 13:05     ` Balaji Selvanathan [this message]
2026-03-24  5:52 ` [PATCH 3/3] fs: fat: Limit transfer size to prevent SDHCI controller timeout Balaji Selvanathan
2026-03-24 11:56   ` Casey Connolly
2026-04-21 13:07     ` Balaji Selvanathan
2026-03-24 12:02   ` Jonas Karlman
2026-04-21 13:07     ` Balaji Selvanathan

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=c87bb381-eccd-461c-a912-a84eb1407b6c@oss.qualcomm.com \
    --to=balaji.selvanathan@oss.qualcomm.com \
    --cc=aswin.murugan@oss.qualcomm.com \
    --cc=casey.connolly@linaro.org \
    --cc=jh80.chung@samsung.com \
    --cc=jjhiblot@ti.com \
    --cc=lukma@denx.de \
    --cc=neil.armstrong@linaro.org \
    --cc=peng.fan@nxp.com \
    --cc=quic_varada@quicinc.com \
    --cc=sjg@chromium.org \
    --cc=stephan.gerhold@linaro.org \
    --cc=sumit.garg@kernel.org \
    --cc=tanmay.kathpalia@altera.com \
    --cc=trini@konsulko.com \
    --cc=u-boot-qcom@groups.io \
    --cc=u-boot@lists.denx.de \
    --cc=varadarajan.narayanan@oss.qualcomm.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