[PATCH 2/3] drivers: mmc: uclass: Set removable flag based on device tree property

Varadarajan Narayanan varadarajan.narayanan at oss.qualcomm.com
Tue Mar 24 11:14:53 CET 2026


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 at oss.qualcomm.com>
> ---
>  drivers/mmc/mmc-uclass.c | 5 +++++
>  1 file changed, 5 insertions(+)

Reviewed-by: Varadarajan Narayanan <varadarajan.narayanan at oss.qualcomm.com>


More information about the U-Boot mailing list