aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/omap2.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index 288423f7b7b1..39f46a0cf34e 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -263,11 +263,10 @@ static void omap_read_buf_pref(struct mtd_info *mtd, u_char *buf, int len)
263 if (ret) { 263 if (ret) {
264 /* PFPW engine is busy, use cpu copy method */ 264 /* PFPW engine is busy, use cpu copy method */
265 if (info->nand.options & NAND_BUSWIDTH_16) 265 if (info->nand.options & NAND_BUSWIDTH_16)
266 omap_read_buf16(mtd, buf, len); 266 omap_read_buf16(mtd, (u_char *)p, len);
267 else 267 else
268 omap_read_buf8(mtd, buf, len); 268 omap_read_buf8(mtd, (u_char *)p, len);
269 } else { 269 } else {
270 p = (u32 *) buf;
271 do { 270 do {
272 r_count = gpmc_read_status(GPMC_PREFETCH_FIFO_CNT); 271 r_count = gpmc_read_status(GPMC_PREFETCH_FIFO_CNT);
273 r_count = r_count >> 2; 272 r_count = r_count >> 2;
@@ -293,7 +292,7 @@ static void omap_write_buf_pref(struct mtd_info *mtd,
293 struct omap_nand_info, mtd); 292 struct omap_nand_info, mtd);
294 uint32_t w_count = 0; 293 uint32_t w_count = 0;
295 int i = 0, ret = 0; 294 int i = 0, ret = 0;
296 u16 *p; 295 u16 *p = (u16 *)buf;
297 unsigned long tim, limit; 296 unsigned long tim, limit;
298 297
299 /* take care of subpage writes */ 298 /* take care of subpage writes */
@@ -309,11 +308,10 @@ static void omap_write_buf_pref(struct mtd_info *mtd,
309 if (ret) { 308 if (ret) {
310 /* PFPW engine is busy, use cpu copy method */ 309 /* PFPW engine is busy, use cpu copy method */
311 if (info->nand.options & NAND_BUSWIDTH_16) 310 if (info->nand.options & NAND_BUSWIDTH_16)
312 omap_write_buf16(mtd, buf, len); 311 omap_write_buf16(mtd, (u_char *)p, len);
313 else 312 else
314 omap_write_buf8(mtd, buf, len); 313 omap_write_buf8(mtd, (u_char *)p, len);
315 } else { 314 } else {
316 p = (u16 *) buf;
317 while (len) { 315 while (len) {
318 w_count = gpmc_read_status(GPMC_PREFETCH_FIFO_CNT); 316 w_count = gpmc_read_status(GPMC_PREFETCH_FIFO_CNT);
319 w_count = w_count >> 1; 317 w_count = w_count >> 1;