2 * arch/ubicom32/mm/kmap.c
3 * Ubicom32 architecture non-mmu ioremap and friends implementation.
5 * (C) Copyright 2009, Ubicom, Inc.
6 * Copyright (C) 2000 Lineo, <davidm@snapgear.com>
7 * Copyright (C) 2000-2002 David McCullough <davidm@snapgear.com>
9 * This file is part of the Ubicom32 Linux Kernel Port.
11 * The Ubicom32 Linux Kernel Port is free software: you can redistribute
12 * it and/or modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation, either version 2 of the
14 * License, or (at your option) any later version.
16 * The Ubicom32 Linux Kernel Port is distributed in the hope that it
17 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
18 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
19 * the GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with the Ubicom32 Linux Kernel Port. If not,
23 * see <http://www.gnu.org/licenses/>.
25 * Ubicom32 implementation derived from (with many thanks):
31 #include <linux/module.h>
33 #include <linux/kernel.h>
34 #include <linux/string.h>
35 #include <linux/types.h>
36 #include <linux/slab.h>
37 #include <linux/vmalloc.h>
39 #include <asm/setup.h>
40 #include <asm/segment.h>
42 #include <asm/pgalloc.h>
44 #include <asm/system.h>
49 * Map some physical address range into the kernel address space.
51 void *__ioremap(unsigned long physaddr
, unsigned long size
, int cacheflag
)
53 return (void *)physaddr
;
57 * Unmap a ioremap()ed region again.
59 void iounmap(void *addr
)
64 * __iounmap unmaps nearly everything, so be careful
65 * it doesn't free currently pointer/page tables anymore but it
66 * wans't used anyway and might be added later.
68 void __iounmap(void *addr
, unsigned long size
)
73 * Set new cache mode for some kernel address space.
74 * The caller must push data for that range itself, if such data may already
77 void kernel_set_cachemode(void *addr
, unsigned long size
, int cmode
)