irqchip/s3c24xx: Mark init_eint as __maybe_unused
[linux/fpc-iii.git] / arch / xtensa / include / asm / io.h
blob74fed0b4e2c2b58a84bd0bbc699d7bca74f422de
1 /*
2 * include/asm-xtensa/io.h
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
8 * Copyright (C) 2001 - 2005 Tensilica Inc.
9 */
11 #ifndef _XTENSA_IO_H
12 #define _XTENSA_IO_H
14 #ifdef __KERNEL__
15 #include <asm/byteorder.h>
16 #include <asm/page.h>
17 #include <asm/vectors.h>
18 #include <linux/bug.h>
19 #include <linux/kernel.h>
21 #include <linux/types.h>
23 #define IOADDR(x) (XCHAL_KIO_BYPASS_VADDR + (x))
24 #define IO_SPACE_LIMIT ~0
26 #ifdef CONFIG_MMU
29 * Return the virtual address for the specified bus memory.
30 * Note that we currently don't support any address outside the KIO segment.
32 static inline void __iomem *ioremap_nocache(unsigned long offset,
33 unsigned long size)
35 if (offset >= XCHAL_KIO_PADDR
36 && offset - XCHAL_KIO_PADDR < XCHAL_KIO_SIZE)
37 return (void*)(offset-XCHAL_KIO_PADDR+XCHAL_KIO_BYPASS_VADDR);
38 else
39 BUG();
42 static inline void __iomem *ioremap_cache(unsigned long offset,
43 unsigned long size)
45 if (offset >= XCHAL_KIO_PADDR
46 && offset - XCHAL_KIO_PADDR < XCHAL_KIO_SIZE)
47 return (void*)(offset-XCHAL_KIO_PADDR+XCHAL_KIO_CACHED_VADDR);
48 else
49 BUG();
51 #define ioremap_cache ioremap_cache
53 #define ioremap_wc ioremap_nocache
54 #define ioremap_wt ioremap_nocache
56 static inline void __iomem *ioremap(unsigned long offset, unsigned long size)
58 return ioremap_nocache(offset, size);
61 static inline void iounmap(volatile void __iomem *addr)
65 #define virt_to_bus virt_to_phys
66 #define bus_to_virt phys_to_virt
68 #endif /* CONFIG_MMU */
70 #endif /* __KERNEL__ */
72 #include <asm-generic/io.h>
74 #endif /* _XTENSA_IO_H */