Commit 93d97635c3b01c5f4af29fcf85ba3d94bb81ca2b
Committed by
Lokesh Vutla
1 parent
20fae0a7bc
Exists in
v2015.07-smarct4x
and in
3 other branches
am335x_evm: Switch to env on FAT SD by default, add am335x_evm_nandboot
- Re-org env sections so that we can fall back to env is in FAT on SD card, for broader board compatibility - Add am335x_evm_nandboot as example of NAND env This is for the TI integration tree only as the plan for upstream is to work towards env location being selectable via Kconfig Signed-off-by: Tom Rini <trini@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Showing 2 changed files with 31 additions and 19 deletions Side-by-side Diff
configs/am335x_evm_nandboot_defconfig
include/configs/am335x_evm.h
... | ... | @@ -244,11 +244,6 @@ |
244 | 244 | "8m(NAND.kernel)," \ |
245 | 245 | "-(NAND.file-system)" |
246 | 246 | #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x000c0000 |
247 | -#undef CONFIG_ENV_IS_NOWHERE | |
248 | -#define CONFIG_ENV_IS_IN_NAND | |
249 | -#define CONFIG_ENV_OFFSET 0x001c0000 | |
250 | -#define CONFIG_ENV_OFFSET_REDUND 0x001e0000 | |
251 | -#define CONFIG_SYS_ENV_SECT_SIZE CONFIG_SYS_NAND_BLOCK_SIZE | |
252 | 247 | /* NAND: SPL related configs */ |
253 | 248 | #ifdef CONFIG_SPL_NAND_SUPPORT |
254 | 249 | #define CONFIG_SPL_NAND_AM33XX_BCH |
... | ... | @@ -411,7 +406,6 @@ |
411 | 406 | "128k(u-boot-env2),3464k(kernel)," \ |
412 | 407 | "-(rootfs)" |
413 | 408 | #elif defined(CONFIG_EMMC_BOOT) |
414 | -#undef CONFIG_ENV_IS_NOWHERE | |
415 | 409 | #define CONFIG_ENV_IS_IN_MMC |
416 | 410 | #define CONFIG_SPL_ENV_SUPPORT |
417 | 411 | #define CONFIG_SYS_MMC_ENV_DEV 1 |
... | ... | @@ -419,6 +413,27 @@ |
419 | 413 | #define CONFIG_ENV_OFFSET 0x0 |
420 | 414 | #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) |
421 | 415 | #define CONFIG_SYS_REDUNDAND_ENVIRONMENT |
416 | +#elif defined(CONFIG_NOR_BOOT) | |
417 | +#define CONFIG_ENV_IS_IN_FLASH | |
418 | +#define CONFIG_ENV_SECT_SIZE (128 << 10) /* 128 KiB */ | |
419 | +#define CONFIG_ENV_OFFSET (512 << 10) /* 512 KiB */ | |
420 | +#define CONFIG_ENV_OFFSET_REDUND (768 << 10) /* 768 KiB */ | |
421 | +#define MTDIDS_DEFAULT "nor0=physmap-flash.0" | |
422 | +#define MTDPARTS_DEFAULT "mtdparts=physmap-flash.0:" \ | |
423 | + "512k(u-boot)," \ | |
424 | + "128k(u-boot-env1)," \ | |
425 | + "128k(u-boot-env2)," \ | |
426 | + "4m(kernel),-(rootfs)" | |
427 | +#elif defined(CONFIG_ENV_IS_IN_NAND) | |
428 | +#define CONFIG_ENV_OFFSET 0x001c0000 | |
429 | +#define CONFIG_ENV_OFFSET_REDUND 0x001e0000 | |
430 | +#define CONFIG_SYS_ENV_SECT_SIZE CONFIG_SYS_NAND_BLOCK_SIZE | |
431 | +#elif !defined(CONFIG_ENV_IS_NOWHERE) | |
432 | +/* Not NAND, SPI, NOR or eMMC env, so put ENV in a file on FAT */ | |
433 | +#define CONFIG_ENV_IS_IN_FAT | |
434 | +#define FAT_ENV_INTERFACE "mmc" | |
435 | +#define FAT_ENV_DEVICE_AND_PART "0:1" | |
436 | +#define FAT_ENV_FILE "uboot.env" | |
422 | 437 | #endif |
423 | 438 | |
424 | 439 | /* SPI flash. */ |
... | ... | @@ -456,19 +471,6 @@ |
456 | 471 | #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT |
457 | 472 | #define CONFIG_SYS_FLASH_SIZE 0x01000000 |
458 | 473 | #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE |
459 | -/* Reduce SPL size by removing unlikey targets */ | |
460 | -#ifdef CONFIG_NOR_BOOT | |
461 | -#define CONFIG_ENV_IS_IN_FLASH | |
462 | -#define CONFIG_ENV_SECT_SIZE (128 << 10) /* 128 KiB */ | |
463 | -#define CONFIG_ENV_OFFSET (512 << 10) /* 512 KiB */ | |
464 | -#define CONFIG_ENV_OFFSET_REDUND (768 << 10) /* 768 KiB */ | |
465 | -#define MTDIDS_DEFAULT "nor0=physmap-flash.0" | |
466 | -#define MTDPARTS_DEFAULT "mtdparts=physmap-flash.0:" \ | |
467 | - "512k(u-boot)," \ | |
468 | - "128k(u-boot-env1)," \ | |
469 | - "128k(u-boot-env2)," \ | |
470 | - "4m(kernel),-(rootfs)" | |
471 | -#endif | |
472 | 474 | #endif /* NOR support */ |
473 | 475 | |
474 | 476 | #endif /* ! __CONFIG_AM335X_EVM_H */ |