ls102xa: ifc: nor: fix the write issue when bytes unaligned
authorYuan Yao <yao.yuan@freescale.com>
Fri, 17 Oct 2014 07:26:34 +0000 (15:26 +0800)
committerYork Sun <yorksun@freescale.com>
Mon, 24 Nov 2014 17:27:23 +0000 (09:27 -0800)
Add define CONFIG_SYS_WRITE_SWAPPED_DATA.
For LS1021AQDS and LS1021QTWR nor flash write should swap the
bytes when handle unaligned tail bytes.

Because of the ending, if the date bus width is 16-bits and the
number of bytes is odd, we should swap the byte when write the
last one.

Signed-off-by: Yuan Yao <yao.yuan@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
include/configs/ls1021aqds.h
include/configs/ls1021atwr.h

index 8954d9dd442f0574beb5cb7ef296a767b6d90e13..bb9fbedea5a5714806cbf8e71ac7a7c104b46239 100644 (file)
@@ -115,6 +115,7 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_SYS_FLASH_QUIET_TEST
 #define CONFIG_FLASH_SHOW_PROGRESS     45
 #define CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS
+#define CONFIG_SYS_WRITE_SWAPPED_DATA
 
 #define CONFIG_SYS_MAX_FLASH_BANKS     2       /* number of banks */
 #define CONFIG_SYS_MAX_FLASH_SECT      1024    /* sectors per device */
index 96b1547963109ba5e2154639ce79a3b82c4722c7..34cec6515c7701a0613b1294f8818fa83e086ac7 100644 (file)
@@ -99,6 +99,7 @@
 #define CONFIG_SYS_FLASH_BANKS_LIST    { CONFIG_SYS_FLASH_BASE_PHYS }
 
 #define CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS
+#define CONFIG_SYS_WRITE_SWAPPED_DATA
 
 /* CPLD */