diff options
author | wdenk <wdenk> | 2004-10-10 22:16:06 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2004-10-10 22:16:06 +0000 |
commit | 656658dd1577b62d5192ba2db4d9b8a3be1dbee3 (patch) | |
tree | 90841a22efe802730fa1d15721aaa5cb9577a34d /include | |
parent | 5c952cf0245421feb4644f2e71487c0b2e1dbd13 (diff) | |
download | u-boot-imx-656658dd1577b62d5192ba2db4d9b8a3be1dbee3.zip u-boot-imx-656658dd1577b62d5192ba2db4d9b8a3be1dbee3.tar.gz u-boot-imx-656658dd1577b62d5192ba2db4d9b8a3be1dbee3.tar.bz2 |
* Configure SX1 board to use drivers/cfi_flash.c
* Patches by Michael Bendzick, 30 Aug 2004:
- Configure omap1510inn board to use drivers/cfi_flash.c
- Make drivers/cfi_flash.c protect environment and redundant
environment.
* Patch by Steven Scholz, 23 Jun 2004:
- Add script (tools/img2brec.sh) to programm U-Boot into
(Synch)Flash using the Bootstrap Mode of the MC9328MX1/L
Diffstat (limited to 'include')
-rw-r--r-- | include/configs/SX1.h | 20 | ||||
-rw-r--r-- | include/configs/omap1510inn.h | 21 |
2 files changed, 34 insertions, 7 deletions
diff --git a/include/configs/SX1.h b/include/configs/SX1.h index ae4cf60..de7f387 100644 --- a/include/configs/SX1.h +++ b/include/configs/SX1.h @@ -161,16 +161,30 @@ * FLASH and environment organization */ #define CFG_MAX_FLASH_BANKS 2 /* max number of memory banks */ +#define PHYS_FLASH_SIZE (16 << 10) /* 16 MB */ +#define PHYS_FLASH_SECT_SIZE (128*1024) /* Size of a sector (128kB) */ #define CFG_MAX_FLASH_SECT (128) /* max number of sectors on one chip */ -#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x020000) /* addr of environment */ +#define CFG_ENV_ADDR (CFG_FLASH_BASE + PHYS_FLASH_SECT_SIZE) /* addr of environment */ +#define CFG_MONITOR_BASE CFG_FLASH_BASE /* Monitor at beginning of flash */ +#define CFG_MONITOR_LEN PHYS_FLASH_SECT_SIZE /* Reserve 1 sector */ +#define CFG_FLASH_BANKS_LIST { CFG_FLASH_BASE, CFG_FLASH_BASE + PHYS_FLASH_SIZE } + +/*----------------------------------------------------------------------- + * FLASH driver setup + */ +#define CFG_FLASH_CFI 1 /* Flash memory is CFI compliant */ +#define CFG_FLASH_CFI_DRIVER 1 /* Use drivers/cfi_flash.c */ +#define CFG_FLASH_USE_BUFFER_WRITE 1 /* Use buffered writes (~10x faster) */ +#define CFG_FLASH_PROTECTION 1 /* Use hardware sector protection */ /* timeout values are in ticks */ #define CFG_FLASH_ERASE_TOUT (20*CFG_HZ) /* Timeout for Flash Erase */ #define CFG_FLASH_WRITE_TOUT (20*CFG_HZ) /* Timeout for Flash Write */ #define CFG_ENV_IS_IN_FLASH 1 -#define CFG_ENV_SIZE 0x20000 /* Total Size of Environment Sector */ -#define CFG_ENV_OFFSET 0x20000 /* environment starts here */ +#define CFG_ENV_SECT_SIZE PHYS_FLASH_SECT_SIZE +#define CFG_ENV_SIZE CFG_ENV_SECT_SIZE /* Total Size of Environment Sector */ +#define CFG_ENV_OFFSET ( CFG_MONITOR_BASE + CFG_MONITOR_LEN ) /* Environment after Monitor */ /* Address and size of Redundant Environment Sector */ #define CFG_ENV_SIZE_REDUND 0x20000 diff --git a/include/configs/omap1510inn.h b/include/configs/omap1510inn.h index 97466c1..88d6c46 100644 --- a/include/configs/omap1510inn.h +++ b/include/configs/omap1510inn.h @@ -159,17 +159,30 @@ /*----------------------------------------------------------------------- * FLASH and environment organization */ -#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */ +#define CFG_MAX_FLASH_BANKS 2 /* max number of memory banks */ #define PHYS_FLASH_SIZE 0x01000000 /* 16MB */ +#define PHYS_FLASH_SECT_SIZE (128*1024) /* Size of a sector (128kB) */ #define CFG_MAX_FLASH_SECT (128) /* max number of sectors on one chip */ -#define CFG_ENV_ADDR (CFG_FLASH_BASE + 0x020000) /* addr of environment */ +#define CFG_ENV_ADDR (CFG_FLASH_BASE + PHYS_FLASH_SECT_SIZE) +#define CFG_MONITOR_BASE CFG_FLASH_BASE /* Monitor at beginning of flash */ +#define CFG_MONITOR_LEN PHYS_FLASH_SECT_SIZE /* Reserve 1 sector */ +#define CFG_FLASH_BANKS_LIST { CFG_FLASH_BASE, CFG_FLASH_BASE + PHYS_FLASH_SIZE } + +/*----------------------------------------------------------------------- + * FLASH driver setup + */ +#define CFG_FLASH_CFI 1 /* Flash memory is CFI compliant */ +#define CFG_FLASH_CFI_DRIVER 1 /* Use drivers/cfi_flash.c */ +#define CFG_FLASH_USE_BUFFER_WRITE 1 /* Use buffered writes (~10x faster) */ +#define CFG_FLASH_PROTECTION 1 /* Use hardware sector protection */ /* timeout values are in ticks */ #define CFG_FLASH_ERASE_TOUT (20*CFG_HZ) /* Timeout for Flash Erase */ #define CFG_FLASH_WRITE_TOUT (20*CFG_HZ) /* Timeout for Flash Write */ #define CFG_ENV_IS_IN_FLASH 1 -#define CFG_ENV_SIZE 0x20000 /* Total Size of Environment Sector */ -#define CFG_ENV_OFFSET 0x20000 /* environment starts here */ +#define CFG_ENV_SECT_SIZE PHYS_FLASH_SECT_SIZE /* Total Size of Environment Sector */ +#define CFG_ENV_SIZE CFG_ENV_SECT_SIZE +#define CFG_ENV_OFFSET ( CFG_MONITOR_BASE + CFG_MONITOR_LEN ) /* Environment after Monitor */ #endif /* __CONFIG_H */ |