9
0
Fork 0

mtd nand i.MX: Add i.MX53 support

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2011-10-13 15:38:08 +02:00
parent 7caed07217
commit 64c1007a69
2 changed files with 9 additions and 3 deletions

View File

@ -14,7 +14,7 @@ struct imx_nand_platform_data {
#define nfc_is_v21() (cpu_is_mx25() || cpu_is_mx35())
#define nfc_is_v1() (cpu_is_mx31() || cpu_is_mx27() || cpu_is_mx21())
#define nfc_is_v3_2() cpu_is_mx51()
#define nfc_is_v3_2() (cpu_is_mx51() || cpu_is_mx53())
#define nfc_is_v3() nfc_is_v3_2()
#define NFC_V1_ECC_STATUS_RESULT 0x0c

View File

@ -58,7 +58,8 @@
#define NFC_V3_CONFIG2_2CMD_PHASES (1 << 4)
#define NFC_V3_CONFIG2_NUM_ADDR_PHASE0 (1 << 5)
#define NFC_V3_CONFIG2_ECC_MODE_8 (1 << 6)
#define NFC_V3_CONFIG2_PPB(x) (((x) & 0x3) << 7)
#define NFC_V3_MX51_CONFIG2_PPB(x) (((x) & 0x3) << 7)
#define NFC_V3_MX53_CONFIG2_PPB(x) (((x) & 0x3) << 8)
#define NFC_V3_CONFIG2_NUM_ADDR_PHASE1(x) (((x) & 0x3) << 12)
#define NFC_V3_CONFIG2_INT_MSK (1 << 15)
#define NFC_V3_CONFIG2_ST_CMD(x) (((x) & 0xff) << 24)
@ -812,7 +813,12 @@ static void preset_v3(struct mtd_info *mtd)
}
if (mtd->writesize) {
config2 |= NFC_V3_CONFIG2_PPB(ffs(mtd->erasesize / mtd->writesize) - 6);
if (cpu_is_mx51())
config2 |= NFC_V3_MX51_CONFIG2_PPB(
ffs(mtd->erasesize / mtd->writesize) - 6);
else
config2 |= NFC_V3_MX53_CONFIG2_PPB(
ffs(mtd->erasesize / mtd->writesize) - 6);
host->eccsize = get_eccsize(mtd);
if (host->eccsize == 8)
config2 |= NFC_V3_CONFIG2_ECC_MODE_8;