Skip to content

Commit ada06d1

Browse files
committed
ODROID-M1/M1S: core/uclass: fix failure due to wrong device number for SD
Upstream Linux kernel defines the device node for MMC devices as 'dwmmc@fe2b0000' and 'dwmmc@fe2c0000' while the device tree in U-Boot defines as 'mmc@fe2b0000' and 'mmc@fe2c0000'. This makes to add new devices and their device number becomes '3' and '4' for the same hardware. => mmc list dwmmc@fe2b0000: 3 (SD) dwmmc@fe2c0000: 2 sdhci@fe310000: 0 (eMMC)Device 'mmc@fe2b0000': seq 1 is in use by 'dwmmc@fe2b0000' mmc@fe2b0000: 1 This problem leads to use the device number '3' for SD card that supposed to be '1', so instead of adding new boot command 'boot_mmc3', this fix hacks the device node name to be same as the device node name in U-Boot. => mmc list mmc@fe2b0000: 1 (SD) mmc@fe2c0000: 2 sdhci@fe310000: 0 (eMMC) Signed-off-by: Dongjin Kim <[email protected]> Change-Id: I4b5c1f620ac7a1610773f38595842e6914772013
1 parent ab38cd1 commit ada06d1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/core/uclass.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,14 @@ int uclass_resolve_seq(struct udevice *dev)
624624
int ret;
625625

626626
assert(dev->seq == -1);
627+
628+
#if defined(CONFIG_TARGET_ODROID_M1) || defined(CONFIG_TARGET_ODROID_M1S)
629+
if (!strcmp(dev->name, "dwmmc@fe2b0000"))
630+
strcpy((char *)dev->name, "mmc@fe2b0000");
631+
else if (!strcmp(dev->name, "dwmmc@fe2c0000"))
632+
strcpy((char *)dev->name, "mmc@fe2c0000");
633+
#endif
634+
627635
ret = uclass_find_device_by_seq(dev->uclass->uc_drv->id, dev->req_seq,
628636
false, &dup);
629637
if (!ret) {

0 commit comments

Comments
 (0)