Commit 7f09d4a0 authored by Jun Tian's avatar Jun Tian Committed by Greg Kroah-Hartman

goldfish: 64-bit nand driver for goldfish platform

Enable the 64-bit nand data support in the goldfish nand driver.
Signed-off-by: default avatarJun Tian <jun.j.tian@intel.com>
Signed-off-by: default avatarOctavian Purdila <octavian.purdila@intel.com>
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c3c1ba66
...@@ -67,7 +67,7 @@ static u32 goldfish_nand_cmd_with_params(struct mtd_info *mtd, ...@@ -67,7 +67,7 @@ static u32 goldfish_nand_cmd_with_params(struct mtd_info *mtd,
cps->addr_high = (u32)(addr >> 32); cps->addr_high = (u32)(addr >> 32);
cps->addr_low = (u32)addr; cps->addr_low = (u32)addr;
cps->transfer_size = len; cps->transfer_size = len;
cps->data = (u32)ptr; cps->data = (unsigned long)ptr;
writel(cmdp, base + NAND_COMMAND); writel(cmdp, base + NAND_COMMAND);
*rv = cps->result; *rv = cps->result;
return 0; return 0;
...@@ -87,6 +87,9 @@ static u32 goldfish_nand_cmd(struct mtd_info *mtd, enum nand_cmd cmd, ...@@ -87,6 +87,9 @@ static u32 goldfish_nand_cmd(struct mtd_info *mtd, enum nand_cmd cmd,
writel((u32)addr, base + NAND_ADDR_LOW); writel((u32)addr, base + NAND_ADDR_LOW);
writel(len, base + NAND_TRANSFER_SIZE); writel(len, base + NAND_TRANSFER_SIZE);
writel((u32)ptr, base + NAND_DATA); writel((u32)ptr, base + NAND_DATA);
#ifdef CONFIG_64BIT
writel((u32)((u64)ptr >> 32), base + NAND_DATA_HIGH);
#endif
writel(cmd, base + NAND_COMMAND); writel(cmd, base + NAND_COMMAND);
rv = readl(base + NAND_RESULT); rv = readl(base + NAND_RESULT);
} }
......
...@@ -57,6 +57,9 @@ enum nand_reg { ...@@ -57,6 +57,9 @@ enum nand_reg {
NAND_RESULT = 0x040, NAND_RESULT = 0x040,
NAND_COMMAND = 0x044, NAND_COMMAND = 0x044,
NAND_DATA = 0x048, NAND_DATA = 0x048,
#ifdef CONFIG_64BIT
NAND_DATA_HIGH = 0x100,
#endif
NAND_TRANSFER_SIZE = 0x04c, NAND_TRANSFER_SIZE = 0x04c,
NAND_ADDR_LOW = 0x050, NAND_ADDR_LOW = 0x050,
NAND_ADDR_HIGH = 0x054, NAND_ADDR_HIGH = 0x054,
...@@ -69,7 +72,7 @@ struct cmd_params { ...@@ -69,7 +72,7 @@ struct cmd_params {
uint32_t addr_low; uint32_t addr_low;
uint32_t addr_high; uint32_t addr_high;
uint32_t transfer_size; uint32_t transfer_size;
uint32_t data; unsigned long data;
uint32_t result; uint32_t result;
}; };
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment