From: Michal Simek Date: Mon, 24 Sep 2012 12:51:22 +0000 (+0200) Subject: zynq: Synchronize nor flash X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=94f19296556b4c4188c59e8053f4f594edf60c2c;p=thirdparty%2Fu-boot.git zynq: Synchronize nor flash Signed-off-by: Michal Simek --- diff --git a/include/configs/zynq_afx.h b/include/configs/zynq_afx.h index e266003b8e1..a8465930341 100644 --- a/include/configs/zynq_afx.h +++ b/include/configs/zynq_afx.h @@ -20,16 +20,17 @@ #define CONFIG_ZYNQ_SERIAL_UART1 -#include - -#if defined(CONFIG_AFX_NOR) -#undef CONFIG_SYS_NO_FLASH -#else #define CONFIG_SYS_NO_FLASH +#if defined(CONFIG_AFX_NOR) +# undef CONFIG_SYS_NO_FLASH #endif + +#include + + + #include -#define CONFIG_CMD_SAVEENV /* Command to save ENV to Flash */ #define CONFIG_REGINFO /* Again, debugging */ #undef CONFIG_CMD_SETGETDCR /* README says 4xx only */ #define CONFIG_TIMESTAMP /* print image timestamp on bootm, etc */ @@ -45,34 +46,6 @@ #define CONFIG_ZYNQ_XILINX_FLASH_HEADER #endif -/* - * NOR Flash Settings - */ -#ifndef CONFIG_SYS_NO_FLASH -#define CONFIG_SYS_FLASH_BASE 0xE2000000 -#define CONFIG_SYS_FLASH_SIZE (16 * 1024 * 1024) -#define CONFIG_SYS_MAX_FLASH_BANKS 1 - -/* max number of sectors/blocks on one chip */ -#define CONFIG_SYS_MAX_FLASH_SECT 512 -#define CONFIG_SYS_FLASH_ERASE_TOUT 1000 -#define CONFIG_SYS_FLASH_WRITE_TOUT 5000 -#define CONFIG_FLASH_SHOW_PROGRESS 10 - -#define CONFIG_SYS_FLASH_CFI -#undef CONFIG_SYS_FLASH_EMPTY_INFO -#define CONFIG_FLASH_CFI_DRIVER -#undef CONFIG_SYS_FLASH_PROTECTION /* don't use hardware protection */ -#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE /* use buffered writes (20x faster) */ -#define CONFIG_ENV_OFFSET 0xC0000 /*768 KB*/ -#define CONFIG_ENV_SECT_SIZE 0x20000 /*128 KB*/ -#define CONFIG_ENV_IS_IN_FLASH -#ifdef CONFIG_ZYNQ_XILINX_FLASH_HEADER -#define CONFIG_ZYNQ_XIP_START CONFIG_SYS_FLASH_BASE -#endif -#else -#define CONFIG_ENV_IS_NOWHERE -#endif /* * Physical Memory map diff --git a/include/configs/zynq_common.h b/include/configs/zynq_common.h index 44d2fa1a2ea..5df1860e3fb 100644 --- a/include/configs/zynq_common.h +++ b/include/configs/zynq_common.h @@ -74,6 +74,38 @@ #endif #define CONFIG_SYS_HZ 1000 + +/* no NOR flash */ +#ifdef CONFIG_SYS_NO_FLASH +# define CONFIG_ENV_IS_NOWHERE +#else +# define CONFIG_SYS_FLASH_BASE 0xE2000000 +# define CONFIG_SYS_FLASH_SIZE (16 * 1024 * 1024) +# define CONFIG_SYS_MAX_FLASH_BANKS 1 +/* max number of sectors/blocks on one chip */ +# define CONFIG_SYS_MAX_FLASH_SECT 512 +# define CONFIG_SYS_FLASH_ERASE_TOUT 1000 +# define CONFIG_SYS_FLASH_WRITE_TOUT 5000 +# define CONFIG_FLASH_SHOW_PROGRESS 10 + +# define CONFIG_SYS_FLASH_CFI +# undef CONFIG_SYS_FLASH_EMPTY_INFO +# define CONFIG_FLASH_CFI_DRIVER + +# undef CONFIG_SYS_FLASH_PROTECTION /* don't use hardware protection */ +# define CONFIG_SYS_FLASH_USE_BUFFER_WRITE /* use buffered writes (20x faster) */ + +# ifndef CONFIG_ENV_IS_NOWHERE +# define CONFIG_ENV_OFFSET 0xC0000 /*768 KB*/ +# define CONFIG_ENV_SECT_SIZE 0x20000 /*128 KB*/ +# define CONFIG_ENV_IS_IN_FLASH +# define CONFIG_CMD_SAVEENV /* Command to save ENV to Flash */ +# ifdef CONFIG_ZYNQ_XILINX_FLASH_HEADER +# define CONFIG_ZYNQ_XIP_START CONFIG_SYS_FLASH_BASE +# endif +# endif +#endif + #include #define CONFIG_SYS_TEXT_BASE 0x04000000 diff --git a/include/configs/zynq_cseflash.h b/include/configs/zynq_cseflash.h index 5a8e146cc39..9c370da9ed9 100644 --- a/include/configs/zynq_cseflash.h +++ b/include/configs/zynq_cseflash.h @@ -4,6 +4,8 @@ #ifndef __CONFIG_H #define __CONFIG_H +#define CONFIG_ENV_IS_NOWHERE + #include /* Disable uart console */ @@ -19,8 +21,8 @@ */ #undef CONFIG_OF_LIBFDT -#undef CONFIG_SYS_NO_FLASH -#define CONFIG_ENV_IS_NOWHERE + + #include #undef CONFIG_CMD_PING /* Might be useful for debugging */ @@ -72,26 +74,6 @@ /* #define CONFIG_ZYNQ_IP_ENV */ -#ifndef CONFIG_SYS_NO_FLASH - -/* FLASH organization */ -#define CONFIG_SYS_FLASH_BASE 0xE2000000 -#define CONFIG_SYS_FLASH_SIZE (16 * 1024 * 1024) -#define CONFIG_SYS_MAX_FLASH_BANKS 1 -/* max number of sectors/blocks on one chip */ -#define CONFIG_SYS_MAX_FLASH_SECT 512 -#define CONFIG_SYS_FLASH_ERASE_TOUT 1000 -#define CONFIG_SYS_FLASH_WRITE_TOUT 5000 - -#define CONFIG_FLASH_SHOW_PROGRESS 10 - -#define CONFIG_SYS_FLASH_CFI -#undef CONFIG_SYS_FLASH_EMPTY_INFO -#define CONFIG_FLASH_CFI_DRIVER - -#undef CONFIG_SYS_FLASH_PROTECTION /* don't use hardware protection */ -#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE /* use buffered writes (20x faster) */ -#endif /* Because (at least at first) we're going to be loaded via JTAG_Tcl */ #define CONFIG_SKIP_LOWLEVEL_INIT diff --git a/include/configs/zynq_ep107.h b/include/configs/zynq_ep107.h index f7bd6ab368b..710c42064f8 100644 --- a/include/configs/zynq_ep107.h +++ b/include/configs/zynq_ep107.h @@ -65,12 +65,9 @@ "tftp 0x800000 ramdisk8M.image.gz;" \ "go 0x8000\0" -/* Uncomment it if you don't want Flash */ -//#define CONFIG_SYS_NO_FLASH #include #define CONFIG_CMD_PING /* Might be useful for debugging */ -#define CONFIG_CMD_SAVEENV /* Command to save ENV to Flash */ #define CONFIG_REGINFO /* Again, debugging */ #undef CONFIG_CMD_SETGETDCR /* README says 4xx only */ @@ -89,31 +86,6 @@ /* this is to set ipaddr, ethaddr and serverip env variables. */ #define CONFIG_ZYNQ_IP_ENV -/* - * NOR Flash Settings - */ -#ifndef CONFIG_SYS_NO_FLASH - -#define CONFIG_SYS_FLASH_BASE 0xE2000000 -#define CONFIG_SYS_FLASH_SIZE (16 * 1024 * 1024) -#define CONFIG_SYS_MAX_FLASH_BANKS 1 -/* max number of sectors/blocks on one chip */ -#define CONFIG_SYS_MAX_FLASH_SECT 512 -#define CONFIG_SYS_FLASH_ERASE_TOUT 1000 -#define CONFIG_SYS_FLASH_WRITE_TOUT 5000 -#define CONFIG_FLASH_SHOW_PROGRESS 10 - -#define CONFIG_SYS_FLASH_CFI -#undef CONFIG_SYS_FLASH_EMPTY_INFO -#define CONFIG_FLASH_CFI_DRIVER -#undef CONFIG_SYS_FLASH_PROTECTION /* don't use hardware protection */ -#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE /* use buffered writes (20x faster) */ -#define CONFIG_ENV_OFFSET 0xC0000 /*768 KB*/ -#define CONFIG_ENV_SECT_SIZE 0x20000 /*128 KB*/ -#define CONFIG_ENV_IS_IN_FLASH -#else -#define CONFIG_ENV_IS_NOWHERE -#endif /* * Physical Memory map diff --git a/include/configs/zynq_zc70x.h b/include/configs/zynq_zc70x.h index b6c61eec581..09cde5a102e 100644 --- a/include/configs/zynq_zc70x.h +++ b/include/configs/zynq_zc70x.h @@ -22,11 +22,11 @@ #define CONFIG_ZYNQ_GEM0 #define CONFIG_PHY_ADDR 7 +#define CONFIG_SYS_NO_FLASH + + #include -/* no NOR on zc702 */ -#define CONFIG_SYS_NO_FLASH -#define CONFIG_ENV_IS_NOWHERE #include #define CONFIG_CMD_PING /* Might be useful for debugging */ diff --git a/include/configs/zynq_zc770.h b/include/configs/zynq_zc770.h index 2f3a249c102..341b8551375 100644 --- a/include/configs/zynq_zc770.h +++ b/include/configs/zynq_zc770.h @@ -18,6 +18,7 @@ #ifndef __CONFIG_ZYNQ_ZC770_H #define __CONFIG_ZYNQ_ZC770_H +#define CONFIG_SYS_NO_FLASH #if defined(CONFIG_ZC770_XM010) # define CONFIG_ZYNQ_SERIAL_UART1 @@ -29,6 +30,7 @@ #elif defined(CONFIG_ZC770_XM012) # define CONFIG_ZYNQ_SERIAL_UART1 +# undef CONFIG_SYS_NO_FLASH #elif defined(CONFIG_ZC770_XM013) # define CONFIG_ZYNQ_SERIAL_UART0 @@ -39,16 +41,13 @@ # define CONFIG_ZYNQ_SERIAL_UART0 #endif + + + #include -#if defined(CONFIG_ZC770_XM012) -#undef CONFIG_SYS_NO_FLASH -#else -#define CONFIG_SYS_NO_FLASH -#endif #include -#define CONFIG_CMD_SAVEENV /* Command to save ENV to Flash */ #define CONFIG_REGINFO /* Again, debugging */ #undef CONFIG_CMD_SETGETDCR /* README says 4xx only */ @@ -69,35 +68,6 @@ #define CONFIG_ZYNQ_XILINX_FLASH_HEADER #endif -/* - * NOR Flash Settings - */ -#ifndef CONFIG_SYS_NO_FLASH - -#define CONFIG_SYS_FLASH_BASE 0xE2000000 -#define CONFIG_SYS_FLASH_SIZE (16 * 1024 * 1024) -#define CONFIG_SYS_MAX_FLASH_BANKS 1 -/* max number of sectors/blocks on one chip */ -#define CONFIG_SYS_MAX_FLASH_SECT 512 -#define CONFIG_SYS_FLASH_ERASE_TOUT 1000 -#define CONFIG_SYS_FLASH_WRITE_TOUT 5000 -#define CONFIG_FLASH_SHOW_PROGRESS 10 - -#define CONFIG_SYS_FLASH_CFI -#undef CONFIG_SYS_FLASH_EMPTY_INFO -#define CONFIG_FLASH_CFI_DRIVER -#undef CONFIG_SYS_FLASH_PROTECTION /* don't use hardware protection */ -#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE /* use buffered writes (20x faster) */ -#define CONFIG_ENV_OFFSET 0xC0000 /*768 KB*/ -#define CONFIG_ENV_SECT_SIZE 0x20000 /*128 KB*/ -#define CONFIG_ENV_IS_IN_FLASH -#ifdef CONFIG_ZYNQ_XILINX_FLASH_HEADER -#define CONFIG_ZYNQ_XIP_START CONFIG_SYS_FLASH_BASE -#endif -#else -#define CONFIG_ENV_IS_NOWHERE -#endif - /* * Physical Memory map */ diff --git a/include/configs/zynq_zed.h b/include/configs/zynq_zed.h index 6a18930c13b..538d65894bd 100644 --- a/include/configs/zynq_zed.h +++ b/include/configs/zynq_zed.h @@ -22,11 +22,11 @@ #define CONFIG_ZYNQ_GEM0 #define CONFIG_PHY_ADDR 0 +#define CONFIG_SYS_NO_FLASH + #include -/* No NOR Flash available on ZedBoard */ -#define CONFIG_SYS_NO_FLASH -#define CONFIG_ENV_IS_NOWHERE + #undef CONFIG_EXTRA_ENV_SETTINGS #define CONFIG_EXTRA_ENV_SETTINGS \ @@ -52,7 +52,6 @@ #include #define CONFIG_CMD_PING /* Might be useful for debugging */ -#define CONFIG_CMD_SAVEENV /* Command to save ENV to Flash */ #define CONFIG_REGINFO /* Again, debugging */ #undef CONFIG_CMD_SETGETDCR /* README says 4xx only */