diff options
author | Jason <r64343@freescale.com> | 2009-10-12 10:48:31 +0800 |
---|---|---|
committer | Terry Lv <r65388@freescale.com> | 2009-11-04 11:37:53 +0800 |
commit | 6532550c9f7e96cbe32488f24ca53b2e3648fef1 (patch) | |
tree | b1aa234aa1370d50cdaa2df9c3d7dfbcbc0a7a2c /include/asm-arm/arch-mx51 | |
parent | 1fa19862acbd764533c0d3d6e09cca768e7a9d81 (diff) | |
download | u-boot-imx-6532550c9f7e96cbe32488f24ca53b2e3648fef1.zip u-boot-imx-6532550c9f7e96cbe32488f24ca53b2e3648fef1.tar.gz u-boot-imx-6532550c9f7e96cbe32488f24ca53b2e3648fef1.tar.bz2 |
ENGR00116924 Uboot: Boot up hang at detecting NAND when cold boot
Boot from MMC card failed at detecting NAND. The fix will
1. Set RBB_MODE to 1 and using atomic status command
2. Set FW correctly by adding CONFIG_NAND_FW_8 config
3. Correct the BLS register value
Signed-off-by:Jason Liu <r64343@freescale.com>
(cherry picked from commit 7142651386271c340a6ae061a6e2893695675724)
Diffstat (limited to 'include/asm-arm/arch-mx51')
-rw-r--r-- | include/asm-arm/arch-mx51/mxc_nand.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/include/asm-arm/arch-mx51/mxc_nand.h b/include/asm-arm/arch-mx51/mxc_nand.h index 539d0fd..ee5bf91 100644 --- a/include/asm-arm/arch-mx51/mxc_nand.h +++ b/include/asm-arm/arch-mx51/mxc_nand.h @@ -72,7 +72,7 @@ #define IS_4BIT_ECC \ ( \ - is_soc_rev(CHIP_REV_2_0) == 0 ? \ + is_soc_rev(CHIP_REV_2_0) >= 0 ? \ !((raw_read(NFC_CONFIG2) & NFC_ECC_MODE_4) >> 6) : \ ((raw_read(NFC_CONFIG2) & NFC_ECC_MODE_4) >> 6) \ ) @@ -84,7 +84,7 @@ #define NFC_SET_ECC_MODE(v) \ do { \ - if (is_soc_rev(CHIP_REV_2_0) == 0) { \ + if (is_soc_rev(CHIP_REV_2_0) >= 0) { \ if ((v) == NFC_SPAS_218 || (v) == NFC_SPAS_112) \ raw_write(((raw_read(NFC_CONFIG2) & \ NFC_ECC_MODE_MASK) | \ @@ -201,9 +201,9 @@ do { \ #define NFC_PPB_256 (3 << 7) #define NFC_PPB_RESET (~(3 << 7)) -#define NFC_BLS_LOCKED (0 << 16) -#define NFC_BLS_LOCKED_DEFAULT (1 << 16) -#define NFC_BLS_UNLCOKED (2 << 16) +#define NFC_BLS_LOCKED (0 << 6) +#define NFC_BLS_LOCKED_DEFAULT (1 << 6) +#define NFC_BLS_UNLCOKED (2 << 6) #define NFC_BLS_RESET (~(3 << 16)) #define NFC_WPC_LOCK_TIGHT 1 #define NFC_WPC_LOCK (1 << 1) @@ -335,7 +335,8 @@ do { \ /*should set the fw,ps,spas,ppb*/ #define NFC_SET_NFMS(v) \ do { \ - NFC_SET_FW(NFC_FW_8); \ + if (!(v)) \ + NFC_SET_FW(NFC_FW_8); \ if (((v) & (1 << NFMS_NF_DWIDTH))) \ NFC_SET_FW(NFC_FW_16); \ if (((v) & (1 << NFMS_NF_PG_SZ))) { \ @@ -356,7 +357,8 @@ do { \ NFC_SET_SPAS(GET_NAND_OOB_SIZE >> 1); \ NFC_SET_ECC_MODE(GET_NAND_OOB_SIZE >> 1); \ NFC_SET_ST_CMD(0x70); \ - raw_write(raw_read(NFC_CONFIG3) | 1 << 20, NFC_CONFIG3); \ + raw_write(raw_read(NFC_CONFIG3) | NFC_NO_SDMA, NFC_CONFIG3); \ + raw_write(raw_read(NFC_CONFIG3) | NFC_RBB_MODE, NFC_CONFIG3); \ } \ } while (0) |