aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-mxc/include/mach/io.h
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
commitfcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch)
treea57612d1888735a2ec7972891b68c1ac5ec8faea /arch/arm/plat-mxc/include/mach/io.h
parent8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff)
Added missing tegra files.HEADmaster
Diffstat (limited to 'arch/arm/plat-mxc/include/mach/io.h')
-rw-r--r--arch/arm/plat-mxc/include/mach/io.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/include/mach/io.h b/arch/arm/plat-mxc/include/mach/io.h
new file mode 100644
index 00000000000..4347a87d2bb
--- /dev/null
+++ b/arch/arm/plat-mxc/include/mach/io.h
@@ -0,0 +1,49 @@
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
11#ifndef __ASM_ARCH_MXC_IO_H__
12#define __ASM_ARCH_MXC_IO_H__
13
14/* Allow IO space to be anywhere in the memory */
15#define IO_SPACE_LIMIT 0xffffffff
16
17#if defined(CONFIG_SOC_IMX31) || defined(CONFIG_SOC_IMX35)
18#include <mach/hardware.h>
19
20#define __arch_ioremap __imx_ioremap
21#define __arch_iounmap __iounmap
22
23#define addr_in_module(addr, mod) \
24 ((unsigned long)(addr) - mod ## _BASE_ADDR < mod ## _SIZE)
25
26static inline void __iomem *
27__imx_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
28{
29 if (mtype == MT_DEVICE && (cpu_is_mx31() || cpu_is_mx35())) {
30 /*
31 * Access all peripherals below 0x80000000 as nonshared device
32 * on mx3, but leave l2cc alone. Otherwise cache corruptions
33 * can occur.
34 */
35 if (phys_addr < 0x80000000 &&
36 !addr_in_module(phys_addr, MX3x_L2CC))
37 mtype = MT_DEVICE_NONSHARED;
38 }
39
40 return __arm_ioremap(phys_addr, size, mtype);
41}
42#endif
43
44/* io address mapping macro */
45#define __io(a) __typesafe_io(a)
46
47#define __mem_pci(a) (a)
48
49#endif