From f32803e7e626a7e7e81ca2ea87faacc538889d5b Mon Sep 17 00:00:00 2001 From: Chanho Park Date: Thu, 26 Nov 2015 13:28:32 +0900 Subject: [PATCH] common: movi: remove unnecessary partition This patch removes unnecessary emmc boot partition because they are not used anymore. Change-Id: I4f15db025d2756007aa89d5ec3c15142df2b7ce5 Signed-off-by: Chanho Park --- arch/arm/cpu/armv7/exynos/movi_partition.c | 45 --------- common/cmd_movi.c | 104 --------------------- 2 files changed, 149 deletions(-) diff --git a/arch/arm/cpu/armv7/exynos/movi_partition.c b/arch/arm/cpu/armv7/exynos/movi_partition.c index 136b30d4c..e612878ef 100644 --- a/arch/arm/cpu/armv7/exynos/movi_partition.c +++ b/arch/arm/cpu/armv7/exynos/movi_partition.c @@ -80,53 +80,8 @@ int init_raw_area_table(block_dev_desc_t * dev_desc, int location) image[part_num].attribute = 0x4; strcpy(image[part_num].description, "environment"); dbg("env: %d\n", image[part_num].start_blk); - - - /* For eMMC partition BLOCK Change*/ - if (location == 0) - image[part_num].start_blk = image[part_num].start_blk + 1; - part_num++; - - /* image 5 should be kernel */ -#ifdef CONFIG_KERNEL_OFFSET - image[part_num].start_blk = CONFIG_KERNEL_OFFSET * 2048; -#else - image[part_num].start_blk = image[part_num - 1].start_blk + MOVI_ENV_BLKCNT; -#endif - image[part_num].used_blk = MOVI_ZIMAGE_BLKCNT; - image[part_num].size = PART_SIZE_KERNEL; - image[part_num].attribute = 0x5; - strcpy(image[part_num].description, "kernel"); - dbg("knl: %d\n", image[part_num].start_blk); part_num++; - /* image 6 should be RFS */ - image[part_num].start_blk = image[part_num - 1].start_blk + MOVI_ZIMAGE_BLKCNT; - image[part_num].used_blk = MOVI_ROOTFS_BLKCNT; - image[part_num].size = PART_SIZE_ROOTFS; - image[part_num].attribute = 0x6; - strcpy(image[part_num].description, "rfs"); - dbg("rfs: %d\n", image[part_num].start_blk); - part_num++; - -#ifdef CONFIG_CHARGER_LOGO - image[part_num].start_blk = image[part_num - 1].start_blk + MOVI_ROOTFS_BLKCNT; - image[part_num].used_blk = MOVI_CHARGER_LOGO_BLKCNT; - image[part_num].size = PART_SIZE_CHARGER_LOGO; - image[part_num].attribute = 0x7; - strcpy(image[part_num].description, "charger"); - dbg("charger: %d\n", image[part_num].start_blk); - part_num++; -#endif -#ifdef CONFIG_BOOT_LOGO - image[part_num].start_blk = image[part_num - 1].start_blk + MOVI_CHARGER_LOGO_BLKCNT; - image[part_num].used_blk = MOVI_BOOT_LOGO_BLKCNT; - image[part_num].size = PART_SIZE_BOOT_LOGO; - image[part_num].attribute = 0x8; - strcpy(image[part_num].description, "bootlogo"); - dbg("bootlogo: %d\n", image[part_num].start_blk); - part_num++; -#endif for (i = part_num; i < 15; i++) { raw_area_control.image[i].start_blk = 0; raw_area_control.image[i].used_blk = 0; diff --git a/common/cmd_movi.c b/common/cmd_movi.c index 552074548..2e1da92d0 100644 --- a/common/cmd_movi.c +++ b/common/cmd_movi.c @@ -93,30 +93,6 @@ int do_movi(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) goto usage; attribute = 0x4; break; - case 'k': - if (argc != 5) - goto usage; - attribute = 0x5; - break; - case 'r': - if (argc != 6) - goto usage; - attribute = 0x6; - break; -#ifdef CONFIG_CHARGER_LOGO - case 'c': - if (argc != (6 - location)) - goto usage; - attribute = 0x7; - break; -#endif -#ifdef CONFIG_BOOT_LOGO - case 'l': - if (argc != (6 - location)) - goto usage; - attribute = 0x8; - break; -#endif default: goto usage; } @@ -217,82 +193,6 @@ int do_movi(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) return 1; } - /* kernel r/w */ - if (attribute == 0x5) { - for (i=0, image = raw_area_control.image; i<15; i++) { - if (image[i].attribute == attribute) - break; - } - start_blk = image[i].start_blk; - blkcnt = image[i].used_blk; - printf("%s kernel..device %d Start %ld, Count %ld ", rw ? "writing" : "reading", - dev_num, start_blk, blkcnt); - sprintf(run_cmd, "mmc %s %d 0x%lx 0x%lx 0x%lx", - rw ? "write" : "read", dev_num, - addr, start_blk, blkcnt); - run_command(run_cmd, dev_num); - printf("completed\n"); - return 1; - } - - /* root file system r/w */ - if (attribute == 0x6) { - rfs_size = simple_strtoul(argv[5], NULL, 16); - - for (i=0, image = raw_area_control.image; i<15; i++) { - if (image[i].attribute == attribute) - break; - } - start_blk = image[i].start_blk; - blkcnt = rfs_size/MOVI_BLKSIZE + - ((rfs_size&(MOVI_BLKSIZE-1)) ? 1 : 0); - image[i].used_blk = blkcnt; - printf("%s RFS..device %d Start %ld, Count %ld ", rw ? "writing":"reading", - dev_num, start_blk, blkcnt); - sprintf(run_cmd,"mmc %s %d 0x%lx 0x%lx 0x%lx", - rw ? "write":"read", dev_num, - addr, start_blk, blkcnt); - run_command(run_cmd, dev_num); - printf("completed\n"); - return 1; - } - -#ifdef CONFIG_CHARGER_LOGO - if (attribute == 0x7) { - for (i=0, image = raw_area_control.image; i<15; i++) { - if (image[i].attribute == attribute) - break; - } - start_blk = image[i].start_blk; - blkcnt = image[i].used_blk; - printf("%s charger logo..device %d Start %ld, Count %ld ", rw ? "writing" : "reading", - dev_num, start_blk, blkcnt); - sprintf(run_cmd, "mmc %s %d 0x%lx 0x%lx 0x%lx", - rw ? "write" : "read", dev_num, - addr, start_blk, blkcnt); - run_command(run_cmd, dev_num); - printf("completed\n"); - return 1; - } -#endif -#ifdef CONFIG_BOOT_LOGO - if (attribute == 0x8) { - for (i=0, image = raw_area_control.image; i<15; i++) { - if (image[i].attribute == attribute) - break; - } - start_blk = image[i].start_blk; - blkcnt = image[i].used_blk; - printf("%s bootlogo.. %d Start %ld, Count %ld ", rw ? "writing" : "reading", - dev_num, start_blk, blkcnt); - sprintf(run_cmd, "mmc %s %d 0x%lx 0x%lx 0x%lx", - rw ? "write" : "read", dev_num, - addr, start_blk, blkcnt); - run_command(run_cmd, dev_num); - printf("completed\n"); - return 1; - } -#endif return 1; usage: @@ -311,10 +211,6 @@ U_BOOT_CMD( "movi read {fwbl1 | bl2 | u-boot | tzsw} {device_number} {addr} - Read data from sd/mmc\n" "movi write {fwbl1 | bl2 | u-boot | tzsw} {device_number} {addr} - Read data from sd/mmc\n" "#COMMON#\n" - "movi read kernel {device_number} {addr} - Read data from device\n" - "movi write kernel {device_number} {addr} - Write data to device\n" - "movi read rootfs {device_number} {addr} [bytes(hex)] - Read rootfs data from device by size\n" - "movi write rootfs {device_number} {addr} [bytes(hex)] - Write rootfs data to device by size\n" "movi read {sector#} {device_number} {bytes(hex)} {addr} - instead of this, you can use \"mmc read\"\n" "movi write {sector#} {device_number} {bytes(hex)} {addr} - instead of this, you can use \"mmc write\"\n" ); -- 2.34.1