diff options
author | Jun Tian <jun.j.tian@intel.com> | 2014-04-28 20:47:22 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-03 19:47:18 -0400 |
commit | 7f09d4a00cc85ca43b2a7f491f9b3f8498413f1b (patch) | |
tree | 2cd6908c3cef98b45b94fcfc2609fbc6918bd913 | |
parent | c3c1ba6640d6c8f87a7bca440841924b58df8fb8 (diff) | |
download | op-kernel-dev-7f09d4a00cc85ca43b2a7f491f9b3f8498413f1b.zip op-kernel-dev-7f09d4a00cc85ca43b2a7f491f9b3f8498413f1b.tar.gz |
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>
-rw-r--r-- | drivers/staging/goldfish/goldfish_nand.c | 5 | ||||
-rw-r--r-- | drivers/staging/goldfish/goldfish_nand_reg.h | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/drivers/staging/goldfish/goldfish_nand.c b/drivers/staging/goldfish/goldfish_nand.c index 2a292df..b8e3dd2 100644 --- a/drivers/staging/goldfish/goldfish_nand.c +++ b/drivers/staging/goldfish/goldfish_nand.c @@ -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); } diff --git a/drivers/staging/goldfish/goldfish_nand_reg.h b/drivers/staging/goldfish/goldfish_nand_reg.h index ddfda71..60ab91f 100644 --- a/drivers/staging/goldfish/goldfish_nand_reg.h +++ b/drivers/staging/goldfish/goldfish_nand_reg.h @@ -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 |