Enable the driver for the embedded flash used in the Atmel
AT91SAM9XE devices.
+config EFLASH_PROTSECTORS
+ int "Number of flash sectors to protect from erasing"
+ depends on AT91_EFLASH
+ help
+ If non-zero, this will be the number of sectors of the flash to disallow
+ U-Boot to ease, starting from the beginning of flash.
+
config AT91_GPIO_PULLUP
bool "Keep pullups on peripheral pins"
depends on CPU_ARM926EJS
if (i%32 == 0)
tmp = readl(&eefc->frr);
flash_info[0].protect[i] = (tmp >> (i%32)) & 1;
-#if defined(CONFIG_EFLASH_PROTSECTORS)
+#if CONFIG_VAL(EFLASH_PROTSECTORS)
if (i < CONFIG_EFLASH_PROTSECTORS)
flash_info[0].protect[i] = 1;
#endif
debug("protect sector=%ld prot=%d\n", sector, prot);
-#if defined(CONFIG_EFLASH_PROTSECTORS)
+#if CONFIG_VAL(EFLASH_PROTSECTORS)
if (sector < CONFIG_EFLASH_PROTSECTORS) {
if (!prot) {
printf("eflash: sector %lu cannot be unprotected\n",
CONFIG_SYS_MALLOC_LEN=0x121000
CONFIG_TARGET_ETHERNUT5=y
CONFIG_AT91_EFLASH=y
+CONFIG_EFLASH_PROTSECTORS=1
CONFIG_NR_DRAM_BANKS=1
CONFIG_ENV_SIZE=0x21000
CONFIG_ENV_OFFSET=0x3DE000
/* 512kB on-chip NOR flash */
# define CONFIG_SYS_FLASH_BASE 0x00200000 /* AT91SAM9XE_FLASH_BASE */
# define CONFIG_SYS_MAX_FLASH_SECT 32
-# define CONFIG_EFLASH_PROTSECTORS 1
/* bootstrap + u-boot + env + linux in dataflash on CS0 */