From 684958f4162c12b923636f97ce0c5a32747cc62b Mon Sep 17 00:00:00 2001 From: "Ye.Li" Date: Thu, 5 Jun 2014 10:56:30 +0800 Subject: ENGR00315894-17 imx6q:sabresd/sabreauto: add SATA support This patch adds the SATA support for i.mx6qsabresd and i.mx6qsabreauto board Signed-off-by: Jason Liu Signed-off-by: Ye.Li --- include/configs/mx6sabre_common.h | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'include/configs') diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h index e051972..0cb1ebb 100644 --- a/include/configs/mx6sabre_common.h +++ b/include/configs/mx6sabre_common.h @@ -149,9 +149,23 @@ "nand read ${fdt_addr} 0x2000000 0x100000;"\ "bootm ${loadaddr} - ${fdt_addr}\0" -#else /* the following is used by the non-NAND boot. */ +#elif defined(CONFIG_SYS_BOOT_SATA) #define CONFIG_EXTRA_ENV_SETTINGS \ + CONFIG_MFG_ENV_SETTINGS \ + "fdt_addr=0x18000000\0" \ + "fdt_high=0xffffffff\0" \ + "bootargs=console=" CONFIG_CONSOLE_DEV ",115200 \0"\ + "bootargs_sata=setenv bootargs ${bootargs} " \ + "root=/dev/sda1 rootwait rw \0" \ + "bootcmd_sata=run bootargs_sata; sata init; " \ + "sata read ${loadaddr} 0x800 0x4000; " \ + "sata read ${fdt_addr} 0x8000 0x800; " \ + "bootm ${loadaddr} - ${fdt_addr} \0" \ + "bootcmd=run bootcmd_sata \0" + +#else +#define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_MFG_ENV_SETTINGS \ "script=boot.scr\0" \ "image=zImage\0" \ @@ -296,10 +310,22 @@ #elif defined CONFIG_SYS_BOOT_NAND #define CONFIG_SYS_USE_NAND #define CONFIG_ENV_IS_IN_NAND +#elif defined CONFIG_SYS_BOOT_SATA +#define CONFIG_ENV_IS_IN_SATA +#define CONFIG_CMD_SATA #else #define CONFIG_ENV_IS_IN_MMC #endif +#ifdef CONFIG_CMD_SATA +#define CONFIG_DWC_AHSATA +#define CONFIG_SYS_SATA_MAX_DEVICE 1 +#define CONFIG_DWC_AHSATA_PORT_ID 0 +#define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR +#define CONFIG_LBA48 +#define CONFIG_LIBATA +#endif + #ifdef CONFIG_SYS_USE_SPINOR #define CONFIG_CMD_SF #define CONFIG_SPI_FLASH @@ -359,6 +385,10 @@ #define CONFIG_ENV_OFFSET (8 << 20) #define CONFIG_ENV_SECT_SIZE (128 << 10) #define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE +#elif defined(CONFIG_ENV_IS_IN_SATA) +#define CONFIG_ENV_OFFSET (768 * 1024) +#define CONFIG_SATA_ENV_DEV 0 +#define CONFIG_SYS_DCACHE_OFF /* remove when sata driver support cache */ #endif #define CONFIG_OF_LIBFDT -- cgit v1.1