aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-mxc/include
diff options
context:
space:
mode:
authorDmitriy Taychenachev <dimichxp@gmail.com>2009-07-31 07:29:22 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2009-08-14 06:40:46 -0400
commitfd6ac7bb9d671d36fd7536c68fde977d197756ab (patch)
tree4c1993ee4079a55c6d621b46dba4826b92e3c028 /arch/arm/plat-mxc/include
parent8e5be212cba6675dc363a224ce4a98bb07039b4b (diff)
MXC: add basic MXC91231 support
Signed-off-by: Dmitriy Taychenachev <dimichxp@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/plat-mxc/include')
-rw-r--r--arch/arm/plat-mxc/include/mach/common.h6
-rw-r--r--arch/arm/plat-mxc/include/mach/debug-macro.S8
-rw-r--r--arch/arm/plat-mxc/include/mach/hardware.h4
-rw-r--r--arch/arm/plat-mxc/include/mach/irqs.h2
-rw-r--r--arch/arm/plat-mxc/include/mach/memory.h2
-rw-r--r--arch/arm/plat-mxc/include/mach/mxc.h15
-rw-r--r--arch/arm/plat-mxc/include/mach/mxc91231.h315
-rw-r--r--arch/arm/plat-mxc/include/mach/system.h10
-rw-r--r--arch/arm/plat-mxc/include/mach/timex.h2
-rw-r--r--arch/arm/plat-mxc/include/mach/uncompress.h4
10 files changed, 367 insertions, 1 deletions
diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h
index 4e7af7412396..286cb9b0a25b 100644
--- a/arch/arm/plat-mxc/include/mach/common.h
+++ b/arch/arm/plat-mxc/include/mach/common.h
@@ -20,6 +20,7 @@ extern void mx25_map_io(void);
20extern void mx27_map_io(void); 20extern void mx27_map_io(void);
21extern void mx31_map_io(void); 21extern void mx31_map_io(void);
22extern void mx35_map_io(void); 22extern void mx35_map_io(void);
23extern void mxc91231_map_io(void);
23extern void mxc_init_irq(void __iomem *); 24extern void mxc_init_irq(void __iomem *);
24extern void mx1_init_irq(void); 25extern void mx1_init_irq(void);
25extern void mx21_init_irq(void); 26extern void mx21_init_irq(void);
@@ -27,6 +28,7 @@ extern void mx25_init_irq(void);
27extern void mx27_init_irq(void); 28extern void mx27_init_irq(void);
28extern void mx31_init_irq(void); 29extern void mx31_init_irq(void);
29extern void mx35_init_irq(void); 30extern void mx35_init_irq(void);
31extern void mxc91231_init_irq(void);
30extern void mxc_timer_init(struct clk *timer_clk, void __iomem *, int); 32extern void mxc_timer_init(struct clk *timer_clk, void __iomem *, int);
31extern int mx1_clocks_init(unsigned long fref); 33extern int mx1_clocks_init(unsigned long fref);
32extern int mx21_clocks_init(unsigned long lref, unsigned long fref); 34extern int mx21_clocks_init(unsigned long lref, unsigned long fref);
@@ -34,9 +36,13 @@ extern int mx25_clocks_init(unsigned long fref);
34extern int mx27_clocks_init(unsigned long fref); 36extern int mx27_clocks_init(unsigned long fref);
35extern int mx31_clocks_init(unsigned long fref); 37extern int mx31_clocks_init(unsigned long fref);
36extern int mx35_clocks_init(void); 38extern int mx35_clocks_init(void);
39extern int mxc91231_clocks_init(unsigned long fref);
37extern int mxc_register_gpios(void); 40extern int mxc_register_gpios(void);
38extern int mxc_register_device(struct platform_device *pdev, void *data); 41extern int mxc_register_device(struct platform_device *pdev, void *data);
39extern void mxc_set_cpu_type(unsigned int type); 42extern void mxc_set_cpu_type(unsigned int type);
40extern void mxc_arch_reset_init(void __iomem *); 43extern void mxc_arch_reset_init(void __iomem *);
44extern void mxc91231_power_off(void);
45extern void mxc91231_arch_reset(int, const char *);
46extern void mxc91231_prepare_idle(void);
41 47
42#endif 48#endif
diff --git a/arch/arm/plat-mxc/include/mach/debug-macro.S b/arch/arm/plat-mxc/include/mach/debug-macro.S
index bf683de56b76..15b2b148a105 100644
--- a/arch/arm/plat-mxc/include/mach/debug-macro.S
+++ b/arch/arm/plat-mxc/include/mach/debug-macro.S
@@ -44,6 +44,14 @@
44#define UART_VADDR AIPS1_IO_ADDRESS(UART1_BASE_ADDR) 44#define UART_VADDR AIPS1_IO_ADDRESS(UART1_BASE_ADDR)
45#endif 45#endif
46 46
47#ifdef CONFIG_ARCH_MXC91231
48#ifdef UART_PADDR
49#error "CONFIG_DEBUG_LL is incompatible with multiple archs"
50#endif
51#include <mach/mxc91231.h>
52#define UART_PADDR MXC91231_UART2_BASE_ADDR
53#define UART_VADDR MXC91231_AIPS1_IO_ADDRESS(MXC91231_UART2_BASE_ADDR)
54#endif
47 .macro addruart,rx 55 .macro addruart,rx
48 mrc p15, 0, \rx, c1, c0 56 mrc p15, 0, \rx, c1, c0
49 tst \rx, #1 @ MMU enabled? 57 tst \rx, #1 @ MMU enabled?
diff --git a/arch/arm/plat-mxc/include/mach/hardware.h b/arch/arm/plat-mxc/include/mach/hardware.h
index 569af3239c3c..78db75475f69 100644
--- a/arch/arm/plat-mxc/include/mach/hardware.h
+++ b/arch/arm/plat-mxc/include/mach/hardware.h
@@ -46,6 +46,10 @@
46# include <mach/mx25.h> 46# include <mach/mx25.h>
47#endif 47#endif
48 48
49#ifdef CONFIG_ARCH_MXC91231
50# include <mach/mxc91231.h>
51#endif
52
49#include <mach/mxc.h> 53#include <mach/mxc.h>
50 54
51#endif /* __ASM_ARCH_MXC_HARDWARE_H__ */ 55#endif /* __ASM_ARCH_MXC_HARDWARE_H__ */
diff --git a/arch/arm/plat-mxc/include/mach/irqs.h b/arch/arm/plat-mxc/include/mach/irqs.h
index f39e016c1cc5..ead9d592168d 100644
--- a/arch/arm/plat-mxc/include/mach/irqs.h
+++ b/arch/arm/plat-mxc/include/mach/irqs.h
@@ -26,6 +26,8 @@
26#define MXC_GPIO_IRQS (32 * 3) 26#define MXC_GPIO_IRQS (32 * 3)
27#elif defined CONFIG_ARCH_MX25 27#elif defined CONFIG_ARCH_MX25
28#define MXC_GPIO_IRQS (32 * 4) 28#define MXC_GPIO_IRQS (32 * 4)
29#elif defined CONFIG_ARCH_MXC91231
30#define MXC_GPIO_IRQS (32 * 4)
29#endif 31#endif
30 32
31/* 33/*
diff --git a/arch/arm/plat-mxc/include/mach/memory.h b/arch/arm/plat-mxc/include/mach/memory.h
index 42db73941118..d3afafdcc0e5 100644
--- a/arch/arm/plat-mxc/include/mach/memory.h
+++ b/arch/arm/plat-mxc/include/mach/memory.h
@@ -24,6 +24,8 @@
24#define PHYS_OFFSET UL(0x80000000) 24#define PHYS_OFFSET UL(0x80000000)
25#elif defined CONFIG_ARCH_MX25 25#elif defined CONFIG_ARCH_MX25
26#define PHYS_OFFSET UL(0x80000000) 26#define PHYS_OFFSET UL(0x80000000)
27#elif defined CONFIG_ARCH_MXC91231
28#define PHYS_OFFSET UL(0x90000000)
27#endif 29#endif
28 30
29#if defined(CONFIG_MX1_VIDEO) 31#if defined(CONFIG_MX1_VIDEO)
diff --git a/arch/arm/plat-mxc/include/mach/mxc.h b/arch/arm/plat-mxc/include/mach/mxc.h
index 882b816729bd..51990536b845 100644
--- a/arch/arm/plat-mxc/include/mach/mxc.h
+++ b/arch/arm/plat-mxc/include/mach/mxc.h
@@ -30,6 +30,7 @@
30#define MXC_CPU_MX27 27 30#define MXC_CPU_MX27 27
31#define MXC_CPU_MX31 31 31#define MXC_CPU_MX31 31
32#define MXC_CPU_MX35 35 32#define MXC_CPU_MX35 35
33#define MXC_CPU_MXC91231 91231
33 34
34#ifndef __ASSEMBLY__ 35#ifndef __ASSEMBLY__
35extern unsigned int __mxc_cpu_type; 36extern unsigned int __mxc_cpu_type;
@@ -107,13 +108,25 @@ extern unsigned int __mxc_cpu_type;
107# define cpu_is_mx35() (0) 108# define cpu_is_mx35() (0)
108#endif 109#endif
109 110
111#ifdef CONFIG_ARCH_MXC91231
112# ifdef mxc_cpu_type
113# undef mxc_cpu_type
114# define mxc_cpu_type __mxc_cpu_type
115# else
116# define mxc_cpu_type MXC_CPU_MXC91231
117# endif
118# define cpu_is_mxc91231() (mxc_cpu_type == MXC_CPU_MXC91231)
119#else
120# define cpu_is_mxc91231() (0)
121#endif
122
110#if defined(CONFIG_ARCH_MX3) || defined(CONFIG_ARCH_MX2) 123#if defined(CONFIG_ARCH_MX3) || defined(CONFIG_ARCH_MX2)
111#define CSCR_U(n) (IO_ADDRESS(WEIM_BASE_ADDR) + n * 0x10) 124#define CSCR_U(n) (IO_ADDRESS(WEIM_BASE_ADDR) + n * 0x10)
112#define CSCR_L(n) (IO_ADDRESS(WEIM_BASE_ADDR) + n * 0x10 + 0x4) 125#define CSCR_L(n) (IO_ADDRESS(WEIM_BASE_ADDR) + n * 0x10 + 0x4)
113#define CSCR_A(n) (IO_ADDRESS(WEIM_BASE_ADDR) + n * 0x10 + 0x8) 126#define CSCR_A(n) (IO_ADDRESS(WEIM_BASE_ADDR) + n * 0x10 + 0x8)
114#endif 127#endif
115 128
116#define cpu_is_mx3() (cpu_is_mx31() || cpu_is_mx35()) 129#define cpu_is_mx3() (cpu_is_mx31() || cpu_is_mx35() || cpu_is_mxc91231())
117#define cpu_is_mx2() (cpu_is_mx21() || cpu_is_mx27()) 130#define cpu_is_mx2() (cpu_is_mx21() || cpu_is_mx27())
118 131
119#endif /* __ASM_ARCH_MXC_H__ */ 132#endif /* __ASM_ARCH_MXC_H__ */
diff --git a/arch/arm/plat-mxc/include/mach/mxc91231.h b/arch/arm/plat-mxc/include/mach/mxc91231.h
new file mode 100644
index 000000000000..81484d1ef232
--- /dev/null
+++ b/arch/arm/plat-mxc/include/mach/mxc91231.h
@@ -0,0 +1,315 @@
1/*
2 * Copyright 2004-2006 Freescale Semiconductor, Inc. All Rights Reserved.
3 * - Platform specific register memory map
4 *
5 * Copyright 2005-2007 Motorola, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#ifndef __MACH_MXC91231_H__
22#define __MACH_MXC91231_H__
23
24/*
25 * L2CC
26 */
27#define MXC91231_L2CC_BASE_ADDR 0x30000000
28#define MXC91231_L2CC_BASE_ADDR_VIRT 0xF9000000
29#define MXC91231_L2CC_SIZE SZ_64K
30
31/*
32 * AIPS 1
33 */
34#define MXC91231_AIPS1_BASE_ADDR 0x43F00000
35#define MXC91231_AIPS1_BASE_ADDR_VIRT 0xFC000000
36#define MXC91231_AIPS1_SIZE SZ_1M
37
38#define MXC91231_AIPS1_CTRL_BASE_ADDR MXC91231_AIPS1_BASE_ADDR
39#define MXC91231_MAX_BASE_ADDR (MXC91231_AIPS1_BASE_ADDR + 0x04000)
40#define MXC91231_EVTMON_BASE_ADDR (MXC91231_AIPS1_BASE_ADDR + 0x08000)
41#define MXC91231_CLKCTL_BASE_ADDR (MXC91231_AIPS1_BASE_ADDR + 0x0C000)
42#define MXC91231_ETB_SLOT4_BASE_ADDR (MXC91231_AIPS1_BASE_ADDR + 0x10000)
43#define MXC91231_ETB_SLOT5_BASE_ADDR (MXC91231_AIPS1_BASE_ADDR + 0x14000)
44#define MXC91231_ECT_CTIO_BASE_ADDR (MXC91231_AIPS1_BASE_ADDR + 0x18000)
45#define MXC91231_I2C_BASE_ADDR (MXC91231_AIPS1_BASE_ADDR + 0x80000)
46#define MXC91231_MU_BASE_ADDR (MXC91231_AIPS1_BASE_ADDR + 0x88000)
47#define MXC91231_UART1_BASE_ADDR (MXC91231_AIPS1_BASE_ADDR + 0x90000)
48#define MXC91231_UART2_BASE_ADDR (MXC91231_AIPS1_BASE_ADDR + 0x94000)
49#define MXC91231_DSM_BASE_ADDR (MXC91231_AIPS1_BASE_ADDR + 0x98000)
50#define MXC91231_OWIRE_BASE_ADDR (MXC91231_AIPS1_BASE_ADDR + 0x9C000)
51#define MXC91231_SSI1_BASE_ADDR (MXC91231_AIPS1_BASE_ADDR + 0xA0000)
52#define MXC91231_KPP_BASE_ADDR (MXC91231_AIPS1_BASE_ADDR + 0xA8000)
53#define MXC91231_IOMUX_AP_BASE_ADDR (MXC91231_AIPS1_BASE_ADDR + 0xAC000)
54#define MXC91231_CTI_AP_BASE_ADDR (MXC91231_AIPS1_BASE_ADDR + 0xB8000)
55
56/*
57 * AIPS 2
58 */
59#define MXC91231_AIPS2_BASE_ADDR 0x53F00000
60#define MXC91231_AIPS2_BASE_ADDR_VIRT 0xFC100000
61#define MXC91231_AIPS2_SIZE SZ_1M
62
63#define MXC91231_GEMK_BASE_ADDR (MXC91231_AIPS2_BASE_ADDR + 0x8C000)
64#define MXC91231_GPT1_BASE_ADDR (MXC91231_AIPS2_BASE_ADDR + 0x90000)
65#define MXC91231_EPIT1_AP_BASE_ADDR (MXC91231_AIPS2_BASE_ADDR + 0x94000)
66#define MXC91231_SCC_BASE_ADDR (MXC91231_AIPS2_BASE_ADDR + 0xAC000)
67#define MXC91231_RNGA_BASE_ADDR (MXC91231_AIPS2_BASE_ADDR + 0xB0000)
68#define MXC91231_IPU_CTRL_BASE_ADDR (MXC91231_AIPS2_BASE_ADDR + 0xC0000)
69#define MXC91231_AUDMUX_BASE_ADDR (MXC91231_AIPS2_BASE_ADDR + 0xC4000)
70#define MXC91231_EDIO_BASE_ADDR (MXC91231_AIPS2_BASE_ADDR + 0xC8000)
71#define MXC91231_GPIO1_AP_BASE_ADDR (MXC91231_AIPS2_BASE_ADDR + 0xCC000)
72#define MXC91231_GPIO2_AP_BASE_ADDR (MXC91231_AIPS2_BASE_ADDR + 0xD0000)
73#define MXC91231_SDMA_BASE_ADDR (MXC91231_AIPS2_BASE_ADDR + 0xD4000)
74#define MXC91231_RTC_BASE_ADDR (MXC91231_AIPS2_BASE_ADDR + 0xD8000)
75#define MXC91231_WDOG1_BASE_ADDR (MXC91231_AIPS2_BASE_ADDR + 0xDC000)
76#define MXC91231_PWM_BASE_ADDR (MXC91231_AIPS2_BASE_ADDR + 0xE0000)
77#define MXC91231_GPIO3_AP_BASE_ADDR (MXC91231_AIPS2_BASE_ADDR + 0xE4000)
78#define MXC91231_WDOG2_BASE_ADDR (MXC91231_AIPS2_BASE_ADDR + 0xE8000)
79#define MXC91231_RTIC_BASE_ADDR (MXC91231_AIPS2_BASE_ADDR + 0xEC000)
80#define MXC91231_LPMC_BASE_ADDR (MXC91231_AIPS2_BASE_ADDR + 0xF0000)
81
82/*
83 * SPBA global module 0
84 */
85#define MXC91231_SPBA0_BASE_ADDR 0x50000000
86#define MXC91231_SPBA0_BASE_ADDR_VIRT 0xFC200000
87#define MXC91231_SPBA0_SIZE SZ_1M
88
89#define MXC91231_MMC_SDHC1_BASE_ADDR (MXC91231_SPBA0_BASE_ADDR + 0x04000)
90#define MXC91231_MMC_SDHC2_BASE_ADDR (MXC91231_SPBA0_BASE_ADDR + 0x08000)
91#define MXC91231_UART3_BASE_ADDR (MXC91231_SPBA0_BASE_ADDR + 0x0C000)
92#define MXC91231_CSPI2_BASE_ADDR (MXC91231_SPBA0_BASE_ADDR + 0x10000)
93#define MXC91231_SSI2_BASE_ADDR (MXC91231_SPBA0_BASE_ADDR + 0x14000)
94#define MXC91231_SIM_BASE_ADDR (MXC91231_SPBA0_BASE_ADDR + 0x18000)
95#define MXC91231_IIM_BASE_ADDR (MXC91231_SPBA0_BASE_ADDR + 0x1C000)
96#define MXC91231_CTI_SDMA_BASE_ADDR (MXC91231_SPBA0_BASE_ADDR + 0x20000)
97#define MXC91231_USBOTG_CTRL_BASE_ADDR (MXC91231_SPBA0_BASE_ADDR + 0x24000)
98#define MXC91231_USBOTG_DATA_BASE_ADDR (MXC91231_SPBA0_BASE_ADDR + 0x28000)
99#define MXC91231_CSPI1_BASE_ADDR (MXC91231_SPBA0_BASE_ADDR + 0x30000)
100#define MXC91231_SPBA_CTRL_BASE_ADDR (MXC91231_SPBA0_BASE_ADDR + 0x3C000)
101#define MXC91231_IOMUX_COM_BASE_ADDR (MXC91231_SPBA0_BASE_ADDR + 0x40000)
102#define MXC91231_CRM_COM_BASE_ADDR (MXC91231_SPBA0_BASE_ADDR + 0x44000)
103#define MXC91231_CRM_AP_BASE_ADDR (MXC91231_SPBA0_BASE_ADDR + 0x48000)
104#define MXC91231_PLL0_BASE_ADDR (MXC91231_SPBA0_BASE_ADDR + 0x4C000)
105#define MXC91231_PLL1_BASE_ADDR (MXC91231_SPBA0_BASE_ADDR + 0x50000)
106#define MXC91231_PLL2_BASE_ADDR (MXC91231_SPBA0_BASE_ADDR + 0x54000)
107#define MXC91231_GPIO4_SH_BASE_ADDR (MXC91231_SPBA0_BASE_ADDR + 0x58000)
108#define MXC91231_HAC_BASE_ADDR (MXC91231_SPBA0_BASE_ADDR + 0x5C000)
109#define MXC91231_SAHARA_BASE_ADDR (MXC91231_SPBA0_BASE_ADDR + 0x5C000)
110#define MXC91231_PLL3_BASE_ADDR (MXC91231_SPBA0_BASE_ADDR + 0x60000)
111
112/*
113 * SPBA global module 1
114 */
115#define MXC91231_SPBA1_BASE_ADDR 0x52000000
116#define MXC91231_SPBA1_BASE_ADDR_VIRT 0xFC300000
117#define MXC91231_SPBA1_SIZE SZ_1M
118
119#define MXC91231_MQSPI_BASE_ADDR (MXC91231_SPBA1_BASE_ADDR + 0x34000)
120#define MXC91231_EL1T_BASE_ADDR (MXC91231_SPBA1_BASE_ADDR + 0x38000)
121
122/*!
123 * Defines for SPBA modules
124 */
125#define MXC91231_SPBA_SDHC1 0x04
126#define MXC91231_SPBA_SDHC2 0x08
127#define MXC91231_SPBA_UART3 0x0C
128#define MXC91231_SPBA_CSPI2 0x10
129#define MXC91231_SPBA_SSI2 0x14
130#define MXC91231_SPBA_SIM 0x18
131#define MXC91231_SPBA_IIM 0x1C
132#define MXC91231_SPBA_CTI_SDMA 0x20
133#define MXC91231_SPBA_USBOTG_CTRL_REGS 0x24
134#define MXC91231_SPBA_USBOTG_DATA_REGS 0x28
135#define MXC91231_SPBA_CSPI1 0x30
136#define MXC91231_SPBA_MQSPI 0x34
137#define MXC91231_SPBA_EL1T 0x38
138#define MXC91231_SPBA_IOMUX 0x40
139#define MXC91231_SPBA_CRM_COM 0x44
140#define MXC91231_SPBA_CRM_AP 0x48
141#define MXC91231_SPBA_PLL0 0x4C
142#define MXC91231_SPBA_PLL1 0x50
143#define MXC91231_SPBA_PLL2 0x54
144#define MXC91231_SPBA_GPIO4 0x58
145#define MXC91231_SPBA_SAHARA 0x5C
146
147/*
148 * ROMP and AVIC
149 */
150#define MXC91231_ROMP_BASE_ADDR 0x60000000
151#define MXC91231_ROMP_BASE_ADDR_VIRT 0xFC400000
152#define MXC91231_ROMP_SIZE SZ_64K
153
154#define MXC91231_AVIC_BASE_ADDR 0x68000000
155#define MXC91231_AVIC_BASE_ADDR_VIRT 0xFC410000
156#define MXC91231_AVIC_SIZE SZ_64K
157
158/*
159 * NAND, SDRAM, WEIM, M3IF, EMI controllers
160 */
161#define MXC91231_X_MEMC_BASE_ADDR 0xB8000000
162#define MXC91231_X_MEMC_BASE_ADDR_VIRT 0xFC420000
163#define MXC91231_X_MEMC_SIZE SZ_64K
164
165#define MXC91231_NFC_BASE_ADDR (MXC91231_X_MEMC_BASE_ADDR + 0x0000)
166#define MXC91231_ESDCTL_BASE_ADDR (MXC91231_X_MEMC_BASE_ADDR + 0x1000)
167#define MXC91231_WEIM_BASE_ADDR (MXC91231_X_MEMC_BASE_ADDR + 0x2000)
168#define MXC91231_M3IF_BASE_ADDR (MXC91231_X_MEMC_BASE_ADDR + 0x3000)
169#define MXC91231_EMI_CTL_BASE_ADDR (MXC91231_X_MEMC_BASE_ADDR + 0x4000)
170
171/*
172 * Memory regions and CS
173 * CPLD is connected on CS4
174 * CS5 is TP1021 or it is not connected
175 * */
176#define MXC91231_FB_RAM_BASE_ADDR 0x78000000
177#define MXC91231_FB_RAM_SIZE SZ_256K
178#define MXC91231_CSD0_BASE_ADDR 0x80000000
179#define MXC91231_CSD1_BASE_ADDR 0x90000000
180#define MXC91231_CS0_BASE_ADDR 0xA0000000
181#define MXC91231_CS1_BASE_ADDR 0xA8000000
182#define MXC91231_CS2_BASE_ADDR 0xB0000000
183#define MXC91231_CS3_BASE_ADDR 0xB2000000
184#define MXC91231_CS4_BASE_ADDR 0xB4000000
185#define MXC91231_CS5_BASE_ADDR 0xB6000000
186
187/* Is given address belongs to the specified memory region? */
188#define ADDRESS_IN_REGION(addr, start, size) \
189 (((addr) >= (start)) && ((addr) < (start)+(size)))
190
191/* Is given address belongs to the specified named `module'? */
192#define MXC91231_IS_MODULE(addr, module) \
193 ADDRESS_IN_REGION(addr, MXC91231_ ## module ## _BASE_ADDR, \
194 MXC91231_ ## module ## _SIZE)
195/*
196 * This macro defines the physical to virtual address mapping for all the
197 * peripheral modules. It is used by passing in the physical address as x
198 * and returning the virtual address. If the physical address is not mapped,
199 * it returns 0xDEADBEEF
200 */
201
202#define MXC91231_IO_ADDRESS(x) \
203 (void __iomem *) \
204 (MXC91231_IS_MODULE(x, L2CC) ? MXC91231_L2CC_IO_ADDRESS(x) : \
205 MXC91231_IS_MODULE(x, AIPS1) ? MXC91231_AIPS1_IO_ADDRESS(x) : \
206 MXC91231_IS_MODULE(x, AIPS2) ? MXC91231_AIPS2_IO_ADDRESS(x) : \
207 MXC91231_IS_MODULE(x, SPBA0) ? MXC91231_SPBA0_IO_ADDRESS(x) : \
208 MXC91231_IS_MODULE(x, SPBA1) ? MXC91231_SPBA1_IO_ADDRESS(x) : \
209 MXC91231_IS_MODULE(x, ROMP) ? MXC91231_ROMP_IO_ADDRESS(x) : \
210 MXC91231_IS_MODULE(x, AVIC) ? MXC91231_AVIC_IO_ADDRESS(x) : \
211 MXC91231_IS_MODULE(x, X_MEMC) ? MXC91231_X_MEMC_IO_ADDRESS(x) : \
212 0xDEADBEEF)
213
214
215/*
216 * define the address mapping macros: in physical address order
217 */
218#define MXC91231_L2CC_IO_ADDRESS(x) \
219 (((x) - MXC91231_L2CC_BASE_ADDR) + MXC91231_L2CC_BASE_ADDR_VIRT)
220
221#define MXC91231_AIPS1_IO_ADDRESS(x) \
222 (((x) - MXC91231_AIPS1_BASE_ADDR) + MXC91231_AIPS1_BASE_ADDR_VIRT)
223
224#define MXC91231_SPBA0_IO_ADDRESS(x) \
225 (((x) - MXC91231_SPBA0_BASE_ADDR) + MXC91231_SPBA0_BASE_ADDR_VIRT)
226
227#define MXC91231_SPBA1_IO_ADDRESS(x) \
228 (((x) - MXC91231_SPBA1_BASE_ADDR) + MXC91231_SPBA1_BASE_ADDR_VIRT)
229
230#define MXC91231_AIPS2_IO_ADDRESS(x) \
231 (((x) - MXC91231_AIPS2_BASE_ADDR) + MXC91231_AIPS2_BASE_ADDR_VIRT)
232
233#define MXC91231_ROMP_IO_ADDRESS(x) \
234 (((x) - MXC91231_ROMP_BASE_ADDR) + MXC91231_ROMP_BASE_ADDR_VIRT)
235
236#define MXC91231_AVIC_IO_ADDRESS(x) \
237 (((x) - MXC91231_AVIC_BASE_ADDR) + MXC91231_AVIC_BASE_ADDR_VIRT)
238
239#define MXC91231_X_MEMC_IO_ADDRESS(x) \
240 (((x) - MXC91231_X_MEMC_BASE_ADDR) + MXC91231_X_MEMC_BASE_ADDR_VIRT)
241
242/*
243 * Interrupt numbers
244 */
245#define MXC91231_INT_GPIO3 0
246#define MXC91231_INT_EL1T_CI 1
247#define MXC91231_INT_EL1T_RFCI 2
248#define MXC91231_INT_EL1T_RFI 3
249#define MXC91231_INT_EL1T_MCU 4
250#define MXC91231_INT_EL1T_IPI 5
251#define MXC91231_INT_MU_GEN 6
252#define MXC91231_INT_GPIO4 7
253#define MXC91231_INT_MMC_SDHC2 8
254#define MXC91231_INT_MMC_SDHC1 9
255#define MXC91231_INT_I2C 10
256#define MXC91231_INT_SSI2 11
257#define MXC91231_INT_SSI1 12
258#define MXC91231_INT_CSPI2 13
259#define MXC91231_INT_CSPI1 14
260#define MXC91231_INT_RTIC 15
261#define MXC91231_INT_SAHARA 15
262#define MXC91231_INT_HAC 15
263#define MXC91231_INT_UART3_RX 16
264#define MXC91231_INT_UART3_TX 17
265#define MXC91231_INT_UART3_MINT 18
266#define MXC91231_INT_ECT 19
267#define MXC91231_INT_SIM_IPB 20
268#define MXC91231_INT_SIM_DATA 21
269#define MXC91231_INT_RNGA 22
270#define MXC91231_INT_DSM_AP 23
271#define MXC91231_INT_KPP 24
272#define MXC91231_INT_RTC 25
273#define MXC91231_INT_PWM 26
274#define MXC91231_INT_GEMK_AP 27
275#define MXC91231_INT_EPIT 28
276#define MXC91231_INT_GPT 29
277#define MXC91231_INT_UART2_RX 30
278#define MXC91231_INT_UART2_TX 31
279#define MXC91231_INT_UART2_MINT 32
280#define MXC91231_INT_NANDFC 33
281#define MXC91231_INT_SDMA 34
282#define MXC91231_INT_USB_WAKEUP 35
283#define MXC91231_INT_USB_SOF 36
284#define MXC91231_INT_PMU_EVTMON 37
285#define MXC91231_INT_USB_FUNC 38
286#define MXC91231_INT_USB_DMA 39
287#define MXC91231_INT_USB_CTRL 40
288#define MXC91231_INT_IPU_ERR 41
289#define MXC91231_INT_IPU_SYN 42
290#define MXC91231_INT_UART1_RX 43
291#define MXC91231_INT_UART1_TX 44
292#define MXC91231_INT_UART1_MINT 45
293#define MXC91231_INT_IIM 46
294#define MXC91231_INT_MU_RX_OR 47
295#define MXC91231_INT_MU_TX_OR 48
296#define MXC91231_INT_SCC_SCM 49
297#define MXC91231_INT_SCC_SMN 50
298#define MXC91231_INT_GPIO2 51
299#define MXC91231_INT_GPIO1 52
300#define MXC91231_INT_MQSPI1 53
301#define MXC91231_INT_MQSPI2 54
302#define MXC91231_INT_WDOG2 55
303#define MXC91231_INT_EXT_INT7 56
304#define MXC91231_INT_EXT_INT6 57
305#define MXC91231_INT_EXT_INT5 58
306#define MXC91231_INT_EXT_INT4 59
307#define MXC91231_INT_EXT_INT3 60
308#define MXC91231_INT_EXT_INT2 61
309#define MXC91231_INT_EXT_INT1 62
310#define MXC91231_INT_EXT_INT0 63
311
312#define MXC91231_MAX_INT_LINES 63
313#define MXC91231_MAX_EXT_LINES 8
314
315#endif /* __MACH_MXC91231_H__ */
diff --git a/arch/arm/plat-mxc/include/mach/system.h b/arch/arm/plat-mxc/include/mach/system.h
index e56241af870e..ef00199568de 100644
--- a/arch/arm/plat-mxc/include/mach/system.h
+++ b/arch/arm/plat-mxc/include/mach/system.h
@@ -21,8 +21,18 @@
21#ifndef __ASM_ARCH_MXC_SYSTEM_H__ 21#ifndef __ASM_ARCH_MXC_SYSTEM_H__
22#define __ASM_ARCH_MXC_SYSTEM_H__ 22#define __ASM_ARCH_MXC_SYSTEM_H__
23 23
24#include <mach/hardware.h>
25#include <mach/common.h>
26
24static inline void arch_idle(void) 27static inline void arch_idle(void)
25{ 28{
29#ifdef CONFIG_ARCH_MXC91231
30 if (cpu_is_mxc91231()) {
31 /* Need this to set DSM low-power mode */
32 mxc91231_prepare_idle();
33 }
34#endif
35
26 cpu_do_idle(); 36 cpu_do_idle();
27} 37}
28 38
diff --git a/arch/arm/plat-mxc/include/mach/timex.h b/arch/arm/plat-mxc/include/mach/timex.h
index 0707b7d5b5ce..527a6c24788e 100644
--- a/arch/arm/plat-mxc/include/mach/timex.h
+++ b/arch/arm/plat-mxc/include/mach/timex.h
@@ -28,6 +28,8 @@
28#define CLOCK_TICK_RATE 16625000 28#define CLOCK_TICK_RATE 16625000
29#elif defined CONFIG_ARCH_MX25 29#elif defined CONFIG_ARCH_MX25
30#define CLOCK_TICK_RATE 16000000 30#define CLOCK_TICK_RATE 16000000
31#elif defined CONFIG_ARCH_MXC91231
32#define CLOCK_TICK_RATE 13000000
31#endif 33#endif
32 34
33#endif /* __ASM_ARCH_MXC_TIMEX_H__ */ 35#endif /* __ASM_ARCH_MXC_TIMEX_H__ */
diff --git a/arch/arm/plat-mxc/include/mach/uncompress.h b/arch/arm/plat-mxc/include/mach/uncompress.h
index 1e24499f20b5..082a3908256b 100644
--- a/arch/arm/plat-mxc/include/mach/uncompress.h
+++ b/arch/arm/plat-mxc/include/mach/uncompress.h
@@ -66,6 +66,7 @@ static void putc(int ch)
66#define MX25_UART1_BASE_ADDR 0x43f90000 66#define MX25_UART1_BASE_ADDR 0x43f90000
67#define MX2X_UART1_BASE_ADDR 0x1000a000 67#define MX2X_UART1_BASE_ADDR 0x1000a000
68#define MX3X_UART1_BASE_ADDR 0x43F90000 68#define MX3X_UART1_BASE_ADDR 0x43F90000
69#define MX3X_UART2_BASE_ADDR 0x43F94000
69 70
70static __inline__ void __arch_decomp_setup(unsigned long arch_id) 71static __inline__ void __arch_decomp_setup(unsigned long arch_id)
71{ 72{
@@ -95,6 +96,9 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)
95 case MACH_TYPE_PCM043: 96 case MACH_TYPE_PCM043:
96 uart_base = MX3X_UART1_BASE_ADDR; 97 uart_base = MX3X_UART1_BASE_ADDR;
97 break; 98 break;
99 case MACH_TYPE_MAGX_ZN5:
100 uart_base = MX3X_UART2_BASE_ADDR;
101 break;
98 default: 102 default:
99 break; 103 break;
100 } 104 }