From d73a8a1b8ce831f9b869960de682ca7d48d49f9d Mon Sep 17 00:00:00 2001 From: Stefano Babic Date: Thu, 11 Nov 2010 15:38:02 +0100 Subject: da850: Enable SPI Flash The patch was already posted to the arago project, but not yet to mainline. It allows to save environment into the spi flash. Tested on LogiPD tmdxl138. Signed-off-by: Sudhakar Rajashekhara Signed-off-by: Stefano Babic CC: Detlev Zundev CC: Ben Gardiner Signed-off-by: Sandeep Paulraj --- include/configs/da850evm.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'include/configs') diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h index 4224258..f3d5a54 100644 --- a/include/configs/da850evm.h +++ b/include/configs/da850evm.h @@ -27,6 +27,7 @@ * Board */ #define CONFIG_DRIVER_TI_EMAC +#define CONFIG_USE_SPIFLASH /* * SoC Configuration @@ -71,6 +72,15 @@ #define CONFIG_BAUDRATE 115200 /* Default baud rate */ #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } +#define CONFIG_SPI +#define CONFIG_SPI_FLASH +#define CONFIG_SPI_FLASH_STMICRO +#define CONFIG_DAVINCI_SPI +#define CONFIG_SYS_SPI_BASE DAVINCI_SPI1_BASE +#define CONFIG_SYS_SPI_CLK clk_get(DAVINCI_SPI1_CLKID) +#define CONFIG_SF_DEFAULT_SPEED 30000000 +#define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED + /* * I2C Configuration */ @@ -115,6 +125,16 @@ #define CONFIG_NET_MULTI #endif +#ifdef CONFIG_USE_SPIFLASH +#undef CONFIG_ENV_IS_IN_FLASH +#undef CONFIG_ENV_IS_IN_NAND +#define CONFIG_ENV_IS_IN_SPI_FLASH +#define CONFIG_ENV_SIZE (64 << 10) +#define CONFIG_ENV_OFFSET (256 << 10) +#define CONFIG_ENV_SECT_SIZE (64 << 10) +#define CONFIG_SYS_NO_FLASH +#endif + /* * U-Boot general configuration */ @@ -179,6 +199,14 @@ #define CONFIG_CMD_UBIFS #endif +#ifdef CONFIG_USE_SPIFLASH +#undef CONFIG_CMD_IMLS +#undef CONFIG_CMD_FLASH +#define CONFIG_CMD_SPI +#define CONFIG_CMD_SF +#define CONFIG_CMD_SAVEENV +#endif + #if !defined(CONFIG_USE_NAND) && \ !defined(CONFIG_USE_NOR) && \ !defined(CONFIG_USE_SPIFLASH) -- cgit v1.1