Merge branch 'for-2.6.28' of git://linux-nfs.org/~bfields/linux
[linux-2.6-block.git] / arch / arm / plat-mxc / include / mach / io.h
CommitLineData
52c543f9
QJ
1/*
2 * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
3 */
4
5/*
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
52c543f9
QJ
11#ifndef __ASM_ARCH_MXC_IO_H__
12#define __ASM_ARCH_MXC_IO_H__
13
f304fc42 14/* Allow IO space to be anywhere in the memory */
52c543f9
QJ
15#define IO_SPACE_LIMIT 0xffffffff
16
eadefeff
SH
17#ifdef CONFIG_ARCH_MX3
18#define __arch_ioremap __mx3_ioremap
19#define __arch_iounmap __iounmap
20
21static inline void __iomem *
22__mx3_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
23{
24 if (mtype == MT_DEVICE) {
25 /* Access all peripherals below 0x80000000 as nonshared device
26 * but leave l2cc alone.
27 */
28 if ((phys_addr < 0x80000000) && ((phys_addr < L2CC_BASE_ADDR) ||
29 (phys_addr >= L2CC_BASE_ADDR + L2CC_SIZE)))
30 mtype = MT_DEVICE_NONSHARED;
31 }
32
33 return __arm_ioremap(phys_addr, size, mtype);
34}
35#endif
36
f304fc42 37/* io address mapping macro */
52c543f9
QJ
38#define __io(a) ((void __iomem *)(a))
39
40#define __mem_pci(a) (a)
41
42#endif