Hi Thomas,

Thomas Chou wrote:
The current NiosII f-core supports write-back data cache. This patch
adds uncached mapping with address bit 31 setting to bypass data cache.

Signed-off-by: Thomas Chou <[EMAIL PROTECTED]>

Applied to uClinux-dist, thanks.

Regards
Greg



 linux-2.6.x/arch/nios2nommu/mm/ioremap.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/linux-2.6.x/arch/nios2nommu/mm/ioremap.c 
b/linux-2.6.x/arch/nios2nommu/mm/ioremap.c
index 1c8b172..c1c7829 100644
--- a/linux-2.6.x/arch/nios2nommu/mm/ioremap.c
+++ b/linux-2.6.x/arch/nios2nommu/mm/ioremap.c
@@ -39,12 +39,13 @@
 #include <asm/system.h>
/*
- * Map some physical address range into the kernel address space.
+ * Map some physical address range into the cached or uncached kernel address 
space.
  */
void *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag)
 {
-       return (void *)physaddr;
+ return (cacheflag == IOMAP_FULL_CACHING) ? (void *)(physaddr & ~0x80000000) : + (void *)(physaddr | 0x80000000);
 }
/*

--
------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     [EMAIL PROTECTED]
Secure Computing Corporation                PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to