MOXA linux-2.6.x / linux-2.6.19-uc1 from UC-7110-LX-BOOTLOADER-1.9_VERSION-4.2.tgz
[linux-2.6.19-moxart.git] / include / asm-nios2nommu / virtconvert.h
blob89bf899eadb3fe142cd54dac94c40f8f2e61e08a
1 #ifndef __NIOS_VIRT_CONVERT__
2 #define __NIOS_VIRT_CONVERT__
4 /*--------------------------------------------------------------------
6 * include/asm-nios2nommu/virtconvert.h
8 * Derived from various works, Alpha, ix86, M68K, Sparc, ...et al
10 * Copyright (C) 2004 Microtronix Datacom Ltd
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
23 * Jan/20/2004 dgt NiosII
25 ---------------------------------------------------------------------*/
29 * Macros used for converting between virtual and physical mappings.
32 #ifdef __KERNEL__
34 #include <asm/setup.h>
35 #include <asm/page.h>
37 #define mm_ptov(vaddr) ((void *) (vaddr))
38 #define mm_vtop(vaddr) ((unsigned long) (vaddr))
39 #define phys_to_virt(vaddr) ((void *) (vaddr))
40 #define virt_to_phys(vaddr) ((unsigned long) (vaddr))
42 #define virt_to_bus virt_to_phys
43 #define bus_to_virt phys_to_virt
45 #endif /*__KERNEL__ */
46 #endif /*__NIOS_VIRT_CONVERT__*/