diff options
author | Koul, Vinod <vinod.koul@intel.com> | 2014-10-20 12:06:13 -0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2014-11-05 17:27:37 -0500 |
commit | 33a87a159cca9deb29b6b72e9aed9d6644b5d1c8 (patch) | |
tree | 4bc0efc466c8406655520ee45758807e2999571f /drivers/mtd | |
parent | e8e6c875658c39624fc8cb4c6f3e1b6ab9ce1b6e (diff) |
mtd: mxc_nand: use __iowrite32_copy for 32 bit copy
The driver was also using own method to do 32bit copy, turns out
we have a kernel API so use that instead
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/mxc_nand.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index dba262bf766f..23e075428dc4 100644 --- a/drivers/mtd/nand/mxc_nand.c +++ b/drivers/mtd/nand/mxc_nand.c | |||
@@ -280,14 +280,10 @@ static void memcpy32_fromio(void *trg, const void __iomem *src, size_t size) | |||
280 | *t++ = __raw_readl(s++); | 280 | *t++ = __raw_readl(s++); |
281 | } | 281 | } |
282 | 282 | ||
283 | static void memcpy32_toio(void __iomem *trg, const void *src, int size) | 283 | static inline void memcpy32_toio(void __iomem *trg, const void *src, int size) |
284 | { | 284 | { |
285 | int i; | 285 | /* __iowrite32_copy use 32bit size values so divide by 4 */ |
286 | u32 __iomem *t = trg; | 286 | __iowrite32_copy(trg, src, size / 4); |
287 | const u32 *s = src; | ||
288 | |||
289 | for (i = 0; i < (size >> 2); i++) | ||
290 | __raw_writel(*s++, t++); | ||
291 | } | 287 | } |
292 | 288 | ||
293 | static int check_int_v3(struct mxc_nand_host *host) | 289 | static int check_int_v3(struct mxc_nand_host *host) |