++ if (flash->read(flash, 12, sizeof(u32), &len, (char *) &size) ||
++ len != 4)
++ return -ENXIO;
++ size += 0x40; /* header size of the uImage */
++ if (size < 0x400000) {
++ /* skip to next erase block */
++ if (size & (flash->erasesize - 1)) {
++ size |= (flash->erasesize - 1);
++ size += 1;
++ }
++ magic_partitions[1].offset = size;
++ magic_partitions[1].size = magic_partitions[2].offset - size;
++ }
++