diff --git a/board/cm-bf527/gpio_cfi_flash.c b/board/cm-bf527/gpio_cfi_flash.c
index 565d9003effa63a7876820ba3b595ceb10c30d34..71676803f5c4c7a943a4f6b9f0ad51453010e410 100644
--- a/board/cm-bf527/gpio_cfi_flash.c
+++ b/board/cm-bf527/gpio_cfi_flash.c
@@ -51,9 +51,9 @@ u##size flash_read##size(void *addr) \
 	return __raw_read##sfx(gpio_cfi_flash_swizzle(addr)); \
 }
 MAKE_FLASH(8, b)  /* flash_write8()  flash_read8() */
-MAKE_FLASH(16, w) /* flash_write16() flash_write16() */
-MAKE_FLASH(32, l) /* flash_write32() flash_write32() */
-MAKE_FLASH(64, q) /* flash_write64() flash_write64() */
+MAKE_FLASH(16, w) /* flash_write16() flash_read16() */
+MAKE_FLASH(32, l) /* flash_write32() flash_read32() */
+MAKE_FLASH(64, q) /* flash_write64() flash_read64() */
 
 void gpio_cfi_flash_init(void)
 {
diff --git a/board/cm-bf537e/gpio_cfi_flash.c b/board/cm-bf537e/gpio_cfi_flash.c
index bb35169c521c976052e9bac4bdef6d8a48984241..a9e69cfe418e75c1ef6ce5f7f7597a14fe121110 100644
--- a/board/cm-bf537e/gpio_cfi_flash.c
+++ b/board/cm-bf537e/gpio_cfi_flash.c
@@ -49,9 +49,9 @@ u##size flash_read##size(void *addr) \
 	return __raw_read##sfx(gpio_cfi_flash_swizzle(addr)); \
 }
 MAKE_FLASH(8, b)  /* flash_write8()  flash_read8() */
-MAKE_FLASH(16, w) /* flash_write16() flash_write16() */
-MAKE_FLASH(32, l) /* flash_write32() flash_write32() */
-MAKE_FLASH(64, q) /* flash_write64() flash_write64() */
+MAKE_FLASH(16, w) /* flash_write16() flash_read16() */
+MAKE_FLASH(32, l) /* flash_write32() flash_read32() */
+MAKE_FLASH(64, q) /* flash_write64() flash_read64() */
 
 void gpio_cfi_flash_init(void)
 {
diff --git a/board/tcm-bf537/gpio_cfi_flash.c b/board/tcm-bf537/gpio_cfi_flash.c
index 7137d125580581f729bd8c6099c7f7ee1d32596f..ac8587c9cf8c7d039b23c34e2df7b141a1dbc7a0 100644
--- a/board/tcm-bf537/gpio_cfi_flash.c
+++ b/board/tcm-bf537/gpio_cfi_flash.c
@@ -51,9 +51,9 @@ u##size flash_read##size(void *addr) \
 	return __raw_read##sfx(gpio_cfi_flash_swizzle(addr)); \
 }
 MAKE_FLASH(8, b)  /* flash_write8()  flash_read8() */
-MAKE_FLASH(16, w) /* flash_write16() flash_write16() */
-MAKE_FLASH(32, l) /* flash_write32() flash_write32() */
-MAKE_FLASH(64, q) /* flash_write64() flash_write64() */
+MAKE_FLASH(16, w) /* flash_write16() flash_read16() */
+MAKE_FLASH(32, l) /* flash_write32() flash_read32() */
+MAKE_FLASH(64, q) /* flash_write64() flash_read64() */
 
 void gpio_cfi_flash_init(void)
 {
diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c
index 528b22b49aeb32ec2a57720d385a080c12bd9a8d..0891936f00d4c2776b296750cd1e57a8861caa0e 100644
--- a/drivers/mtd/nand/ndfc.c
+++ b/drivers/mtd/nand/ndfc.c
@@ -89,8 +89,8 @@ static int ndfc_calculate_ecc(struct mtd_info *mtdinfo,
 
 	/* The NDFC uses Smart Media (SMC) bytes order
 	 */
-	ecc_code[0] = p[2];
-	ecc_code[1] = p[1];
+	ecc_code[0] = p[1];
+	ecc_code[1] = p[2];
 	ecc_code[2] = p[3];
 
 	return 0;
diff --git a/include/configs/cm-bf527.h b/include/configs/cm-bf527.h
index 79d06fba524f3332d5fb2e57dba961434ca099b0..159271996b5f2695b3d5ea2b7d5e0d876380b8dd 100644
--- a/include/configs/cm-bf527.h
+++ b/include/configs/cm-bf527.h
@@ -95,7 +95,7 @@
 #define CONFIG_SYS_FLASH_CFI
 #define CONFIG_SYS_FLASH_PROTECTION
 #define CONFIG_SYS_MAX_FLASH_BANKS	1
-#define CONFIG_SYS_MAX_FLASH_SECT 	64
+#define CONFIG_SYS_MAX_FLASH_SECT 	67
 
 
 /*
diff --git a/include/configs/cm-bf537e.h b/include/configs/cm-bf537e.h
index 021b631a90b376c7143ca5d1834171a3ca8300a9..34d429935ea6930ad65b377656f8d9d3284b1891 100644
--- a/include/configs/cm-bf537e.h
+++ b/include/configs/cm-bf537e.h
@@ -79,7 +79,7 @@
 #define CONFIG_SYS_FLASH_CFI
 #define CONFIG_SYS_FLASH_PROTECTION
 #define CONFIG_SYS_MAX_FLASH_BANKS	1
-#define CONFIG_SYS_MAX_FLASH_SECT	32
+#define CONFIG_SYS_MAX_FLASH_SECT	35
 
 
 /*
diff --git a/include/s3c24x0.h b/include/s3c24x0.h
index 71f35a5174280fc8fb1fe1b7271a156efd42fc43..4fa8000681d994eb51feae94dcf1a5350a3bbbd0 100644
--- a/include/s3c24x0.h
+++ b/include/s3c24x0.h
@@ -550,14 +550,20 @@ typedef struct {
 
 /* SPI (see manual chapter 22) */
 typedef struct {
-	S3C24X0_REG32	SPCON;
-	S3C24X0_REG32	SPSTA;
-	S3C24X0_REG32	SPPIN;
-	S3C24X0_REG32	SPPRE;
-	S3C24X0_REG32	SPTDAT;
-	S3C24X0_REG32	SPRDAT;
-	S3C24X0_REG32	res[2];
-} __attribute__((__packed__)) S3C24X0_SPI_CHANNEL;
+	S3C24X0_REG8	SPCON;
+	S3C24X0_REG8	res1[3];
+	S3C24X0_REG8	SPSTA;
+	S3C24X0_REG8	res2[3];
+	S3C24X0_REG8	SPPIN;
+	S3C24X0_REG8	res3[3];
+	S3C24X0_REG8	SPPRE;
+	S3C24X0_REG8	res4[3];
+	S3C24X0_REG8	SPTDAT;
+	S3C24X0_REG8	res5[3];
+	S3C24X0_REG8	SPRDAT;
+	S3C24X0_REG8	res6[3];
+	S3C24X0_REG8	res7[16];
+} /*__attribute__((__packed__))*/ S3C24X0_SPI_CHANNEL;
 
 typedef struct {
 	S3C24X0_SPI_CHANNEL	ch[S3C24X0_SPI_CHANNELS];