aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices/ps3vram.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/devices/ps3vram.c')
-rw-r--r--drivers/mtd/devices/ps3vram.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/mtd/devices/ps3vram.c b/drivers/mtd/devices/ps3vram.c
index d5924142d909..d21e9beb7ed2 100644
--- a/drivers/mtd/devices/ps3vram.c
+++ b/drivers/mtd/devices/ps3vram.c
@@ -6,6 +6,7 @@
6 */ 6 */
7 7
8#include <linux/io.h> 8#include <linux/io.h>
9#include <linux/mm.h>
9#include <linux/init.h> 10#include <linux/init.h>
10#include <linux/kernel.h> 11#include <linux/kernel.h>
11#include <linux/list.h> 12#include <linux/list.h>
@@ -69,7 +70,7 @@ struct ps3vram_priv {
69 u64 context_handle; 70 u64 context_handle;
70 u32 *ctrl; 71 u32 *ctrl;
71 u32 *reports; 72 u32 *reports;
72 u8 *base; 73 u8 __iomem *ddr_base;
73 u8 *xdr_buf; 74 u8 *xdr_buf;
74 75
75 u32 *fifo_base; 76 u32 *fifo_base;
@@ -425,7 +426,7 @@ static int ps3vram_erase(struct mtd_info *mtd, struct erase_info *instr)
425 ps3vram_cache_flush(mtd); 426 ps3vram_cache_flush(mtd);
426 427
427 /* Set bytes to 0xFF */ 428 /* Set bytes to 0xFF */
428 memset(priv->base + instr->addr, 0xFF, instr->len); 429 memset_io(priv->ddr_base + instr->addr, 0xFF, instr->len);
429 430
430 mutex_unlock(&priv->lock); 431 mutex_unlock(&priv->lock);
431 432
@@ -628,8 +629,9 @@ static int __devinit ps3vram_probe(struct ps3_system_bus_device *dev)
628 goto out_free_context; 629 goto out_free_context;
629 } 630 }
630 631
631 priv->base = ioremap(ddr_lpar, ddr_size); 632 priv->ddr_base = ioremap_flags(ddr_lpar, ddr_size, _PAGE_NO_CACHE);
632 if (!priv->base) { 633
634 if (!priv->ddr_base) {
633 dev_err(&dev->core, "%s:%d: ioremap failed\n", __func__, 635 dev_err(&dev->core, "%s:%d: ioremap failed\n", __func__,
634 __LINE__); 636 __LINE__);
635 ret = -ENOMEM; 637 ret = -ENOMEM;
@@ -702,7 +704,7 @@ out_unmap_reports:
702out_unmap_ctrl: 704out_unmap_ctrl:
703 iounmap(priv->ctrl); 705 iounmap(priv->ctrl);
704out_unmap_vram: 706out_unmap_vram:
705 iounmap(priv->base); 707 iounmap(priv->ddr_base);
706out_free_context: 708out_free_context:
707 lv1_gpu_context_free(priv->context_handle); 709 lv1_gpu_context_free(priv->context_handle);
708out_free_memory: 710out_free_memory:
@@ -728,7 +730,7 @@ static int ps3vram_shutdown(struct ps3_system_bus_device *dev)
728 ps3vram_cache_cleanup(&ps3vram_mtd); 730 ps3vram_cache_cleanup(&ps3vram_mtd);
729 iounmap(priv->reports); 731 iounmap(priv->reports);
730 iounmap(priv->ctrl); 732 iounmap(priv->ctrl);
731 iounmap(priv->base); 733 iounmap(priv->ddr_base);
732 lv1_gpu_context_free(priv->context_handle); 734 lv1_gpu_context_free(priv->context_handle);
733 lv1_gpu_memory_free(priv->memory_handle); 735 lv1_gpu_memory_free(priv->memory_handle);
734 ps3_close_hv_device(dev); 736 ps3_close_hv_device(dev);