diff options
author | Hamish Guthrie <hcg@openwrt.org> | 2009-03-24 08:54:41 +0000 |
---|---|---|
committer | Hamish Guthrie <hcg@openwrt.org> | 2009-03-24 08:54:41 +0000 |
commit | 74b20050069bf139ff490f32435f27b927fb4ce7 (patch) | |
tree | c1cc6c53bf0a0eb89ebaf60d02359b15334b3e28 /target/linux/ps3/patches-2.6.28/0013-mtd-ps3vram-Use-_PAGE_NO_CACHE-in-memory-ioremap.patch | |
parent | d0e357e729480d44369c2472081a587e4e5c5e12 (diff) | |
download | master-31e0f0ae-74b20050069bf139ff490f32435f27b927fb4ce7.tar.gz master-31e0f0ae-74b20050069bf139ff490f32435f27b927fb4ce7.tar.bz2 master-31e0f0ae-74b20050069bf139ff490f32435f27b927fb4ce7.zip |
ps3: update ps3vram patches
SVN-Revision: 15011
Diffstat (limited to 'target/linux/ps3/patches-2.6.28/0013-mtd-ps3vram-Use-_PAGE_NO_CACHE-in-memory-ioremap.patch')
-rw-r--r-- | target/linux/ps3/patches-2.6.28/0013-mtd-ps3vram-Use-_PAGE_NO_CACHE-in-memory-ioremap.patch | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/target/linux/ps3/patches-2.6.28/0013-mtd-ps3vram-Use-_PAGE_NO_CACHE-in-memory-ioremap.patch b/target/linux/ps3/patches-2.6.28/0013-mtd-ps3vram-Use-_PAGE_NO_CACHE-in-memory-ioremap.patch new file mode 100644 index 0000000000..b3047e16a2 --- /dev/null +++ b/target/linux/ps3/patches-2.6.28/0013-mtd-ps3vram-Use-_PAGE_NO_CACHE-in-memory-ioremap.patch @@ -0,0 +1,78 @@ +From 2efd72af0f18860927084df618f7419c82f69be3 Mon Sep 17 00:00:00 2001 +From: Geoff Levand <geoffrey.levand@am.sony.com> +Date: Wed, 7 Jan 2009 17:22:07 -0800 +Subject: [PATCH] mtd/ps3vram: Use _PAGE_NO_CACHE in memory ioremap + +Use _PAGE_NO_CACHE for gpu memory ioremap. Also, +add __iomem attribute to gpu memory pointer and +change use of memset() to memset_io(). + +Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> +Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> +--- + drivers/mtd/devices/ps3vram.c | 14 ++++++++------ + 1 files changed, 8 insertions(+), 6 deletions(-) + +diff --git a/drivers/mtd/devices/ps3vram.c b/drivers/mtd/devices/ps3vram.c +index d592414..d21e9be 100644 +--- a/drivers/mtd/devices/ps3vram.c ++++ b/drivers/mtd/devices/ps3vram.c +@@ -6,6 +6,7 @@ + */ + + #include <linux/io.h> ++#include <linux/mm.h> + #include <linux/init.h> + #include <linux/kernel.h> + #include <linux/list.h> +@@ -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; +@@ -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); + +@@ -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; +@@ -702,7 +704,7 @@ out_unmap_reports: + 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: +@@ -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); +-- +1.6.0.4 + |