diff options
author | Terry Lv <r65388@freescale.com> | 2011-08-12 12:58:07 +0800 |
---|---|---|
committer | Terry Lv <r65388@freescale.com> | 2011-09-01 11:45:02 +0800 |
commit | 32429d7b461f8b6a96d7b0f2bb3e2b1270780091 (patch) | |
tree | d16739584df7eae3e63e682f2889a45bc6899842 /common | |
parent | 72ac6998a7700c2c64a4a7f4d6d44bbc980558f6 (diff) | |
download | u-boot-imx-32429d7b461f8b6a96d7b0f2bb3e2b1270780091.zip u-boot-imx-32429d7b461f8b6a96d7b0f2bb3e2b1270780091.tar.gz u-boot-imx-32429d7b461f8b6a96d7b0f2bb3e2b1270780091.tar.bz2 |
ENGR00154666-4: Align u-boot mmc command with community
Change fastboot code for that fastboot uses mmc command to access card.
Thus the code need to be modified to new mmc command.
Signed-off-by: Terry Lv <r65388@freescale.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_fastboot.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index 2c819bf..4f076f4 100644 --- a/common/cmd_fastboot.c +++ b/common/cmd_fastboot.c @@ -1191,16 +1191,15 @@ static int rx_handler (const unsigned char *buffer, unsigned int buffer_size) mmc_ops: printf("writing to partition '%s'\n", ptn->name); - char *mmc_write[7] = {"mmc", "write", - NULL, NULL, NULL, NULL, NULL}; - char *mmc_init[2] = {"mmcinit", NULL,}; + char *mmc_write[5] = {"mmc", "write", + NULL, NULL, NULL, NULL}; + char *mmc_dev[4] = {"mmc", "dev", NULL, NULL}; - mmc_init[1] = slot_no; - mmc_write[2] = slot_no; - mmc_write[3] = source; - mmc_write[4] = dest; - mmc_write[5] = length; - mmc_write[6] = part_no; + mmc_dev[2] = slot_no; + mmc_dev[3] = part_no; + mmc_write[2] = source; + mmc_write[3] = dest; + mmc_write[4] = length; sprintf(slot_no, "%d", fastboot_devinfo.dev_id); @@ -1217,13 +1216,13 @@ mmc_ops: sprintf(length, "0x%x", temp); printf("Initializing '%s'\n", ptn->name); - if (do_mmcops(NULL, 0, 2, mmc_init)) + if (do_mmcops(NULL, 0, 4, mmc_dev)) sprintf(response, "FAIL:Init of MMC card"); else sprintf(response, "OKAY"); printf("Writing '%s'\n", ptn->name); - if (do_mmcops(NULL, 0, 7, mmc_write)) { + if (do_mmcops(NULL, 0, 5, mmc_write)) { printf("Writing '%s' FAILED!\n", ptn->name); sprintf(response, "FAIL: Write partition"); } else { |