Skip to contentSkip to conversation

Correct corrupted NAND Flash access on KARO TX25 modules

PATCH Superseded Gachet Daniel 2 participants 2 messages Apr 6, 2012 – May 18, 2012

Subsystems (3)

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 Correct corrupted NAND Flash access on KARO TX25 modules

Hi Stefano,

You will find below the new patch for the NAND flash access problem on the TX25 module. I hope this version is fulfilling your expectations.

Cordially,

Daniel

drivers/mtd/nand/mxc_nand.c +2 -0
index 35e89a0..fe1cef6 100644
@@ -1290,7 +1290,9 @@ static void mxc_setup_config1(void)
 	uint16_t tmp;
 
 	tmp = readw(&host->regs->nfc_config1);
+#ifndef CONFIG_NAND_MXC_NFC_TWO_CYCLES
 	tmp |= NFC_ONE_CYCLE;
+#endif
 	tmp |= NFC_4_8N_ECC;
 	writew(tmp, &host->regs->nfc_config1);
 	if (host->pagesize_2k)
include/configs/tx25.h +1 -0
index 87bd8a6..0c9aeb8 100644
@@ -110,6 +110,7 @@
 /* NAND */
 #define CONFIG_NAND_MXC
 #define CONFIG_NAND_MXC_V1_1
+#define CONFIG_NAND_MXC_NFC_TWO_CYCLES
 #define CONFIG_MXC_NAND_REGS_BASE	(0xBB000000)
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
 #define CONFIG_SYS_NAND_BASE		(0xBB000000)
#1 lore raw

PATCH v3 1/1 Correct corrupted NAND Flash access on KARO TX25 modules

Quoted 28 lines · Gachet Daniel

Hi Stefano,

You will find below the new patch for the NAND flash access problem on the TX25 module. I hope this version is fulfilling your expectations.

Cordially,

Daniel

drivers/mtd/nand/mxc_nand.c +2 -0
index 35e89a0..fe1cef6 100644
@@ -1290,7 +1290,9 @@ static void mxc_setup_config1(void)
 	uint16_t tmp;
 
 	tmp = readw(&host->regs->nfc_config1);
+#ifndef CONFIG_NAND_MXC_NFC_TWO_CYCLES
 	tmp |= NFC_ONE_CYCLE;
+#endif
 	tmp |= NFC_4_8N_ECC;
 	writew(tmp, &host->regs->nfc_config1);
 	if (host->pagesize_2k)
include/configs/tx25.h +0 -0
index 87bd8a6..0c9aeb8 100644

include/configs/tx25.h line 116

Quoted 7 lines
include/configs/tx25.h +1 -0
@@ -110,6 +110,7 @@
 /* NAND */
 #define CONFIG_NAND_MXC
 #define CONFIG_NAND_MXC_V1_1
+#define CONFIG_NAND_MXC_NFC_TWO_CYCLES
 #define CONFIG_MXC_NAND_REGS_BASE	(0xBB000000)
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
 #define CONFIG_SYS_NAND_BASE		(0xBB000000)

Please add documentation for this new config option -- also it should be CONFIG_SYS as it is hardware description rather than configuration.

-Scott