goldfish: 64-bit nand driver for goldfish platform

Enable the 64-bit nand data support in the goldfish nand driver.

Signed-off-by: Jun Tian <jun.j.tian@intel.com>
Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Jun Tian 2014-04-28 20:47:22 +01:00 committed by Greg Kroah-Hartman
parent c3c1ba6640
commit 7f09d4a00c
2 changed files with 8 additions and 2 deletions

View File

@ -67,7 +67,7 @@ static u32 goldfish_nand_cmd_with_params(struct mtd_info *mtd,
cps->addr_high = (u32)(addr >> 32);
cps->addr_low = (u32)addr;
cps->transfer_size = len;
cps->data = (u32)ptr;
cps->data = (unsigned long)ptr;
writel(cmdp, base + NAND_COMMAND);
*rv = cps->result;
return 0;
@ -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(len, base + NAND_TRANSFER_SIZE);
writel((u32)ptr, base + NAND_DATA);
#ifdef CONFIG_64BIT
writel((u32)((u64)ptr >> 32), base + NAND_DATA_HIGH);
#endif
writel(cmd, base + NAND_COMMAND);
rv = readl(base + NAND_RESULT);
}

View File

@ -57,6 +57,9 @@ enum nand_reg {
NAND_RESULT = 0x040,
NAND_COMMAND = 0x044,
NAND_DATA = 0x048,
#ifdef CONFIG_64BIT
NAND_DATA_HIGH = 0x100,
#endif
NAND_TRANSFER_SIZE = 0x04c,
NAND_ADDR_LOW = 0x050,
NAND_ADDR_HIGH = 0x054,
@ -69,7 +72,7 @@ struct cmd_params {
uint32_t addr_low;
uint32_t addr_high;
uint32_t transfer_size;
uint32_t data;
unsigned long data;
uint32_t result;
};
#endif