3 @@ -94,6 +94,7 @@ void usage(void)
4 " [KOBS] boot structures config options\n"
5 " --chip_0_device_path=<path> .......... Device of boot (default /dev/mtd0)\n"
6 " --chip_1_device_path=<path> .......... The second chip in case of multichip NAND\n"
7 + " --chip_0_size=<size> ................. Override size of chip_0 device\n"
8 " --search_exponent=<value> ............ NCB field (default 2)\n"
9 " --data_setup_time=<value> ............ NCB field (default 80)\n"
10 " --data_hold_time=<value> ............. NCB field (default 60)\n"
13 @@ -716,6 +716,11 @@ struct mtd_data *mtd_open(const struct m
17 + /* override MTD size */
18 + if (md->cfg.chip_0_size) {
19 + miu->size = md->cfg.chip_0_size;
22 /* verify it's a nand */
23 if (miu->type != MTD_NANDFLASH) {
24 fprintf(stderr, "mtd: device %s not NAND\n", mp->name);
25 @@ -2914,7 +2919,7 @@ static const struct {
27 ARG_IGNORE(chip_count),
28 ARG_IGNORE(chip_0_offset),
29 - ARG_IGNORE(chip_0_size),
31 ARG_IGNORE(chip_1_offset),
32 ARG_IGNORE(chip_1_size),
34 @@ -3107,7 +3112,7 @@ void mtd_cfg_dump(struct mtd_config *cfg
36 Ps(chip_0_device_path);
40 Ps(chip_1_device_path);