sun60iw2: mmc cmd align with orangepi baseline

This commit is contained in:
Qubot 2026-05-27 14:59:18 +08:00
parent 60ab0f3c6d
commit 27672815f8

View File

@ -909,7 +909,7 @@ static cmd_tbl_t cmd_mmc[] = {
U_BOOT_CMD_MKENT(swrite, 3, 0, do_mmc_sparse_write, "", ""),
#endif
U_BOOT_CMD_MKENT(rescan, 1, 1, do_mmc_rescan, "", ""),
U_BOOT_CMD_MKENT(part, 1, 1, do_mmc_part, "", ""),
U_BOOT_CMD_MKENT(part, 2, 1, do_mmc_part, "", ""),
U_BOOT_CMD_MKENT(dev, 3, 0, do_mmc_dev, "", ""),
U_BOOT_CMD_MKENT(list, 1, 1, do_mmc_list, "", ""),
#if CONFIG_IS_ENABLED(MMC_HW_PARTITIONING)
@ -949,11 +949,6 @@ static int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return CMD_RET_SUCCESS;
if (curr_device < 0) {
/*
* Legacy sunxi mmc stack may report device count as max-devnum.
* Accept device 0 as available when count is 0 to avoid false
* "No MMC device available" on single-slot boards.
*/
if (get_mmc_num() >= 0) {
curr_device = 0;
} else {
@ -1034,7 +1029,6 @@ int do_card0_probe(cmd_tbl_t *cmdtp, int flag,
board_mmc_set_num(0);
board_mmc_pre_init(0);
// sunxi_mmc_init(0);
mmc_boot = find_mmc_device(0);
if (!mmc_boot) {
printf("fail to find card0\n");
@ -1044,8 +1038,8 @@ int do_card0_probe(cmd_tbl_t *cmdtp, int flag,
puts("card0 init failed\n");
return -1;
}
run_command("mmcinfo", 0);
run_command("mmc part", 0);
//run_command("mmcinfo", 0);
//run_command("mmc part", 0);
card0_init = 1;
return 0;
}
@ -1055,4 +1049,3 @@ U_BOOT_CMD(
"probe sunxi card0 device",
"sunxi_card0_probe"
);