Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127687
b: refs/heads/master
c: 2efd72a
h: refs/heads/master
i:
  127685: b487d02
  127683: 388ab51
  127679: b799a87
v: v3
  • Loading branch information
Geoff Levand authored and Benjamin Herrenschmidt committed Jan 8, 2009
1 parent 120c598 commit a97fe3f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 60c0c5987b0996a7c7c4c6d90f63ed413c368a71
refs/heads/master: 2efd72af0f18860927084df618f7419c82f69be3
14 changes: 8 additions & 6 deletions trunk/drivers/mtd/devices/ps3vram.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

#include <linux/io.h>
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/list.h>
Expand Down Expand Up @@ -69,7 +70,7 @@ struct ps3vram_priv {
u64 context_handle;
u32 *ctrl;
u32 *reports;
u8 *base;
u8 __iomem *ddr_base;
u8 *xdr_buf;

u32 *fifo_base;
Expand Down Expand Up @@ -425,7 +426,7 @@ static int ps3vram_erase(struct mtd_info *mtd, struct erase_info *instr)
ps3vram_cache_flush(mtd);

/* Set bytes to 0xFF */
memset(priv->base + instr->addr, 0xFF, instr->len);
memset_io(priv->ddr_base + instr->addr, 0xFF, instr->len);

mutex_unlock(&priv->lock);

Expand Down Expand Up @@ -628,8 +629,9 @@ static int __devinit ps3vram_probe(struct ps3_system_bus_device *dev)
goto out_free_context;
}

priv->base = ioremap(ddr_lpar, ddr_size);
if (!priv->base) {
priv->ddr_base = ioremap_flags(ddr_lpar, ddr_size, _PAGE_NO_CACHE);

if (!priv->ddr_base) {
dev_err(&dev->core, "%s:%d: ioremap failed\n", __func__,
__LINE__);
ret = -ENOMEM;
Expand Down Expand Up @@ -702,7 +704,7 @@ static int __devinit ps3vram_probe(struct ps3_system_bus_device *dev)
out_unmap_ctrl:
iounmap(priv->ctrl);
out_unmap_vram:
iounmap(priv->base);
iounmap(priv->ddr_base);
out_free_context:
lv1_gpu_context_free(priv->context_handle);
out_free_memory:
Expand All @@ -728,7 +730,7 @@ static int ps3vram_shutdown(struct ps3_system_bus_device *dev)
ps3vram_cache_cleanup(&ps3vram_mtd);
iounmap(priv->reports);
iounmap(priv->ctrl);
iounmap(priv->base);
iounmap(priv->ddr_base);
lv1_gpu_context_free(priv->context_handle);
lv1_gpu_memory_free(priv->memory_handle);
ps3_close_hv_device(dev);
Expand Down

0 comments on commit a97fe3f

Please sign in to comment.