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]> --- 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); } /* -- 1.5.3.3 _______________________________________________ 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