]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: rk3399: fix incorrect boot-device in u-boot, spl-boot-device
authorQuentin Schulz <quentin.schulz@theobroma-systems.com>
Fri, 15 Jul 2022 15:15:51 +0000 (17:15 +0200)
committerKever Yang <kever.yang@rock-chips.com>
Sun, 4 Sep 2022 12:00:38 +0000 (20:00 +0800)
On RK3399, mmc0 is eMMC and mmc1 is SD card, c.f. console:
MMC:   mmc@fe320000: 1, mmc@fe330000: 0

In arch/arm/mach-rockchip/spl-boot-order.c:board_boot_order, the
boot_device (BOOT_DEVICE_*) value is gotten from spl_node_to_boot_device
function. Said function returns BOOT_DEVICE_MMC1 for mmc0 (eMMC) and
BOOT_DEVICE_MMC2 for mmc1 (SD card).

Since the SD card controller is at mmc@fe320000, it should be associated
with BOOT_DEVICE_MMC2 and not BOOT_DEVICE_MMC1. Same applies to eMMC.

Let's fix that by swapping the two BOOT_DEVICEs.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Tested-by: Xavier Drudis Ferran <xdrudis@tinet.cat>
arch/arm/mach-rockchip/rk3399/rk3399.c

index de11a3fa3081cc8477a4a6f060e209e19478b905..819cc7fa1be08b42e5c6f1e7c0f887cb9c780b3c 100644 (file)
@@ -180,8 +180,8 @@ const char *spl_decode_boot_device(u32 boot_device)
                u32 boot_device;
                const char *ofpath;
        } spl_boot_devices_tbl[] = {
-               { BOOT_DEVICE_MMC1, "/mmc@fe320000" },
-               { BOOT_DEVICE_MMC2, "/mmc@fe330000" },
+               { BOOT_DEVICE_MMC2, "/mmc@fe320000" },
+               { BOOT_DEVICE_MMC1, "/mmc@fe330000" },
                { BOOT_DEVICE_SPI, "/spi@ff1d0000" },
        };