From f166af88a898601f24c490aa8e2b555cfc2dfc91 Mon Sep 17 00:00:00 2001 From: "Wenyou.Yang@microchip.com" Date: Fri, 21 Jul 2017 13:40:11 +0800 Subject: board: at91sam9260ek: Use SPI-flash-based AT45xxx DataFlash To support driver model and device tree, use the SPI-flash-based AT45xxx DataFlash driver, DataFlash is a kind of SPI flash. Instead of ATMEL_DATAFLASH_SPI DataFlash older driver that will be removed in the future. Signed-off-by: Wenyou Yang Reviewed-by: Simon Glass --- include/configs/at91sam9260ek.h | 40 ++++++++++++---------------------------- 1 file changed, 12 insertions(+), 28 deletions(-) (limited to 'include/configs') diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h index 00efcf032d..8238dcc78f 100644 --- a/include/configs/at91sam9260ek.h +++ b/include/configs/at91sam9260ek.h @@ -93,25 +93,6 @@ # define CONFIG_MACH_TYPE MACH_TYPE_AT91SAM9260EK #endif -#ifndef CONFIG_AT91SAM9G20EK_2MMC -/* DataFlash */ -#define CONFIG_ATMEL_DATAFLASH_SPI -#define CONFIG_HAS_DATAFLASH 1 -#define CONFIG_SYS_MAX_DATAFLASH_BANKS 2 -#define CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 0xC0000000 /* CS0 */ -#define CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 0xD0000000 /* CS1 */ -#define AT91_SPI_CLK 15000000 -#else -/* Enable MMC. The MCCK is conflicted with DataFlash */ -#endif - -#ifdef CONFIG_AT91SAM9G20EK -#define DATAFLASH_TCSS (0x22 << 16) -#else -#define DATAFLASH_TCSS (0x1a << 16) -#endif -#define DATAFLASH_TCHS (0x1 << 24) - /* NAND flash */ #ifdef CONFIG_CMD_NAND #define CONFIG_NAND_ATMEL @@ -141,11 +122,13 @@ #ifdef CONFIG_SYS_USE_DATAFLASH_CS0 /* bootstrap + u-boot + env + linux in dataflash on CS0 */ -#define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + 0x8400) -#define CONFIG_ENV_OFFSET 0x4200 -#define CONFIG_ENV_ADDR (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 + CONFIG_ENV_OFFSET) +#define CONFIG_ENV_OFFSET 0x4200 #define CONFIG_ENV_SIZE 0x4200 -#define CONFIG_BOOTCOMMAND "cp.b 0xC0084000 0x22000000 0x210000; bootm" +#define CONFIG_ENV_SECT_SIZE 0x210 +#define CONFIG_ENV_SPI_MAX_HZ 15000000 +#define CONFIG_BOOTCOMMAND "sf probe 0:0; " \ + "sf read 0x22000000 0x84000 0x294000; " \ + "bootm 0x22000000" #define CONFIG_BOOTARGS "console=ttyS0,115200 " \ "root=/dev/mtdblock0 " \ "mtdparts=atmel_nand:-(root) " \ @@ -153,12 +136,13 @@ #elif CONFIG_SYS_USE_DATAFLASH_CS1 -/* bootstrap + u-boot + env + linux in dataflash on CS1 */ -#define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 + 0x8400) -#define CONFIG_ENV_OFFSET 0x4200 -#define CONFIG_ENV_ADDR (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 + CONFIG_ENV_OFFSET) +#define CONFIG_ENV_OFFSET 0x4200 #define CONFIG_ENV_SIZE 0x4200 -#define CONFIG_BOOTCOMMAND "cp.b 0xD0084000 0x22000000 0x210000; bootm" +#define CONFIG_ENV_SECT_SIZE 0x210 +#define CONFIG_ENV_SPI_MAX_HZ 15000000 +#define CONFIG_BOOTCOMMAND "sf probe 0:1; " \ + "sf read 0x22000000 0x84000 0x294000; " \ + "bootm 0x22000000" #define CONFIG_BOOTARGS "console=ttyS0,115200 " \ "root=/dev/mtdblock0 " \ "mtdparts=atmel_nand:-(root) " \ -- cgit