diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-07-29 10:48:37 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-07-29 10:48:37 -0400 |
commit | d50f58bbd979e86378dfdec982452041f0e604ef (patch) | |
tree | 511938033b3346983175c70dd4d0afeb00b59b82 /arch | |
parent | 129961ecaf21c9ee899ad9067d917c1aa172fb7a (diff) | |
parent | 79d3c2c2395a89a70d25f0c77c11afc87efab89b (diff) |
Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into devel-stable
Diffstat (limited to 'arch')
150 files changed, 4570 insertions, 2893 deletions
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 71cbb17ff89c..21ceada460dd 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -150,8 +150,8 @@ machine-$(CONFIG_ARCH_LPC32XX) := lpc32xx | |||
150 | machine-$(CONFIG_ARCH_MMP) := mmp | 150 | machine-$(CONFIG_ARCH_MMP) := mmp |
151 | machine-$(CONFIG_ARCH_MSM) := msm | 151 | machine-$(CONFIG_ARCH_MSM) := msm |
152 | machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0 | 152 | machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0 |
153 | machine-$(CONFIG_ARCH_MX1) := mx1 | 153 | machine-$(CONFIG_ARCH_MX1) := imx |
154 | machine-$(CONFIG_ARCH_MX2) := mx2 | 154 | machine-$(CONFIG_ARCH_MX2) := imx |
155 | machine-$(CONFIG_ARCH_MX25) := mx25 | 155 | machine-$(CONFIG_ARCH_MX25) := mx25 |
156 | machine-$(CONFIG_ARCH_MX3) := mx3 | 156 | machine-$(CONFIG_ARCH_MX3) := mx3 |
157 | machine-$(CONFIG_ARCH_MX5) := mx5 | 157 | machine-$(CONFIG_ARCH_MX5) := mx5 |
diff --git a/arch/arm/mach-mx2/Kconfig b/arch/arm/mach-imx/Kconfig index 742fd4e6dcb9..c5c0369bb481 100644 --- a/arch/arm/mach-mx2/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -1,42 +1,103 @@ | |||
1 | config IMX_HAVE_DMA_V1 | ||
2 | bool | ||
3 | |||
4 | if ARCH_MX1 | ||
5 | |||
6 | config SOC_IMX1 | ||
7 | select CPU_ARM920T | ||
8 | select IMX_HAVE_DMA_V1 | ||
9 | select IMX_HAVE_IOMUX_V1 | ||
10 | bool | ||
11 | |||
12 | comment "MX1 platforms:" | ||
13 | config MACH_MXLADS | ||
14 | bool | ||
15 | |||
16 | config ARCH_MX1ADS | ||
17 | bool "MX1ADS platform" | ||
18 | select MACH_MXLADS | ||
19 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
20 | select IMX_HAVE_PLATFORM_IMX_UART | ||
21 | help | ||
22 | Say Y here if you are using Motorola MX1ADS/MXLADS boards | ||
23 | |||
24 | config MACH_SCB9328 | ||
25 | bool "Synertronixx scb9328" | ||
26 | select IMX_HAVE_PLATFORM_IMX_UART | ||
27 | help | ||
28 | Say Y here if you are using a Synertronixx scb9328 board | ||
29 | |||
30 | endif | ||
31 | |||
1 | if ARCH_MX2 | 32 | if ARCH_MX2 |
2 | 33 | ||
34 | config SOC_IMX21 | ||
35 | select CPU_ARM926T | ||
36 | select ARCH_MXC_AUDMUX_V1 | ||
37 | select IMX_HAVE_DMA_V1 | ||
38 | select IMX_HAVE_IOMUX_V1 | ||
39 | bool | ||
40 | |||
41 | config SOC_IMX27 | ||
42 | select CPU_ARM926T | ||
43 | select ARCH_MXC_AUDMUX_V1 | ||
44 | select IMX_HAVE_DMA_V1 | ||
45 | select IMX_HAVE_IOMUX_V1 | ||
46 | bool | ||
47 | |||
3 | choice | 48 | choice |
4 | prompt "CPUs:" | 49 | prompt "CPUs:" |
5 | default MACH_MX21 | 50 | default MACH_MX21 |
6 | 51 | ||
7 | config MACH_MX21 | 52 | config MACH_MX21 |
8 | bool "i.MX21 support" | 53 | bool "i.MX21 support" |
9 | select ARCH_MXC_AUDMUX_V1 | 54 | select SOC_IMX21 |
10 | help | 55 | help |
11 | This enables support for Freescale's MX2 based i.MX21 processor. | 56 | This enables support for Freescale's MX2 based i.MX21 processor. |
12 | 57 | ||
13 | config MACH_MX27 | 58 | config MACH_MX27 |
14 | bool "i.MX27 support" | 59 | bool "i.MX27 support" |
15 | select ARCH_MXC_AUDMUX_V1 | 60 | select SOC_IMX27 |
16 | help | 61 | help |
17 | This enables support for Freescale's MX2 based i.MX27 processor. | 62 | This enables support for Freescale's MX2 based i.MX27 processor. |
18 | 63 | ||
19 | endchoice | 64 | endchoice |
20 | 65 | ||
21 | comment "MX2 platforms:" | 66 | endif |
67 | |||
68 | if MACH_MX21 | ||
69 | |||
70 | comment "MX21 platforms:" | ||
22 | 71 | ||
23 | config MACH_MX21ADS | 72 | config MACH_MX21ADS |
24 | bool "MX21ADS platform" | 73 | bool "MX21ADS platform" |
25 | depends on MACH_MX21 | 74 | select IMX_HAVE_PLATFORM_IMX_UART |
75 | select IMX_HAVE_PLATFORM_MXC_NAND | ||
26 | help | 76 | help |
27 | Include support for MX21ADS platform. This includes specific | 77 | Include support for MX21ADS platform. This includes specific |
28 | configurations for the board and its peripherals. | 78 | configurations for the board and its peripherals. |
29 | 79 | ||
80 | endif | ||
81 | |||
82 | if MACH_MX27 | ||
83 | |||
84 | comment "MX27 platforms:" | ||
85 | |||
30 | config MACH_MX27ADS | 86 | config MACH_MX27ADS |
31 | bool "MX27ADS platform" | 87 | bool "MX27ADS platform" |
32 | depends on MACH_MX27 | 88 | select IMX_HAVE_PLATFORM_IMX_I2C |
89 | select IMX_HAVE_PLATFORM_IMX_UART | ||
90 | select IMX_HAVE_PLATFORM_MXC_NAND | ||
33 | help | 91 | help |
34 | Include support for MX27ADS platform. This includes specific | 92 | Include support for MX27ADS platform. This includes specific |
35 | configurations for the board and its peripherals. | 93 | configurations for the board and its peripherals. |
36 | 94 | ||
37 | config MACH_PCM038 | 95 | config MACH_PCM038 |
38 | bool "Phytec phyCORE-i.MX27 CPU module (pcm038)" | 96 | bool "Phytec phyCORE-i.MX27 CPU module (pcm038)" |
39 | depends on MACH_MX27 | 97 | select IMX_HAVE_PLATFORM_IMX_I2C |
98 | select IMX_HAVE_PLATFORM_IMX_UART | ||
99 | select IMX_HAVE_PLATFORM_MXC_NAND | ||
100 | select IMX_HAVE_PLATFORM_SPI_IMX | ||
40 | select MXC_ULPI if USB_ULPI | 101 | select MXC_ULPI if USB_ULPI |
41 | help | 102 | help |
42 | Include support for phyCORE-i.MX27 (aka pcm038) platform. This | 103 | Include support for phyCORE-i.MX27 (aka pcm038) platform. This |
@@ -58,7 +119,9 @@ endchoice | |||
58 | 119 | ||
59 | config MACH_CPUIMX27 | 120 | config MACH_CPUIMX27 |
60 | bool "Eukrea CPUIMX27 module" | 121 | bool "Eukrea CPUIMX27 module" |
61 | depends on MACH_MX27 | 122 | select IMX_HAVE_PLATFORM_IMX_I2C |
123 | select IMX_HAVE_PLATFORM_IMX_UART | ||
124 | select IMX_HAVE_PLATFORM_MXC_NAND | ||
62 | help | 125 | help |
63 | Include support for Eukrea CPUIMX27 platform. This includes | 126 | Include support for Eukrea CPUIMX27 platform. This includes |
64 | specific configurations for the module and its peripherals. | 127 | specific configurations for the module and its peripherals. |
@@ -67,9 +130,16 @@ config MACH_EUKREA_CPUIMX27_USESDHC2 | |||
67 | bool "CPUIMX27 integrates SDHC2 module" | 130 | bool "CPUIMX27 integrates SDHC2 module" |
68 | depends on MACH_CPUIMX27 | 131 | depends on MACH_CPUIMX27 |
69 | help | 132 | help |
70 | This adds support for the internal SDHC2 used on CPUIMX27 used | 133 | This adds support for the internal SDHC2 used on CPUIMX27 |
71 | for wifi or eMMC. | 134 | for wifi or eMMC. |
72 | 135 | ||
136 | config MACH_EUKREA_CPUIMX27_USEUART4 | ||
137 | bool "CPUIMX27 integrates UART4 module" | ||
138 | depends on MACH_CPUIMX27 | ||
139 | help | ||
140 | This adds support for the internal UART4 used on CPUIMX27 | ||
141 | for bluetooth. | ||
142 | |||
73 | choice | 143 | choice |
74 | prompt "Baseboard" | 144 | prompt "Baseboard" |
75 | depends on MACH_CPUIMX27 | 145 | depends on MACH_CPUIMX27 |
@@ -78,6 +148,8 @@ choice | |||
78 | config MACH_EUKREA_MBIMX27_BASEBOARD | 148 | config MACH_EUKREA_MBIMX27_BASEBOARD |
79 | prompt "Eukrea MBIMX27 development board" | 149 | prompt "Eukrea MBIMX27 development board" |
80 | bool | 150 | bool |
151 | select IMX_HAVE_PLATFORM_IMX_UART | ||
152 | select IMX_HAVE_PLATFORM_SPI_IMX | ||
81 | help | 153 | help |
82 | This adds board specific devices that can be found on Eukrea's | 154 | This adds board specific devices that can be found on Eukrea's |
83 | MBIMX27 evaluation board. | 155 | MBIMX27 evaluation board. |
@@ -86,21 +158,24 @@ endchoice | |||
86 | 158 | ||
87 | config MACH_MX27_3DS | 159 | config MACH_MX27_3DS |
88 | bool "MX27PDK platform" | 160 | bool "MX27PDK platform" |
89 | depends on MACH_MX27 | 161 | select IMX_HAVE_PLATFORM_IMX_UART |
90 | help | 162 | help |
91 | Include support for MX27PDK platform. This includes specific | 163 | Include support for MX27PDK platform. This includes specific |
92 | configurations for the board and its peripherals. | 164 | configurations for the board and its peripherals. |
93 | 165 | ||
94 | config MACH_IMX27LITE | 166 | config MACH_IMX27LITE |
95 | bool "LogicPD MX27 LITEKIT platform" | 167 | bool "LogicPD MX27 LITEKIT platform" |
96 | depends on MACH_MX27 | 168 | select IMX_HAVE_PLATFORM_IMX_UART |
97 | help | 169 | help |
98 | Include support for MX27 LITEKIT platform. This includes specific | 170 | Include support for MX27 LITEKIT platform. This includes specific |
99 | configurations for the board and its peripherals. | 171 | configurations for the board and its peripherals. |
100 | 172 | ||
101 | config MACH_PCA100 | 173 | config MACH_PCA100 |
102 | bool "Phytec phyCARD-s (pca100)" | 174 | bool "Phytec phyCARD-s (pca100)" |
103 | depends on MACH_MX27 | 175 | select IMX_HAVE_PLATFORM_IMX_I2C |
176 | select IMX_HAVE_PLATFORM_IMX_UART | ||
177 | select IMX_HAVE_PLATFORM_MXC_NAND | ||
178 | select IMX_HAVE_PLATFORM_SPI_IMX | ||
104 | select MXC_ULPI if USB_ULPI | 179 | select MXC_ULPI if USB_ULPI |
105 | help | 180 | help |
106 | Include support for phyCARD-s (aka pca100) platform. This | 181 | Include support for phyCARD-s (aka pca100) platform. This |
@@ -108,7 +183,9 @@ config MACH_PCA100 | |||
108 | 183 | ||
109 | config MACH_MXT_TD60 | 184 | config MACH_MXT_TD60 |
110 | bool "Maxtrack i-MXT TD60" | 185 | bool "Maxtrack i-MXT TD60" |
111 | depends on MACH_MX27 | 186 | select IMX_HAVE_PLATFORM_IMX_I2C |
187 | select IMX_HAVE_PLATFORM_IMX_UART | ||
188 | select IMX_HAVE_PLATFORM_MXC_NAND | ||
112 | help | 189 | help |
113 | Include support for i-MXT (aka td60) platform. This | 190 | Include support for i-MXT (aka td60) platform. This |
114 | includes specific configurations for the module and its peripherals. | 191 | includes specific configurations for the module and its peripherals. |
diff --git a/arch/arm/mach-mx2/Makefile b/arch/arm/mach-imx/Makefile index e3254faac828..46a9fdfbbd15 100644 --- a/arch/arm/mach-mx2/Makefile +++ b/arch/arm/mach-imx/Makefile | |||
@@ -4,14 +4,24 @@ | |||
4 | 4 | ||
5 | # Object file lists. | 5 | # Object file lists. |
6 | 6 | ||
7 | obj-y := devices.o serial.o | 7 | obj-y := devices.o |
8 | 8 | ||
9 | obj-$(CONFIG_MACH_MX21) += clock_imx21.o mm-imx21.o | 9 | obj-$(CONFIG_IMX_HAVE_DMA_V1) += dma-v1.o |
10 | 10 | ||
11 | obj-$(CONFIG_MACH_MX27) += cpu_imx27.o | 11 | obj-$(CONFIG_ARCH_MX1) += clock-imx1.o mm-imx1.o |
12 | obj-$(CONFIG_MACH_MX27) += clock_imx27.o mm-imx27.o | 12 | obj-$(CONFIG_MACH_MX21) += clock-imx21.o mm-imx21.o |
13 | |||
14 | obj-$(CONFIG_MACH_MX27) += cpu-imx27.o pm-imx27.o | ||
15 | obj-$(CONFIG_MACH_MX27) += clock-imx27.o mm-imx27.o | ||
16 | |||
17 | # Support for CMOS sensor interface | ||
18 | obj-$(CONFIG_MX1_VIDEO) += mx1-camera-fiq.o mx1-camera-fiq-ksym.o | ||
19 | |||
20 | obj-$(CONFIG_ARCH_MX1ADS) += mach-mx1ads.o | ||
21 | obj-$(CONFIG_MACH_SCB9328) += mach-scb9328.o | ||
13 | 22 | ||
14 | obj-$(CONFIG_MACH_MX21ADS) += mach-mx21ads.o | 23 | obj-$(CONFIG_MACH_MX21ADS) += mach-mx21ads.o |
24 | |||
15 | obj-$(CONFIG_MACH_MX27ADS) += mach-mx27ads.o | 25 | obj-$(CONFIG_MACH_MX27ADS) += mach-mx27ads.o |
16 | obj-$(CONFIG_MACH_PCM038) += mach-pcm038.o | 26 | obj-$(CONFIG_MACH_PCM038) += mach-pcm038.o |
17 | obj-$(CONFIG_MACH_PCM970_BASEBOARD) += pcm970-baseboard.o | 27 | obj-$(CONFIG_MACH_PCM970_BASEBOARD) += pcm970-baseboard.o |
diff --git a/arch/arm/mach-mx2/Makefile.boot b/arch/arm/mach-imx/Makefile.boot index e867398a8fdb..7988a85cf07d 100644 --- a/arch/arm/mach-mx2/Makefile.boot +++ b/arch/arm/mach-imx/Makefile.boot | |||
@@ -1,3 +1,7 @@ | |||
1 | zreladdr-$(CONFIG_ARCH_MX1) := 0x08008000 | ||
2 | params_phys-$(CONFIG_ARCH_MX1) := 0x08000100 | ||
3 | initrd_phys-$(CONFIG_ARCH_MX1) := 0x08800000 | ||
4 | |||
1 | zreladdr-$(CONFIG_MACH_MX21) := 0xC0008000 | 5 | zreladdr-$(CONFIG_MACH_MX21) := 0xC0008000 |
2 | params_phys-$(CONFIG_MACH_MX21) := 0xC0000100 | 6 | params_phys-$(CONFIG_MACH_MX21) := 0xC0000100 |
3 | initrd_phys-$(CONFIG_MACH_MX21) := 0xC0800000 | 7 | initrd_phys-$(CONFIG_MACH_MX21) := 0xC0800000 |
diff --git a/arch/arm/mach-mx1/clock.c b/arch/arm/mach-imx/clock-imx1.c index 6cf2d4a7511d..c05096c38301 100644 --- a/arch/arm/mach-mx1/clock.c +++ b/arch/arm/mach-imx/clock-imx1.c | |||
@@ -2,18 +2,17 @@ | |||
2 | * Copyright (C) 2008 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | 2 | * Copyright (C) 2008 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License version 2 as |
6 | * the Free Software Foundation; either version 2 of the License, or | 6 | * published by the Free Software Foundation. |
7 | * (at your option) any later version. | ||
8 | * | 7 | * |
9 | * This program is distributed in the hope that it will be useful, | 8 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. | 11 | * GNU General Public License for more details. |
13 | * | 12 | * |
14 | * You should have received a copy of the GNU General Public License | 13 | * You should have received a copy of the GNU General Public License along |
15 | * along with this program; if not, write to the Free Software | 14 | * with this program; if not, write to the Free Software Foundation, Inc., |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 15 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. |
17 | */ | 16 | */ |
18 | 17 | ||
19 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
@@ -29,7 +28,41 @@ | |||
29 | #include <mach/clock.h> | 28 | #include <mach/clock.h> |
30 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
31 | #include <mach/common.h> | 30 | #include <mach/common.h> |
32 | #include "crm_regs.h" | 31 | |
32 | #define IO_ADDR_CCM(off) (MX1_IO_ADDRESS(MX1_CCM_BASE_ADDR + (off))) | ||
33 | |||
34 | /* CCM register addresses */ | ||
35 | #define CCM_CSCR IO_ADDR_CCM(0x0) | ||
36 | #define CCM_MPCTL0 IO_ADDR_CCM(0x4) | ||
37 | #define CCM_SPCTL0 IO_ADDR_CCM(0xc) | ||
38 | #define CCM_PCDR IO_ADDR_CCM(0x20) | ||
39 | |||
40 | #define CCM_CSCR_CLKO_OFFSET 29 | ||
41 | #define CCM_CSCR_CLKO_MASK (0x7 << 29) | ||
42 | #define CCM_CSCR_USB_OFFSET 26 | ||
43 | #define CCM_CSCR_USB_MASK (0x7 << 26) | ||
44 | #define CCM_CSCR_OSC_EN_SHIFT 17 | ||
45 | #define CCM_CSCR_SYSTEM_SEL (1 << 16) | ||
46 | #define CCM_CSCR_BCLK_OFFSET 10 | ||
47 | #define CCM_CSCR_BCLK_MASK (0xf << 10) | ||
48 | #define CCM_CSCR_PRESC (1 << 15) | ||
49 | |||
50 | #define CCM_PCDR_PCLK3_OFFSET 16 | ||
51 | #define CCM_PCDR_PCLK3_MASK (0x7f << 16) | ||
52 | #define CCM_PCDR_PCLK2_OFFSET 4 | ||
53 | #define CCM_PCDR_PCLK2_MASK (0xf << 4) | ||
54 | #define CCM_PCDR_PCLK1_OFFSET 0 | ||
55 | #define CCM_PCDR_PCLK1_MASK 0xf | ||
56 | |||
57 | #define IO_ADDR_SCM(off) (MX1_IO_ADDRESS(MX1_SCM_BASE_ADDR + (off))) | ||
58 | |||
59 | /* SCM register addresses */ | ||
60 | #define SCM_GCCR IO_ADDR_SCM(0xc) | ||
61 | |||
62 | #define SCM_GCCR_DMA_CLK_EN_OFFSET 3 | ||
63 | #define SCM_GCCR_CSI_CLK_EN_OFFSET 2 | ||
64 | #define SCM_GCCR_MMA_CLK_EN_OFFSET 1 | ||
65 | #define SCM_GCCR_USBD_CLK_EN_OFFSET 0 | ||
33 | 66 | ||
34 | static int _clk_enable(struct clk *clk) | 67 | static int _clk_enable(struct clk *clk) |
35 | { | 68 | { |
@@ -596,7 +629,8 @@ int __init mx1_clocks_init(unsigned long fref) | |||
596 | clk_enable(&hclk); | 629 | clk_enable(&hclk); |
597 | clk_enable(&fclk); | 630 | clk_enable(&fclk); |
598 | 631 | ||
599 | mxc_timer_init(&gpt_clk, IO_ADDRESS(TIM1_BASE_ADDR), TIM1_INT); | 632 | mxc_timer_init(&gpt_clk, MX1_IO_ADDRESS(MX1_TIM1_BASE_ADDR), |
633 | MX1_TIM1_INT); | ||
600 | 634 | ||
601 | return 0; | 635 | return 0; |
602 | } | 636 | } |
diff --git a/arch/arm/mach-mx2/clock_imx21.c b/arch/arm/mach-imx/clock-imx21.c index bb419ef4d133..bb419ef4d133 100644 --- a/arch/arm/mach-mx2/clock_imx21.c +++ b/arch/arm/mach-imx/clock-imx21.c | |||
diff --git a/arch/arm/mach-mx2/clock_imx27.c b/arch/arm/mach-imx/clock-imx27.c index 0f0823c8b170..5a1aa15c8a16 100644 --- a/arch/arm/mach-mx2/clock_imx27.c +++ b/arch/arm/mach-imx/clock-imx27.c | |||
@@ -644,7 +644,7 @@ static struct clk_lookup lookups[] = { | |||
644 | _REGISTER_CLOCK("spi_imx.1", NULL, cspi2_clk) | 644 | _REGISTER_CLOCK("spi_imx.1", NULL, cspi2_clk) |
645 | _REGISTER_CLOCK("spi_imx.2", NULL, cspi3_clk) | 645 | _REGISTER_CLOCK("spi_imx.2", NULL, cspi3_clk) |
646 | _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) | 646 | _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) |
647 | _REGISTER_CLOCK(NULL, "csi", csi_clk) | 647 | _REGISTER_CLOCK("mx2-camera.0", NULL, csi_clk) |
648 | _REGISTER_CLOCK("fsl-usb2-udc", "usb", usb_clk) | 648 | _REGISTER_CLOCK("fsl-usb2-udc", "usb", usb_clk) |
649 | _REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", usb_clk1) | 649 | _REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", usb_clk1) |
650 | _REGISTER_CLOCK("mxc-ehci.0", "usb", usb_clk) | 650 | _REGISTER_CLOCK("mxc-ehci.0", "usb", usb_clk) |
diff --git a/arch/arm/mach-mx2/cpu_imx27.c b/arch/arm/mach-imx/cpu-imx27.c index d8d3b2d84dc5..d8d3b2d84dc5 100644 --- a/arch/arm/mach-mx2/cpu_imx27.c +++ b/arch/arm/mach-imx/cpu-imx27.c | |||
diff --git a/arch/arm/mach-imx/devices-imx1.h b/arch/arm/mach-imx/devices-imx1.h new file mode 100644 index 000000000000..a8d94f078196 --- /dev/null +++ b/arch/arm/mach-imx/devices-imx1.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <mach/mx1.h> | ||
10 | #include <mach/devices-common.h> | ||
11 | |||
12 | #define imx1_add_i2c_imx(pdata) \ | ||
13 | imx_add_imx_i2c(0, MX1_I2C_BASE_ADDR, SZ_4K, MX1_INT_I2C, pdata) | ||
14 | |||
15 | #define imx1_add_imx_uart0(pdata) \ | ||
16 | imx_add_imx_uart_3irq(0, MX1_UART1_BASE_ADDR, 0xd0, MX1_INT_UART1RX, MX1_INT_UART1TX, MX1_INT_UART1RTS, pdata) | ||
17 | #define imx1_add_imx_uart1(pdata) \ | ||
18 | imx_add_imx_uart_3irq(0, MX1_UART2_BASE_ADDR, 0xd0, MX1_INT_UART2RX, MX1_INT_UART2TX, MX1_INT_UART2RTS, pdata) | ||
diff --git a/arch/arm/mach-imx/devices-imx21.h b/arch/arm/mach-imx/devices-imx21.h new file mode 100644 index 000000000000..42788e99d127 --- /dev/null +++ b/arch/arm/mach-imx/devices-imx21.h | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <mach/mx21.h> | ||
10 | #include <mach/devices-common.h> | ||
11 | |||
12 | #define imx21_add_i2c_imx(pdata) \ | ||
13 | imx_add_imx_i2c(0, MX2x_I2C_BASE_ADDR, SZ_4K, MX2x_INT_I2C, pdata) | ||
14 | |||
15 | #define imx21_add_imx_uart0(pdata) \ | ||
16 | imx_add_imx_uart_1irq(0, MX21_UART1_BASE_ADDR, SZ_4K, MX21_INT_UART1, pdata) | ||
17 | #define imx21_add_imx_uart1(pdata) \ | ||
18 | imx_add_imx_uart_1irq(1, MX21_UART2_BASE_ADDR, SZ_4K, MX21_INT_UART2, pdata) | ||
19 | #define imx21_add_imx_uart2(pdata) \ | ||
20 | imx_add_imx_uart_1irq(2, MX21_UART3_BASE_ADDR, SZ_4K, MX21_INT_UART3, pdata) | ||
21 | #define imx21_add_imx_uart3(pdata) \ | ||
22 | imx_add_imx_uart_1irq(3, MX21_UART4_BASE_ADDR, SZ_4K, MX21_INT_UART4, pdata) | ||
23 | |||
24 | #define imx21_add_mxc_nand(pdata) \ | ||
25 | imx_add_mxc_nand_v1(MX21_NFC_BASE_ADDR, MX21_INT_NANDFC, pdata) | ||
26 | |||
27 | #define imx21_add_spi_imx0(pdata) \ | ||
28 | imx_add_spi_imx(0, MX21_CSPI1_BASE_ADDR, SZ_4K, MX21_INT_CSPI1, pdata) | ||
29 | #define imx21_add_spi_imx1(pdata) \ | ||
30 | imx_add_spi_imx(1, MX21_CSPI2_BASE_ADDR, SZ_4K, MX21_INT_CSPI2, pdata) | ||
diff --git a/arch/arm/mach-imx/devices-imx27.h b/arch/arm/mach-imx/devices-imx27.h new file mode 100644 index 000000000000..65e7bb7ec2e8 --- /dev/null +++ b/arch/arm/mach-imx/devices-imx27.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <mach/mx27.h> | ||
10 | #include <mach/devices-common.h> | ||
11 | |||
12 | #define imx27_add_i2c_imx0(pdata) \ | ||
13 | imx_add_imx_i2c(0, MX27_I2C1_BASE_ADDR, SZ_4K, MX27_INT_I2C1, pdata) | ||
14 | #define imx27_add_i2c_imx1(pdata) \ | ||
15 | imx_add_imx_i2c(1, MX27_I2C2_BASE_ADDR, SZ_4K, MX27_INT_I2C2, pdata) | ||
16 | |||
17 | #define imx27_add_imx_uart0(pdata) \ | ||
18 | imx_add_imx_uart_1irq(0, MX27_UART1_BASE_ADDR, SZ_4K, MX27_INT_UART1, pdata) | ||
19 | #define imx27_add_imx_uart1(pdata) \ | ||
20 | imx_add_imx_uart_1irq(1, MX27_UART2_BASE_ADDR, SZ_4K, MX27_INT_UART2, pdata) | ||
21 | #define imx27_add_imx_uart2(pdata) \ | ||
22 | imx_add_imx_uart_1irq(2, MX27_UART3_BASE_ADDR, SZ_4K, MX27_INT_UART3, pdata) | ||
23 | #define imx27_add_imx_uart3(pdata) \ | ||
24 | imx_add_imx_uart_1irq(3, MX27_UART4_BASE_ADDR, SZ_4K, MX27_INT_UART4, pdata) | ||
25 | #define imx27_add_imx_uart4(pdata) \ | ||
26 | imx_add_imx_uart_1irq(4, MX27_UART5_BASE_ADDR, SZ_4K, MX27_INT_UART5, pdata) | ||
27 | #define imx27_add_imx_uart5(pdata) \ | ||
28 | imx_add_imx_uart_1irq(5, MX27_UART6_BASE_ADDR, SZ_4K, MX27_INT_UART6, pdata) | ||
29 | |||
30 | #define imx27_add_mxc_nand(pdata) \ | ||
31 | imx_add_mxc_nand_v1(MX27_NFC_BASE_ADDR, MX27_INT_NANDFC, pdata) | ||
32 | |||
33 | #define imx27_add_spi_imx0(pdata) \ | ||
34 | imx_add_spi_imx(0, MX27_CSPI1_BASE_ADDR, SZ_4K, MX27_INT_CSPI1, pdata) | ||
35 | #define imx27_add_spi_imx1(pdata) \ | ||
36 | imx_add_spi_imx(1, MX27_CSPI2_BASE_ADDR, SZ_4K, MX27_INT_CSPI2, pdata) | ||
37 | #define imx27_add_spi_imx2(pdata) \ | ||
38 | imx_add_spi_imx(2, MX27_CSPI3_BASE_ADDR, SZ_4K, MX27_INT_CSPI3, pdata) | ||
diff --git a/arch/arm/mach-mx2/devices.c b/arch/arm/mach-imx/devices.c index a0aeb8a4adc1..9c271a752b84 100644 --- a/arch/arm/mach-mx2/devices.c +++ b/arch/arm/mach-imx/devices.c | |||
@@ -11,6 +11,9 @@ | |||
11 | * | 11 | * |
12 | * Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved. | 12 | * Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved. |
13 | * Copyright 2008 Juergen Beisert, kernel@pengutronix.de | 13 | * Copyright 2008 Juergen Beisert, kernel@pengutronix.de |
14 | * Copyright 2008 Sascha Hauer, kernel@pengutronix.de | ||
15 | * Copyright (c) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt> | ||
16 | * Copyright (c) 2008 Darius Augulis <darius.augulis@teltonika.lt> | ||
14 | * | 17 | * |
15 | * This program is free software; you can redistribute it and/or | 18 | * This program is free software; you can redistribute it and/or |
16 | * modify it under the terms of the GNU General Public License | 19 | * modify it under the terms of the GNU General Public License |
@@ -32,6 +35,7 @@ | |||
32 | #include <linux/platform_device.h> | 35 | #include <linux/platform_device.h> |
33 | #include <linux/gpio.h> | 36 | #include <linux/gpio.h> |
34 | #include <linux/dma-mapping.h> | 37 | #include <linux/dma-mapping.h> |
38 | #include <linux/serial.h> | ||
35 | 39 | ||
36 | #include <mach/irqs.h> | 40 | #include <mach/irqs.h> |
37 | #include <mach/hardware.h> | 41 | #include <mach/hardware.h> |
@@ -40,38 +44,179 @@ | |||
40 | 44 | ||
41 | #include "devices.h" | 45 | #include "devices.h" |
42 | 46 | ||
43 | /* | 47 | #if defined(CONFIG_ARCH_MX1) |
44 | * SPI master controller | 48 | static struct resource imx1_camera_resources[] = { |
45 | * | 49 | { |
46 | * - i.MX1: 2 channel (slighly different register setting) | 50 | .start = 0x00224000, |
47 | * - i.MX21: 2 channel | 51 | .end = 0x00224010, |
48 | * - i.MX27: 3 channel | 52 | .flags = IORESOURCE_MEM, |
49 | */ | 53 | }, { |
50 | #define DEFINE_IMX_SPI_DEVICE(n, baseaddr, irq) \ | 54 | .start = MX1_CSI_INT, |
51 | static struct resource mxc_spi_resources ## n[] = { \ | 55 | .end = MX1_CSI_INT, |
52 | { \ | 56 | .flags = IORESOURCE_IRQ, |
53 | .start = baseaddr, \ | 57 | }, |
54 | .end = baseaddr + SZ_4K - 1, \ | 58 | }; |
55 | .flags = IORESOURCE_MEM, \ | 59 | |
56 | }, { \ | 60 | static u64 imx1_camera_dmamask = DMA_BIT_MASK(32); |
57 | .start = irq, \ | 61 | |
58 | .end = irq, \ | 62 | struct platform_device imx1_camera_device = { |
59 | .flags = IORESOURCE_IRQ, \ | 63 | .name = "mx1-camera", |
60 | }, \ | 64 | .id = 0, /* This is used to put cameras on this interface */ |
61 | }; \ | 65 | .dev = { |
62 | \ | 66 | .dma_mask = &imx1_camera_dmamask, |
63 | struct platform_device mxc_spi_device ## n = { \ | 67 | .coherent_dma_mask = DMA_BIT_MASK(32), |
64 | .name = "spi_imx", \ | 68 | }, |
65 | .id = n, \ | 69 | .resource = imx1_camera_resources, |
66 | .num_resources = ARRAY_SIZE(mxc_spi_resources ## n), \ | 70 | .num_resources = ARRAY_SIZE(imx1_camera_resources), |
67 | .resource = mxc_spi_resources ## n, \ | 71 | }; |
72 | |||
73 | static struct resource imx_rtc_resources[] = { | ||
74 | { | ||
75 | .start = 0x00204000, | ||
76 | .end = 0x00204024, | ||
77 | .flags = IORESOURCE_MEM, | ||
78 | }, { | ||
79 | .start = MX1_RTC_INT, | ||
80 | .end = MX1_RTC_INT, | ||
81 | .flags = IORESOURCE_IRQ, | ||
82 | }, { | ||
83 | .start = MX1_RTC_SAMINT, | ||
84 | .end = MX1_RTC_SAMINT, | ||
85 | .flags = IORESOURCE_IRQ, | ||
86 | }, | ||
87 | }; | ||
88 | |||
89 | struct platform_device imx_rtc_device = { | ||
90 | .name = "rtc-imx", | ||
91 | .id = 0, | ||
92 | .resource = imx_rtc_resources, | ||
93 | .num_resources = ARRAY_SIZE(imx_rtc_resources), | ||
94 | }; | ||
95 | |||
96 | static struct resource imx_wdt_resources[] = { | ||
97 | { | ||
98 | .start = 0x00201000, | ||
99 | .end = 0x00201008, | ||
100 | .flags = IORESOURCE_MEM, | ||
101 | }, { | ||
102 | .start = MX1_WDT_INT, | ||
103 | .end = MX1_WDT_INT, | ||
104 | .flags = IORESOURCE_IRQ, | ||
105 | }, | ||
106 | }; | ||
107 | |||
108 | struct platform_device imx_wdt_device = { | ||
109 | .name = "imx-wdt", | ||
110 | .id = 0, | ||
111 | .resource = imx_wdt_resources, | ||
112 | .num_resources = ARRAY_SIZE(imx_wdt_resources), | ||
113 | }; | ||
114 | |||
115 | static struct resource imx_usb_resources[] = { | ||
116 | { | ||
117 | .start = 0x00212000, | ||
118 | .end = 0x00212148, | ||
119 | .flags = IORESOURCE_MEM, | ||
120 | }, { | ||
121 | .start = MX1_USBD_INT0, | ||
122 | .end = MX1_USBD_INT0, | ||
123 | .flags = IORESOURCE_IRQ, | ||
124 | }, { | ||
125 | .start = MX1_USBD_INT1, | ||
126 | .end = MX1_USBD_INT1, | ||
127 | .flags = IORESOURCE_IRQ, | ||
128 | }, { | ||
129 | .start = MX1_USBD_INT2, | ||
130 | .end = MX1_USBD_INT2, | ||
131 | .flags = IORESOURCE_IRQ, | ||
132 | }, { | ||
133 | .start = MX1_USBD_INT3, | ||
134 | .end = MX1_USBD_INT3, | ||
135 | .flags = IORESOURCE_IRQ, | ||
136 | }, { | ||
137 | .start = MX1_USBD_INT4, | ||
138 | .end = MX1_USBD_INT4, | ||
139 | .flags = IORESOURCE_IRQ, | ||
140 | }, { | ||
141 | .start = MX1_USBD_INT5, | ||
142 | .end = MX1_USBD_INT5, | ||
143 | .flags = IORESOURCE_IRQ, | ||
144 | }, { | ||
145 | .start = MX1_USBD_INT6, | ||
146 | .end = MX1_USBD_INT6, | ||
147 | .flags = IORESOURCE_IRQ, | ||
148 | }, | ||
149 | }; | ||
150 | |||
151 | struct platform_device imx_usb_device = { | ||
152 | .name = "imx_udc", | ||
153 | .id = 0, | ||
154 | .num_resources = ARRAY_SIZE(imx_usb_resources), | ||
155 | .resource = imx_usb_resources, | ||
156 | }; | ||
157 | |||
158 | /* GPIO port description */ | ||
159 | static struct mxc_gpio_port imx_gpio_ports[] = { | ||
160 | { | ||
161 | .chip.label = "gpio-0", | ||
162 | .base = (void __iomem *)MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR), | ||
163 | .irq = MX1_GPIO_INT_PORTA, | ||
164 | .virtual_irq_start = MXC_GPIO_IRQ_START, | ||
165 | }, { | ||
166 | .chip.label = "gpio-1", | ||
167 | .base = (void __iomem *)MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR + 0x100), | ||
168 | .irq = MX1_GPIO_INT_PORTB, | ||
169 | .virtual_irq_start = MXC_GPIO_IRQ_START + 32, | ||
170 | }, { | ||
171 | .chip.label = "gpio-2", | ||
172 | .base = (void __iomem *)MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR + 0x200), | ||
173 | .irq = MX1_GPIO_INT_PORTC, | ||
174 | .virtual_irq_start = MXC_GPIO_IRQ_START + 64, | ||
175 | }, { | ||
176 | .chip.label = "gpio-3", | ||
177 | .base = (void __iomem *)MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR + 0x300), | ||
178 | .irq = MX1_GPIO_INT_PORTD, | ||
179 | .virtual_irq_start = MXC_GPIO_IRQ_START + 96, | ||
68 | } | 180 | } |
181 | }; | ||
182 | |||
183 | int __init imx1_register_gpios(void) | ||
184 | { | ||
185 | return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); | ||
186 | } | ||
187 | #endif | ||
69 | 188 | ||
70 | DEFINE_IMX_SPI_DEVICE(0, MX2x_CSPI1_BASE_ADDR, MX2x_INT_CSPI1); | 189 | #if defined(CONFIG_MACH_MX21) || defined(CONFIG_MACH_MX27) |
71 | DEFINE_IMX_SPI_DEVICE(1, MX2x_CSPI2_BASE_ADDR, MX2x_INT_CSPI2); | ||
72 | 190 | ||
73 | #ifdef CONFIG_MACH_MX27 | 191 | #ifdef CONFIG_MACH_MX27 |
74 | DEFINE_IMX_SPI_DEVICE(2, MX27_CSPI3_BASE_ADDR, MX27_INT_CSPI3); | 192 | static struct resource mx27_camera_resources[] = { |
193 | { | ||
194 | .start = MX27_CSI_BASE_ADDR, | ||
195 | .end = MX27_CSI_BASE_ADDR + 0x1f, | ||
196 | .flags = IORESOURCE_MEM, | ||
197 | }, { | ||
198 | .start = MX27_EMMA_PRP_BASE_ADDR, | ||
199 | .end = MX27_EMMA_PRP_BASE_ADDR + 0x1f, | ||
200 | .flags = IORESOURCE_MEM, | ||
201 | }, { | ||
202 | .start = MX27_INT_CSI, | ||
203 | .end = MX27_INT_CSI, | ||
204 | .flags = IORESOURCE_IRQ, | ||
205 | },{ | ||
206 | .start = MX27_INT_EMMAPRP, | ||
207 | .end = MX27_INT_EMMAPRP, | ||
208 | .flags = IORESOURCE_IRQ, | ||
209 | }, | ||
210 | }; | ||
211 | struct platform_device mx27_camera_device = { | ||
212 | .name = "mx2-camera", | ||
213 | .id = 0, | ||
214 | .num_resources = ARRAY_SIZE(mx27_camera_resources), | ||
215 | .resource = mx27_camera_resources, | ||
216 | .dev = { | ||
217 | .coherent_dma_mask = 0xffffffff, | ||
218 | }, | ||
219 | }; | ||
75 | #endif | 220 | #endif |
76 | 221 | ||
77 | /* | 222 | /* |
@@ -140,34 +285,6 @@ struct platform_device mxc_w1_master_device = { | |||
140 | .resource = mxc_w1_master_resources, | 285 | .resource = mxc_w1_master_resources, |
141 | }; | 286 | }; |
142 | 287 | ||
143 | #define DEFINE_MXC_NAND_DEVICE(pfx, baseaddr, irq) \ | ||
144 | static struct resource pfx ## _nand_resources[] = { \ | ||
145 | { \ | ||
146 | .start = baseaddr, \ | ||
147 | .end = baseaddr + SZ_4K - 1, \ | ||
148 | .flags = IORESOURCE_MEM, \ | ||
149 | }, { \ | ||
150 | .start = irq, \ | ||
151 | .end = irq, \ | ||
152 | .flags = IORESOURCE_IRQ, \ | ||
153 | }, \ | ||
154 | }; \ | ||
155 | \ | ||
156 | struct platform_device pfx ## _nand_device = { \ | ||
157 | .name = "mxc_nand", \ | ||
158 | .id = 0, \ | ||
159 | .num_resources = ARRAY_SIZE(pfx ## _nand_resources), \ | ||
160 | .resource = pfx ## _nand_resources, \ | ||
161 | } | ||
162 | |||
163 | #ifdef CONFIG_MACH_MX21 | ||
164 | DEFINE_MXC_NAND_DEVICE(imx21, MX21_NFC_BASE_ADDR, MX21_INT_NANDFC); | ||
165 | #endif | ||
166 | |||
167 | #ifdef CONFIG_MACH_MX27 | ||
168 | DEFINE_MXC_NAND_DEVICE(imx27, MX27_NFC_BASE_ADDR, MX27_INT_NANDFC); | ||
169 | #endif | ||
170 | |||
171 | /* | 288 | /* |
172 | * lcdc: | 289 | * lcdc: |
173 | * - i.MX1: the basic controller | 290 | * - i.MX1: the basic controller |
@@ -218,32 +335,6 @@ struct platform_device mxc_fec_device = { | |||
218 | }; | 335 | }; |
219 | #endif | 336 | #endif |
220 | 337 | ||
221 | #define DEFINE_IMX_I2C_DEVICE(n, baseaddr, irq) \ | ||
222 | static struct resource mxc_i2c_resources ## n[] = { \ | ||
223 | { \ | ||
224 | .start = baseaddr, \ | ||
225 | .end = baseaddr + SZ_4K - 1, \ | ||
226 | .flags = IORESOURCE_MEM, \ | ||
227 | }, { \ | ||
228 | .start = irq, \ | ||
229 | .end = irq, \ | ||
230 | .flags = IORESOURCE_IRQ, \ | ||
231 | } \ | ||
232 | }; \ | ||
233 | \ | ||
234 | struct platform_device mxc_i2c_device ## n = { \ | ||
235 | .name = "imx-i2c", \ | ||
236 | .id = n, \ | ||
237 | .num_resources = ARRAY_SIZE(mxc_i2c_resources ## n), \ | ||
238 | .resource = mxc_i2c_resources ## n, \ | ||
239 | } | ||
240 | |||
241 | DEFINE_IMX_I2C_DEVICE(0, MX2x_I2C_BASE_ADDR, MX2x_INT_I2C); | ||
242 | |||
243 | #ifdef CONFIG_MACH_MX27 | ||
244 | DEFINE_IMX_I2C_DEVICE(1, MX27_I2C2_BASE_ADDR, MX27_INT_I2C2); | ||
245 | #endif | ||
246 | |||
247 | static struct resource mxc_pwm_resources[] = { | 338 | static struct resource mxc_pwm_resources[] = { |
248 | { | 339 | { |
249 | .start = MX2x_PWM_BASE_ADDR, | 340 | .start = MX2x_PWM_BASE_ADDR, |
@@ -454,26 +545,21 @@ DEFINE_IMX_SSI_DEVICE(1, 2, MX2x_SSI1_BASE_ADDR, MX2x_INT_SSI1); | |||
454 | 545 | ||
455 | #ifdef CONFIG_MACH_MX21 | 546 | #ifdef CONFIG_MACH_MX21 |
456 | DEFINE_MXC_GPIO_PORTS(MX21, imx21); | 547 | DEFINE_MXC_GPIO_PORTS(MX21, imx21); |
548 | |||
549 | int __init imx21_register_gpios(void) | ||
550 | { | ||
551 | return mxc_gpio_init(imx21_gpio_ports, ARRAY_SIZE(imx21_gpio_ports)); | ||
552 | } | ||
457 | #endif | 553 | #endif |
458 | 554 | ||
459 | #ifdef CONFIG_MACH_MX27 | 555 | #ifdef CONFIG_MACH_MX27 |
460 | DEFINE_MXC_GPIO_PORTS(MX27, imx27); | 556 | DEFINE_MXC_GPIO_PORTS(MX27, imx27); |
461 | #endif | ||
462 | 557 | ||
463 | int __init mxc_register_gpios(void) | 558 | int __init imx27_register_gpios(void) |
464 | { | 559 | { |
465 | #ifdef CONFIG_MACH_MX21 | 560 | return mxc_gpio_init(imx27_gpio_ports, ARRAY_SIZE(imx27_gpio_ports)); |
466 | if (cpu_is_mx21()) | ||
467 | return mxc_gpio_init(imx21_gpio_ports, ARRAY_SIZE(imx21_gpio_ports)); | ||
468 | else | ||
469 | #endif | ||
470 | #ifdef CONFIG_MACH_MX27 | ||
471 | if (cpu_is_mx27()) | ||
472 | return mxc_gpio_init(imx27_gpio_ports, ARRAY_SIZE(imx27_gpio_ports)); | ||
473 | else | ||
474 | #endif | ||
475 | return 0; | ||
476 | } | 561 | } |
562 | #endif | ||
477 | 563 | ||
478 | #ifdef CONFIG_MACH_MX21 | 564 | #ifdef CONFIG_MACH_MX21 |
479 | static struct resource mx21_usbhc_resources[] = { | 565 | static struct resource mx21_usbhc_resources[] = { |
@@ -501,3 +587,23 @@ struct platform_device mx21_usbhc_device = { | |||
501 | }; | 587 | }; |
502 | #endif | 588 | #endif |
503 | 589 | ||
590 | static struct resource imx_kpp_resources[] = { | ||
591 | { | ||
592 | .start = MX2x_KPP_BASE_ADDR, | ||
593 | .end = MX2x_KPP_BASE_ADDR + 0xf, | ||
594 | .flags = IORESOURCE_MEM | ||
595 | }, { | ||
596 | .start = MX2x_INT_KPP, | ||
597 | .end = MX2x_INT_KPP, | ||
598 | .flags = IORESOURCE_IRQ, | ||
599 | }, | ||
600 | }; | ||
601 | |||
602 | struct platform_device imx_kpp_device = { | ||
603 | .name = "imx-keypad", | ||
604 | .id = -1, | ||
605 | .num_resources = ARRAY_SIZE(imx_kpp_resources), | ||
606 | .resource = imx_kpp_resources, | ||
607 | }; | ||
608 | |||
609 | #endif | ||
diff --git a/arch/arm/mach-mx2/devices.h b/arch/arm/mach-imx/devices.h index 84ed51380174..efd4527506a5 100644 --- a/arch/arm/mach-mx2/devices.h +++ b/arch/arm/mach-imx/devices.h | |||
@@ -1,3 +1,11 @@ | |||
1 | #ifdef CONFIG_ARCH_MX1 | ||
2 | extern struct platform_device imx1_camera_device; | ||
3 | extern struct platform_device imx_rtc_device; | ||
4 | extern struct platform_device imx_wdt_device; | ||
5 | extern struct platform_device imx_usb_device; | ||
6 | #endif | ||
7 | |||
8 | #if defined(CONFIG_MACH_MX21) || defined(CONFIG_MACH_MX27) | ||
1 | extern struct platform_device mxc_gpt1; | 9 | extern struct platform_device mxc_gpt1; |
2 | extern struct platform_device mxc_gpt2; | 10 | extern struct platform_device mxc_gpt2; |
3 | #ifdef CONFIG_MACH_MX27 | 11 | #ifdef CONFIG_MACH_MX27 |
@@ -6,37 +14,19 @@ extern struct platform_device mxc_gpt4; | |||
6 | extern struct platform_device mxc_gpt5; | 14 | extern struct platform_device mxc_gpt5; |
7 | #endif | 15 | #endif |
8 | extern struct platform_device mxc_wdt; | 16 | extern struct platform_device mxc_wdt; |
9 | extern struct platform_device mxc_uart_device0; | ||
10 | extern struct platform_device mxc_uart_device1; | ||
11 | extern struct platform_device mxc_uart_device2; | ||
12 | extern struct platform_device mxc_uart_device3; | ||
13 | extern struct platform_device mxc_uart_device4; | ||
14 | extern struct platform_device mxc_uart_device5; | ||
15 | extern struct platform_device mxc_w1_master_device; | 17 | extern struct platform_device mxc_w1_master_device; |
16 | #ifdef CONFIG_MACH_MX21 | ||
17 | extern struct platform_device imx21_nand_device; | ||
18 | #endif | ||
19 | #ifdef CONFIG_MACH_MX27 | ||
20 | extern struct platform_device imx27_nand_device; | ||
21 | #endif | ||
22 | extern struct platform_device mxc_fb_device; | 18 | extern struct platform_device mxc_fb_device; |
23 | extern struct platform_device mxc_fec_device; | 19 | extern struct platform_device mxc_fec_device; |
24 | extern struct platform_device mxc_pwm_device; | 20 | extern struct platform_device mxc_pwm_device; |
25 | extern struct platform_device mxc_i2c_device0; | ||
26 | #ifdef CONFIG_MACH_MX27 | ||
27 | extern struct platform_device mxc_i2c_device1; | ||
28 | #endif | ||
29 | extern struct platform_device mxc_sdhc_device0; | 21 | extern struct platform_device mxc_sdhc_device0; |
30 | extern struct platform_device mxc_sdhc_device1; | 22 | extern struct platform_device mxc_sdhc_device1; |
31 | extern struct platform_device mxc_otg_udc_device; | 23 | extern struct platform_device mxc_otg_udc_device; |
24 | extern struct platform_device mx27_camera_device; | ||
32 | extern struct platform_device mxc_otg_host; | 25 | extern struct platform_device mxc_otg_host; |
33 | extern struct platform_device mxc_usbh1; | 26 | extern struct platform_device mxc_usbh1; |
34 | extern struct platform_device mxc_usbh2; | 27 | extern struct platform_device mxc_usbh2; |
35 | extern struct platform_device mxc_spi_device0; | ||
36 | extern struct platform_device mxc_spi_device1; | ||
37 | #ifdef CONFIG_MACH_MX27 | ||
38 | extern struct platform_device mxc_spi_device2; | ||
39 | #endif | ||
40 | extern struct platform_device mx21_usbhc_device; | 28 | extern struct platform_device mx21_usbhc_device; |
41 | extern struct platform_device imx_ssi_device0; | 29 | extern struct platform_device imx_ssi_device0; |
42 | extern struct platform_device imx_ssi_device1; | 30 | extern struct platform_device imx_ssi_device1; |
31 | extern struct platform_device imx_kpp_device; | ||
32 | #endif | ||
diff --git a/arch/arm/plat-mxc/dma-mx1-mx2.c b/arch/arm/mach-imx/dma-v1.c index e16014b0d13c..fd1d9197d06e 100644 --- a/arch/arm/plat-mxc/dma-mx1-mx2.c +++ b/arch/arm/mach-imx/dma-v1.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/arm/plat-mxc/dma-mx1-mx2.c | 2 | * linux/arch/arm/plat-mxc/dma-v1.c |
3 | * | 3 | * |
4 | * i.MX DMA registration and IRQ dispatching | 4 | * i.MX DMA registration and IRQ dispatching |
5 | * | 5 | * |
@@ -34,7 +34,7 @@ | |||
34 | #include <asm/system.h> | 34 | #include <asm/system.h> |
35 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
36 | #include <mach/hardware.h> | 36 | #include <mach/hardware.h> |
37 | #include <mach/dma-mx1-mx2.h> | 37 | #include <mach/dma-v1.h> |
38 | 38 | ||
39 | #define DMA_DCR 0x00 /* Control Register */ | 39 | #define DMA_DCR 0x00 /* Control Register */ |
40 | #define DMA_DISR 0x04 /* Interrupt status Register */ | 40 | #define DMA_DISR 0x04 /* Interrupt status Register */ |
diff --git a/arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c index f3b169d5245f..4edc5f439201 100644 --- a/arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c +++ b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2009 Eric Benard - eric@eukrea.com | 2 | * Copyright (C) 2009-2010 Eric Benard - eric@eukrea.com |
3 | * | 3 | * |
4 | * Based on pcm970-baseboard.c which is : | 4 | * Based on pcm970-baseboard.c which is : |
5 | * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de) | 5 | * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de) |
@@ -24,6 +24,9 @@ | |||
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/spi/spi.h> | 25 | #include <linux/spi/spi.h> |
26 | #include <linux/spi/ads7846.h> | 26 | #include <linux/spi/ads7846.h> |
27 | #include <linux/backlight.h> | ||
28 | #include <video/platform_lcd.h> | ||
29 | #include <linux/input/matrix_keypad.h> | ||
27 | 30 | ||
28 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
29 | 32 | ||
@@ -32,8 +35,11 @@ | |||
32 | #include <mach/imxfb.h> | 35 | #include <mach/imxfb.h> |
33 | #include <mach/hardware.h> | 36 | #include <mach/hardware.h> |
34 | #include <mach/mmc.h> | 37 | #include <mach/mmc.h> |
35 | #include <mach/imx-uart.h> | 38 | #include <mach/spi.h> |
39 | #include <mach/ssi.h> | ||
40 | #include <mach/audmux.h> | ||
36 | 41 | ||
42 | #include "devices-imx27.h" | ||
37 | #include "devices.h" | 43 | #include "devices.h" |
38 | 44 | ||
39 | static int eukrea_mbimx27_pins[] = { | 45 | static int eukrea_mbimx27_pins[] = { |
@@ -48,10 +54,12 @@ static int eukrea_mbimx27_pins[] = { | |||
48 | PE10_PF_UART3_CTS, | 54 | PE10_PF_UART3_CTS, |
49 | PE11_PF_UART3_RTS, | 55 | PE11_PF_UART3_RTS, |
50 | /* UART4 */ | 56 | /* UART4 */ |
57 | #if !defined(MACH_EUKREA_CPUIMX27_USEUART4) | ||
51 | PB26_AF_UART4_RTS, | 58 | PB26_AF_UART4_RTS, |
52 | PB28_AF_UART4_TXD, | 59 | PB28_AF_UART4_TXD, |
53 | PB29_AF_UART4_CTS, | 60 | PB29_AF_UART4_CTS, |
54 | PB31_AF_UART4_RXD, | 61 | PB31_AF_UART4_RXD, |
62 | #endif | ||
55 | /* SDHC1*/ | 63 | /* SDHC1*/ |
56 | PE18_PF_SD1_D0, | 64 | PE18_PF_SD1_D0, |
57 | PE19_PF_SD1_D1, | 65 | PE19_PF_SD1_D1, |
@@ -84,10 +92,29 @@ static int eukrea_mbimx27_pins[] = { | |||
84 | PA30_PF_CONTRAST, | 92 | PA30_PF_CONTRAST, |
85 | PA31_PF_OE_ACD, | 93 | PA31_PF_OE_ACD, |
86 | /* SPI1 */ | 94 | /* SPI1 */ |
87 | PD28_PF_CSPI1_SS0, | ||
88 | PD29_PF_CSPI1_SCLK, | 95 | PD29_PF_CSPI1_SCLK, |
89 | PD30_PF_CSPI1_MISO, | 96 | PD30_PF_CSPI1_MISO, |
90 | PD31_PF_CSPI1_MOSI, | 97 | PD31_PF_CSPI1_MOSI, |
98 | /* SSI4 */ | ||
99 | #if defined(CONFIG_SND_SOC_EUKREA_TLV320) \ | ||
100 | || defined(CONFIG_SND_SOC_EUKREA_TLV320_MODULE) | ||
101 | PC16_PF_SSI4_FS, | ||
102 | PC17_PF_SSI4_RXD | GPIO_PUEN, | ||
103 | PC18_PF_SSI4_TXD | GPIO_PUEN, | ||
104 | PC19_PF_SSI4_CLK, | ||
105 | #endif | ||
106 | }; | ||
107 | |||
108 | static const uint32_t eukrea_mbimx27_keymap[] = { | ||
109 | KEY(0, 0, KEY_UP), | ||
110 | KEY(0, 1, KEY_DOWN), | ||
111 | KEY(1, 0, KEY_RIGHT), | ||
112 | KEY(1, 1, KEY_LEFT), | ||
113 | }; | ||
114 | |||
115 | static struct matrix_keymap_data eukrea_mbimx27_keymap_data = { | ||
116 | .keymap = eukrea_mbimx27_keymap, | ||
117 | .keymap_size = ARRAY_SIZE(eukrea_mbimx27_keymap), | ||
91 | }; | 118 | }; |
92 | 119 | ||
93 | static struct gpio_led gpio_leds[] = { | 120 | static struct gpio_led gpio_leds[] = { |
@@ -103,12 +130,6 @@ static struct gpio_led gpio_leds[] = { | |||
103 | .active_low = 1, | 130 | .active_low = 1, |
104 | .gpio = GPIO_PORTF | 19, | 131 | .gpio = GPIO_PORTF | 19, |
105 | }, | 132 | }, |
106 | { | ||
107 | .name = "backlight", | ||
108 | .default_trigger = "backlight", | ||
109 | .active_low = 0, | ||
110 | .gpio = GPIO_PORTE | 5, | ||
111 | }, | ||
112 | }; | 133 | }; |
113 | 134 | ||
114 | static struct gpio_led_platform_data gpio_led_info = { | 135 | static struct gpio_led_platform_data gpio_led_info = { |
@@ -127,7 +148,7 @@ static struct platform_device leds_gpio = { | |||
127 | static struct imx_fb_videomode eukrea_mbimx27_modes[] = { | 148 | static struct imx_fb_videomode eukrea_mbimx27_modes[] = { |
128 | { | 149 | { |
129 | .mode = { | 150 | .mode = { |
130 | .name = "CMO-QGVA", | 151 | .name = "CMO-QVGA", |
131 | .refresh = 60, | 152 | .refresh = 60, |
132 | .xres = 320, | 153 | .xres = 320, |
133 | .yres = 240, | 154 | .yres = 240, |
@@ -141,6 +162,38 @@ static struct imx_fb_videomode eukrea_mbimx27_modes[] = { | |||
141 | }, | 162 | }, |
142 | .pcr = 0xFAD08B80, | 163 | .pcr = 0xFAD08B80, |
143 | .bpp = 16, | 164 | .bpp = 16, |
165 | }, { | ||
166 | .mode = { | ||
167 | .name = "DVI-VGA", | ||
168 | .refresh = 60, | ||
169 | .xres = 640, | ||
170 | .yres = 480, | ||
171 | .pixclock = 32000, | ||
172 | .hsync_len = 1, | ||
173 | .left_margin = 35, | ||
174 | .right_margin = 0, | ||
175 | .vsync_len = 1, | ||
176 | .upper_margin = 7, | ||
177 | .lower_margin = 0, | ||
178 | }, | ||
179 | .pcr = 0xFA208B80, | ||
180 | .bpp = 16, | ||
181 | }, { | ||
182 | .mode = { | ||
183 | .name = "DVI-SVGA", | ||
184 | .refresh = 60, | ||
185 | .xres = 800, | ||
186 | .yres = 600, | ||
187 | .pixclock = 25000, | ||
188 | .hsync_len = 1, | ||
189 | .left_margin = 35, | ||
190 | .right_margin = 0, | ||
191 | .vsync_len = 1, | ||
192 | .upper_margin = 7, | ||
193 | .lower_margin = 0, | ||
194 | }, | ||
195 | .pcr = 0xFA208B80, | ||
196 | .bpp = 16, | ||
144 | }, | 197 | }, |
145 | }; | 198 | }; |
146 | 199 | ||
@@ -153,16 +206,52 @@ static struct imx_fb_platform_data eukrea_mbimx27_fb_data = { | |||
153 | .dmacr = 0x00040060, | 206 | .dmacr = 0x00040060, |
154 | }; | 207 | }; |
155 | 208 | ||
156 | static struct imxuart_platform_data uart_pdata[] = { | 209 | static void eukrea_mbimx27_bl_set_intensity(int intensity) |
157 | { | 210 | { |
158 | .flags = IMXUART_HAVE_RTSCTS, | 211 | if (intensity) |
159 | }, | 212 | gpio_direction_output(GPIO_PORTE | 5, 1); |
160 | { | 213 | else |
161 | .flags = IMXUART_HAVE_RTSCTS, | 214 | gpio_direction_output(GPIO_PORTE | 5, 0); |
215 | } | ||
216 | |||
217 | static struct generic_bl_info eukrea_mbimx27_bl_info = { | ||
218 | .name = "eukrea_mbimx27-bl", | ||
219 | .max_intensity = 0xff, | ||
220 | .default_intensity = 0xff, | ||
221 | .set_bl_intensity = eukrea_mbimx27_bl_set_intensity, | ||
222 | }; | ||
223 | |||
224 | static struct platform_device eukrea_mbimx27_bl_dev = { | ||
225 | .name = "generic-bl", | ||
226 | .id = 1, | ||
227 | .dev = { | ||
228 | .platform_data = &eukrea_mbimx27_bl_info, | ||
162 | }, | 229 | }, |
163 | }; | 230 | }; |
164 | 231 | ||
165 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) | 232 | static void eukrea_mbimx27_lcd_power_set(struct plat_lcd_data *pd, |
233 | unsigned int power) | ||
234 | { | ||
235 | if (power) | ||
236 | gpio_direction_output(GPIO_PORTA | 25, 1); | ||
237 | else | ||
238 | gpio_direction_output(GPIO_PORTA | 25, 0); | ||
239 | } | ||
240 | |||
241 | static struct plat_lcd_data eukrea_mbimx27_lcd_power_data = { | ||
242 | .set_power = eukrea_mbimx27_lcd_power_set, | ||
243 | }; | ||
244 | |||
245 | static struct platform_device eukrea_mbimx27_lcd_powerdev = { | ||
246 | .name = "platform-lcd", | ||
247 | .dev.platform_data = &eukrea_mbimx27_lcd_power_data, | ||
248 | }; | ||
249 | |||
250 | static const struct imxuart_platform_data uart_pdata __initconst = { | ||
251 | .flags = IMXUART_HAVE_RTSCTS, | ||
252 | }; | ||
253 | |||
254 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) \ | ||
166 | || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) | 255 | || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) |
167 | 256 | ||
168 | #define ADS7846_PENDOWN (GPIO_PORTD | 25) | 257 | #define ADS7846_PENDOWN (GPIO_PORTD | 25) |
@@ -173,7 +262,6 @@ static void ads7846_dev_init(void) | |||
173 | printk(KERN_ERR "can't get ads746 pen down GPIO\n"); | 262 | printk(KERN_ERR "can't get ads746 pen down GPIO\n"); |
174 | return; | 263 | return; |
175 | } | 264 | } |
176 | |||
177 | gpio_direction_input(ADS7846_PENDOWN); | 265 | gpio_direction_input(ADS7846_PENDOWN); |
178 | } | 266 | } |
179 | 267 | ||
@@ -186,7 +274,9 @@ static struct ads7846_platform_data ads7846_config __initdata = { | |||
186 | .get_pendown_state = ads7846_get_pendown_state, | 274 | .get_pendown_state = ads7846_get_pendown_state, |
187 | .keep_vref_on = 1, | 275 | .keep_vref_on = 1, |
188 | }; | 276 | }; |
277 | #endif | ||
189 | 278 | ||
279 | #if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) | ||
190 | static struct spi_board_info eukrea_mbimx27_spi_board_info[] __initdata = { | 280 | static struct spi_board_info eukrea_mbimx27_spi_board_info[] __initdata = { |
191 | [0] = { | 281 | [0] = { |
192 | .modalias = "ads7846", | 282 | .modalias = "ads7846", |
@@ -201,16 +291,30 @@ static struct spi_board_info eukrea_mbimx27_spi_board_info[] __initdata = { | |||
201 | 291 | ||
202 | static int eukrea_mbimx27_spi_cs[] = {GPIO_PORTD | 28}; | 292 | static int eukrea_mbimx27_spi_cs[] = {GPIO_PORTD | 28}; |
203 | 293 | ||
204 | static struct spi_imx_master eukrea_mbimx27_spi_0_data = { | 294 | static const struct spi_imx_master eukrea_mbimx27_spi0_data __initconst = { |
205 | .chipselect = eukrea_mbimx27_spi_cs, | 295 | .chipselect = eukrea_mbimx27_spi_cs, |
206 | .num_chipselect = ARRAY_SIZE(eukrea_mbimx27_spi_cs), | 296 | .num_chipselect = ARRAY_SIZE(eukrea_mbimx27_spi_cs), |
207 | }; | 297 | }; |
208 | #endif | 298 | #endif |
209 | 299 | ||
300 | static struct i2c_board_info eukrea_mbimx27_i2c_devices[] = { | ||
301 | { | ||
302 | I2C_BOARD_INFO("tlv320aic23", 0x1a), | ||
303 | }, | ||
304 | }; | ||
305 | |||
210 | static struct platform_device *platform_devices[] __initdata = { | 306 | static struct platform_device *platform_devices[] __initdata = { |
211 | &leds_gpio, | 307 | &leds_gpio, |
212 | }; | 308 | }; |
213 | 309 | ||
310 | static struct imxmmc_platform_data sdhc_pdata = { | ||
311 | .dat3_card_detect = 1, | ||
312 | }; | ||
313 | |||
314 | struct imx_ssi_platform_data eukrea_mbimx27_ssi_pdata = { | ||
315 | .flags = IMX_SSI_DMA | IMX_SSI_USE_I2S_SLAVE, | ||
316 | }; | ||
317 | |||
214 | /* | 318 | /* |
215 | * system init for baseboard usage. Will be called by cpuimx27 init. | 319 | * system init for baseboard usage. Will be called by cpuimx27 init. |
216 | * | 320 | * |
@@ -222,21 +326,52 @@ void __init eukrea_mbimx27_baseboard_init(void) | |||
222 | mxc_gpio_setup_multiple_pins(eukrea_mbimx27_pins, | 326 | mxc_gpio_setup_multiple_pins(eukrea_mbimx27_pins, |
223 | ARRAY_SIZE(eukrea_mbimx27_pins), "MBIMX27"); | 327 | ARRAY_SIZE(eukrea_mbimx27_pins), "MBIMX27"); |
224 | 328 | ||
225 | mxc_register_device(&mxc_uart_device1, &uart_pdata[0]); | 329 | #if defined(CONFIG_SND_SOC_EUKREA_TLV320) \ |
226 | mxc_register_device(&mxc_uart_device2, &uart_pdata[1]); | 330 | || defined(CONFIG_SND_SOC_EUKREA_TLV320_MODULE) |
331 | /* SSI unit master I2S codec connected to SSI_PINS_4*/ | ||
332 | mxc_audmux_v1_configure_port(MX27_AUDMUX_HPCR1_SSI0, | ||
333 | MXC_AUDMUX_V1_PCR_SYN | | ||
334 | MXC_AUDMUX_V1_PCR_TFSDIR | | ||
335 | MXC_AUDMUX_V1_PCR_TCLKDIR | | ||
336 | MXC_AUDMUX_V1_PCR_RFSDIR | | ||
337 | MXC_AUDMUX_V1_PCR_RCLKDIR | | ||
338 | MXC_AUDMUX_V1_PCR_TFCSEL(MX27_AUDMUX_HPCR3_SSI_PINS_4) | | ||
339 | MXC_AUDMUX_V1_PCR_RFCSEL(MX27_AUDMUX_HPCR3_SSI_PINS_4) | | ||
340 | MXC_AUDMUX_V1_PCR_RXDSEL(MX27_AUDMUX_HPCR3_SSI_PINS_4) | ||
341 | ); | ||
342 | mxc_audmux_v1_configure_port(MX27_AUDMUX_HPCR3_SSI_PINS_4, | ||
343 | MXC_AUDMUX_V1_PCR_SYN | | ||
344 | MXC_AUDMUX_V1_PCR_RXDSEL(MX27_AUDMUX_HPCR1_SSI0) | ||
345 | ); | ||
346 | #endif | ||
347 | |||
348 | imx27_add_imx_uart1(&uart_pdata); | ||
349 | imx27_add_imx_uart2(&uart_pdata); | ||
350 | #if !defined(MACH_EUKREA_CPUIMX27_USEUART4) | ||
351 | imx27_add_imx_uart3(&uart_pdata); | ||
352 | #endif | ||
227 | 353 | ||
228 | mxc_register_device(&mxc_fb_device, &eukrea_mbimx27_fb_data); | 354 | mxc_register_device(&mxc_fb_device, &eukrea_mbimx27_fb_data); |
229 | mxc_register_device(&mxc_sdhc_device0, NULL); | 355 | mxc_register_device(&mxc_sdhc_device0, &sdhc_pdata); |
230 | 356 | ||
231 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) | 357 | i2c_register_board_info(0, eukrea_mbimx27_i2c_devices, |
358 | ARRAY_SIZE(eukrea_mbimx27_i2c_devices)); | ||
359 | |||
360 | mxc_register_device(&imx_ssi_device0, &eukrea_mbimx27_ssi_pdata); | ||
361 | |||
362 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) \ | ||
232 | || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) | 363 | || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) |
233 | /* SPI and ADS7846 Touchscreen controler init */ | 364 | /* ADS7846 Touchscreen controller init */ |
234 | mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT); | ||
235 | mxc_gpio_mode(GPIO_PORTD | 25 | GPIO_GPIO | GPIO_IN); | 365 | mxc_gpio_mode(GPIO_PORTD | 25 | GPIO_GPIO | GPIO_IN); |
236 | mxc_register_device(&mxc_spi_device0, &eukrea_mbimx27_spi_0_data); | 366 | ads7846_dev_init(); |
367 | #endif | ||
368 | |||
369 | #if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) | ||
370 | /* SPI_CS0 init */ | ||
371 | mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT); | ||
372 | imx27_add_spi_imx0(&eukrea_mbimx27_spi0_data); | ||
237 | spi_register_board_info(eukrea_mbimx27_spi_board_info, | 373 | spi_register_board_info(eukrea_mbimx27_spi_board_info, |
238 | ARRAY_SIZE(eukrea_mbimx27_spi_board_info)); | 374 | ARRAY_SIZE(eukrea_mbimx27_spi_board_info)); |
239 | ads7846_dev_init(); | ||
240 | #endif | 375 | #endif |
241 | 376 | ||
242 | /* Leds configuration */ | 377 | /* Leds configuration */ |
@@ -244,6 +379,14 @@ void __init eukrea_mbimx27_baseboard_init(void) | |||
244 | mxc_gpio_mode(GPIO_PORTF | 19 | GPIO_GPIO | GPIO_OUT); | 379 | mxc_gpio_mode(GPIO_PORTF | 19 | GPIO_GPIO | GPIO_OUT); |
245 | /* Backlight */ | 380 | /* Backlight */ |
246 | mxc_gpio_mode(GPIO_PORTE | 5 | GPIO_GPIO | GPIO_OUT); | 381 | mxc_gpio_mode(GPIO_PORTE | 5 | GPIO_GPIO | GPIO_OUT); |
382 | gpio_request(GPIO_PORTE | 5, "backlight"); | ||
383 | platform_device_register(&eukrea_mbimx27_bl_dev); | ||
384 | /* LCD Reset */ | ||
385 | mxc_gpio_mode(GPIO_PORTA | 25 | GPIO_GPIO | GPIO_OUT); | ||
386 | gpio_request(GPIO_PORTA | 25, "lcd_enable"); | ||
387 | platform_device_register(&eukrea_mbimx27_lcd_powerdev); | ||
388 | |||
389 | mxc_register_device(&imx_kpp_device, &eukrea_mbimx27_keymap_data); | ||
247 | 390 | ||
248 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 391 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
249 | } | 392 | } |
diff --git a/arch/arm/mach-imx/include/mach/dma-mx1-mx2.h b/arch/arm/mach-imx/include/mach/dma-mx1-mx2.h new file mode 100644 index 000000000000..df5f522da6b3 --- /dev/null +++ b/arch/arm/mach-imx/include/mach/dma-mx1-mx2.h | |||
@@ -0,0 +1,10 @@ | |||
1 | #ifndef __MACH_DMA_MX1_MX2_H__ | ||
2 | #define __MACH_DMA_MX1_MX2_H__ | ||
3 | /* | ||
4 | * Don't use this header in new code, it will go away when all users are | ||
5 | * converted to mach/dma-v1.h | ||
6 | */ | ||
7 | |||
8 | #include <mach/dma-v1.h> | ||
9 | |||
10 | #endif /* ifndef __MACH_DMA_MX1_MX2_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h b/arch/arm/mach-imx/include/mach/dma-v1.h index 7c4870bd5a21..287431cc13e5 100644 --- a/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h +++ b/arch/arm/mach-imx/include/mach/dma-v1.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h | 2 | * linux/arch/arm/mach-imx/include/mach/dma-v1.h |
3 | * | 3 | * |
4 | * i.MX DMA registration and IRQ dispatching | 4 | * i.MX DMA registration and IRQ dispatching |
5 | * | 5 | * |
@@ -22,8 +22,10 @@ | |||
22 | * MA 02110-1301, USA. | 22 | * MA 02110-1301, USA. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #ifndef __ASM_ARCH_MXC_DMA_H | 25 | #ifndef __MACH_DMA_V1_H__ |
26 | #define __ASM_ARCH_MXC_DMA_H | 26 | #define __MACH_DMA_V1_H__ |
27 | |||
28 | #define imx_has_dma_v1() (cpu_is_mx1() || cpu_is_mx21() || cpu_is_mx27()) | ||
27 | 29 | ||
28 | #define IMX_DMA_CHANNELS 16 | 30 | #define IMX_DMA_CHANNELS 16 |
29 | 31 | ||
@@ -102,4 +104,4 @@ enum imx_dma_prio { | |||
102 | 104 | ||
103 | int imx_dma_request_by_prio(const char *name, enum imx_dma_prio prio); | 105 | int imx_dma_request_by_prio(const char *name, enum imx_dma_prio prio); |
104 | 106 | ||
105 | #endif /* _ASM_ARCH_MXC_DMA_H */ | 107 | #endif /* __MACH_DMA_V1_H__ */ |
diff --git a/arch/arm/mach-mx2/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c index 1f616dcaabc9..575ff1ae85a7 100644 --- a/arch/arm/mach-mx2/mach-cpuimx27.c +++ b/arch/arm/mach-imx/mach-cpuimx27.c | |||
@@ -26,20 +26,24 @@ | |||
26 | #include <linux/mtd/physmap.h> | 26 | #include <linux/mtd/physmap.h> |
27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
28 | #include <linux/serial_8250.h> | 28 | #include <linux/serial_8250.h> |
29 | #include <linux/usb/otg.h> | ||
30 | #include <linux/usb/ulpi.h> | ||
31 | #include <linux/fsl_devices.h> | ||
29 | 32 | ||
30 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
31 | #include <asm/mach/arch.h> | 34 | #include <asm/mach/arch.h> |
32 | #include <asm/mach/time.h> | 35 | #include <asm/mach/time.h> |
33 | #include <asm/mach/map.h> | 36 | #include <asm/mach/map.h> |
34 | 37 | ||
35 | #include <mach/board-eukrea_cpuimx27.h> | 38 | #include <mach/eukrea-baseboards.h> |
36 | #include <mach/common.h> | 39 | #include <mach/common.h> |
37 | #include <mach/hardware.h> | 40 | #include <mach/hardware.h> |
38 | #include <mach/i2c.h> | ||
39 | #include <mach/iomux-mx27.h> | 41 | #include <mach/iomux-mx27.h> |
40 | #include <mach/imx-uart.h> | ||
41 | #include <mach/mxc_nand.h> | 42 | #include <mach/mxc_nand.h> |
43 | #include <mach/mxc_ehci.h> | ||
44 | #include <mach/ulpi.h> | ||
42 | 45 | ||
46 | #include "devices-imx27.h" | ||
43 | #include "devices.h" | 47 | #include "devices.h" |
44 | 48 | ||
45 | static int eukrea_cpuimx27_pins[] = { | 49 | static int eukrea_cpuimx27_pins[] = { |
@@ -49,10 +53,12 @@ static int eukrea_cpuimx27_pins[] = { | |||
49 | PE14_PF_UART1_CTS, | 53 | PE14_PF_UART1_CTS, |
50 | PE15_PF_UART1_RTS, | 54 | PE15_PF_UART1_RTS, |
51 | /* UART4 */ | 55 | /* UART4 */ |
56 | #if defined(MACH_EUKREA_CPUIMX27_USEUART4) | ||
52 | PB26_AF_UART4_RTS, | 57 | PB26_AF_UART4_RTS, |
53 | PB28_AF_UART4_TXD, | 58 | PB28_AF_UART4_TXD, |
54 | PB29_AF_UART4_CTS, | 59 | PB29_AF_UART4_CTS, |
55 | PB31_AF_UART4_RXD, | 60 | PB31_AF_UART4_RXD, |
61 | #endif | ||
56 | /* FEC */ | 62 | /* FEC */ |
57 | PD0_AIN_FEC_TXD0, | 63 | PD0_AIN_FEC_TXD0, |
58 | PD1_AIN_FEC_TXD1, | 64 | PD1_AIN_FEC_TXD1, |
@@ -76,19 +82,47 @@ static int eukrea_cpuimx27_pins[] = { | |||
76 | PD17_PF_I2C_DATA, | 82 | PD17_PF_I2C_DATA, |
77 | PD18_PF_I2C_CLK, | 83 | PD18_PF_I2C_CLK, |
78 | /* SDHC2 */ | 84 | /* SDHC2 */ |
85 | #if defined(CONFIG_MACH_EUKREA_CPUIMX27_USESDHC2) | ||
79 | PB4_PF_SD2_D0, | 86 | PB4_PF_SD2_D0, |
80 | PB5_PF_SD2_D1, | 87 | PB5_PF_SD2_D1, |
81 | PB6_PF_SD2_D2, | 88 | PB6_PF_SD2_D2, |
82 | PB7_PF_SD2_D3, | 89 | PB7_PF_SD2_D3, |
83 | PB8_PF_SD2_CMD, | 90 | PB8_PF_SD2_CMD, |
84 | PB9_PF_SD2_CLK, | 91 | PB9_PF_SD2_CLK, |
92 | #endif | ||
85 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) | 93 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) |
86 | /* Quad UART's IRQ */ | 94 | /* Quad UART's IRQ */ |
87 | GPIO_PORTD | 22 | GPIO_GPIO | GPIO_IN, | 95 | GPIO_PORTB | 22 | GPIO_GPIO | GPIO_IN, |
88 | GPIO_PORTD | 23 | GPIO_GPIO | GPIO_IN, | 96 | GPIO_PORTB | 23 | GPIO_GPIO | GPIO_IN, |
89 | GPIO_PORTD | 27 | GPIO_GPIO | GPIO_IN, | 97 | GPIO_PORTB | 27 | GPIO_GPIO | GPIO_IN, |
90 | GPIO_PORTD | 30 | GPIO_GPIO | GPIO_IN, | 98 | GPIO_PORTB | 30 | GPIO_GPIO | GPIO_IN, |
91 | #endif | 99 | #endif |
100 | /* OTG */ | ||
101 | PC7_PF_USBOTG_DATA5, | ||
102 | PC8_PF_USBOTG_DATA6, | ||
103 | PC9_PF_USBOTG_DATA0, | ||
104 | PC10_PF_USBOTG_DATA2, | ||
105 | PC11_PF_USBOTG_DATA1, | ||
106 | PC12_PF_USBOTG_DATA4, | ||
107 | PC13_PF_USBOTG_DATA3, | ||
108 | PE0_PF_USBOTG_NXT, | ||
109 | PE1_PF_USBOTG_STP, | ||
110 | PE2_PF_USBOTG_DIR, | ||
111 | PE24_PF_USBOTG_CLK, | ||
112 | PE25_PF_USBOTG_DATA7, | ||
113 | /* USBH2 */ | ||
114 | PA0_PF_USBH2_CLK, | ||
115 | PA1_PF_USBH2_DIR, | ||
116 | PA2_PF_USBH2_DATA7, | ||
117 | PA3_PF_USBH2_NXT, | ||
118 | PA4_PF_USBH2_STP, | ||
119 | PD19_AF_USBH2_DATA4, | ||
120 | PD20_AF_USBH2_DATA3, | ||
121 | PD21_AF_USBH2_DATA6, | ||
122 | PD22_AF_USBH2_DATA0, | ||
123 | PD23_AF_USBH2_DATA2, | ||
124 | PD24_AF_USBH2_DATA1, | ||
125 | PD26_AF_USBH2_DATA5, | ||
92 | }; | 126 | }; |
93 | 127 | ||
94 | static struct physmap_flash_data eukrea_cpuimx27_flash_data = { | 128 | static struct physmap_flash_data eukrea_cpuimx27_flash_data = { |
@@ -111,15 +145,12 @@ static struct platform_device eukrea_cpuimx27_nor_mtd_device = { | |||
111 | .resource = &eukrea_cpuimx27_flash_resource, | 145 | .resource = &eukrea_cpuimx27_flash_resource, |
112 | }; | 146 | }; |
113 | 147 | ||
114 | static struct imxuart_platform_data uart_pdata[] = { | 148 | static const struct imxuart_platform_data uart_pdata __initconst = { |
115 | { | 149 | .flags = IMXUART_HAVE_RTSCTS, |
116 | .flags = IMXUART_HAVE_RTSCTS, | ||
117 | }, { | ||
118 | .flags = IMXUART_HAVE_RTSCTS, | ||
119 | }, | ||
120 | }; | 150 | }; |
121 | 151 | ||
122 | static struct mxc_nand_platform_data eukrea_cpuimx27_nand_board_info = { | 152 | static const struct mxc_nand_platform_data |
153 | cpuimx27_nand_board_info __initconst = { | ||
123 | .width = 1, | 154 | .width = 1, |
124 | .hw_ecc = 1, | 155 | .hw_ecc = 1, |
125 | }; | 156 | }; |
@@ -127,9 +158,11 @@ static struct mxc_nand_platform_data eukrea_cpuimx27_nand_board_info = { | |||
127 | static struct platform_device *platform_devices[] __initdata = { | 158 | static struct platform_device *platform_devices[] __initdata = { |
128 | &eukrea_cpuimx27_nor_mtd_device, | 159 | &eukrea_cpuimx27_nor_mtd_device, |
129 | &mxc_fec_device, | 160 | &mxc_fec_device, |
161 | &mxc_wdt, | ||
162 | &mxc_w1_master_device, | ||
130 | }; | 163 | }; |
131 | 164 | ||
132 | static struct imxi2c_platform_data eukrea_cpuimx27_i2c_1_data = { | 165 | static const struct imxi2c_platform_data cpuimx27_i2c1_data __initconst = { |
133 | .bitrate = 100000, | 166 | .bitrate = 100000, |
134 | }; | 167 | }; |
135 | 168 | ||
@@ -182,34 +215,83 @@ static struct platform_device serial_device = { | |||
182 | }; | 215 | }; |
183 | #endif | 216 | #endif |
184 | 217 | ||
218 | #if defined(CONFIG_USB_ULPI) | ||
219 | static struct mxc_usbh_platform_data otg_pdata = { | ||
220 | .portsc = MXC_EHCI_MODE_ULPI, | ||
221 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, | ||
222 | }; | ||
223 | |||
224 | static struct mxc_usbh_platform_data usbh2_pdata = { | ||
225 | .portsc = MXC_EHCI_MODE_ULPI, | ||
226 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, | ||
227 | }; | ||
228 | #endif | ||
229 | |||
230 | static struct fsl_usb2_platform_data otg_device_pdata = { | ||
231 | .operating_mode = FSL_USB2_DR_DEVICE, | ||
232 | .phy_mode = FSL_USB2_PHY_ULPI, | ||
233 | }; | ||
234 | |||
235 | static int otg_mode_host; | ||
236 | |||
237 | static int __init eukrea_cpuimx27_otg_mode(char *options) | ||
238 | { | ||
239 | if (!strcmp(options, "host")) | ||
240 | otg_mode_host = 1; | ||
241 | else if (!strcmp(options, "device")) | ||
242 | otg_mode_host = 0; | ||
243 | else | ||
244 | pr_info("otg_mode neither \"host\" nor \"device\". " | ||
245 | "Defaulting to device\n"); | ||
246 | return 0; | ||
247 | } | ||
248 | __setup("otg_mode=", eukrea_cpuimx27_otg_mode); | ||
249 | |||
185 | static void __init eukrea_cpuimx27_init(void) | 250 | static void __init eukrea_cpuimx27_init(void) |
186 | { | 251 | { |
187 | mxc_gpio_setup_multiple_pins(eukrea_cpuimx27_pins, | 252 | mxc_gpio_setup_multiple_pins(eukrea_cpuimx27_pins, |
188 | ARRAY_SIZE(eukrea_cpuimx27_pins), "CPUIMX27"); | 253 | ARRAY_SIZE(eukrea_cpuimx27_pins), "CPUIMX27"); |
189 | 254 | ||
190 | mxc_register_device(&mxc_uart_device0, &uart_pdata[0]); | 255 | imx27_add_imx_uart0(&uart_pdata); |
191 | 256 | ||
192 | mxc_register_device(&imx27_nand_device, | 257 | imx27_add_mxc_nand(&cpuimx27_nand_board_info); |
193 | &eukrea_cpuimx27_nand_board_info); | ||
194 | 258 | ||
195 | i2c_register_board_info(0, eukrea_cpuimx27_i2c_devices, | 259 | i2c_register_board_info(0, eukrea_cpuimx27_i2c_devices, |
196 | ARRAY_SIZE(eukrea_cpuimx27_i2c_devices)); | 260 | ARRAY_SIZE(eukrea_cpuimx27_i2c_devices)); |
197 | 261 | ||
198 | mxc_register_device(&mxc_i2c_device0, &eukrea_cpuimx27_i2c_1_data); | 262 | imx27_add_i2c_imx1(&cpuimx27_i2c1_data); |
199 | 263 | ||
200 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 264 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
201 | 265 | ||
202 | #if defined(CONFIG_MACH_EUKREA_CPUIMX27_USESDHC2) | 266 | #if defined(CONFIG_MACH_EUKREA_CPUIMX27_USESDHC2) |
203 | /* SDHC2 can be used for Wifi */ | 267 | /* SDHC2 can be used for Wifi */ |
204 | mxc_register_device(&mxc_sdhc_device1, NULL); | 268 | mxc_register_device(&mxc_sdhc_device1, NULL); |
269 | #endif | ||
270 | #if defined(MACH_EUKREA_CPUIMX27_USEUART4) | ||
205 | /* in which case UART4 is also used for Bluetooth */ | 271 | /* in which case UART4 is also used for Bluetooth */ |
206 | mxc_register_device(&mxc_uart_device3, &uart_pdata[1]); | 272 | imx27_add_imx_uart3(&uart_pdata); |
207 | #endif | 273 | #endif |
208 | 274 | ||
209 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) | 275 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) |
210 | platform_device_register(&serial_device); | 276 | platform_device_register(&serial_device); |
211 | #endif | 277 | #endif |
212 | 278 | ||
279 | #if defined(CONFIG_USB_ULPI) | ||
280 | if (otg_mode_host) { | ||
281 | otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | ||
282 | USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); | ||
283 | |||
284 | mxc_register_device(&mxc_otg_host, &otg_pdata); | ||
285 | } | ||
286 | |||
287 | usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | ||
288 | USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); | ||
289 | |||
290 | mxc_register_device(&mxc_usbh2, &usbh2_pdata); | ||
291 | #endif | ||
292 | if (!otg_mode_host) | ||
293 | mxc_register_device(&mxc_otg_udc_device, &otg_device_pdata); | ||
294 | |||
213 | #ifdef CONFIG_MACH_EUKREA_MBIMX27_BASEBOARD | 295 | #ifdef CONFIG_MACH_EUKREA_MBIMX27_BASEBOARD |
214 | eukrea_mbimx27_baseboard_init(); | 296 | eukrea_mbimx27_baseboard_init(); |
215 | #endif | 297 | #endif |
diff --git a/arch/arm/mach-mx2/mach-imx27lite.c b/arch/arm/mach-imx/mach-imx27lite.c index b5710bf18b96..22a2b5d91213 100644 --- a/arch/arm/mach-mx2/mach-imx27lite.c +++ b/arch/arm/mach-imx/mach-imx27lite.c | |||
@@ -12,10 +12,6 @@ | |||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | 15 | */ |
20 | 16 | ||
21 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
@@ -26,10 +22,9 @@ | |||
26 | #include <asm/mach/map.h> | 22 | #include <asm/mach/map.h> |
27 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
28 | #include <mach/common.h> | 24 | #include <mach/common.h> |
29 | #include <mach/imx-uart.h> | ||
30 | #include <mach/iomux-mx27.h> | 25 | #include <mach/iomux-mx27.h> |
31 | #include <mach/board-mx27lite.h> | ||
32 | 26 | ||
27 | #include "devices-imx27.h" | ||
33 | #include "devices.h" | 28 | #include "devices.h" |
34 | 29 | ||
35 | static unsigned int mx27lite_pins[] = { | 30 | static unsigned int mx27lite_pins[] = { |
@@ -59,7 +54,7 @@ static unsigned int mx27lite_pins[] = { | |||
59 | PF23_AIN_FEC_TX_EN, | 54 | PF23_AIN_FEC_TX_EN, |
60 | }; | 55 | }; |
61 | 56 | ||
62 | static struct imxuart_platform_data uart_pdata = { | 57 | static const struct imxuart_platform_data uart_pdata __initconst = { |
63 | .flags = IMXUART_HAVE_RTSCTS, | 58 | .flags = IMXUART_HAVE_RTSCTS, |
64 | }; | 59 | }; |
65 | 60 | ||
@@ -71,7 +66,7 @@ static void __init mx27lite_init(void) | |||
71 | { | 66 | { |
72 | mxc_gpio_setup_multiple_pins(mx27lite_pins, ARRAY_SIZE(mx27lite_pins), | 67 | mxc_gpio_setup_multiple_pins(mx27lite_pins, ARRAY_SIZE(mx27lite_pins), |
73 | "imx27lite"); | 68 | "imx27lite"); |
74 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 69 | imx27_add_imx_uart0(&uart_pdata); |
75 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 70 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
76 | } | 71 | } |
77 | 72 | ||
diff --git a/arch/arm/mach-mx1/mach-mx1ads.c b/arch/arm/mach-imx/mach-mx1ads.c index 51f3cfd83db2..77a760cfadc0 100644 --- a/arch/arm/mach-mx1/mach-mx1ads.c +++ b/arch/arm/mach-imx/mach-mx1ads.c | |||
@@ -26,10 +26,10 @@ | |||
26 | #include <mach/common.h> | 26 | #include <mach/common.h> |
27 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
28 | #include <mach/i2c.h> | 28 | #include <mach/i2c.h> |
29 | #include <mach/imx-uart.h> | ||
30 | #include <mach/iomux-mx1.h> | 29 | #include <mach/iomux-mx1.h> |
31 | #include <mach/irqs.h> | 30 | #include <mach/irqs.h> |
32 | 31 | ||
32 | #include "devices-imx1.h" | ||
33 | #include "devices.h" | 33 | #include "devices.h" |
34 | 34 | ||
35 | static int mx1ads_pins[] = { | 35 | static int mx1ads_pins[] = { |
@@ -58,12 +58,12 @@ static int mx1ads_pins[] = { | |||
58 | * UARTs platform data | 58 | * UARTs platform data |
59 | */ | 59 | */ |
60 | 60 | ||
61 | static struct imxuart_platform_data uart_pdata[] = { | 61 | static const struct imxuart_platform_data uart0_pdata __initconst = { |
62 | { | 62 | .flags = IMXUART_HAVE_RTSCTS, |
63 | .flags = IMXUART_HAVE_RTSCTS, | 63 | }; |
64 | }, { | 64 | |
65 | .flags = IMXUART_HAVE_RTSCTS, | 65 | static const struct imxuart_platform_data uart1_pdata __initconst = { |
66 | }, | 66 | .flags = IMXUART_HAVE_RTSCTS, |
67 | }; | 67 | }; |
68 | 68 | ||
69 | /* | 69 | /* |
@@ -75,8 +75,8 @@ static struct physmap_flash_data mx1ads_flash_data = { | |||
75 | }; | 75 | }; |
76 | 76 | ||
77 | static struct resource flash_resource = { | 77 | static struct resource flash_resource = { |
78 | .start = IMX_CS0_PHYS, | 78 | .start = MX1_CS0_PHYS, |
79 | .end = IMX_CS0_PHYS + SZ_32M - 1, | 79 | .end = MX1_CS0_PHYS + SZ_32M - 1, |
80 | .flags = IORESOURCE_MEM, | 80 | .flags = IORESOURCE_MEM, |
81 | }; | 81 | }; |
82 | 82 | ||
@@ -98,7 +98,7 @@ static struct pcf857x_platform_data pcf857x_data[] = { | |||
98 | } | 98 | } |
99 | }; | 99 | }; |
100 | 100 | ||
101 | static struct imxi2c_platform_data mx1ads_i2c_data = { | 101 | static const struct imxi2c_platform_data mx1ads_i2c_data __initconst = { |
102 | .bitrate = 100000, | 102 | .bitrate = 100000, |
103 | }; | 103 | }; |
104 | 104 | ||
@@ -121,8 +121,8 @@ static void __init mx1ads_init(void) | |||
121 | ARRAY_SIZE(mx1ads_pins), "mx1ads"); | 121 | ARRAY_SIZE(mx1ads_pins), "mx1ads"); |
122 | 122 | ||
123 | /* UART */ | 123 | /* UART */ |
124 | mxc_register_device(&imx_uart1_device, &uart_pdata[0]); | 124 | imx1_add_imx_uart0(&uart0_pdata); |
125 | mxc_register_device(&imx_uart2_device, &uart_pdata[1]); | 125 | imx1_add_imx_uart1(&uart1_pdata); |
126 | 126 | ||
127 | /* Physmap flash */ | 127 | /* Physmap flash */ |
128 | mxc_register_device(&flash_device, &mx1ads_flash_data); | 128 | mxc_register_device(&flash_device, &mx1ads_flash_data); |
@@ -131,7 +131,7 @@ static void __init mx1ads_init(void) | |||
131 | i2c_register_board_info(0, mx1ads_i2c_devices, | 131 | i2c_register_board_info(0, mx1ads_i2c_devices, |
132 | ARRAY_SIZE(mx1ads_i2c_devices)); | 132 | ARRAY_SIZE(mx1ads_i2c_devices)); |
133 | 133 | ||
134 | mxc_register_device(&imx_i2c_device, &mx1ads_i2c_data); | 134 | imx1_add_i2c_imx(&mx1ads_i2c_data); |
135 | } | 135 | } |
136 | 136 | ||
137 | static void __init mx1ads_timer_init(void) | 137 | static void __init mx1ads_timer_init(void) |
@@ -145,8 +145,8 @@ struct sys_timer mx1ads_timer = { | |||
145 | 145 | ||
146 | MACHINE_START(MX1ADS, "Freescale MX1ADS") | 146 | MACHINE_START(MX1ADS, "Freescale MX1ADS") |
147 | /* Maintainer: Sascha Hauer, Pengutronix */ | 147 | /* Maintainer: Sascha Hauer, Pengutronix */ |
148 | .phys_io = IMX_IO_PHYS, | 148 | .phys_io = MX1_IO_BASE_ADDR, |
149 | .io_pg_offst = (IMX_IO_BASE >> 18) & 0xfffc, | 149 | .io_pg_offst = (MX1_IO_BASE_ADDR_VIRT >> 18) & 0xfffc, |
150 | .boot_params = MX1_PHYS_OFFSET + 0x100, | 150 | .boot_params = MX1_PHYS_OFFSET + 0x100, |
151 | .map_io = mx1_map_io, | 151 | .map_io = mx1_map_io, |
152 | .init_irq = mx1_init_irq, | 152 | .init_irq = mx1_init_irq, |
@@ -155,8 +155,8 @@ MACHINE_START(MX1ADS, "Freescale MX1ADS") | |||
155 | MACHINE_END | 155 | MACHINE_END |
156 | 156 | ||
157 | MACHINE_START(MXLADS, "Freescale MXLADS") | 157 | MACHINE_START(MXLADS, "Freescale MXLADS") |
158 | .phys_io = IMX_IO_PHYS, | 158 | .phys_io = MX1_IO_BASE_ADDR, |
159 | .io_pg_offst = (IMX_IO_BASE >> 18) & 0xfffc, | 159 | .io_pg_offst = (MX1_IO_BASE_ADDR_VIRT >> 18) & 0xfffc, |
160 | .boot_params = MX1_PHYS_OFFSET + 0x100, | 160 | .boot_params = MX1_PHYS_OFFSET + 0x100, |
161 | .map_io = mx1_map_io, | 161 | .map_io = mx1_map_io, |
162 | .init_irq = mx1_init_irq, | 162 | .init_irq = mx1_init_irq, |
diff --git a/arch/arm/mach-mx2/mach-mx21ads.c b/arch/arm/mach-imx/mach-mx21ads.c index 113e58d7cb40..96d7f8189f32 100644 --- a/arch/arm/mach-mx2/mach-mx21ads.c +++ b/arch/arm/mach-imx/mach-mx21ads.c | |||
@@ -12,10 +12,6 @@ | |||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | 15 | */ |
20 | 16 | ||
21 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
@@ -28,15 +24,49 @@ | |||
28 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
29 | #include <asm/mach/time.h> | 25 | #include <asm/mach/time.h> |
30 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
31 | #include <mach/imx-uart.h> | ||
32 | #include <mach/imxfb.h> | 27 | #include <mach/imxfb.h> |
33 | #include <mach/iomux-mx21.h> | 28 | #include <mach/iomux-mx21.h> |
34 | #include <mach/mxc_nand.h> | 29 | #include <mach/mxc_nand.h> |
35 | #include <mach/mmc.h> | 30 | #include <mach/mmc.h> |
36 | #include <mach/board-mx21ads.h> | ||
37 | 31 | ||
32 | #include "devices-imx21.h" | ||
38 | #include "devices.h" | 33 | #include "devices.h" |
39 | 34 | ||
35 | /* | ||
36 | * Memory-mapped I/O on MX21ADS base board | ||
37 | */ | ||
38 | #define MX21ADS_MMIO_BASE_ADDR 0xf5000000 | ||
39 | #define MX21ADS_MMIO_SIZE SZ_16M | ||
40 | |||
41 | #define MX21ADS_REG_ADDR(offset) (void __force __iomem *) \ | ||
42 | (MX21ADS_MMIO_BASE_ADDR + (offset)) | ||
43 | |||
44 | #define MX21ADS_CS8900A_IRQ IRQ_GPIOE(11) | ||
45 | #define MX21ADS_CS8900A_IOBASE_REG MX21ADS_REG_ADDR(0x000000) | ||
46 | #define MX21ADS_ST16C255_IOBASE_REG MX21ADS_REG_ADDR(0x200000) | ||
47 | #define MX21ADS_VERSION_REG MX21ADS_REG_ADDR(0x400000) | ||
48 | #define MX21ADS_IO_REG MX21ADS_REG_ADDR(0x800000) | ||
49 | |||
50 | /* MX21ADS_IO_REG bit definitions */ | ||
51 | #define MX21ADS_IO_SD_WP 0x0001 /* read */ | ||
52 | #define MX21ADS_IO_TP6 0x0001 /* write */ | ||
53 | #define MX21ADS_IO_SW_SEL 0x0002 /* read */ | ||
54 | #define MX21ADS_IO_TP7 0x0002 /* write */ | ||
55 | #define MX21ADS_IO_RESET_E_UART 0x0004 | ||
56 | #define MX21ADS_IO_RESET_BASE 0x0008 | ||
57 | #define MX21ADS_IO_CSI_CTL2 0x0010 | ||
58 | #define MX21ADS_IO_CSI_CTL1 0x0020 | ||
59 | #define MX21ADS_IO_CSI_CTL0 0x0040 | ||
60 | #define MX21ADS_IO_UART1_EN 0x0080 | ||
61 | #define MX21ADS_IO_UART4_EN 0x0100 | ||
62 | #define MX21ADS_IO_LCDON 0x0200 | ||
63 | #define MX21ADS_IO_IRDA_EN 0x0400 | ||
64 | #define MX21ADS_IO_IRDA_FIR_SEL 0x0800 | ||
65 | #define MX21ADS_IO_IRDA_MD0_B 0x1000 | ||
66 | #define MX21ADS_IO_IRDA_MD1 0x2000 | ||
67 | #define MX21ADS_IO_LED4_ON 0x4000 | ||
68 | #define MX21ADS_IO_LED3_ON 0x8000 | ||
69 | |||
40 | static unsigned int mx21ads_pins[] = { | 70 | static unsigned int mx21ads_pins[] = { |
41 | 71 | ||
42 | /* CS8900A */ | 72 | /* CS8900A */ |
@@ -133,14 +163,13 @@ static struct platform_device mx21ads_nor_mtd_device = { | |||
133 | .resource = &mx21ads_flash_resource, | 163 | .resource = &mx21ads_flash_resource, |
134 | }; | 164 | }; |
135 | 165 | ||
136 | static struct imxuart_platform_data uart_pdata = { | 166 | static const struct imxuart_platform_data uart_pdata_rts __initconst = { |
137 | .flags = IMXUART_HAVE_RTSCTS, | 167 | .flags = IMXUART_HAVE_RTSCTS, |
138 | }; | 168 | }; |
139 | 169 | ||
140 | static struct imxuart_platform_data uart_norts_pdata = { | 170 | static const struct imxuart_platform_data uart_pdata_norts __initconst = { |
141 | }; | 171 | }; |
142 | 172 | ||
143 | |||
144 | static int mx21ads_fb_init(struct platform_device *pdev) | 173 | static int mx21ads_fb_init(struct platform_device *pdev) |
145 | { | 174 | { |
146 | u16 tmp; | 175 | u16 tmp; |
@@ -227,7 +256,8 @@ static struct imxmmc_platform_data mx21ads_sdhc_pdata = { | |||
227 | .exit = mx21ads_sdhc_exit, | 256 | .exit = mx21ads_sdhc_exit, |
228 | }; | 257 | }; |
229 | 258 | ||
230 | static struct mxc_nand_platform_data mx21ads_nand_board_info = { | 259 | static const struct mxc_nand_platform_data |
260 | mx21ads_nand_board_info __initconst = { | ||
231 | .width = 1, | 261 | .width = 1, |
232 | .hw_ecc = 1, | 262 | .hw_ecc = 1, |
233 | }; | 263 | }; |
@@ -263,12 +293,12 @@ static void __init mx21ads_board_init(void) | |||
263 | mxc_gpio_setup_multiple_pins(mx21ads_pins, ARRAY_SIZE(mx21ads_pins), | 293 | mxc_gpio_setup_multiple_pins(mx21ads_pins, ARRAY_SIZE(mx21ads_pins), |
264 | "mx21ads"); | 294 | "mx21ads"); |
265 | 295 | ||
266 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 296 | imx21_add_imx_uart0(&uart_pdata_rts); |
267 | mxc_register_device(&mxc_uart_device2, &uart_norts_pdata); | 297 | imx21_add_imx_uart2(&uart_pdata_norts); |
268 | mxc_register_device(&mxc_uart_device3, &uart_pdata); | 298 | imx21_add_imx_uart3(&uart_pdata_rts); |
269 | mxc_register_device(&mxc_fb_device, &mx21ads_fb_data); | 299 | mxc_register_device(&mxc_fb_device, &mx21ads_fb_data); |
270 | mxc_register_device(&mxc_sdhc_device0, &mx21ads_sdhc_pdata); | 300 | mxc_register_device(&mxc_sdhc_device0, &mx21ads_sdhc_pdata); |
271 | mxc_register_device(&imx21_nand_device, &mx21ads_nand_board_info); | 301 | imx21_add_mxc_nand(&mx21ads_nand_board_info); |
272 | 302 | ||
273 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 303 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
274 | } | 304 | } |
diff --git a/arch/arm/mach-mx2/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c index b2f4e0db3fb3..e66ffaa1c26c 100644 --- a/arch/arm/mach-mx2/mach-mx27_3ds.c +++ b/arch/arm/mach-imx/mach-mx27_3ds.c | |||
@@ -12,23 +12,25 @@ | |||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
15 | * | 15 | */ |
16 | * You should have received a copy of the GNU General Public License | 16 | |
17 | * along with this program; if not, write to the Free Software | 17 | /* |
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * This machine is known as: |
19 | * - i.MX27 3-Stack Development System | ||
20 | * - i.MX27 Platform Development Kit (i.MX27 PDK) | ||
19 | */ | 21 | */ |
20 | 22 | ||
21 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
22 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
25 | #include <linux/input/matrix_keypad.h> | ||
23 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
24 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
25 | #include <asm/mach/time.h> | 28 | #include <asm/mach/time.h> |
26 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
27 | #include <mach/common.h> | 30 | #include <mach/common.h> |
28 | #include <mach/imx-uart.h> | ||
29 | #include <mach/iomux-mx27.h> | 31 | #include <mach/iomux-mx27.h> |
30 | #include <mach/board-mx27pdk.h> | ||
31 | 32 | ||
33 | #include "devices-imx27.h" | ||
32 | #include "devices.h" | 34 | #include "devices.h" |
33 | 35 | ||
34 | static unsigned int mx27pdk_pins[] = { | 36 | static unsigned int mx27pdk_pins[] = { |
@@ -58,7 +60,7 @@ static unsigned int mx27pdk_pins[] = { | |||
58 | PF23_AIN_FEC_TX_EN, | 60 | PF23_AIN_FEC_TX_EN, |
59 | }; | 61 | }; |
60 | 62 | ||
61 | static struct imxuart_platform_data uart_pdata = { | 63 | static const struct imxuart_platform_data uart_pdata __initconst = { |
62 | .flags = IMXUART_HAVE_RTSCTS, | 64 | .flags = IMXUART_HAVE_RTSCTS, |
63 | }; | 65 | }; |
64 | 66 | ||
@@ -66,12 +68,34 @@ static struct platform_device *platform_devices[] __initdata = { | |||
66 | &mxc_fec_device, | 68 | &mxc_fec_device, |
67 | }; | 69 | }; |
68 | 70 | ||
71 | /* | ||
72 | * Matrix keyboard | ||
73 | */ | ||
74 | |||
75 | static const uint32_t mx27_3ds_keymap[] = { | ||
76 | KEY(0, 0, KEY_UP), | ||
77 | KEY(0, 1, KEY_DOWN), | ||
78 | KEY(1, 0, KEY_RIGHT), | ||
79 | KEY(1, 1, KEY_LEFT), | ||
80 | KEY(1, 2, KEY_ENTER), | ||
81 | KEY(2, 0, KEY_F6), | ||
82 | KEY(2, 1, KEY_F8), | ||
83 | KEY(2, 2, KEY_F9), | ||
84 | KEY(2, 3, KEY_F10), | ||
85 | }; | ||
86 | |||
87 | static struct matrix_keymap_data mx27_3ds_keymap_data = { | ||
88 | .keymap = mx27_3ds_keymap, | ||
89 | .keymap_size = ARRAY_SIZE(mx27_3ds_keymap), | ||
90 | }; | ||
91 | |||
69 | static void __init mx27pdk_init(void) | 92 | static void __init mx27pdk_init(void) |
70 | { | 93 | { |
71 | mxc_gpio_setup_multiple_pins(mx27pdk_pins, ARRAY_SIZE(mx27pdk_pins), | 94 | mxc_gpio_setup_multiple_pins(mx27pdk_pins, ARRAY_SIZE(mx27pdk_pins), |
72 | "mx27pdk"); | 95 | "mx27pdk"); |
73 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 96 | imx27_add_imx_uart0(&uart_pdata); |
74 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 97 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
98 | mxc_register_device(&imx_kpp_device, &mx27_3ds_keymap_data); | ||
75 | } | 99 | } |
76 | 100 | ||
77 | static void __init mx27pdk_timer_init(void) | 101 | static void __init mx27pdk_timer_init(void) |
diff --git a/arch/arm/mach-mx2/mach-mx27ads.c b/arch/arm/mach-imx/mach-mx27ads.c index 6ce323669e58..9c77da98a10e 100644 --- a/arch/arm/mach-mx2/mach-mx27ads.c +++ b/arch/arm/mach-imx/mach-mx27ads.c | |||
@@ -12,10 +12,6 @@ | |||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | 15 | */ |
20 | 16 | ||
21 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
@@ -32,16 +28,44 @@ | |||
32 | #include <asm/mach/time.h> | 28 | #include <asm/mach/time.h> |
33 | #include <asm/mach/map.h> | 29 | #include <asm/mach/map.h> |
34 | #include <mach/gpio.h> | 30 | #include <mach/gpio.h> |
35 | #include <mach/imx-uart.h> | ||
36 | #include <mach/iomux-mx27.h> | 31 | #include <mach/iomux-mx27.h> |
37 | #include <mach/board-mx27ads.h> | ||
38 | #include <mach/mxc_nand.h> | 32 | #include <mach/mxc_nand.h> |
39 | #include <mach/i2c.h> | ||
40 | #include <mach/imxfb.h> | 33 | #include <mach/imxfb.h> |
41 | #include <mach/mmc.h> | 34 | #include <mach/mmc.h> |
42 | 35 | ||
36 | #include "devices-imx27.h" | ||
43 | #include "devices.h" | 37 | #include "devices.h" |
44 | 38 | ||
39 | /* | ||
40 | * Base address of PBC controller, CS4 | ||
41 | */ | ||
42 | #define PBC_BASE_ADDRESS 0xf4300000 | ||
43 | #define PBC_REG_ADDR(offset) (void __force __iomem *) \ | ||
44 | (PBC_BASE_ADDRESS + (offset)) | ||
45 | |||
46 | /* When the PBC address connection is fixed in h/w, defined as 1 */ | ||
47 | #define PBC_ADDR_SH 0 | ||
48 | |||
49 | /* Offsets for the PBC Controller register */ | ||
50 | /* | ||
51 | * PBC Board version register offset | ||
52 | */ | ||
53 | #define PBC_VERSION_REG PBC_REG_ADDR(0x00000 >> PBC_ADDR_SH) | ||
54 | /* | ||
55 | * PBC Board control register 1 set address. | ||
56 | */ | ||
57 | #define PBC_BCTRL1_SET_REG PBC_REG_ADDR(0x00008 >> PBC_ADDR_SH) | ||
58 | /* | ||
59 | * PBC Board control register 1 clear address. | ||
60 | */ | ||
61 | #define PBC_BCTRL1_CLEAR_REG PBC_REG_ADDR(0x0000C >> PBC_ADDR_SH) | ||
62 | |||
63 | /* PBC Board Control Register 1 bit definitions */ | ||
64 | #define PBC_BCTRL1_LCDON 0x0800 /* Enable the LCD */ | ||
65 | |||
66 | /* to determine the correct external crystal reference */ | ||
67 | #define CKIH_27MHZ_BIT_SET (1 << 3) | ||
68 | |||
45 | static unsigned int mx27ads_pins[] = { | 69 | static unsigned int mx27ads_pins[] = { |
46 | /* UART0 */ | 70 | /* UART0 */ |
47 | PE12_PF_UART1_TXD, | 71 | PE12_PF_UART1_TXD, |
@@ -141,7 +165,8 @@ static unsigned int mx27ads_pins[] = { | |||
141 | PB9_PF_SD2_CLK, | 165 | PB9_PF_SD2_CLK, |
142 | }; | 166 | }; |
143 | 167 | ||
144 | static struct mxc_nand_platform_data mx27ads_nand_board_info = { | 168 | static const struct mxc_nand_platform_data |
169 | mx27ads_nand_board_info __initconst = { | ||
145 | .width = 1, | 170 | .width = 1, |
146 | .hw_ecc = 1, | 171 | .hw_ecc = 1, |
147 | }; | 172 | }; |
@@ -168,7 +193,7 @@ static struct platform_device mx27ads_nor_mtd_device = { | |||
168 | .resource = &mx27ads_flash_resource, | 193 | .resource = &mx27ads_flash_resource, |
169 | }; | 194 | }; |
170 | 195 | ||
171 | static struct imxi2c_platform_data mx27ads_i2c_data = { | 196 | static const struct imxi2c_platform_data mx27ads_i2c1_data __initconst = { |
172 | .bitrate = 100000, | 197 | .bitrate = 100000, |
173 | }; | 198 | }; |
174 | 199 | ||
@@ -263,20 +288,8 @@ static struct platform_device *platform_devices[] __initdata = { | |||
263 | &mxc_w1_master_device, | 288 | &mxc_w1_master_device, |
264 | }; | 289 | }; |
265 | 290 | ||
266 | static struct imxuart_platform_data uart_pdata[] = { | 291 | static const struct imxuart_platform_data uart_pdata __initconst = { |
267 | { | 292 | .flags = IMXUART_HAVE_RTSCTS, |
268 | .flags = IMXUART_HAVE_RTSCTS, | ||
269 | }, { | ||
270 | .flags = IMXUART_HAVE_RTSCTS, | ||
271 | }, { | ||
272 | .flags = IMXUART_HAVE_RTSCTS, | ||
273 | }, { | ||
274 | .flags = IMXUART_HAVE_RTSCTS, | ||
275 | }, { | ||
276 | .flags = IMXUART_HAVE_RTSCTS, | ||
277 | }, { | ||
278 | .flags = IMXUART_HAVE_RTSCTS, | ||
279 | }, | ||
280 | }; | 293 | }; |
281 | 294 | ||
282 | static void __init mx27ads_board_init(void) | 295 | static void __init mx27ads_board_init(void) |
@@ -284,18 +297,18 @@ static void __init mx27ads_board_init(void) | |||
284 | mxc_gpio_setup_multiple_pins(mx27ads_pins, ARRAY_SIZE(mx27ads_pins), | 297 | mxc_gpio_setup_multiple_pins(mx27ads_pins, ARRAY_SIZE(mx27ads_pins), |
285 | "mx27ads"); | 298 | "mx27ads"); |
286 | 299 | ||
287 | mxc_register_device(&mxc_uart_device0, &uart_pdata[0]); | 300 | imx27_add_imx_uart0(&uart_pdata); |
288 | mxc_register_device(&mxc_uart_device1, &uart_pdata[1]); | 301 | imx27_add_imx_uart1(&uart_pdata); |
289 | mxc_register_device(&mxc_uart_device2, &uart_pdata[2]); | 302 | imx27_add_imx_uart2(&uart_pdata); |
290 | mxc_register_device(&mxc_uart_device3, &uart_pdata[3]); | 303 | imx27_add_imx_uart3(&uart_pdata); |
291 | mxc_register_device(&mxc_uart_device4, &uart_pdata[4]); | 304 | imx27_add_imx_uart4(&uart_pdata); |
292 | mxc_register_device(&mxc_uart_device5, &uart_pdata[5]); | 305 | imx27_add_imx_uart5(&uart_pdata); |
293 | mxc_register_device(&imx27_nand_device, &mx27ads_nand_board_info); | 306 | imx27_add_mxc_nand(&mx27ads_nand_board_info); |
294 | 307 | ||
295 | /* only the i2c master 1 is used on this CPU card */ | 308 | /* only the i2c master 1 is used on this CPU card */ |
296 | i2c_register_board_info(1, mx27ads_i2c_devices, | 309 | i2c_register_board_info(1, mx27ads_i2c_devices, |
297 | ARRAY_SIZE(mx27ads_i2c_devices)); | 310 | ARRAY_SIZE(mx27ads_i2c_devices)); |
298 | mxc_register_device(&mxc_i2c_device1, &mx27ads_i2c_data); | 311 | imx27_add_i2c_imx1(&mx27ads_i2c1_data); |
299 | mxc_register_device(&mxc_fb_device, &mx27ads_fb_data); | 312 | mxc_register_device(&mxc_fb_device, &mx27ads_fb_data); |
300 | mxc_register_device(&mxc_sdhc_device0, &sdhc1_pdata); | 313 | mxc_register_device(&mxc_sdhc_device0, &sdhc1_pdata); |
301 | mxc_register_device(&mxc_sdhc_device1, &sdhc2_pdata); | 314 | mxc_register_device(&mxc_sdhc_device1, &sdhc2_pdata); |
@@ -342,4 +355,3 @@ MACHINE_START(MX27ADS, "Freescale i.MX27ADS") | |||
342 | .init_machine = mx27ads_board_init, | 355 | .init_machine = mx27ads_board_init, |
343 | .timer = &mx27ads_timer, | 356 | .timer = &mx27ads_timer, |
344 | MACHINE_END | 357 | MACHINE_END |
345 | |||
diff --git a/arch/arm/mach-mx2/mach-mxt_td60.c b/arch/arm/mach-imx/mach-mxt_td60.c index bc3855992677..a3a1e452d4c5 100644 --- a/arch/arm/mach-mx2/mach-mxt_td60.c +++ b/arch/arm/mach-imx/mach-mxt_td60.c | |||
@@ -12,10 +12,6 @@ | |||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | 15 | */ |
20 | 16 | ||
21 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
@@ -32,14 +28,13 @@ | |||
32 | #include <asm/mach/time.h> | 28 | #include <asm/mach/time.h> |
33 | #include <asm/mach/map.h> | 29 | #include <asm/mach/map.h> |
34 | #include <linux/gpio.h> | 30 | #include <linux/gpio.h> |
35 | #include <mach/imx-uart.h> | ||
36 | #include <mach/iomux-mx27.h> | 31 | #include <mach/iomux-mx27.h> |
37 | #include <mach/mxc_nand.h> | 32 | #include <mach/mxc_nand.h> |
38 | #include <mach/i2c.h> | ||
39 | #include <linux/i2c/pca953x.h> | 33 | #include <linux/i2c/pca953x.h> |
40 | #include <mach/imxfb.h> | 34 | #include <mach/imxfb.h> |
41 | #include <mach/mmc.h> | 35 | #include <mach/mmc.h> |
42 | 36 | ||
37 | #include "devices-imx27.h" | ||
43 | #include "devices.h" | 38 | #include "devices.h" |
44 | 39 | ||
45 | static unsigned int mxt_td60_pins[] __initdata = { | 40 | static unsigned int mxt_td60_pins[] __initdata = { |
@@ -128,12 +123,13 @@ static unsigned int mxt_td60_pins[] __initdata = { | |||
128 | PB9_PF_SD2_CLK, | 123 | PB9_PF_SD2_CLK, |
129 | }; | 124 | }; |
130 | 125 | ||
131 | static struct mxc_nand_platform_data mxt_td60_nand_board_info = { | 126 | static const struct mxc_nand_platform_data |
127 | mxt_td60_nand_board_info __initconst = { | ||
132 | .width = 1, | 128 | .width = 1, |
133 | .hw_ecc = 1, | 129 | .hw_ecc = 1, |
134 | }; | 130 | }; |
135 | 131 | ||
136 | static struct imxi2c_platform_data mxt_td60_i2c_data = { | 132 | static const struct imxi2c_platform_data mxt_td60_i2c0_data __initconst = { |
137 | .bitrate = 100000, | 133 | .bitrate = 100000, |
138 | }; | 134 | }; |
139 | 135 | ||
@@ -173,7 +169,7 @@ static struct i2c_board_info mxt_td60_i2c_devices[] = { | |||
173 | }, | 169 | }, |
174 | }; | 170 | }; |
175 | 171 | ||
176 | static struct imxi2c_platform_data mxt_td60_i2c2_data = { | 172 | static const struct imxi2c_platform_data mxt_td60_i2c1_data __initconst = { |
177 | .bitrate = 100000, | 173 | .bitrate = 100000, |
178 | }; | 174 | }; |
179 | 175 | ||
@@ -239,14 +235,8 @@ static struct platform_device *platform_devices[] __initdata = { | |||
239 | &mxc_fec_device, | 235 | &mxc_fec_device, |
240 | }; | 236 | }; |
241 | 237 | ||
242 | static struct imxuart_platform_data uart_pdata[] = { | 238 | static const struct imxuart_platform_data uart_pdata __initconst = { |
243 | { | 239 | .flags = IMXUART_HAVE_RTSCTS, |
244 | .flags = IMXUART_HAVE_RTSCTS, | ||
245 | }, { | ||
246 | .flags = IMXUART_HAVE_RTSCTS, | ||
247 | }, { | ||
248 | .flags = IMXUART_HAVE_RTSCTS, | ||
249 | }, | ||
250 | }; | 240 | }; |
251 | 241 | ||
252 | static void __init mxt_td60_board_init(void) | 242 | static void __init mxt_td60_board_init(void) |
@@ -254,10 +244,10 @@ static void __init mxt_td60_board_init(void) | |||
254 | mxc_gpio_setup_multiple_pins(mxt_td60_pins, ARRAY_SIZE(mxt_td60_pins), | 244 | mxc_gpio_setup_multiple_pins(mxt_td60_pins, ARRAY_SIZE(mxt_td60_pins), |
255 | "MXT_TD60"); | 245 | "MXT_TD60"); |
256 | 246 | ||
257 | mxc_register_device(&mxc_uart_device0, &uart_pdata[0]); | 247 | imx27_add_imx_uart0(&uart_pdata); |
258 | mxc_register_device(&mxc_uart_device1, &uart_pdata[1]); | 248 | imx27_add_imx_uart1(&uart_pdata); |
259 | mxc_register_device(&mxc_uart_device2, &uart_pdata[2]); | 249 | imx27_add_imx_uart2(&uart_pdata); |
260 | mxc_register_device(&imx27_nand_device, &mxt_td60_nand_board_info); | 250 | imx27_add_mxc_nand(&mxt_td60_nand_board_info); |
261 | 251 | ||
262 | i2c_register_board_info(0, mxt_td60_i2c_devices, | 252 | i2c_register_board_info(0, mxt_td60_i2c_devices, |
263 | ARRAY_SIZE(mxt_td60_i2c_devices)); | 253 | ARRAY_SIZE(mxt_td60_i2c_devices)); |
@@ -265,8 +255,8 @@ static void __init mxt_td60_board_init(void) | |||
265 | i2c_register_board_info(1, mxt_td60_i2c2_devices, | 255 | i2c_register_board_info(1, mxt_td60_i2c2_devices, |
266 | ARRAY_SIZE(mxt_td60_i2c2_devices)); | 256 | ARRAY_SIZE(mxt_td60_i2c2_devices)); |
267 | 257 | ||
268 | mxc_register_device(&mxc_i2c_device0, &mxt_td60_i2c_data); | 258 | imx27_add_i2c_imx0(&mxt_td60_i2c0_data); |
269 | mxc_register_device(&mxc_i2c_device1, &mxt_td60_i2c2_data); | 259 | imx27_add_i2c_imx1(&mxt_td60_i2c1_data); |
270 | mxc_register_device(&mxc_fb_device, &mxt_td60_fb_data); | 260 | mxc_register_device(&mxc_fb_device, &mxt_td60_fb_data); |
271 | mxc_register_device(&mxc_sdhc_device0, &sdhc1_pdata); | 261 | mxc_register_device(&mxc_sdhc_device0, &sdhc1_pdata); |
272 | 262 | ||
diff --git a/arch/arm/mach-mx2/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c index a87422ed4ff5..6c92deaf468f 100644 --- a/arch/arm/mach-mx2/mach-pca100.c +++ b/arch/arm/mach-imx/mach-pca100.c | |||
@@ -36,12 +36,7 @@ | |||
36 | #include <mach/common.h> | 36 | #include <mach/common.h> |
37 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
38 | #include <mach/iomux-mx27.h> | 38 | #include <mach/iomux-mx27.h> |
39 | #include <mach/i2c.h> | ||
40 | #include <asm/mach/time.h> | 39 | #include <asm/mach/time.h> |
41 | #if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) | ||
42 | #include <mach/spi.h> | ||
43 | #endif | ||
44 | #include <mach/imx-uart.h> | ||
45 | #include <mach/audmux.h> | 40 | #include <mach/audmux.h> |
46 | #include <mach/ssi.h> | 41 | #include <mach/ssi.h> |
47 | #include <mach/mxc_nand.h> | 42 | #include <mach/mxc_nand.h> |
@@ -49,11 +44,16 @@ | |||
49 | #include <mach/mmc.h> | 44 | #include <mach/mmc.h> |
50 | #include <mach/mxc_ehci.h> | 45 | #include <mach/mxc_ehci.h> |
51 | #include <mach/ulpi.h> | 46 | #include <mach/ulpi.h> |
47 | #include <mach/imxfb.h> | ||
52 | 48 | ||
49 | #include "devices-imx27.h" | ||
53 | #include "devices.h" | 50 | #include "devices.h" |
54 | 51 | ||
55 | #define OTG_PHY_CS_GPIO (GPIO_PORTB + 23) | 52 | #define OTG_PHY_CS_GPIO (GPIO_PORTB + 23) |
56 | #define USBH2_PHY_CS_GPIO (GPIO_PORTB + 24) | 53 | #define USBH2_PHY_CS_GPIO (GPIO_PORTB + 24) |
54 | #define SPI1_SS0 (GPIO_PORTD + 28) | ||
55 | #define SPI1_SS1 (GPIO_PORTD + 27) | ||
56 | #define SD2_CD (GPIO_PORTC + 29) | ||
57 | 57 | ||
58 | static int pca100_pins[] = { | 58 | static int pca100_pins[] = { |
59 | /* UART1 */ | 59 | /* UART1 */ |
@@ -68,6 +68,7 @@ static int pca100_pins[] = { | |||
68 | PB7_PF_SD2_D3, | 68 | PB7_PF_SD2_D3, |
69 | PB8_PF_SD2_CMD, | 69 | PB8_PF_SD2_CMD, |
70 | PB9_PF_SD2_CLK, | 70 | PB9_PF_SD2_CLK, |
71 | SD2_CD | GPIO_GPIO | GPIO_IN, | ||
71 | /* FEC */ | 72 | /* FEC */ |
72 | PD0_AIN_FEC_TXD0, | 73 | PD0_AIN_FEC_TXD0, |
73 | PD1_AIN_FEC_TXD1, | 74 | PD1_AIN_FEC_TXD1, |
@@ -131,13 +132,42 @@ static int pca100_pins[] = { | |||
131 | PD23_AF_USBH2_DATA2, | 132 | PD23_AF_USBH2_DATA2, |
132 | PD24_AF_USBH2_DATA1, | 133 | PD24_AF_USBH2_DATA1, |
133 | PD26_AF_USBH2_DATA5, | 134 | PD26_AF_USBH2_DATA5, |
135 | /* display */ | ||
136 | PA5_PF_LSCLK, | ||
137 | PA6_PF_LD0, | ||
138 | PA7_PF_LD1, | ||
139 | PA8_PF_LD2, | ||
140 | PA9_PF_LD3, | ||
141 | PA10_PF_LD4, | ||
142 | PA11_PF_LD5, | ||
143 | PA12_PF_LD6, | ||
144 | PA13_PF_LD7, | ||
145 | PA14_PF_LD8, | ||
146 | PA15_PF_LD9, | ||
147 | PA16_PF_LD10, | ||
148 | PA17_PF_LD11, | ||
149 | PA18_PF_LD12, | ||
150 | PA19_PF_LD13, | ||
151 | PA20_PF_LD14, | ||
152 | PA21_PF_LD15, | ||
153 | PA22_PF_LD16, | ||
154 | PA23_PF_LD17, | ||
155 | PA26_PF_PS, | ||
156 | PA28_PF_HSYNC, | ||
157 | PA29_PF_VSYNC, | ||
158 | PA31_PF_OE_ACD, | ||
159 | /* free GPIO */ | ||
160 | GPIO_PORTC | 31 | GPIO_GPIO | GPIO_IN, /* GPIO0_IRQ */ | ||
161 | GPIO_PORTC | 25 | GPIO_GPIO | GPIO_IN, /* GPIO1_IRQ */ | ||
162 | GPIO_PORTE | 5 | GPIO_GPIO | GPIO_IN, /* GPIO2_IRQ */ | ||
134 | }; | 163 | }; |
135 | 164 | ||
136 | static struct imxuart_platform_data uart_pdata = { | 165 | static const struct imxuart_platform_data uart_pdata __initconst = { |
137 | .flags = IMXUART_HAVE_RTSCTS, | 166 | .flags = IMXUART_HAVE_RTSCTS, |
138 | }; | 167 | }; |
139 | 168 | ||
140 | static struct mxc_nand_platform_data pca100_nand_board_info = { | 169 | static const struct mxc_nand_platform_data |
170 | pca100_nand_board_info __initconst = { | ||
141 | .width = 1, | 171 | .width = 1, |
142 | .hw_ecc = 1, | 172 | .hw_ecc = 1, |
143 | }; | 173 | }; |
@@ -148,7 +178,7 @@ static struct platform_device *platform_devices[] __initdata = { | |||
148 | &mxc_wdt, | 178 | &mxc_wdt, |
149 | }; | 179 | }; |
150 | 180 | ||
151 | static struct imxi2c_platform_data pca100_i2c_1_data = { | 181 | static const struct imxi2c_platform_data pca100_i2c1_data __initconst = { |
152 | .bitrate = 100000, | 182 | .bitrate = 100000, |
153 | }; | 183 | }; |
154 | 184 | ||
@@ -189,9 +219,9 @@ static struct spi_board_info pca100_spi_board_info[] __initdata = { | |||
189 | }, | 219 | }, |
190 | }; | 220 | }; |
191 | 221 | ||
192 | static int pca100_spi_cs[] = {GPIO_PORTD + 28, GPIO_PORTD + 27}; | 222 | static int pca100_spi_cs[] = {SPI1_SS0, SPI1_SS1}; |
193 | 223 | ||
194 | static struct spi_imx_master pca100_spi_0_data = { | 224 | static const struct spi_imx_master pca100_spi0_data __initconst = { |
195 | .chipselect = pca100_spi_cs, | 225 | .chipselect = pca100_spi_cs, |
196 | .num_chipselect = ARRAY_SIZE(pca100_spi_cs), | 226 | .num_chipselect = ARRAY_SIZE(pca100_spi_cs), |
197 | }; | 227 | }; |
@@ -253,6 +283,7 @@ static struct imxmmc_platform_data sdhc_pdata = { | |||
253 | .exit = pca100_sdhc2_exit, | 283 | .exit = pca100_sdhc2_exit, |
254 | }; | 284 | }; |
255 | 285 | ||
286 | #if defined(CONFIG_USB_ULPI) | ||
256 | static int otg_phy_init(struct platform_device *pdev) | 287 | static int otg_phy_init(struct platform_device *pdev) |
257 | { | 288 | { |
258 | gpio_set_value(OTG_PHY_CS_GPIO, 0); | 289 | gpio_set_value(OTG_PHY_CS_GPIO, 0); |
@@ -276,6 +307,7 @@ static struct mxc_usbh_platform_data usbh2_pdata = { | |||
276 | .portsc = MXC_EHCI_MODE_ULPI, | 307 | .portsc = MXC_EHCI_MODE_ULPI, |
277 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, | 308 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, |
278 | }; | 309 | }; |
310 | #endif | ||
279 | 311 | ||
280 | static struct fsl_usb2_platform_data otg_device_pdata = { | 312 | static struct fsl_usb2_platform_data otg_device_pdata = { |
281 | .operating_mode = FSL_USB2_DR_DEVICE, | 313 | .operating_mode = FSL_USB2_DR_DEVICE, |
@@ -297,6 +329,45 @@ static int __init pca100_otg_mode(char *options) | |||
297 | } | 329 | } |
298 | __setup("otg_mode=", pca100_otg_mode); | 330 | __setup("otg_mode=", pca100_otg_mode); |
299 | 331 | ||
332 | /* framebuffer info */ | ||
333 | static struct imx_fb_videomode pca100_fb_modes[] = { | ||
334 | { | ||
335 | .mode = { | ||
336 | .name = "EMERGING-ETV570G0DHU", | ||
337 | .refresh = 60, | ||
338 | .xres = 640, | ||
339 | .yres = 480, | ||
340 | .pixclock = 39722, /* in ps (25.175 MHz) */ | ||
341 | .hsync_len = 30, | ||
342 | .left_margin = 114, | ||
343 | .right_margin = 16, | ||
344 | .vsync_len = 3, | ||
345 | .upper_margin = 32, | ||
346 | .lower_margin = 0, | ||
347 | }, | ||
348 | /* | ||
349 | * TFT | ||
350 | * Pixel pol active high | ||
351 | * HSYNC active low | ||
352 | * VSYNC active low | ||
353 | * use HSYNC for ACD count | ||
354 | * line clock disable while idle | ||
355 | * always enable line clock even if no data | ||
356 | */ | ||
357 | .pcr = 0xf0c08080, | ||
358 | .bpp = 16, | ||
359 | }, | ||
360 | }; | ||
361 | |||
362 | static struct imx_fb_platform_data pca100_fb_data = { | ||
363 | .mode = pca100_fb_modes, | ||
364 | .num_modes = ARRAY_SIZE(pca100_fb_modes), | ||
365 | |||
366 | .pwmr = 0x00A903FF, | ||
367 | .lscr1 = 0x00120300, | ||
368 | .dmacr = 0x00020010, | ||
369 | }; | ||
370 | |||
300 | static void __init pca100_init(void) | 371 | static void __init pca100_init(void) |
301 | { | 372 | { |
302 | int ret; | 373 | int ret; |
@@ -320,33 +391,24 @@ static void __init pca100_init(void) | |||
320 | 391 | ||
321 | mxc_register_device(&imx_ssi_device0, &pca100_ssi_pdata); | 392 | mxc_register_device(&imx_ssi_device0, &pca100_ssi_pdata); |
322 | 393 | ||
323 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 394 | imx27_add_imx_uart0(&uart_pdata); |
324 | 395 | ||
325 | mxc_gpio_mode(GPIO_PORTC | 29 | GPIO_GPIO | GPIO_IN); | ||
326 | mxc_register_device(&mxc_sdhc_device1, &sdhc_pdata); | 396 | mxc_register_device(&mxc_sdhc_device1, &sdhc_pdata); |
327 | 397 | ||
328 | mxc_register_device(&imx27_nand_device, &pca100_nand_board_info); | 398 | imx27_add_mxc_nand(&pca100_nand_board_info); |
329 | 399 | ||
330 | /* only the i2c master 1 is used on this CPU card */ | 400 | /* only the i2c master 1 is used on this CPU card */ |
331 | i2c_register_board_info(1, pca100_i2c_devices, | 401 | i2c_register_board_info(1, pca100_i2c_devices, |
332 | ARRAY_SIZE(pca100_i2c_devices)); | 402 | ARRAY_SIZE(pca100_i2c_devices)); |
333 | 403 | ||
334 | mxc_register_device(&mxc_i2c_device1, &pca100_i2c_1_data); | 404 | imx27_add_i2c_imx1(&pca100_i2c1_data); |
335 | |||
336 | mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT); | ||
337 | mxc_gpio_mode(GPIO_PORTD | 27 | GPIO_GPIO | GPIO_OUT); | ||
338 | |||
339 | /* GPIO0_IRQ */ | ||
340 | mxc_gpio_mode(GPIO_PORTC | 31 | GPIO_GPIO | GPIO_IN); | ||
341 | /* GPIO1_IRQ */ | ||
342 | mxc_gpio_mode(GPIO_PORTC | 25 | GPIO_GPIO | GPIO_IN); | ||
343 | /* GPIO2_IRQ */ | ||
344 | mxc_gpio_mode(GPIO_PORTE | 5 | GPIO_GPIO | GPIO_IN); | ||
345 | 405 | ||
346 | #if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) | 406 | #if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) |
407 | mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_IN); | ||
408 | mxc_gpio_mode(GPIO_PORTD | 27 | GPIO_GPIO | GPIO_IN); | ||
347 | spi_register_board_info(pca100_spi_board_info, | 409 | spi_register_board_info(pca100_spi_board_info, |
348 | ARRAY_SIZE(pca100_spi_board_info)); | 410 | ARRAY_SIZE(pca100_spi_board_info)); |
349 | mxc_register_device(&mxc_spi_device0, &pca100_spi_0_data); | 411 | imx27_add_spi_imx0(&pca100_spi_0_data); |
350 | #endif | 412 | #endif |
351 | 413 | ||
352 | gpio_request(OTG_PHY_CS_GPIO, "usb-otg-cs"); | 414 | gpio_request(OTG_PHY_CS_GPIO, "usb-otg-cs"); |
@@ -372,6 +434,8 @@ static void __init pca100_init(void) | |||
372 | mxc_register_device(&mxc_otg_udc_device, &otg_device_pdata); | 434 | mxc_register_device(&mxc_otg_udc_device, &otg_device_pdata); |
373 | } | 435 | } |
374 | 436 | ||
437 | mxc_register_device(&mxc_fb_device, &pca100_fb_data); | ||
438 | |||
375 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 439 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
376 | } | 440 | } |
377 | 441 | ||
diff --git a/arch/arm/mach-mx2/mach-pcm038.c b/arch/arm/mach-imx/mach-pcm038.c index 36c89431679a..9212e8f37001 100644 --- a/arch/arm/mach-mx2/mach-pcm038.c +++ b/arch/arm/mach-imx/mach-pcm038.c | |||
@@ -35,14 +35,12 @@ | |||
35 | #include <mach/board-pcm038.h> | 35 | #include <mach/board-pcm038.h> |
36 | #include <mach/common.h> | 36 | #include <mach/common.h> |
37 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
38 | #include <mach/i2c.h> | ||
39 | #include <mach/iomux-mx27.h> | 38 | #include <mach/iomux-mx27.h> |
40 | #include <mach/imx-uart.h> | ||
41 | #include <mach/mxc_nand.h> | 39 | #include <mach/mxc_nand.h> |
42 | #include <mach/spi.h> | ||
43 | #include <mach/mxc_ehci.h> | 40 | #include <mach/mxc_ehci.h> |
44 | #include <mach/ulpi.h> | 41 | #include <mach/ulpi.h> |
45 | 42 | ||
43 | #include "devices-imx27.h" | ||
46 | #include "devices.h" | 44 | #include "devices.h" |
47 | 45 | ||
48 | static int pcm038_pins[] = { | 46 | static int pcm038_pins[] = { |
@@ -162,17 +160,12 @@ static struct platform_device pcm038_nor_mtd_device = { | |||
162 | .resource = &pcm038_flash_resource, | 160 | .resource = &pcm038_flash_resource, |
163 | }; | 161 | }; |
164 | 162 | ||
165 | static struct imxuart_platform_data uart_pdata[] = { | 163 | static const struct imxuart_platform_data uart_pdata __initconst = { |
166 | { | 164 | .flags = IMXUART_HAVE_RTSCTS, |
167 | .flags = IMXUART_HAVE_RTSCTS, | ||
168 | }, { | ||
169 | .flags = IMXUART_HAVE_RTSCTS, | ||
170 | }, { | ||
171 | .flags = IMXUART_HAVE_RTSCTS, | ||
172 | }, | ||
173 | }; | 165 | }; |
174 | 166 | ||
175 | static struct mxc_nand_platform_data pcm038_nand_board_info = { | 167 | static const struct mxc_nand_platform_data |
168 | pcm038_nand_board_info __initconst = { | ||
176 | .width = 1, | 169 | .width = 1, |
177 | .hw_ecc = 1, | 170 | .hw_ecc = 1, |
178 | }; | 171 | }; |
@@ -192,7 +185,7 @@ static void __init pcm038_init_sram(void) | |||
192 | mx27_setup_weimcs(1, 0x0000d843, 0x22252521, 0x22220a00); | 185 | mx27_setup_weimcs(1, 0x0000d843, 0x22252521, 0x22220a00); |
193 | } | 186 | } |
194 | 187 | ||
195 | static struct imxi2c_platform_data pcm038_i2c_1_data = { | 188 | static const struct imxi2c_platform_data pcm038_i2c1_data __initconst = { |
196 | .bitrate = 100000, | 189 | .bitrate = 100000, |
197 | }; | 190 | }; |
198 | 191 | ||
@@ -215,7 +208,7 @@ static struct i2c_board_info pcm038_i2c_devices[] = { | |||
215 | 208 | ||
216 | static int pcm038_spi_cs[] = {GPIO_PORTD + 28}; | 209 | static int pcm038_spi_cs[] = {GPIO_PORTD + 28}; |
217 | 210 | ||
218 | static struct spi_imx_master pcm038_spi_0_data = { | 211 | static const struct spi_imx_master pcm038_spi0_data __initconst = { |
219 | .chipselect = pcm038_spi_cs, | 212 | .chipselect = pcm038_spi_cs, |
220 | .num_chipselect = ARRAY_SIZE(pcm038_spi_cs), | 213 | .num_chipselect = ARRAY_SIZE(pcm038_spi_cs), |
221 | }; | 214 | }; |
@@ -305,18 +298,18 @@ static void __init pcm038_init(void) | |||
305 | 298 | ||
306 | pcm038_init_sram(); | 299 | pcm038_init_sram(); |
307 | 300 | ||
308 | mxc_register_device(&mxc_uart_device0, &uart_pdata[0]); | 301 | imx27_add_imx_uart0(&uart_pdata); |
309 | mxc_register_device(&mxc_uart_device1, &uart_pdata[1]); | 302 | imx27_add_imx_uart1(&uart_pdata); |
310 | mxc_register_device(&mxc_uart_device2, &uart_pdata[2]); | 303 | imx27_add_imx_uart2(&uart_pdata); |
311 | 304 | ||
312 | mxc_gpio_mode(PE16_AF_OWIRE); | 305 | mxc_gpio_mode(PE16_AF_OWIRE); |
313 | mxc_register_device(&imx27_nand_device, &pcm038_nand_board_info); | 306 | imx27_add_mxc_nand(&pcm038_nand_board_info); |
314 | 307 | ||
315 | /* only the i2c master 1 is used on this CPU card */ | 308 | /* only the i2c master 1 is used on this CPU card */ |
316 | i2c_register_board_info(1, pcm038_i2c_devices, | 309 | i2c_register_board_info(1, pcm038_i2c_devices, |
317 | ARRAY_SIZE(pcm038_i2c_devices)); | 310 | ARRAY_SIZE(pcm038_i2c_devices)); |
318 | 311 | ||
319 | mxc_register_device(&mxc_i2c_device1, &pcm038_i2c_1_data); | 312 | imx27_add_i2c_imx1(&pcm038_i2c1_data); |
320 | 313 | ||
321 | /* PE18 for user-LED D40 */ | 314 | /* PE18 for user-LED D40 */ |
322 | mxc_gpio_mode(GPIO_PORTE | 18 | GPIO_GPIO | GPIO_OUT); | 315 | mxc_gpio_mode(GPIO_PORTE | 18 | GPIO_GPIO | GPIO_OUT); |
@@ -326,7 +319,7 @@ static void __init pcm038_init(void) | |||
326 | /* MC13783 IRQ */ | 319 | /* MC13783 IRQ */ |
327 | mxc_gpio_mode(GPIO_PORTB | 23 | GPIO_GPIO | GPIO_IN); | 320 | mxc_gpio_mode(GPIO_PORTB | 23 | GPIO_GPIO | GPIO_IN); |
328 | 321 | ||
329 | mxc_register_device(&mxc_spi_device0, &pcm038_spi_0_data); | 322 | imx27_add_spi_imx0(&pcm038_spi0_data); |
330 | spi_register_board_info(pcm038_spi_board_info, | 323 | spi_register_board_info(pcm038_spi_board_info, |
331 | ARRAY_SIZE(pcm038_spi_board_info)); | 324 | ARRAY_SIZE(pcm038_spi_board_info)); |
332 | 325 | ||
diff --git a/arch/arm/mach-mx1/mach-scb9328.c b/arch/arm/mach-imx/mach-scb9328.c index 7587a7a12460..88bf0d1e26e6 100644 --- a/arch/arm/mach-mx1/mach-scb9328.c +++ b/arch/arm/mach-imx/mach-scb9328.c | |||
@@ -22,17 +22,17 @@ | |||
22 | #include <mach/common.h> | 22 | #include <mach/common.h> |
23 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
24 | #include <mach/irqs.h> | 24 | #include <mach/irqs.h> |
25 | #include <mach/imx-uart.h> | ||
26 | #include <mach/iomux-mx1.h> | 25 | #include <mach/iomux-mx1.h> |
27 | 26 | ||
27 | #include "devices-imx1.h" | ||
28 | #include "devices.h" | 28 | #include "devices.h" |
29 | 29 | ||
30 | /* | 30 | /* |
31 | * This scb9328 has a 32MiB flash | 31 | * This scb9328 has a 32MiB flash |
32 | */ | 32 | */ |
33 | static struct resource flash_resource = { | 33 | static struct resource flash_resource = { |
34 | .start = IMX_CS0_PHYS, | 34 | .start = MX1_CS0_PHYS, |
35 | .end = IMX_CS0_PHYS + (32 * 1024 * 1024) - 1, | 35 | .end = MX1_CS0_PHYS + (32 * 1024 * 1024) - 1, |
36 | .flags = IORESOURCE_MEM, | 36 | .flags = IORESOURCE_MEM, |
37 | }; | 37 | }; |
38 | 38 | ||
@@ -70,13 +70,13 @@ static struct dm9000_plat_data dm9000_platdata = { | |||
70 | static struct resource dm9000x_resources[] = { | 70 | static struct resource dm9000x_resources[] = { |
71 | { | 71 | { |
72 | .name = "address area", | 72 | .name = "address area", |
73 | .start = IMX_CS5_PHYS, | 73 | .start = MX1_CS5_PHYS, |
74 | .end = IMX_CS5_PHYS + 1, | 74 | .end = MX1_CS5_PHYS + 1, |
75 | .flags = IORESOURCE_MEM, /* address access */ | 75 | .flags = IORESOURCE_MEM, /* address access */ |
76 | }, { | 76 | }, { |
77 | .name = "data area", | 77 | .name = "data area", |
78 | .start = IMX_CS5_PHYS + 4, | 78 | .start = MX1_CS5_PHYS + 4, |
79 | .end = IMX_CS5_PHYS + 5, | 79 | .end = MX1_CS5_PHYS + 5, |
80 | .flags = IORESOURCE_MEM, /* data access */ | 80 | .flags = IORESOURCE_MEM, /* data access */ |
81 | }, { | 81 | }, { |
82 | .start = IRQ_GPIOC(3), | 82 | .start = IRQ_GPIOC(3), |
@@ -108,14 +108,13 @@ static int uart1_mxc_init(struct platform_device *pdev) | |||
108 | ARRAY_SIZE(mxc_uart1_pins), "UART1"); | 108 | ARRAY_SIZE(mxc_uart1_pins), "UART1"); |
109 | } | 109 | } |
110 | 110 | ||
111 | static int uart1_mxc_exit(struct platform_device *pdev) | 111 | static void uart1_mxc_exit(struct platform_device *pdev) |
112 | { | 112 | { |
113 | mxc_gpio_release_multiple_pins(mxc_uart1_pins, | 113 | mxc_gpio_release_multiple_pins(mxc_uart1_pins, |
114 | ARRAY_SIZE(mxc_uart1_pins)); | 114 | ARRAY_SIZE(mxc_uart1_pins)); |
115 | return 0; | ||
116 | } | 115 | } |
117 | 116 | ||
118 | static struct imxuart_platform_data uart_pdata = { | 117 | static const struct imxuart_platform_data uart_pdata __initconst = { |
119 | .init = uart1_mxc_init, | 118 | .init = uart1_mxc_init, |
120 | .exit = uart1_mxc_exit, | 119 | .exit = uart1_mxc_exit, |
121 | .flags = IMXUART_HAVE_RTSCTS, | 120 | .flags = IMXUART_HAVE_RTSCTS, |
@@ -131,7 +130,7 @@ static struct platform_device *devices[] __initdata = { | |||
131 | */ | 130 | */ |
132 | static void __init scb9328_init(void) | 131 | static void __init scb9328_init(void) |
133 | { | 132 | { |
134 | mxc_register_device(&imx_uart1_device, &uart_pdata); | 133 | imx1_add_imx_uart0(&uart_pdata); |
135 | 134 | ||
136 | printk(KERN_INFO"Scb9328: Adding devices\n"); | 135 | printk(KERN_INFO"Scb9328: Adding devices\n"); |
137 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 136 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
diff --git a/arch/arm/mach-mx1/generic.c b/arch/arm/mach-imx/mm-imx1.c index 7f9fc1034c08..9be92b96dc89 100644 --- a/arch/arm/mach-mx1/generic.c +++ b/arch/arm/mach-imx/mm-imx1.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * Created: april 20th, 2004 | 3 | * Created: april 20th, 2004 |
4 | * Copyright: Synertronixx GmbH | 4 | * Copyright: Synertronixx GmbH |
5 | * | 5 | * |
6 | * Common code for i.MX machines | 6 | * Common code for i.MX1 machines |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
@@ -14,11 +14,6 @@ | |||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | * GNU General Public License for more details. | 16 | * GNU General Public License for more details. |
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | * | ||
22 | */ | 17 | */ |
23 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
24 | #include <linux/init.h> | 19 | #include <linux/init.h> |
@@ -31,23 +26,25 @@ | |||
31 | 26 | ||
32 | static struct map_desc imx_io_desc[] __initdata = { | 27 | static struct map_desc imx_io_desc[] __initdata = { |
33 | { | 28 | { |
34 | .virtual = IMX_IO_BASE, | 29 | .virtual = MX1_IO_BASE_ADDR_VIRT, |
35 | .pfn = __phys_to_pfn(IMX_IO_PHYS), | 30 | .pfn = __phys_to_pfn(MX1_IO_BASE_ADDR), |
36 | .length = IMX_IO_SIZE, | 31 | .length = MX1_IO_SIZE, |
37 | .type = MT_DEVICE | 32 | .type = MT_DEVICE |
38 | } | 33 | } |
39 | }; | 34 | }; |
40 | 35 | ||
41 | void __init mx1_map_io(void) | 36 | void __init mx1_map_io(void) |
42 | { | 37 | { |
43 | mxc_set_cpu_type(MXC_CPU_MX1); | 38 | mxc_set_cpu_type(MXC_CPU_MX1); |
44 | mxc_arch_reset_init(IO_ADDRESS(WDT_BASE_ADDR)); | 39 | mxc_arch_reset_init(MX1_IO_ADDRESS(MX1_WDT_BASE_ADDR)); |
45 | 40 | ||
46 | iotable_init(imx_io_desc, ARRAY_SIZE(imx_io_desc)); | 41 | iotable_init(imx_io_desc, ARRAY_SIZE(imx_io_desc)); |
47 | } | 42 | } |
48 | 43 | ||
44 | int imx1_register_gpios(void); | ||
45 | |||
49 | void __init mx1_init_irq(void) | 46 | void __init mx1_init_irq(void) |
50 | { | 47 | { |
51 | mxc_init_irq(IO_ADDRESS(AVIC_BASE_ADDR)); | 48 | mxc_init_irq(MX1_IO_ADDRESS(MX1_AVIC_BASE_ADDR)); |
49 | imx1_register_gpios(); | ||
52 | } | 50 | } |
53 | |||
diff --git a/arch/arm/mach-mx2/mm-imx21.c b/arch/arm/mach-imx/mm-imx21.c index 64134314d012..12faeeaa0a97 100644 --- a/arch/arm/mach-mx2/mm-imx21.c +++ b/arch/arm/mach-imx/mm-imx21.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/mach-mx2/mm-imx21.c | 2 | * arch/arm/mach-imx/mm-imx21.c |
3 | * | 3 | * |
4 | * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de) | 4 | * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de) |
5 | * | 5 | * |
@@ -77,7 +77,10 @@ void __init mx21_map_io(void) | |||
77 | iotable_init(imx21_io_desc, ARRAY_SIZE(imx21_io_desc)); | 77 | iotable_init(imx21_io_desc, ARRAY_SIZE(imx21_io_desc)); |
78 | } | 78 | } |
79 | 79 | ||
80 | int imx21_register_gpios(void); | ||
81 | |||
80 | void __init mx21_init_irq(void) | 82 | void __init mx21_init_irq(void) |
81 | { | 83 | { |
82 | mxc_init_irq(MX21_IO_ADDRESS(MX21_AVIC_BASE_ADDR)); | 84 | mxc_init_irq(MX21_IO_ADDRESS(MX21_AVIC_BASE_ADDR)); |
85 | imx21_register_gpios(); | ||
83 | } | 86 | } |
diff --git a/arch/arm/mach-mx2/mm-imx27.c b/arch/arm/mach-imx/mm-imx27.c index 3366ed44cfd5..a24622957ff2 100644 --- a/arch/arm/mach-mx2/mm-imx27.c +++ b/arch/arm/mach-imx/mm-imx27.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/mach-mx2/mm-imx27.c | 2 | * arch/arm/mach-imx/mm-imx27.c |
3 | * | 3 | * |
4 | * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de) | 4 | * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de) |
5 | * | 5 | * |
@@ -77,7 +77,10 @@ void __init mx27_map_io(void) | |||
77 | iotable_init(imx27_io_desc, ARRAY_SIZE(imx27_io_desc)); | 77 | iotable_init(imx27_io_desc, ARRAY_SIZE(imx27_io_desc)); |
78 | } | 78 | } |
79 | 79 | ||
80 | int imx27_register_gpios(void); | ||
81 | |||
80 | void __init mx27_init_irq(void) | 82 | void __init mx27_init_irq(void) |
81 | { | 83 | { |
82 | mxc_init_irq(MX27_IO_ADDRESS(MX27_AVIC_BASE_ADDR)); | 84 | mxc_init_irq(MX27_IO_ADDRESS(MX27_AVIC_BASE_ADDR)); |
85 | imx27_register_gpios(); | ||
83 | } | 86 | } |
diff --git a/arch/arm/mach-mx1/ksym_mx1.c b/arch/arm/mach-imx/mx1-camera-fiq-ksym.c index b09ee12a4ff0..b09ee12a4ff0 100644 --- a/arch/arm/mach-mx1/ksym_mx1.c +++ b/arch/arm/mach-imx/mx1-camera-fiq-ksym.c | |||
diff --git a/arch/arm/mach-mx1/mx1_camera_fiq.S b/arch/arm/mach-imx/mx1-camera-fiq.S index 9c69aa65bf17..9c69aa65bf17 100644 --- a/arch/arm/mach-mx1/mx1_camera_fiq.S +++ b/arch/arm/mach-imx/mx1-camera-fiq.S | |||
diff --git a/arch/arm/mach-mx2/pcm970-baseboard.c b/arch/arm/mach-imx/pcm970-baseboard.c index f490a406d57e..f490a406d57e 100644 --- a/arch/arm/mach-mx2/pcm970-baseboard.c +++ b/arch/arm/mach-imx/pcm970-baseboard.c | |||
diff --git a/arch/arm/mach-imx/pm-imx27.c b/arch/arm/mach-imx/pm-imx27.c new file mode 100644 index 000000000000..afc17ce0bb54 --- /dev/null +++ b/arch/arm/mach-imx/pm-imx27.c | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * i.MX27 Power Management Routines | ||
3 | * | ||
4 | * Based on Freescale's BSP | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License. | ||
8 | */ | ||
9 | |||
10 | #include <linux/kernel.h> | ||
11 | #include <linux/suspend.h> | ||
12 | #include <linux/io.h> | ||
13 | #include <mach/system.h> | ||
14 | #include <mach/mx27.h> | ||
15 | |||
16 | static int mx27_suspend_enter(suspend_state_t state) | ||
17 | { | ||
18 | u32 cscr; | ||
19 | switch (state) { | ||
20 | case PM_SUSPEND_MEM: | ||
21 | /* Clear MPEN and SPEN to disable MPLL/SPLL */ | ||
22 | cscr = __raw_readl(MX27_IO_ADDRESS(MX27_CCM_BASE_ADDR)); | ||
23 | cscr &= 0xFFFFFFFC; | ||
24 | __raw_writel(cscr, MX27_IO_ADDRESS(MX27_CCM_BASE_ADDR)); | ||
25 | /* Executes WFI */ | ||
26 | arch_idle(); | ||
27 | break; | ||
28 | |||
29 | default: | ||
30 | return -EINVAL; | ||
31 | } | ||
32 | return 0; | ||
33 | } | ||
34 | |||
35 | static struct platform_suspend_ops mx27_suspend_ops = { | ||
36 | .enter = mx27_suspend_enter, | ||
37 | .valid = suspend_valid_only_mem, | ||
38 | }; | ||
39 | |||
40 | static int __init mx27_pm_init(void) | ||
41 | { | ||
42 | suspend_set_ops(&mx27_suspend_ops); | ||
43 | return 0; | ||
44 | } | ||
45 | |||
46 | device_initcall(mx27_pm_init); | ||
diff --git a/arch/arm/mach-mx1/Kconfig b/arch/arm/mach-mx1/Kconfig deleted file mode 100644 index eb7660f5d4b7..000000000000 --- a/arch/arm/mach-mx1/Kconfig +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | if ARCH_MX1 | ||
2 | |||
3 | comment "MX1 platforms:" | ||
4 | |||
5 | config MACH_MXLADS | ||
6 | bool | ||
7 | |||
8 | config ARCH_MX1ADS | ||
9 | bool "MX1ADS platform" | ||
10 | select MACH_MXLADS | ||
11 | help | ||
12 | Say Y here if you are using Motorola MX1ADS/MXLADS boards | ||
13 | |||
14 | config MACH_SCB9328 | ||
15 | bool "Synertronixx scb9328" | ||
16 | help | ||
17 | Say Y here if you are using a Synertronixx scb9328 board | ||
18 | |||
19 | endif | ||
diff --git a/arch/arm/mach-mx1/Makefile b/arch/arm/mach-mx1/Makefile deleted file mode 100644 index fc2ddf82441b..000000000000 --- a/arch/arm/mach-mx1/Makefile +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | |||
5 | # Object file lists. | ||
6 | |||
7 | EXTRA_CFLAGS += -DIMX_NEEDS_DEPRECATED_SYMBOLS | ||
8 | obj-y += generic.o clock.o devices.o | ||
9 | |||
10 | # Support for CMOS sensor interface | ||
11 | obj-$(CONFIG_MX1_VIDEO) += ksym_mx1.o mx1_camera_fiq.o | ||
12 | |||
13 | # Specific board support | ||
14 | obj-$(CONFIG_ARCH_MX1ADS) += mach-mx1ads.o | ||
15 | obj-$(CONFIG_MACH_SCB9328) += mach-scb9328.o | ||
diff --git a/arch/arm/mach-mx1/Makefile.boot b/arch/arm/mach-mx1/Makefile.boot deleted file mode 100644 index 8ed1492288a2..000000000000 --- a/arch/arm/mach-mx1/Makefile.boot +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | zreladdr-y := 0x08008000 | ||
2 | params_phys-y := 0x08000100 | ||
3 | initrd_phys-y := 0x08800000 | ||
4 | |||
diff --git a/arch/arm/mach-mx1/crm_regs.h b/arch/arm/mach-mx1/crm_regs.h deleted file mode 100644 index 22e866ff0c09..000000000000 --- a/arch/arm/mach-mx1/crm_regs.h +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright (c) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt> | ||
4 | * | ||
5 | * This file may be distributed under the terms of the GNU General | ||
6 | * Public License, version 2. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ARCH_ARM_MACH_MX1_CRM_REGS_H__ | ||
10 | #define __ARCH_ARM_MACH_MX1_CRM_REGS_H__ | ||
11 | |||
12 | #define CCM_BASE IO_ADDRESS(CCM_BASE_ADDR) | ||
13 | #define SCM_BASE IO_ADDRESS(SCM_BASE_ADDR) | ||
14 | |||
15 | /* CCM register addresses */ | ||
16 | #define CCM_CSCR (CCM_BASE + 0x0) | ||
17 | #define CCM_MPCTL0 (CCM_BASE + 0x4) | ||
18 | #define CCM_MPCTL1 (CCM_BASE + 0x8) | ||
19 | #define CCM_SPCTL0 (CCM_BASE + 0xC) | ||
20 | #define CCM_SPCTL1 (CCM_BASE + 0x10) | ||
21 | #define CCM_PCDR (CCM_BASE + 0x20) | ||
22 | |||
23 | #define CCM_CSCR_CLKO_OFFSET 29 | ||
24 | #define CCM_CSCR_CLKO_MASK (0x7 << 29) | ||
25 | #define CCM_CSCR_USB_OFFSET 26 | ||
26 | #define CCM_CSCR_USB_MASK (0x7 << 26) | ||
27 | #define CCM_CSCR_SPLL_RESTART (1 << 22) | ||
28 | #define CCM_CSCR_MPLL_RESTART (1 << 21) | ||
29 | #define CCM_CSCR_OSC_EN_SHIFT 17 | ||
30 | #define CCM_CSCR_SYSTEM_SEL (1 << 16) | ||
31 | #define CCM_CSCR_BCLK_OFFSET 10 | ||
32 | #define CCM_CSCR_BCLK_MASK (0xF << 10) | ||
33 | #define CCM_CSCR_PRESC (1 << 15) | ||
34 | #define CCM_CSCR_SPEN (1 << 1) | ||
35 | #define CCM_CSCR_MPEN (1 << 0) | ||
36 | |||
37 | #define CCM_PCDR_PCLK3_OFFSET 16 | ||
38 | #define CCM_PCDR_PCLK3_MASK (0x7F << 16) | ||
39 | #define CCM_PCDR_PCLK2_OFFSET 4 | ||
40 | #define CCM_PCDR_PCLK2_MASK (0xF << 4) | ||
41 | #define CCM_PCDR_PCLK1_OFFSET 0 | ||
42 | #define CCM_PCDR_PCLK1_MASK 0xF | ||
43 | |||
44 | /* SCM register addresses */ | ||
45 | #define SCM_SIDR (SCM_BASE + 0x0) | ||
46 | #define SCM_FMCR (SCM_BASE + 0x4) | ||
47 | #define SCM_GPCR (SCM_BASE + 0x8) | ||
48 | #define SCM_GCCR (SCM_BASE + 0xC) | ||
49 | |||
50 | #define SCM_GCCR_DMA_CLK_EN_OFFSET 3 | ||
51 | #define SCM_GCCR_CSI_CLK_EN_OFFSET 2 | ||
52 | #define SCM_GCCR_MMA_CLK_EN_OFFSET 1 | ||
53 | #define SCM_GCCR_USBD_CLK_EN_OFFSET 0 | ||
54 | |||
55 | #endif /* __ARCH_ARM_MACH_MX2_CRM_REGS_H__ */ | ||
diff --git a/arch/arm/mach-mx1/devices.c b/arch/arm/mach-mx1/devices.c deleted file mode 100644 index b6be29d1cb08..000000000000 --- a/arch/arm/mach-mx1/devices.c +++ /dev/null | |||
@@ -1,242 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright 2008 Sascha Hauer, kernel@pengutronix.de | ||
4 | * Copyright (c) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt> | ||
5 | * Copyright (c) 2008 Darius Augulis <darius.augulis@teltonika.lt> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * as published by the Free Software Foundation; either version 2 | ||
10 | * of the License, or (at your option) any later version. | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
19 | * Boston, MA 02110-1301, USA. | ||
20 | */ | ||
21 | |||
22 | #include <linux/kernel.h> | ||
23 | #include <linux/init.h> | ||
24 | #include <linux/platform_device.h> | ||
25 | #include <linux/gpio.h> | ||
26 | #include <mach/irqs.h> | ||
27 | #include <mach/hardware.h> | ||
28 | |||
29 | #include "devices.h" | ||
30 | |||
31 | static struct resource imx_csi_resources[] = { | ||
32 | { | ||
33 | .start = 0x00224000, | ||
34 | .end = 0x00224010, | ||
35 | .flags = IORESOURCE_MEM, | ||
36 | }, { | ||
37 | .start = CSI_INT, | ||
38 | .end = CSI_INT, | ||
39 | .flags = IORESOURCE_IRQ, | ||
40 | }, | ||
41 | }; | ||
42 | |||
43 | static u64 imx_csi_dmamask = 0xffffffffUL; | ||
44 | |||
45 | struct platform_device imx_csi_device = { | ||
46 | .name = "mx1-camera", | ||
47 | .id = 0, /* This is used to put cameras on this interface */ | ||
48 | .dev = { | ||
49 | .dma_mask = &imx_csi_dmamask, | ||
50 | .coherent_dma_mask = 0xffffffff, | ||
51 | }, | ||
52 | .resource = imx_csi_resources, | ||
53 | .num_resources = ARRAY_SIZE(imx_csi_resources), | ||
54 | }; | ||
55 | |||
56 | static struct resource imx_i2c_resources[] = { | ||
57 | { | ||
58 | .start = 0x00217000, | ||
59 | .end = 0x00217010, | ||
60 | .flags = IORESOURCE_MEM, | ||
61 | }, { | ||
62 | .start = I2C_INT, | ||
63 | .end = I2C_INT, | ||
64 | .flags = IORESOURCE_IRQ, | ||
65 | }, | ||
66 | }; | ||
67 | |||
68 | struct platform_device imx_i2c_device = { | ||
69 | .name = "imx-i2c", | ||
70 | .id = 0, | ||
71 | .resource = imx_i2c_resources, | ||
72 | .num_resources = ARRAY_SIZE(imx_i2c_resources), | ||
73 | }; | ||
74 | |||
75 | static struct resource imx_uart1_resources[] = { | ||
76 | { | ||
77 | .start = UART1_BASE_ADDR, | ||
78 | .end = UART1_BASE_ADDR + 0xD0, | ||
79 | .flags = IORESOURCE_MEM, | ||
80 | }, { | ||
81 | .start = UART1_MINT_RX, | ||
82 | .end = UART1_MINT_RX, | ||
83 | .flags = IORESOURCE_IRQ, | ||
84 | }, { | ||
85 | .start = UART1_MINT_TX, | ||
86 | .end = UART1_MINT_TX, | ||
87 | .flags = IORESOURCE_IRQ, | ||
88 | }, { | ||
89 | .start = UART1_MINT_RTS, | ||
90 | .end = UART1_MINT_RTS, | ||
91 | .flags = IORESOURCE_IRQ, | ||
92 | }, | ||
93 | }; | ||
94 | |||
95 | struct platform_device imx_uart1_device = { | ||
96 | .name = "imx-uart", | ||
97 | .id = 0, | ||
98 | .num_resources = ARRAY_SIZE(imx_uart1_resources), | ||
99 | .resource = imx_uart1_resources, | ||
100 | }; | ||
101 | |||
102 | static struct resource imx_uart2_resources[] = { | ||
103 | { | ||
104 | .start = UART2_BASE_ADDR, | ||
105 | .end = UART2_BASE_ADDR + 0xD0, | ||
106 | .flags = IORESOURCE_MEM, | ||
107 | }, { | ||
108 | .start = UART2_MINT_RX, | ||
109 | .end = UART2_MINT_RX, | ||
110 | .flags = IORESOURCE_IRQ, | ||
111 | }, { | ||
112 | .start = UART2_MINT_TX, | ||
113 | .end = UART2_MINT_TX, | ||
114 | .flags = IORESOURCE_IRQ, | ||
115 | }, { | ||
116 | .start = UART2_MINT_RTS, | ||
117 | .end = UART2_MINT_RTS, | ||
118 | .flags = IORESOURCE_IRQ, | ||
119 | }, | ||
120 | }; | ||
121 | |||
122 | struct platform_device imx_uart2_device = { | ||
123 | .name = "imx-uart", | ||
124 | .id = 1, | ||
125 | .num_resources = ARRAY_SIZE(imx_uart2_resources), | ||
126 | .resource = imx_uart2_resources, | ||
127 | }; | ||
128 | |||
129 | static struct resource imx_rtc_resources[] = { | ||
130 | { | ||
131 | .start = 0x00204000, | ||
132 | .end = 0x00204024, | ||
133 | .flags = IORESOURCE_MEM, | ||
134 | }, { | ||
135 | .start = RTC_INT, | ||
136 | .end = RTC_INT, | ||
137 | .flags = IORESOURCE_IRQ, | ||
138 | }, { | ||
139 | .start = RTC_SAMINT, | ||
140 | .end = RTC_SAMINT, | ||
141 | .flags = IORESOURCE_IRQ, | ||
142 | }, | ||
143 | }; | ||
144 | |||
145 | struct platform_device imx_rtc_device = { | ||
146 | .name = "rtc-imx", | ||
147 | .id = 0, | ||
148 | .resource = imx_rtc_resources, | ||
149 | .num_resources = ARRAY_SIZE(imx_rtc_resources), | ||
150 | }; | ||
151 | |||
152 | static struct resource imx_wdt_resources[] = { | ||
153 | { | ||
154 | .start = 0x00201000, | ||
155 | .end = 0x00201008, | ||
156 | .flags = IORESOURCE_MEM, | ||
157 | }, { | ||
158 | .start = WDT_INT, | ||
159 | .end = WDT_INT, | ||
160 | .flags = IORESOURCE_IRQ, | ||
161 | }, | ||
162 | }; | ||
163 | |||
164 | struct platform_device imx_wdt_device = { | ||
165 | .name = "imx-wdt", | ||
166 | .id = 0, | ||
167 | .resource = imx_wdt_resources, | ||
168 | .num_resources = ARRAY_SIZE(imx_wdt_resources), | ||
169 | }; | ||
170 | |||
171 | static struct resource imx_usb_resources[] = { | ||
172 | { | ||
173 | .start = 0x00212000, | ||
174 | .end = 0x00212148, | ||
175 | .flags = IORESOURCE_MEM, | ||
176 | }, { | ||
177 | .start = USBD_INT0, | ||
178 | .end = USBD_INT0, | ||
179 | .flags = IORESOURCE_IRQ, | ||
180 | }, { | ||
181 | .start = USBD_INT1, | ||
182 | .end = USBD_INT1, | ||
183 | .flags = IORESOURCE_IRQ, | ||
184 | }, { | ||
185 | .start = USBD_INT2, | ||
186 | .end = USBD_INT2, | ||
187 | .flags = IORESOURCE_IRQ, | ||
188 | }, { | ||
189 | .start = USBD_INT3, | ||
190 | .end = USBD_INT3, | ||
191 | .flags = IORESOURCE_IRQ, | ||
192 | }, { | ||
193 | .start = USBD_INT4, | ||
194 | .end = USBD_INT4, | ||
195 | .flags = IORESOURCE_IRQ, | ||
196 | }, { | ||
197 | .start = USBD_INT5, | ||
198 | .end = USBD_INT5, | ||
199 | .flags = IORESOURCE_IRQ, | ||
200 | }, { | ||
201 | .start = USBD_INT6, | ||
202 | .end = USBD_INT6, | ||
203 | .flags = IORESOURCE_IRQ, | ||
204 | }, | ||
205 | }; | ||
206 | |||
207 | struct platform_device imx_usb_device = { | ||
208 | .name = "imx_udc", | ||
209 | .id = 0, | ||
210 | .num_resources = ARRAY_SIZE(imx_usb_resources), | ||
211 | .resource = imx_usb_resources, | ||
212 | }; | ||
213 | |||
214 | /* GPIO port description */ | ||
215 | static struct mxc_gpio_port imx_gpio_ports[] = { | ||
216 | { | ||
217 | .chip.label = "gpio-0", | ||
218 | .base = (void __iomem *)IO_ADDRESS(GPIO_BASE_ADDR), | ||
219 | .irq = GPIO_INT_PORTA, | ||
220 | .virtual_irq_start = MXC_GPIO_IRQ_START, | ||
221 | }, { | ||
222 | .chip.label = "gpio-1", | ||
223 | .base = (void __iomem *)IO_ADDRESS(GPIO_BASE_ADDR + 0x100), | ||
224 | .irq = GPIO_INT_PORTB, | ||
225 | .virtual_irq_start = MXC_GPIO_IRQ_START + 32, | ||
226 | }, { | ||
227 | .chip.label = "gpio-2", | ||
228 | .base = (void __iomem *)IO_ADDRESS(GPIO_BASE_ADDR + 0x200), | ||
229 | .irq = GPIO_INT_PORTC, | ||
230 | .virtual_irq_start = MXC_GPIO_IRQ_START + 64, | ||
231 | }, { | ||
232 | .chip.label = "gpio-3", | ||
233 | .base = (void __iomem *)IO_ADDRESS(GPIO_BASE_ADDR + 0x300), | ||
234 | .irq = GPIO_INT_PORTD, | ||
235 | .virtual_irq_start = MXC_GPIO_IRQ_START + 96, | ||
236 | } | ||
237 | }; | ||
238 | |||
239 | int __init mxc_register_gpios(void) | ||
240 | { | ||
241 | return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); | ||
242 | } | ||
diff --git a/arch/arm/mach-mx1/devices.h b/arch/arm/mach-mx1/devices.h deleted file mode 100644 index 0da5d7cce3a2..000000000000 --- a/arch/arm/mach-mx1/devices.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | extern struct platform_device imx_csi_device; | ||
2 | extern struct platform_device imx_i2c_device; | ||
3 | extern struct platform_device imx_uart1_device; | ||
4 | extern struct platform_device imx_uart2_device; | ||
5 | extern struct platform_device imx_rtc_device; | ||
6 | extern struct platform_device imx_wdt_device; | ||
7 | extern struct platform_device imx_usb_device; | ||
diff --git a/arch/arm/mach-mx2/serial.c b/arch/arm/mach-mx2/serial.c deleted file mode 100644 index 1c0c835b2252..000000000000 --- a/arch/arm/mach-mx2/serial.c +++ /dev/null | |||
@@ -1,141 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright 2008 Juergen Beisert, kernel@pengutronix.de | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version 2 | ||
8 | * of the License, or (at your option) any later version. | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
17 | * MA 02110-1301, USA. | ||
18 | */ | ||
19 | |||
20 | #include <linux/module.h> | ||
21 | #include <linux/platform_device.h> | ||
22 | #include <linux/serial.h> | ||
23 | #include <mach/hardware.h> | ||
24 | #include <mach/imx-uart.h> | ||
25 | #include "devices.h" | ||
26 | |||
27 | static struct resource uart0[] = { | ||
28 | { | ||
29 | .start = MX2x_UART1_BASE_ADDR, | ||
30 | .end = MX2x_UART1_BASE_ADDR + 0x0B5, | ||
31 | .flags = IORESOURCE_MEM, | ||
32 | }, { | ||
33 | .start = MX2x_INT_UART1, | ||
34 | .end = MX2x_INT_UART1, | ||
35 | .flags = IORESOURCE_IRQ, | ||
36 | }, | ||
37 | }; | ||
38 | |||
39 | struct platform_device mxc_uart_device0 = { | ||
40 | .name = "imx-uart", | ||
41 | .id = 0, | ||
42 | .resource = uart0, | ||
43 | .num_resources = ARRAY_SIZE(uart0), | ||
44 | }; | ||
45 | |||
46 | static struct resource uart1[] = { | ||
47 | { | ||
48 | .start = MX2x_UART2_BASE_ADDR, | ||
49 | .end = MX2x_UART2_BASE_ADDR + 0x0B5, | ||
50 | .flags = IORESOURCE_MEM, | ||
51 | }, { | ||
52 | .start = MX2x_INT_UART2, | ||
53 | .end = MX2x_INT_UART2, | ||
54 | .flags = IORESOURCE_IRQ, | ||
55 | }, | ||
56 | }; | ||
57 | |||
58 | struct platform_device mxc_uart_device1 = { | ||
59 | .name = "imx-uart", | ||
60 | .id = 1, | ||
61 | .resource = uart1, | ||
62 | .num_resources = ARRAY_SIZE(uart1), | ||
63 | }; | ||
64 | |||
65 | static struct resource uart2[] = { | ||
66 | { | ||
67 | .start = MX2x_UART3_BASE_ADDR, | ||
68 | .end = MX2x_UART3_BASE_ADDR + 0x0B5, | ||
69 | .flags = IORESOURCE_MEM, | ||
70 | }, { | ||
71 | .start = MX2x_INT_UART3, | ||
72 | .end = MX2x_INT_UART3, | ||
73 | .flags = IORESOURCE_IRQ, | ||
74 | }, | ||
75 | }; | ||
76 | |||
77 | struct platform_device mxc_uart_device2 = { | ||
78 | .name = "imx-uart", | ||
79 | .id = 2, | ||
80 | .resource = uart2, | ||
81 | .num_resources = ARRAY_SIZE(uart2), | ||
82 | }; | ||
83 | |||
84 | static struct resource uart3[] = { | ||
85 | { | ||
86 | .start = MX2x_UART4_BASE_ADDR, | ||
87 | .end = MX2x_UART4_BASE_ADDR + 0x0B5, | ||
88 | .flags = IORESOURCE_MEM, | ||
89 | }, { | ||
90 | .start = MX2x_INT_UART4, | ||
91 | .end = MX2x_INT_UART4, | ||
92 | .flags = IORESOURCE_IRQ, | ||
93 | }, | ||
94 | }; | ||
95 | |||
96 | struct platform_device mxc_uart_device3 = { | ||
97 | .name = "imx-uart", | ||
98 | .id = 3, | ||
99 | .resource = uart3, | ||
100 | .num_resources = ARRAY_SIZE(uart3), | ||
101 | }; | ||
102 | |||
103 | #ifdef CONFIG_MACH_MX27 | ||
104 | static struct resource uart4[] = { | ||
105 | { | ||
106 | .start = MX27_UART5_BASE_ADDR, | ||
107 | .end = MX27_UART5_BASE_ADDR + 0x0B5, | ||
108 | .flags = IORESOURCE_MEM, | ||
109 | }, { | ||
110 | .start = MX27_INT_UART5, | ||
111 | .end = MX27_INT_UART5, | ||
112 | .flags = IORESOURCE_IRQ, | ||
113 | }, | ||
114 | }; | ||
115 | |||
116 | struct platform_device mxc_uart_device4 = { | ||
117 | .name = "imx-uart", | ||
118 | .id = 4, | ||
119 | .resource = uart4, | ||
120 | .num_resources = ARRAY_SIZE(uart4), | ||
121 | }; | ||
122 | |||
123 | static struct resource uart5[] = { | ||
124 | { | ||
125 | .start = MX27_UART6_BASE_ADDR, | ||
126 | .end = MX27_UART6_BASE_ADDR + 0x0B5, | ||
127 | .flags = IORESOURCE_MEM, | ||
128 | }, { | ||
129 | .start = MX27_INT_UART6, | ||
130 | .end = MX27_INT_UART6, | ||
131 | .flags = IORESOURCE_IRQ, | ||
132 | }, | ||
133 | }; | ||
134 | |||
135 | struct platform_device mxc_uart_device5 = { | ||
136 | .name = "imx-uart", | ||
137 | .id = 5, | ||
138 | .resource = uart5, | ||
139 | .num_resources = ARRAY_SIZE(uart5), | ||
140 | }; | ||
141 | #endif | ||
diff --git a/arch/arm/mach-mx25/Kconfig b/arch/arm/mach-mx25/Kconfig index 54d217314ee9..c71a7bc19284 100644 --- a/arch/arm/mach-mx25/Kconfig +++ b/arch/arm/mach-mx25/Kconfig | |||
@@ -4,5 +4,28 @@ comment "MX25 platforms:" | |||
4 | 4 | ||
5 | config MACH_MX25_3DS | 5 | config MACH_MX25_3DS |
6 | bool "Support MX25PDK (3DS) Platform" | 6 | bool "Support MX25PDK (3DS) Platform" |
7 | select IMX_HAVE_PLATFORM_IMX_UART | ||
8 | select IMX_HAVE_PLATFORM_MXC_NAND | ||
9 | |||
10 | config MACH_EUKREA_CPUIMX25 | ||
11 | bool "Support Eukrea CPUIMX25 Platform" | ||
12 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
13 | select IMX_HAVE_PLATFORM_IMX_UART | ||
14 | select IMX_HAVE_PLATFORM_MXC_NAND | ||
15 | select MXC_ULPI if USB_ULPI | ||
16 | |||
17 | choice | ||
18 | prompt "Baseboard" | ||
19 | depends on MACH_EUKREA_CPUIMX25 | ||
20 | default MACH_EUKREA_MBIMXSD25_BASEBOARD | ||
21 | |||
22 | config MACH_EUKREA_MBIMXSD25_BASEBOARD | ||
23 | prompt "Eukrea MBIMXSD development board" | ||
24 | bool | ||
25 | help | ||
26 | This adds board specific devices that can be found on Eukrea's | ||
27 | MBIMXSD evaluation board. | ||
28 | |||
29 | endchoice | ||
7 | 30 | ||
8 | endif | 31 | endif |
diff --git a/arch/arm/mach-mx25/Makefile b/arch/arm/mach-mx25/Makefile index 10cebc5ced8c..d9e46ce00a4e 100644 --- a/arch/arm/mach-mx25/Makefile +++ b/arch/arm/mach-mx25/Makefile | |||
@@ -1,3 +1,5 @@ | |||
1 | obj-y := mm.o devices.o | 1 | obj-y := mm.o devices.o |
2 | obj-$(CONFIG_ARCH_MX25) += clock.o | 2 | obj-$(CONFIG_ARCH_MX25) += clock.o |
3 | obj-$(CONFIG_MACH_MX25_3DS) += mach-mx25pdk.o | 3 | obj-$(CONFIG_MACH_MX25_3DS) += mach-mx25_3ds.o |
4 | obj-$(CONFIG_MACH_EUKREA_CPUIMX25) += mach-cpuimx25.o | ||
5 | obj-$(CONFIG_MACH_EUKREA_MBIMXSD25_BASEBOARD) += eukrea_mbimxsd-baseboard.o | ||
diff --git a/arch/arm/mach-mx25/clock.c b/arch/arm/mach-mx25/clock.c index 155014993b13..40c7cc41cee3 100644 --- a/arch/arm/mach-mx25/clock.c +++ b/arch/arm/mach-mx25/clock.c | |||
@@ -109,6 +109,16 @@ static unsigned long get_rate_uart(struct clk *clk) | |||
109 | return get_rate_per(15); | 109 | return get_rate_per(15); |
110 | } | 110 | } |
111 | 111 | ||
112 | static unsigned long get_rate_ssi2(struct clk *clk) | ||
113 | { | ||
114 | return get_rate_per(14); | ||
115 | } | ||
116 | |||
117 | static unsigned long get_rate_ssi1(struct clk *clk) | ||
118 | { | ||
119 | return get_rate_per(13); | ||
120 | } | ||
121 | |||
112 | static unsigned long get_rate_i2c(struct clk *clk) | 122 | static unsigned long get_rate_i2c(struct clk *clk) |
113 | { | 123 | { |
114 | return get_rate_per(6); | 124 | return get_rate_per(6); |
@@ -129,9 +139,17 @@ static unsigned long get_rate_lcdc(struct clk *clk) | |||
129 | return get_rate_per(7); | 139 | return get_rate_per(7); |
130 | } | 140 | } |
131 | 141 | ||
142 | static unsigned long get_rate_csi(struct clk *clk) | ||
143 | { | ||
144 | return get_rate_per(0); | ||
145 | } | ||
146 | |||
132 | static unsigned long get_rate_otg(struct clk *clk) | 147 | static unsigned long get_rate_otg(struct clk *clk) |
133 | { | 148 | { |
134 | return 48000000; /* FIXME */ | 149 | unsigned long cctl = readl(CRM_BASE + CCM_CCTL); |
150 | unsigned long rate = get_rate_upll(); | ||
151 | |||
152 | return (cctl & (1 << 23)) ? 0 : rate / ((0x3F & (cctl >> 16)) + 1); | ||
135 | } | 153 | } |
136 | 154 | ||
137 | static int clk_cgcr_enable(struct clk *clk) | 155 | static int clk_cgcr_enable(struct clk *clk) |
@@ -166,14 +184,40 @@ static void clk_cgcr_disable(struct clk *clk) | |||
166 | .secondary = s, \ | 184 | .secondary = s, \ |
167 | } | 185 | } |
168 | 186 | ||
187 | /* | ||
188 | * Note: the following IPG clock gating bits are wrongly marked "Reserved" in | ||
189 | * the i.MX25 Reference Manual Rev 1, table 15-13. The information below is | ||
190 | * taken from the Freescale released BSP. | ||
191 | * | ||
192 | * bit reg offset clock | ||
193 | * | ||
194 | * 0 CGCR1 0 AUDMUX | ||
195 | * 12 CGCR1 12 ESAI | ||
196 | * 16 CGCR1 16 GPIO1 | ||
197 | * 17 CGCR1 17 GPIO2 | ||
198 | * 18 CGCR1 18 GPIO3 | ||
199 | * 23 CGCR1 23 I2C1 | ||
200 | * 24 CGCR1 24 I2C2 | ||
201 | * 25 CGCR1 25 I2C3 | ||
202 | * 27 CGCR1 27 IOMUXC | ||
203 | * 28 CGCR1 28 KPP | ||
204 | * 30 CGCR1 30 OWIRE | ||
205 | * 36 CGCR2 4 RTIC | ||
206 | * 51 CGCR2 19 WDOG | ||
207 | */ | ||
208 | |||
169 | DEFINE_CLOCK(gpt_clk, 0, CCM_CGCR0, 5, get_rate_gpt, NULL, NULL); | 209 | DEFINE_CLOCK(gpt_clk, 0, CCM_CGCR0, 5, get_rate_gpt, NULL, NULL); |
170 | DEFINE_CLOCK(uart_per_clk, 0, CCM_CGCR0, 15, get_rate_uart, NULL, NULL); | 210 | DEFINE_CLOCK(uart_per_clk, 0, CCM_CGCR0, 15, get_rate_uart, NULL, NULL); |
211 | DEFINE_CLOCK(ssi1_per_clk, 0, CCM_CGCR0, 13, get_rate_ipg, NULL, NULL); | ||
212 | DEFINE_CLOCK(ssi2_per_clk, 0, CCM_CGCR0, 14, get_rate_ipg, NULL, NULL); | ||
171 | DEFINE_CLOCK(cspi1_clk, 0, CCM_CGCR1, 5, get_rate_ipg, NULL, NULL); | 213 | DEFINE_CLOCK(cspi1_clk, 0, CCM_CGCR1, 5, get_rate_ipg, NULL, NULL); |
172 | DEFINE_CLOCK(cspi2_clk, 0, CCM_CGCR1, 6, get_rate_ipg, NULL, NULL); | 214 | DEFINE_CLOCK(cspi2_clk, 0, CCM_CGCR1, 6, get_rate_ipg, NULL, NULL); |
173 | DEFINE_CLOCK(cspi3_clk, 0, CCM_CGCR1, 7, get_rate_ipg, NULL, NULL); | 215 | DEFINE_CLOCK(cspi3_clk, 0, CCM_CGCR1, 7, get_rate_ipg, NULL, NULL); |
174 | DEFINE_CLOCK(fec_ahb_clk, 0, CCM_CGCR0, 23, NULL, NULL, NULL); | 216 | DEFINE_CLOCK(fec_ahb_clk, 0, CCM_CGCR0, 23, NULL, NULL, NULL); |
175 | DEFINE_CLOCK(lcdc_ahb_clk, 0, CCM_CGCR0, 24, NULL, NULL, NULL); | 217 | DEFINE_CLOCK(lcdc_ahb_clk, 0, CCM_CGCR0, 24, NULL, NULL, NULL); |
176 | DEFINE_CLOCK(lcdc_per_clk, 0, CCM_CGCR0, 7, NULL, NULL, &lcdc_ahb_clk); | 218 | DEFINE_CLOCK(lcdc_per_clk, 0, CCM_CGCR0, 7, NULL, NULL, &lcdc_ahb_clk); |
219 | DEFINE_CLOCK(csi_ahb_clk, 0, CCM_CGCR0, 18, get_rate_csi, NULL, NULL); | ||
220 | DEFINE_CLOCK(csi_per_clk, 0, CCM_CGCR0, 0, get_rate_csi, NULL, &csi_ahb_clk); | ||
177 | DEFINE_CLOCK(uart1_clk, 0, CCM_CGCR2, 14, get_rate_uart, NULL, &uart_per_clk); | 221 | DEFINE_CLOCK(uart1_clk, 0, CCM_CGCR2, 14, get_rate_uart, NULL, &uart_per_clk); |
178 | DEFINE_CLOCK(uart2_clk, 0, CCM_CGCR2, 15, get_rate_uart, NULL, &uart_per_clk); | 222 | DEFINE_CLOCK(uart2_clk, 0, CCM_CGCR2, 15, get_rate_uart, NULL, &uart_per_clk); |
179 | DEFINE_CLOCK(uart3_clk, 0, CCM_CGCR2, 16, get_rate_uart, NULL, &uart_per_clk); | 223 | DEFINE_CLOCK(uart3_clk, 0, CCM_CGCR2, 16, get_rate_uart, NULL, &uart_per_clk); |
@@ -191,6 +235,13 @@ DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL, NULL); | |||
191 | DEFINE_CLOCK(fec_clk, 0, CCM_CGCR1, 15, get_rate_ipg, NULL, &fec_ahb_clk); | 235 | DEFINE_CLOCK(fec_clk, 0, CCM_CGCR1, 15, get_rate_ipg, NULL, &fec_ahb_clk); |
192 | DEFINE_CLOCK(dryice_clk, 0, CCM_CGCR1, 8, get_rate_ipg, NULL, NULL); | 236 | DEFINE_CLOCK(dryice_clk, 0, CCM_CGCR1, 8, get_rate_ipg, NULL, NULL); |
193 | DEFINE_CLOCK(lcdc_clk, 0, CCM_CGCR1, 29, get_rate_lcdc, NULL, &lcdc_per_clk); | 237 | DEFINE_CLOCK(lcdc_clk, 0, CCM_CGCR1, 29, get_rate_lcdc, NULL, &lcdc_per_clk); |
238 | DEFINE_CLOCK(wdt_clk, 0, CCM_CGCR2, 19, get_rate_ipg, NULL, NULL); | ||
239 | DEFINE_CLOCK(ssi1_clk, 0, CCM_CGCR2, 11, get_rate_ssi1, NULL, &ssi1_per_clk); | ||
240 | DEFINE_CLOCK(ssi2_clk, 1, CCM_CGCR2, 12, get_rate_ssi2, NULL, &ssi2_per_clk); | ||
241 | DEFINE_CLOCK(audmux_clk, 0, CCM_CGCR1, 0, NULL, NULL, NULL); | ||
242 | DEFINE_CLOCK(csi_clk, 0, CCM_CGCR1, 4, get_rate_csi, NULL, &csi_per_clk); | ||
243 | DEFINE_CLOCK(can1_clk, 0, CCM_CGCR1, 2, get_rate_ipg, NULL, NULL); | ||
244 | DEFINE_CLOCK(can2_clk, 0, CCM_CGCR1, 3, get_rate_ipg, NULL, NULL); | ||
194 | 245 | ||
195 | #define _REGISTER_CLOCK(d, n, c) \ | 246 | #define _REGISTER_CLOCK(d, n, c) \ |
196 | { \ | 247 | { \ |
@@ -217,7 +268,7 @@ static struct clk_lookup lookups[] = { | |||
217 | _REGISTER_CLOCK("mxc_pwm.1", NULL, pwm2_clk) | 268 | _REGISTER_CLOCK("mxc_pwm.1", NULL, pwm2_clk) |
218 | _REGISTER_CLOCK("mxc_pwm.2", NULL, pwm3_clk) | 269 | _REGISTER_CLOCK("mxc_pwm.2", NULL, pwm3_clk) |
219 | _REGISTER_CLOCK("mxc_pwm.3", NULL, pwm4_clk) | 270 | _REGISTER_CLOCK("mxc_pwm.3", NULL, pwm4_clk) |
220 | _REGISTER_CLOCK("mxc-keypad", NULL, kpp_clk) | 271 | _REGISTER_CLOCK("imx-keypad", NULL, kpp_clk) |
221 | _REGISTER_CLOCK("mx25-adc", NULL, tsc_clk) | 272 | _REGISTER_CLOCK("mx25-adc", NULL, tsc_clk) |
222 | _REGISTER_CLOCK("imx-i2c.0", NULL, i2c_clk) | 273 | _REGISTER_CLOCK("imx-i2c.0", NULL, i2c_clk) |
223 | _REGISTER_CLOCK("imx-i2c.1", NULL, i2c_clk) | 274 | _REGISTER_CLOCK("imx-i2c.1", NULL, i2c_clk) |
@@ -225,6 +276,13 @@ static struct clk_lookup lookups[] = { | |||
225 | _REGISTER_CLOCK("fec.0", NULL, fec_clk) | 276 | _REGISTER_CLOCK("fec.0", NULL, fec_clk) |
226 | _REGISTER_CLOCK("imxdi_rtc.0", NULL, dryice_clk) | 277 | _REGISTER_CLOCK("imxdi_rtc.0", NULL, dryice_clk) |
227 | _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) | 278 | _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) |
279 | _REGISTER_CLOCK("imx-wdt.0", NULL, wdt_clk) | ||
280 | _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk) | ||
281 | _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk) | ||
282 | _REGISTER_CLOCK("mx2-camera.0", NULL, csi_clk) | ||
283 | _REGISTER_CLOCK(NULL, "audmux", audmux_clk) | ||
284 | _REGISTER_CLOCK("flexcan.0", NULL, can1_clk) | ||
285 | _REGISTER_CLOCK("flexcan.1", NULL, can2_clk) | ||
228 | }; | 286 | }; |
229 | 287 | ||
230 | int __init mx25_clocks_init(void) | 288 | int __init mx25_clocks_init(void) |
@@ -238,9 +296,13 @@ int __init mx25_clocks_init(void) | |||
238 | __raw_writel((1 << 19), CRM_BASE + CCM_CGCR0); | 296 | __raw_writel((1 << 19), CRM_BASE + CCM_CGCR0); |
239 | __raw_writel((0xf << 16) | (3 << 26), CRM_BASE + CCM_CGCR1); | 297 | __raw_writel((0xf << 16) | (3 << 26), CRM_BASE + CCM_CGCR1); |
240 | __raw_writel((1 << 5), CRM_BASE + CCM_CGCR2); | 298 | __raw_writel((1 << 5), CRM_BASE + CCM_CGCR2); |
299 | #if defined(CONFIG_DEBUG_LL) && !defined(CONFIG_DEBUG_ICEDCC) | ||
300 | clk_enable(&uart1_clk); | ||
301 | #endif | ||
241 | 302 | ||
242 | /* Clock source for lcdc is upll */ | 303 | /* Clock source for lcdc and csi is upll */ |
243 | __raw_writel(__raw_readl(CRM_BASE+0x64) | (1 << 7), CRM_BASE + 0x64); | 304 | __raw_writel(__raw_readl(CRM_BASE+0x64) | (1 << 7) | (1 << 0), |
305 | CRM_BASE + 0x64); | ||
244 | 306 | ||
245 | mxc_timer_init(&gpt_clk, MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), 54); | 307 | mxc_timer_init(&gpt_clk, MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), 54); |
246 | 308 | ||
diff --git a/arch/arm/mach-mx25/devices-imx25.h b/arch/arm/mach-mx25/devices-imx25.h new file mode 100644 index 000000000000..d86a7c3ca8b0 --- /dev/null +++ b/arch/arm/mach-mx25/devices-imx25.h | |||
@@ -0,0 +1,43 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <mach/mx25.h> | ||
10 | #include <mach/devices-common.h> | ||
11 | |||
12 | #define imx25_add_flexcan0(pdata) \ | ||
13 | imx_add_flexcan(0, MX25_CAN1_BASE_ADDR, SZ_16K, MX25_INT_CAN1, pdata) | ||
14 | #define imx25_add_flexcan1(pdata) \ | ||
15 | imx_add_flexcan(1, MX25_CAN2_BASE_ADDR, SZ_16K, MX25_INT_CAN2, pdata) | ||
16 | |||
17 | #define imx25_add_imx_i2c0(pdata) \ | ||
18 | imx_add_imx_i2c(0, MX25_I2C1_BASE_ADDR, SZ_16K, MX25_INT_I2C1, pdata) | ||
19 | #define imx25_add_imx_i2c1(pdata) \ | ||
20 | imx_add_imx_i2c(1, MX25_I2C2_BASE_ADDR, SZ_16K, MX25_INT_I2C2, pdata) | ||
21 | #define imx25_add_imx_i2c2(pdata) \ | ||
22 | imx_add_imx_i2c(2, MX25_I2C3_BASE_ADDR, SZ_16K, MX25_INT_I2C3, pdata) | ||
23 | |||
24 | #define imx25_add_imx_uart0(pdata) \ | ||
25 | imx_add_imx_uart_1irq(0, MX25_UART1_BASE_ADDR, SZ_16K, MX25_INT_UART1, pdata) | ||
26 | #define imx25_add_imx_uart1(pdata) \ | ||
27 | imx_add_imx_uart_1irq(1, MX25_UART2_BASE_ADDR, SZ_16K, MX25_INT_UART2, pdata) | ||
28 | #define imx25_add_imx_uart2(pdata) \ | ||
29 | imx_add_imx_uart_1irq(2, MX25_UART3_BASE_ADDR, SZ_16K, MX25_INT_UART3, pdata) | ||
30 | #define imx25_add_imx_uart3(pdata) \ | ||
31 | imx_add_imx_uart_1irq(3, MX25_UART4_BASE_ADDR, SZ_16K, MX25_INT_UART4, pdata) | ||
32 | #define imx25_add_imx_uart4(pdata) \ | ||
33 | imx_add_imx_uart_1irq(4, MX25_UART5_BASE_ADDR, SZ_16K, MX25_INT_UART5, pdata) | ||
34 | |||
35 | #define imx25_add_mxc_nand(pdata) \ | ||
36 | imx_add_mxc_nand_v21(MX25_NFC_BASE_ADDR, MX25_INT_NANDFC, pdata) | ||
37 | |||
38 | #define imx25_add_spi_imx0(pdata) \ | ||
39 | imx_add_spi_imx(0, MX25_CSPI1_BASE_ADDR, SZ_16K, MX25_INT_CSPI1, pdata) | ||
40 | #define imx25_add_spi_imx1(pdata) \ | ||
41 | imx_add_spi_imx(1, MX25_CSPI2_BASE_ADDR, SZ_16K, MX25_INT_CSPI2, pdata) | ||
42 | #define imx25_add_spi_imx2(pdata) \ | ||
43 | imx_add_spi_imx(2, MX25_CSPI3_BASE_ADDR, SZ_16K, MX25_INT_CSPI3, pdata) | ||
diff --git a/arch/arm/mach-mx25/devices.c b/arch/arm/mach-mx25/devices.c index 3a405fa400eb..3468eb15b236 100644 --- a/arch/arm/mach-mx25/devices.c +++ b/arch/arm/mach-mx25/devices.c | |||
@@ -22,103 +22,6 @@ | |||
22 | #include <mach/mx25.h> | 22 | #include <mach/mx25.h> |
23 | #include <mach/irqs.h> | 23 | #include <mach/irqs.h> |
24 | 24 | ||
25 | static struct resource uart0[] = { | ||
26 | { | ||
27 | .start = 0x43f90000, | ||
28 | .end = 0x43f93fff, | ||
29 | .flags = IORESOURCE_MEM, | ||
30 | }, { | ||
31 | .start = 45, | ||
32 | .end = 45, | ||
33 | .flags = IORESOURCE_IRQ, | ||
34 | }, | ||
35 | }; | ||
36 | |||
37 | struct platform_device mxc_uart_device0 = { | ||
38 | .name = "imx-uart", | ||
39 | .id = 0, | ||
40 | .resource = uart0, | ||
41 | .num_resources = ARRAY_SIZE(uart0), | ||
42 | }; | ||
43 | |||
44 | static struct resource uart1[] = { | ||
45 | { | ||
46 | .start = 0x43f94000, | ||
47 | .end = 0x43f97fff, | ||
48 | .flags = IORESOURCE_MEM, | ||
49 | }, { | ||
50 | .start = 32, | ||
51 | .end = 32, | ||
52 | .flags = IORESOURCE_IRQ, | ||
53 | }, | ||
54 | }; | ||
55 | |||
56 | struct platform_device mxc_uart_device1 = { | ||
57 | .name = "imx-uart", | ||
58 | .id = 1, | ||
59 | .resource = uart1, | ||
60 | .num_resources = ARRAY_SIZE(uart1), | ||
61 | }; | ||
62 | |||
63 | static struct resource uart2[] = { | ||
64 | { | ||
65 | .start = 0x5000c000, | ||
66 | .end = 0x5000ffff, | ||
67 | .flags = IORESOURCE_MEM, | ||
68 | }, { | ||
69 | .start = 18, | ||
70 | .end = 18, | ||
71 | .flags = IORESOURCE_IRQ, | ||
72 | }, | ||
73 | }; | ||
74 | |||
75 | struct platform_device mxc_uart_device2 = { | ||
76 | .name = "imx-uart", | ||
77 | .id = 2, | ||
78 | .resource = uart2, | ||
79 | .num_resources = ARRAY_SIZE(uart2), | ||
80 | }; | ||
81 | |||
82 | static struct resource uart3[] = { | ||
83 | { | ||
84 | .start = 0x50008000, | ||
85 | .end = 0x5000bfff, | ||
86 | .flags = IORESOURCE_MEM, | ||
87 | }, { | ||
88 | .start = 5, | ||
89 | .end = 5, | ||
90 | .flags = IORESOURCE_IRQ, | ||
91 | }, | ||
92 | }; | ||
93 | |||
94 | struct platform_device mxc_uart_device3 = { | ||
95 | .name = "imx-uart", | ||
96 | .id = 3, | ||
97 | .resource = uart3, | ||
98 | .num_resources = ARRAY_SIZE(uart3), | ||
99 | }; | ||
100 | |||
101 | static struct resource uart4[] = { | ||
102 | { | ||
103 | .start = 0x5002c000, | ||
104 | .end = 0x5002ffff, | ||
105 | .flags = IORESOURCE_MEM, | ||
106 | }, { | ||
107 | .start = 40, | ||
108 | .end = 40, | ||
109 | .flags = IORESOURCE_IRQ, | ||
110 | }, | ||
111 | }; | ||
112 | |||
113 | struct platform_device mxc_uart_device4 = { | ||
114 | .name = "imx-uart", | ||
115 | .id = 4, | ||
116 | .resource = uart4, | ||
117 | .num_resources = ARRAY_SIZE(uart4), | ||
118 | }; | ||
119 | |||
120 | #define MX25_OTG_BASE_ADDR 0x53FF4000 | ||
121 | |||
122 | static u64 otg_dmamask = DMA_BIT_MASK(32); | 25 | static u64 otg_dmamask = DMA_BIT_MASK(32); |
123 | 26 | ||
124 | static struct resource mxc_otg_resources[] = { | 27 | static struct resource mxc_otg_resources[] = { |
@@ -181,63 +84,6 @@ struct platform_device mxc_usbh2 = { | |||
181 | .num_resources = ARRAY_SIZE(mxc_usbh2_resources), | 84 | .num_resources = ARRAY_SIZE(mxc_usbh2_resources), |
182 | }; | 85 | }; |
183 | 86 | ||
184 | static struct resource mxc_spi_resources0[] = { | ||
185 | { | ||
186 | .start = 0x43fa4000, | ||
187 | .end = 0x43fa7fff, | ||
188 | .flags = IORESOURCE_MEM, | ||
189 | }, { | ||
190 | .start = 14, | ||
191 | .end = 14, | ||
192 | .flags = IORESOURCE_IRQ, | ||
193 | }, | ||
194 | }; | ||
195 | |||
196 | struct platform_device mxc_spi_device0 = { | ||
197 | .name = "spi_imx", | ||
198 | .id = 0, | ||
199 | .num_resources = ARRAY_SIZE(mxc_spi_resources0), | ||
200 | .resource = mxc_spi_resources0, | ||
201 | }; | ||
202 | |||
203 | static struct resource mxc_spi_resources1[] = { | ||
204 | { | ||
205 | .start = 0x50010000, | ||
206 | .end = 0x50013fff, | ||
207 | .flags = IORESOURCE_MEM, | ||
208 | }, { | ||
209 | .start = 13, | ||
210 | .end = 13, | ||
211 | .flags = IORESOURCE_IRQ, | ||
212 | }, | ||
213 | }; | ||
214 | |||
215 | struct platform_device mxc_spi_device1 = { | ||
216 | .name = "spi_imx", | ||
217 | .id = 1, | ||
218 | .num_resources = ARRAY_SIZE(mxc_spi_resources1), | ||
219 | .resource = mxc_spi_resources1, | ||
220 | }; | ||
221 | |||
222 | static struct resource mxc_spi_resources2[] = { | ||
223 | { | ||
224 | .start = 0x50004000, | ||
225 | .end = 0x50007fff, | ||
226 | .flags = IORESOURCE_MEM, | ||
227 | }, { | ||
228 | .start = 0, | ||
229 | .end = 0, | ||
230 | .flags = IORESOURCE_IRQ, | ||
231 | }, | ||
232 | }; | ||
233 | |||
234 | struct platform_device mxc_spi_device2 = { | ||
235 | .name = "spi_imx", | ||
236 | .id = 2, | ||
237 | .num_resources = ARRAY_SIZE(mxc_spi_resources2), | ||
238 | .resource = mxc_spi_resources2, | ||
239 | }; | ||
240 | |||
241 | static struct resource mxc_pwm_resources0[] = { | 87 | static struct resource mxc_pwm_resources0[] = { |
242 | { | 88 | { |
243 | .start = 0x53fe0000, | 89 | .start = 0x53fe0000, |
@@ -333,63 +179,6 @@ struct platform_device mxc_pwm_device3 = { | |||
333 | .resource = mxc_pwm_resources3, | 179 | .resource = mxc_pwm_resources3, |
334 | }; | 180 | }; |
335 | 181 | ||
336 | static struct resource mxc_i2c_1_resources[] = { | ||
337 | { | ||
338 | .start = 0x43f80000, | ||
339 | .end = 0x43f83fff, | ||
340 | .flags = IORESOURCE_MEM, | ||
341 | }, { | ||
342 | .start = 3, | ||
343 | .end = 3, | ||
344 | .flags = IORESOURCE_IRQ, | ||
345 | } | ||
346 | }; | ||
347 | |||
348 | struct platform_device mxc_i2c_device0 = { | ||
349 | .name = "imx-i2c", | ||
350 | .id = 0, | ||
351 | .num_resources = ARRAY_SIZE(mxc_i2c_1_resources), | ||
352 | .resource = mxc_i2c_1_resources, | ||
353 | }; | ||
354 | |||
355 | static struct resource mxc_i2c_2_resources[] = { | ||
356 | { | ||
357 | .start = 0x43f98000, | ||
358 | .end = 0x43f9bfff, | ||
359 | .flags = IORESOURCE_MEM, | ||
360 | }, { | ||
361 | .start = 4, | ||
362 | .end = 4, | ||
363 | .flags = IORESOURCE_IRQ, | ||
364 | } | ||
365 | }; | ||
366 | |||
367 | struct platform_device mxc_i2c_device1 = { | ||
368 | .name = "imx-i2c", | ||
369 | .id = 1, | ||
370 | .num_resources = ARRAY_SIZE(mxc_i2c_2_resources), | ||
371 | .resource = mxc_i2c_2_resources, | ||
372 | }; | ||
373 | |||
374 | static struct resource mxc_i2c_3_resources[] = { | ||
375 | { | ||
376 | .start = 0x43f84000, | ||
377 | .end = 0x43f87fff, | ||
378 | .flags = IORESOURCE_MEM, | ||
379 | }, { | ||
380 | .start = 10, | ||
381 | .end = 10, | ||
382 | .flags = IORESOURCE_IRQ, | ||
383 | } | ||
384 | }; | ||
385 | |||
386 | struct platform_device mxc_i2c_device2 = { | ||
387 | .name = "imx-i2c", | ||
388 | .id = 2, | ||
389 | .num_resources = ARRAY_SIZE(mxc_i2c_3_resources), | ||
390 | .resource = mxc_i2c_3_resources, | ||
391 | }; | ||
392 | |||
393 | static struct mxc_gpio_port imx_gpio_ports[] = { | 182 | static struct mxc_gpio_port imx_gpio_ports[] = { |
394 | { | 183 | { |
395 | .chip.label = "gpio-0", | 184 | .chip.label = "gpio-0", |
@@ -414,7 +203,7 @@ static struct mxc_gpio_port imx_gpio_ports[] = { | |||
414 | } | 203 | } |
415 | }; | 204 | }; |
416 | 205 | ||
417 | int __init mxc_register_gpios(void) | 206 | int __init imx25_register_gpios(void) |
418 | { | 207 | { |
419 | return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); | 208 | return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); |
420 | } | 209 | } |
@@ -439,26 +228,6 @@ struct platform_device mx25_fec_device = { | |||
439 | .resource = mx25_fec_resources, | 228 | .resource = mx25_fec_resources, |
440 | }; | 229 | }; |
441 | 230 | ||
442 | static struct resource mxc_nand_resources[] = { | ||
443 | { | ||
444 | .start = MX25_NFC_BASE_ADDR, | ||
445 | .end = MX25_NFC_BASE_ADDR + 0x1fff, | ||
446 | .flags = IORESOURCE_MEM, | ||
447 | }, | ||
448 | { | ||
449 | .start = MX25_INT_NANDFC, | ||
450 | .end = MX25_INT_NANDFC, | ||
451 | .flags = IORESOURCE_IRQ, | ||
452 | }, | ||
453 | }; | ||
454 | |||
455 | struct platform_device mxc_nand_device = { | ||
456 | .name = "mxc_nand", | ||
457 | .id = 0, | ||
458 | .num_resources = ARRAY_SIZE(mxc_nand_resources), | ||
459 | .resource = mxc_nand_resources, | ||
460 | }; | ||
461 | |||
462 | static struct resource mx25_rtc_resources[] = { | 231 | static struct resource mx25_rtc_resources[] = { |
463 | { | 232 | { |
464 | .start = MX25_DRYICE_BASE_ADDR, | 233 | .start = MX25_DRYICE_BASE_ADDR, |
@@ -515,3 +284,83 @@ struct platform_device mxc_wdt = { | |||
515 | .num_resources = ARRAY_SIZE(mxc_wdt_resources), | 284 | .num_resources = ARRAY_SIZE(mxc_wdt_resources), |
516 | .resource = mxc_wdt_resources, | 285 | .resource = mxc_wdt_resources, |
517 | }; | 286 | }; |
287 | |||
288 | static struct resource mx25_kpp_resources[] = { | ||
289 | { | ||
290 | .start = MX25_KPP_BASE_ADDR, | ||
291 | .end = MX25_KPP_BASE_ADDR + 0xf, | ||
292 | .flags = IORESOURCE_MEM, | ||
293 | }, | ||
294 | { | ||
295 | .start = MX25_INT_KPP, | ||
296 | .end = MX25_INT_KPP, | ||
297 | .flags = IORESOURCE_IRQ, | ||
298 | }, | ||
299 | }; | ||
300 | |||
301 | struct platform_device mx25_kpp_device = { | ||
302 | .name = "imx-keypad", | ||
303 | .id = -1, | ||
304 | .num_resources = ARRAY_SIZE(mx25_kpp_resources), | ||
305 | .resource = mx25_kpp_resources, | ||
306 | }; | ||
307 | |||
308 | static struct resource imx_ssi_resources0[] = { | ||
309 | { | ||
310 | .start = MX25_SSI1_BASE_ADDR, | ||
311 | .end = MX25_SSI1_BASE_ADDR + 0x3fff, | ||
312 | .flags = IORESOURCE_MEM, | ||
313 | }, { | ||
314 | .start = MX25_INT_SSI1, | ||
315 | .end = MX25_INT_SSI1, | ||
316 | .flags = IORESOURCE_IRQ, | ||
317 | }, | ||
318 | }; | ||
319 | |||
320 | static struct resource imx_ssi_resources1[] = { | ||
321 | { | ||
322 | .start = MX25_SSI2_BASE_ADDR, | ||
323 | .end = MX25_SSI2_BASE_ADDR + 0x3fff, | ||
324 | .flags = IORESOURCE_MEM | ||
325 | }, { | ||
326 | .start = MX25_INT_SSI2, | ||
327 | .end = MX25_INT_SSI2, | ||
328 | .flags = IORESOURCE_IRQ, | ||
329 | }, | ||
330 | }; | ||
331 | |||
332 | struct platform_device imx_ssi_device0 = { | ||
333 | .name = "imx-ssi", | ||
334 | .id = 0, | ||
335 | .num_resources = ARRAY_SIZE(imx_ssi_resources0), | ||
336 | .resource = imx_ssi_resources0, | ||
337 | }; | ||
338 | |||
339 | struct platform_device imx_ssi_device1 = { | ||
340 | .name = "imx-ssi", | ||
341 | .id = 1, | ||
342 | .num_resources = ARRAY_SIZE(imx_ssi_resources1), | ||
343 | .resource = imx_ssi_resources1, | ||
344 | }; | ||
345 | |||
346 | static struct resource mx25_csi_resources[] = { | ||
347 | { | ||
348 | .start = MX25_CSI_BASE_ADDR, | ||
349 | .end = MX25_CSI_BASE_ADDR + 0xfff, | ||
350 | .flags = IORESOURCE_MEM, | ||
351 | }, | ||
352 | { | ||
353 | .start = MX25_INT_CSI, | ||
354 | .flags = IORESOURCE_IRQ | ||
355 | }, | ||
356 | }; | ||
357 | |||
358 | struct platform_device mx25_csi_device = { | ||
359 | .name = "mx2-camera", | ||
360 | .id = 0, | ||
361 | .num_resources = ARRAY_SIZE(mx25_csi_resources), | ||
362 | .resource = mx25_csi_resources, | ||
363 | .dev = { | ||
364 | .coherent_dma_mask = 0xffffffff, | ||
365 | }, | ||
366 | }; | ||
diff --git a/arch/arm/mach-mx25/devices.h b/arch/arm/mach-mx25/devices.h index cee12c0a0be6..4aceb68e35a7 100644 --- a/arch/arm/mach-mx25/devices.h +++ b/arch/arm/mach-mx25/devices.h | |||
@@ -1,24 +1,16 @@ | |||
1 | extern struct platform_device mxc_uart_device0; | ||
2 | extern struct platform_device mxc_uart_device1; | ||
3 | extern struct platform_device mxc_uart_device2; | ||
4 | extern struct platform_device mxc_uart_device3; | ||
5 | extern struct platform_device mxc_uart_device4; | ||
6 | extern struct platform_device mxc_otg; | 1 | extern struct platform_device mxc_otg; |
7 | extern struct platform_device otg_udc_device; | 2 | extern struct platform_device otg_udc_device; |
8 | extern struct platform_device mxc_usbh2; | 3 | extern struct platform_device mxc_usbh2; |
9 | extern struct platform_device mxc_spi_device0; | ||
10 | extern struct platform_device mxc_spi_device1; | ||
11 | extern struct platform_device mxc_spi_device2; | ||
12 | extern struct platform_device mxc_pwm_device0; | 4 | extern struct platform_device mxc_pwm_device0; |
13 | extern struct platform_device mxc_pwm_device1; | 5 | extern struct platform_device mxc_pwm_device1; |
14 | extern struct platform_device mxc_pwm_device2; | 6 | extern struct platform_device mxc_pwm_device2; |
15 | extern struct platform_device mxc_pwm_device3; | 7 | extern struct platform_device mxc_pwm_device3; |
16 | extern struct platform_device mxc_keypad_device; | 8 | extern struct platform_device mxc_keypad_device; |
17 | extern struct platform_device mxc_i2c_device0; | ||
18 | extern struct platform_device mxc_i2c_device1; | ||
19 | extern struct platform_device mxc_i2c_device2; | ||
20 | extern struct platform_device mx25_fec_device; | 9 | extern struct platform_device mx25_fec_device; |
21 | extern struct platform_device mxc_nand_device; | ||
22 | extern struct platform_device mx25_rtc_device; | 10 | extern struct platform_device mx25_rtc_device; |
23 | extern struct platform_device mx25_fb_device; | 11 | extern struct platform_device mx25_fb_device; |
24 | extern struct platform_device mxc_wdt; | 12 | extern struct platform_device mxc_wdt; |
13 | extern struct platform_device mx25_kpp_device; | ||
14 | extern struct platform_device imx_ssi_device0; | ||
15 | extern struct platform_device imx_ssi_device1; | ||
16 | extern struct platform_device mx25_csi_device; | ||
diff --git a/arch/arm/mach-mx25/eukrea_mbimxsd-baseboard.c b/arch/arm/mach-mx25/eukrea_mbimxsd-baseboard.c new file mode 100644 index 000000000000..91931dcb0689 --- /dev/null +++ b/arch/arm/mach-mx25/eukrea_mbimxsd-baseboard.c | |||
@@ -0,0 +1,260 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Eric Benard - eric@eukrea.com | ||
3 | * | ||
4 | * Based on pcm970-baseboard.c which is : | ||
5 | * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de) | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * as published by the Free Software Foundation; either version 2 | ||
10 | * of the License, or (at your option) any later version. | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
19 | * MA 02110-1301, USA. | ||
20 | */ | ||
21 | |||
22 | #include <linux/gpio.h> | ||
23 | #include <linux/leds.h> | ||
24 | #include <linux/platform_device.h> | ||
25 | #include <linux/gpio_keys.h> | ||
26 | #include <linux/input.h> | ||
27 | #include <video/platform_lcd.h> | ||
28 | |||
29 | #include <mach/hardware.h> | ||
30 | #include <mach/iomux-mx25.h> | ||
31 | #include <mach/common.h> | ||
32 | #include <asm/mach-types.h> | ||
33 | #include <asm/mach/arch.h> | ||
34 | #include <mach/mx25.h> | ||
35 | #include <mach/imx-uart.h> | ||
36 | #include <mach/imxfb.h> | ||
37 | #include <mach/ssi.h> | ||
38 | #include <mach/audmux.h> | ||
39 | |||
40 | #include "devices-imx25.h" | ||
41 | #include "devices.h" | ||
42 | |||
43 | static struct pad_desc eukrea_mbimxsd_pads[] = { | ||
44 | /* LCD */ | ||
45 | MX25_PAD_LD0__LD0, | ||
46 | MX25_PAD_LD1__LD1, | ||
47 | MX25_PAD_LD2__LD2, | ||
48 | MX25_PAD_LD3__LD3, | ||
49 | MX25_PAD_LD4__LD4, | ||
50 | MX25_PAD_LD5__LD5, | ||
51 | MX25_PAD_LD6__LD6, | ||
52 | MX25_PAD_LD7__LD7, | ||
53 | MX25_PAD_LD8__LD8, | ||
54 | MX25_PAD_LD9__LD9, | ||
55 | MX25_PAD_LD10__LD10, | ||
56 | MX25_PAD_LD11__LD11, | ||
57 | MX25_PAD_LD12__LD12, | ||
58 | MX25_PAD_LD13__LD13, | ||
59 | MX25_PAD_LD14__LD14, | ||
60 | MX25_PAD_LD15__LD15, | ||
61 | MX25_PAD_GPIO_E__LD16, | ||
62 | MX25_PAD_GPIO_F__LD17, | ||
63 | MX25_PAD_HSYNC__HSYNC, | ||
64 | MX25_PAD_VSYNC__VSYNC, | ||
65 | MX25_PAD_LSCLK__LSCLK, | ||
66 | MX25_PAD_OE_ACD__OE_ACD, | ||
67 | MX25_PAD_CONTRAST__CONTRAST, | ||
68 | /* LCD_PWR */ | ||
69 | MX25_PAD_PWM__GPIO_1_26, | ||
70 | /* LED */ | ||
71 | MX25_PAD_POWER_FAIL__GPIO_3_19, | ||
72 | /* SWITCH */ | ||
73 | MX25_PAD_VSTBY_ACK__GPIO_3_18, | ||
74 | /* UART2 */ | ||
75 | MX25_PAD_UART2_RTS__UART2_RTS, | ||
76 | MX25_PAD_UART2_CTS__UART2_CTS, | ||
77 | MX25_PAD_UART2_TXD__UART2_TXD, | ||
78 | MX25_PAD_UART2_RXD__UART2_RXD, | ||
79 | /* SD1 */ | ||
80 | MX25_PAD_SD1_CMD__SD1_CMD, | ||
81 | MX25_PAD_SD1_CLK__SD1_CLK, | ||
82 | MX25_PAD_SD1_DATA0__SD1_DATA0, | ||
83 | MX25_PAD_SD1_DATA1__SD1_DATA1, | ||
84 | MX25_PAD_SD1_DATA2__SD1_DATA2, | ||
85 | MX25_PAD_SD1_DATA3__SD1_DATA3, | ||
86 | /* SD1 CD */ | ||
87 | MX25_PAD_DE_B__GPIO_2_20, | ||
88 | /* I2S */ | ||
89 | MX25_PAD_KPP_COL3__AUD5_TXFS, | ||
90 | MX25_PAD_KPP_COL2__AUD5_TXC, | ||
91 | MX25_PAD_KPP_COL1__AUD5_RXD, | ||
92 | MX25_PAD_KPP_COL0__AUD5_TXD, | ||
93 | }; | ||
94 | |||
95 | #define GPIO_LED1 83 | ||
96 | #define GPIO_SWITCH1 82 | ||
97 | #define GPIO_SD1CD 52 | ||
98 | #define GPIO_LCDPWR 26 | ||
99 | |||
100 | static struct imx_fb_videomode eukrea_mximxsd_modes[] = { | ||
101 | { | ||
102 | .mode = { | ||
103 | .name = "CMO-QVGA", | ||
104 | .refresh = 60, | ||
105 | .xres = 320, | ||
106 | .yres = 240, | ||
107 | .pixclock = KHZ2PICOS(6500), | ||
108 | .left_margin = 30, | ||
109 | .right_margin = 38, | ||
110 | .upper_margin = 20, | ||
111 | .lower_margin = 3, | ||
112 | .hsync_len = 15, | ||
113 | .vsync_len = 4, | ||
114 | }, | ||
115 | .bpp = 16, | ||
116 | .pcr = 0xCAD08B80, | ||
117 | }, | ||
118 | }; | ||
119 | |||
120 | static struct imx_fb_platform_data eukrea_mximxsd_fb_pdata = { | ||
121 | .mode = eukrea_mximxsd_modes, | ||
122 | .num_modes = ARRAY_SIZE(eukrea_mximxsd_modes), | ||
123 | .pwmr = 0x00A903FF, | ||
124 | .lscr1 = 0x00120300, | ||
125 | .dmacr = 0x00040060, | ||
126 | }; | ||
127 | |||
128 | static void eukrea_mbimxsd_lcd_power_set(struct plat_lcd_data *pd, | ||
129 | unsigned int power) | ||
130 | { | ||
131 | if (power) | ||
132 | gpio_direction_output(GPIO_LCDPWR, 1); | ||
133 | else | ||
134 | gpio_direction_output(GPIO_LCDPWR, 0); | ||
135 | } | ||
136 | |||
137 | static struct plat_lcd_data eukrea_mbimxsd_lcd_power_data = { | ||
138 | .set_power = eukrea_mbimxsd_lcd_power_set, | ||
139 | }; | ||
140 | |||
141 | static struct platform_device eukrea_mbimxsd_lcd_powerdev = { | ||
142 | .name = "platform-lcd", | ||
143 | .dev.platform_data = &eukrea_mbimxsd_lcd_power_data, | ||
144 | }; | ||
145 | |||
146 | static struct gpio_led eukrea_mbimxsd_leds[] = { | ||
147 | { | ||
148 | .name = "led1", | ||
149 | .default_trigger = "heartbeat", | ||
150 | .active_low = 1, | ||
151 | .gpio = GPIO_LED1, | ||
152 | }, | ||
153 | }; | ||
154 | |||
155 | static struct gpio_led_platform_data eukrea_mbimxsd_led_info = { | ||
156 | .leds = eukrea_mbimxsd_leds, | ||
157 | .num_leds = ARRAY_SIZE(eukrea_mbimxsd_leds), | ||
158 | }; | ||
159 | |||
160 | static struct platform_device eukrea_mbimxsd_leds_gpio = { | ||
161 | .name = "leds-gpio", | ||
162 | .id = -1, | ||
163 | .dev = { | ||
164 | .platform_data = &eukrea_mbimxsd_led_info, | ||
165 | }, | ||
166 | }; | ||
167 | |||
168 | static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = { | ||
169 | { | ||
170 | .gpio = GPIO_SWITCH1, | ||
171 | .code = BTN_0, | ||
172 | .desc = "BP1", | ||
173 | .active_low = 1, | ||
174 | .wakeup = 1, | ||
175 | }, | ||
176 | }; | ||
177 | |||
178 | static struct gpio_keys_platform_data eukrea_mbimxsd_button_data = { | ||
179 | .buttons = eukrea_mbimxsd_gpio_buttons, | ||
180 | .nbuttons = ARRAY_SIZE(eukrea_mbimxsd_gpio_buttons), | ||
181 | }; | ||
182 | |||
183 | static struct platform_device eukrea_mbimxsd_button_device = { | ||
184 | .name = "gpio-keys", | ||
185 | .id = -1, | ||
186 | .num_resources = 0, | ||
187 | .dev = { | ||
188 | .platform_data = &eukrea_mbimxsd_button_data, | ||
189 | } | ||
190 | }; | ||
191 | |||
192 | static struct platform_device *platform_devices[] __initdata = { | ||
193 | &eukrea_mbimxsd_leds_gpio, | ||
194 | &eukrea_mbimxsd_button_device, | ||
195 | &eukrea_mbimxsd_lcd_powerdev, | ||
196 | }; | ||
197 | |||
198 | static const struct imxuart_platform_data uart_pdata __initconst = { | ||
199 | .flags = IMXUART_HAVE_RTSCTS, | ||
200 | }; | ||
201 | |||
202 | static struct i2c_board_info eukrea_mbimxsd_i2c_devices[] = { | ||
203 | { | ||
204 | I2C_BOARD_INFO("tlv320aic23", 0x1a), | ||
205 | }, | ||
206 | }; | ||
207 | |||
208 | struct imx_ssi_platform_data eukrea_mbimxsd_ssi_pdata = { | ||
209 | .flags = IMX_SSI_SYN | IMX_SSI_NET | IMX_SSI_USE_I2S_SLAVE, | ||
210 | }; | ||
211 | |||
212 | /* | ||
213 | * system init for baseboard usage. Will be called by cpuimx25 init. | ||
214 | * | ||
215 | * Add platform devices present on this baseboard and init | ||
216 | * them from CPU side as far as required to use them later on | ||
217 | */ | ||
218 | void __init eukrea_mbimxsd_baseboard_init(void) | ||
219 | { | ||
220 | if (mxc_iomux_v3_setup_multiple_pads(eukrea_mbimxsd_pads, | ||
221 | ARRAY_SIZE(eukrea_mbimxsd_pads))) | ||
222 | printk(KERN_ERR "error setting mbimxsd pads !\n"); | ||
223 | |||
224 | #if defined(CONFIG_SND_SOC_EUKREA_TLV320) | ||
225 | /* SSI unit master I2S codec connected to SSI_AUD5*/ | ||
226 | mxc_audmux_v2_configure_port(0, | ||
227 | MXC_AUDMUX_V2_PTCR_SYN | | ||
228 | MXC_AUDMUX_V2_PTCR_TFSDIR | | ||
229 | MXC_AUDMUX_V2_PTCR_TFSEL(4) | | ||
230 | MXC_AUDMUX_V2_PTCR_TCLKDIR | | ||
231 | MXC_AUDMUX_V2_PTCR_TCSEL(4), | ||
232 | MXC_AUDMUX_V2_PDCR_RXDSEL(4) | ||
233 | ); | ||
234 | mxc_audmux_v2_configure_port(4, | ||
235 | MXC_AUDMUX_V2_PTCR_SYN, | ||
236 | MXC_AUDMUX_V2_PDCR_RXDSEL(0) | ||
237 | ); | ||
238 | #endif | ||
239 | |||
240 | imx25_add_imx_uart1(&uart_pdata); | ||
241 | mxc_register_device(&mx25_fb_device, &eukrea_mximxsd_fb_pdata); | ||
242 | mxc_register_device(&imx_ssi_device0, &eukrea_mbimxsd_ssi_pdata); | ||
243 | |||
244 | gpio_request(GPIO_LED1, "LED1"); | ||
245 | gpio_direction_output(GPIO_LED1, 1); | ||
246 | gpio_free(GPIO_LED1); | ||
247 | |||
248 | gpio_request(GPIO_SWITCH1, "SWITCH1"); | ||
249 | gpio_direction_input(GPIO_SWITCH1); | ||
250 | gpio_free(GPIO_SWITCH1); | ||
251 | |||
252 | gpio_request(GPIO_LCDPWR, "LCDPWR"); | ||
253 | gpio_direction_output(GPIO_LCDPWR, 1); | ||
254 | gpio_free(GPIO_SWITCH1); | ||
255 | |||
256 | i2c_register_board_info(0, eukrea_mbimxsd_i2c_devices, | ||
257 | ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); | ||
258 | |||
259 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | ||
260 | } | ||
diff --git a/arch/arm/mach-mx25/mach-cpuimx25.c b/arch/arm/mach-mx25/mach-cpuimx25.c new file mode 100644 index 000000000000..56b2e26d23b4 --- /dev/null +++ b/arch/arm/mach-mx25/mach-cpuimx25.c | |||
@@ -0,0 +1,173 @@ | |||
1 | /* | ||
2 | * Copyright 2009 Sascha Hauer, <kernel@pengutronix.de> | ||
3 | * Copyright 2010 Eric Bénard - Eukréa Electromatique, <eric@eukrea.com> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version 2 | ||
8 | * of the License, or (at your option) any later version. | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
17 | * Boston, MA 02110-1301, USA. | ||
18 | */ | ||
19 | |||
20 | #include <linux/types.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/delay.h> | ||
23 | #include <linux/clk.h> | ||
24 | #include <linux/irq.h> | ||
25 | #include <linux/gpio.h> | ||
26 | #include <linux/fec.h> | ||
27 | #include <linux/platform_device.h> | ||
28 | #include <linux/usb/otg.h> | ||
29 | #include <linux/usb/ulpi.h> | ||
30 | #include <linux/fsl_devices.h> | ||
31 | |||
32 | #include <mach/eukrea-baseboards.h> | ||
33 | #include <mach/hardware.h> | ||
34 | #include <asm/mach-types.h> | ||
35 | #include <asm/mach/arch.h> | ||
36 | #include <asm/mach/time.h> | ||
37 | #include <asm/memory.h> | ||
38 | #include <asm/mach/map.h> | ||
39 | #include <mach/common.h> | ||
40 | #include <mach/mx25.h> | ||
41 | #include <mach/mxc_nand.h> | ||
42 | #include <mach/imxfb.h> | ||
43 | #include <mach/mxc_ehci.h> | ||
44 | #include <mach/ulpi.h> | ||
45 | #include <mach/iomux-mx25.h> | ||
46 | |||
47 | #include "devices-imx25.h" | ||
48 | #include "devices.h" | ||
49 | |||
50 | static const struct imxuart_platform_data uart_pdata __initconst = { | ||
51 | .flags = IMXUART_HAVE_RTSCTS, | ||
52 | }; | ||
53 | |||
54 | static struct pad_desc eukrea_cpuimx25_pads[] = { | ||
55 | /* FEC - RMII */ | ||
56 | MX25_PAD_FEC_MDC__FEC_MDC, | ||
57 | MX25_PAD_FEC_MDIO__FEC_MDIO, | ||
58 | MX25_PAD_FEC_TDATA0__FEC_TDATA0, | ||
59 | MX25_PAD_FEC_TDATA1__FEC_TDATA1, | ||
60 | MX25_PAD_FEC_TX_EN__FEC_TX_EN, | ||
61 | MX25_PAD_FEC_RDATA0__FEC_RDATA0, | ||
62 | MX25_PAD_FEC_RDATA1__FEC_RDATA1, | ||
63 | MX25_PAD_FEC_RX_DV__FEC_RX_DV, | ||
64 | MX25_PAD_FEC_TX_CLK__FEC_TX_CLK, | ||
65 | /* I2C1 */ | ||
66 | MX25_PAD_I2C1_CLK__I2C1_CLK, | ||
67 | MX25_PAD_I2C1_DAT__I2C1_DAT, | ||
68 | }; | ||
69 | |||
70 | static struct fec_platform_data mx25_fec_pdata = { | ||
71 | .phy = PHY_INTERFACE_MODE_RMII, | ||
72 | }; | ||
73 | |||
74 | static const struct mxc_nand_platform_data | ||
75 | eukrea_cpuimx25_nand_board_info __initconst = { | ||
76 | .width = 1, | ||
77 | .hw_ecc = 1, | ||
78 | .flash_bbt = 1, | ||
79 | }; | ||
80 | |||
81 | static const struct imxi2c_platform_data | ||
82 | eukrea_cpuimx25_i2c0_data __initconst = { | ||
83 | .bitrate = 100000, | ||
84 | }; | ||
85 | |||
86 | static struct i2c_board_info eukrea_cpuimx25_i2c_devices[] = { | ||
87 | { | ||
88 | I2C_BOARD_INFO("pcf8563", 0x51), | ||
89 | }, | ||
90 | }; | ||
91 | |||
92 | static struct mxc_usbh_platform_data otg_pdata = { | ||
93 | .portsc = MXC_EHCI_MODE_UTMI, | ||
94 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, | ||
95 | }; | ||
96 | |||
97 | static struct mxc_usbh_platform_data usbh2_pdata = { | ||
98 | .portsc = MXC_EHCI_MODE_SERIAL, | ||
99 | .flags = MXC_EHCI_INTERFACE_SINGLE_UNI | MXC_EHCI_INTERNAL_PHY | | ||
100 | MXC_EHCI_IPPUE_DOWN, | ||
101 | }; | ||
102 | |||
103 | static struct fsl_usb2_platform_data otg_device_pdata = { | ||
104 | .operating_mode = FSL_USB2_DR_DEVICE, | ||
105 | .phy_mode = FSL_USB2_PHY_UTMI, | ||
106 | }; | ||
107 | |||
108 | static int otg_mode_host; | ||
109 | |||
110 | static int __init eukrea_cpuimx25_otg_mode(char *options) | ||
111 | { | ||
112 | if (!strcmp(options, "host")) | ||
113 | otg_mode_host = 1; | ||
114 | else if (!strcmp(options, "device")) | ||
115 | otg_mode_host = 0; | ||
116 | else | ||
117 | pr_info("otg_mode neither \"host\" nor \"device\". " | ||
118 | "Defaulting to device\n"); | ||
119 | return 0; | ||
120 | } | ||
121 | __setup("otg_mode=", eukrea_cpuimx25_otg_mode); | ||
122 | |||
123 | static void __init eukrea_cpuimx25_init(void) | ||
124 | { | ||
125 | if (mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx25_pads, | ||
126 | ARRAY_SIZE(eukrea_cpuimx25_pads))) | ||
127 | printk(KERN_ERR "error setting cpuimx25 pads !\n"); | ||
128 | |||
129 | imx25_add_imx_uart0(&uart_pdata); | ||
130 | imx25_add_mxc_nand(&eukrea_cpuimx25_nand_board_info); | ||
131 | mxc_register_device(&mx25_rtc_device, NULL); | ||
132 | mxc_register_device(&mx25_fec_device, &mx25_fec_pdata); | ||
133 | |||
134 | i2c_register_board_info(0, eukrea_cpuimx25_i2c_devices, | ||
135 | ARRAY_SIZE(eukrea_cpuimx25_i2c_devices)); | ||
136 | imx25_add_imx_i2c0(&eukrea_cpuimx25_i2c0_data); | ||
137 | |||
138 | #if defined(CONFIG_USB_ULPI) | ||
139 | if (otg_mode_host) { | ||
140 | otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | ||
141 | USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); | ||
142 | |||
143 | mxc_register_device(&mxc_otg, &otg_pdata); | ||
144 | } | ||
145 | mxc_register_device(&mxc_usbh2, &usbh2_pdata); | ||
146 | #endif | ||
147 | if (!otg_mode_host) | ||
148 | mxc_register_device(&otg_udc_device, &otg_device_pdata); | ||
149 | |||
150 | #ifdef CONFIG_MACH_EUKREA_MBIMXSD_BASEBOARD | ||
151 | eukrea_mbimxsd_baseboard_init(); | ||
152 | #endif | ||
153 | } | ||
154 | |||
155 | static void __init eukrea_cpuimx25_timer_init(void) | ||
156 | { | ||
157 | mx25_clocks_init(); | ||
158 | } | ||
159 | |||
160 | static struct sys_timer eukrea_cpuimx25_timer = { | ||
161 | .init = eukrea_cpuimx25_timer_init, | ||
162 | }; | ||
163 | |||
164 | MACHINE_START(EUKREA_CPUIMX25, "Eukrea CPUIMX25") | ||
165 | /* Maintainer: Eukrea Electromatique */ | ||
166 | .phys_io = MX25_AIPS1_BASE_ADDR, | ||
167 | .io_pg_offst = ((MX25_AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | ||
168 | .boot_params = MX25_PHYS_OFFSET + 0x100, | ||
169 | .map_io = mx25_map_io, | ||
170 | .init_irq = mx25_init_irq, | ||
171 | .init_machine = eukrea_cpuimx25_init, | ||
172 | .timer = &eukrea_cpuimx25_timer, | ||
173 | MACHINE_END | ||
diff --git a/arch/arm/mach-mx25/mach-mx25pdk.c b/arch/arm/mach-mx25/mach-mx25_3ds.c index 83d74109e7d8..62bc21f11a71 100644 --- a/arch/arm/mach-mx25/mach-mx25pdk.c +++ b/arch/arm/mach-mx25/mach-mx25_3ds.c | |||
@@ -16,6 +16,12 @@ | |||
16 | * Boston, MA 02110-1301, USA. | 16 | * Boston, MA 02110-1301, USA. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | /* | ||
20 | * This machine is known as: | ||
21 | * - i.MX25 3-Stack Development System | ||
22 | * - i.MX25 Platform Development Kit (i.MX25 PDK) | ||
23 | */ | ||
24 | |||
19 | #include <linux/types.h> | 25 | #include <linux/types.h> |
20 | #include <linux/init.h> | 26 | #include <linux/init.h> |
21 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
@@ -24,6 +30,7 @@ | |||
24 | #include <linux/gpio.h> | 30 | #include <linux/gpio.h> |
25 | #include <linux/fec.h> | 31 | #include <linux/fec.h> |
26 | #include <linux/platform_device.h> | 32 | #include <linux/platform_device.h> |
33 | #include <linux/input/matrix_keypad.h> | ||
27 | 34 | ||
28 | #include <mach/hardware.h> | 35 | #include <mach/hardware.h> |
29 | #include <asm/mach-types.h> | 36 | #include <asm/mach-types.h> |
@@ -32,14 +39,14 @@ | |||
32 | #include <asm/memory.h> | 39 | #include <asm/memory.h> |
33 | #include <asm/mach/map.h> | 40 | #include <asm/mach/map.h> |
34 | #include <mach/common.h> | 41 | #include <mach/common.h> |
35 | #include <mach/imx-uart.h> | ||
36 | #include <mach/mx25.h> | 42 | #include <mach/mx25.h> |
37 | #include <mach/mxc_nand.h> | ||
38 | #include <mach/imxfb.h> | 43 | #include <mach/imxfb.h> |
39 | #include "devices.h" | ||
40 | #include <mach/iomux-mx25.h> | 44 | #include <mach/iomux-mx25.h> |
41 | 45 | ||
42 | static struct imxuart_platform_data uart_pdata = { | 46 | #include "devices-imx25.h" |
47 | #include "devices.h" | ||
48 | |||
49 | static const struct imxuart_platform_data uart_pdata __initconst = { | ||
43 | .flags = IMXUART_HAVE_RTSCTS, | 50 | .flags = IMXUART_HAVE_RTSCTS, |
44 | }; | 51 | }; |
45 | 52 | ||
@@ -80,6 +87,16 @@ static struct pad_desc mx25pdk_pads[] = { | |||
80 | MX25_PAD_LSCLK__LSCLK, | 87 | MX25_PAD_LSCLK__LSCLK, |
81 | MX25_PAD_OE_ACD__OE_ACD, | 88 | MX25_PAD_OE_ACD__OE_ACD, |
82 | MX25_PAD_CONTRAST__CONTRAST, | 89 | MX25_PAD_CONTRAST__CONTRAST, |
90 | |||
91 | /* Keypad */ | ||
92 | MX25_PAD_KPP_ROW0__KPP_ROW0, | ||
93 | MX25_PAD_KPP_ROW1__KPP_ROW1, | ||
94 | MX25_PAD_KPP_ROW2__KPP_ROW2, | ||
95 | MX25_PAD_KPP_ROW3__KPP_ROW3, | ||
96 | MX25_PAD_KPP_COL0__KPP_COL0, | ||
97 | MX25_PAD_KPP_COL1__KPP_COL1, | ||
98 | MX25_PAD_KPP_COL2__KPP_COL2, | ||
99 | MX25_PAD_KPP_COL3__KPP_COL3, | ||
83 | }; | 100 | }; |
84 | 101 | ||
85 | static struct fec_platform_data mx25_fec_pdata = { | 102 | static struct fec_platform_data mx25_fec_pdata = { |
@@ -103,7 +120,8 @@ static void __init mx25pdk_fec_reset(void) | |||
103 | gpio_set_value(FEC_RESET_B_GPIO, 1); | 120 | gpio_set_value(FEC_RESET_B_GPIO, 1); |
104 | } | 121 | } |
105 | 122 | ||
106 | static struct mxc_nand_platform_data mx25pdk_nand_board_info = { | 123 | static const struct mxc_nand_platform_data |
124 | mx25pdk_nand_board_info __initconst = { | ||
107 | .width = 1, | 125 | .width = 1, |
108 | .hw_ecc = 1, | 126 | .hw_ecc = 1, |
109 | .flash_bbt = 1, | 127 | .flash_bbt = 1, |
@@ -137,19 +155,45 @@ static struct imx_fb_platform_data mx25pdk_fb_pdata = { | |||
137 | .dmacr = 0x00020010, | 155 | .dmacr = 0x00020010, |
138 | }; | 156 | }; |
139 | 157 | ||
158 | static const uint32_t mx25pdk_keymap[] = { | ||
159 | KEY(0, 0, KEY_UP), | ||
160 | KEY(0, 1, KEY_DOWN), | ||
161 | KEY(0, 2, KEY_VOLUMEDOWN), | ||
162 | KEY(0, 3, KEY_HOME), | ||
163 | KEY(1, 0, KEY_RIGHT), | ||
164 | KEY(1, 1, KEY_LEFT), | ||
165 | KEY(1, 2, KEY_ENTER), | ||
166 | KEY(1, 3, KEY_VOLUMEUP), | ||
167 | KEY(2, 0, KEY_F6), | ||
168 | KEY(2, 1, KEY_F8), | ||
169 | KEY(2, 2, KEY_F9), | ||
170 | KEY(2, 3, KEY_F10), | ||
171 | KEY(3, 0, KEY_F1), | ||
172 | KEY(3, 1, KEY_F2), | ||
173 | KEY(3, 2, KEY_F3), | ||
174 | KEY(3, 3, KEY_POWER), | ||
175 | }; | ||
176 | |||
177 | static struct matrix_keymap_data mx25pdk_keymap_data = { | ||
178 | .keymap = mx25pdk_keymap, | ||
179 | .keymap_size = ARRAY_SIZE(mx25pdk_keymap), | ||
180 | }; | ||
181 | |||
140 | static void __init mx25pdk_init(void) | 182 | static void __init mx25pdk_init(void) |
141 | { | 183 | { |
142 | mxc_iomux_v3_setup_multiple_pads(mx25pdk_pads, | 184 | mxc_iomux_v3_setup_multiple_pads(mx25pdk_pads, |
143 | ARRAY_SIZE(mx25pdk_pads)); | 185 | ARRAY_SIZE(mx25pdk_pads)); |
144 | 186 | ||
145 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 187 | imx25_add_imx_uart0(&uart_pdata); |
146 | mxc_register_device(&mxc_usbh2, NULL); | 188 | mxc_register_device(&mxc_usbh2, NULL); |
147 | mxc_register_device(&mxc_nand_device, &mx25pdk_nand_board_info); | 189 | imx25_add_mxc_nand(&mx25pdk_nand_board_info); |
148 | mxc_register_device(&mx25_rtc_device, NULL); | 190 | mxc_register_device(&mx25_rtc_device, NULL); |
149 | mxc_register_device(&mx25_fb_device, &mx25pdk_fb_pdata); | 191 | mxc_register_device(&mx25_fb_device, &mx25pdk_fb_pdata); |
192 | mxc_register_device(&mxc_wdt, NULL); | ||
150 | 193 | ||
151 | mx25pdk_fec_reset(); | 194 | mx25pdk_fec_reset(); |
152 | mxc_register_device(&mx25_fec_device, &mx25_fec_pdata); | 195 | mxc_register_device(&mx25_fec_device, &mx25_fec_pdata); |
196 | mxc_register_device(&mx25_kpp_device, &mx25pdk_keymap_data); | ||
153 | } | 197 | } |
154 | 198 | ||
155 | static void __init mx25pdk_timer_init(void) | 199 | static void __init mx25pdk_timer_init(void) |
diff --git a/arch/arm/mach-mx25/mm.c b/arch/arm/mach-mx25/mm.c index a7e587ff3e9e..bb677111fb0f 100644 --- a/arch/arm/mach-mx25/mm.c +++ b/arch/arm/mach-mx25/mm.c | |||
@@ -14,10 +14,6 @@ | |||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | * GNU General Public License for more details. | 16 | * GNU General Public License for more details. |
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | */ | 17 | */ |
22 | 18 | ||
23 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
@@ -69,8 +65,11 @@ void __init mx25_map_io(void) | |||
69 | iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc)); | 65 | iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc)); |
70 | } | 66 | } |
71 | 67 | ||
68 | int imx25_register_gpios(void); | ||
69 | |||
72 | void __init mx25_init_irq(void) | 70 | void __init mx25_init_irq(void) |
73 | { | 71 | { |
74 | mxc_init_irq((void __iomem *)MX25_AVIC_BASE_ADDR_VIRT); | 72 | mxc_init_irq((void __iomem *)MX25_AVIC_BASE_ADDR_VIRT); |
73 | imx25_register_gpios(); | ||
75 | } | 74 | } |
76 | 75 | ||
diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig index 344753fdf25e..85beece802aa 100644 --- a/arch/arm/mach-mx3/Kconfig +++ b/arch/arm/mach-mx3/Kconfig | |||
@@ -15,6 +15,8 @@ comment "MX3 platforms:" | |||
15 | config MACH_MX31ADS | 15 | config MACH_MX31ADS |
16 | bool "Support MX31ADS platforms" | 16 | bool "Support MX31ADS platforms" |
17 | select ARCH_MX31 | 17 | select ARCH_MX31 |
18 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
19 | select IMX_HAVE_PLATFORM_IMX_UART | ||
18 | default y | 20 | default y |
19 | help | 21 | help |
20 | Include support for MX31ADS platform. This includes specific | 22 | Include support for MX31ADS platform. This includes specific |
@@ -34,6 +36,9 @@ config MACH_MX31ADS_WM1133_EV1 | |||
34 | config MACH_PCM037 | 36 | config MACH_PCM037 |
35 | bool "Support Phytec pcm037 (i.MX31) platforms" | 37 | bool "Support Phytec pcm037 (i.MX31) platforms" |
36 | select ARCH_MX31 | 38 | select ARCH_MX31 |
39 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
40 | select IMX_HAVE_PLATFORM_IMX_UART | ||
41 | select IMX_HAVE_PLATFORM_MXC_NAND | ||
37 | select MXC_ULPI if USB_ULPI | 42 | select MXC_ULPI if USB_ULPI |
38 | help | 43 | help |
39 | Include support for Phytec pcm037 platform. This includes | 44 | Include support for Phytec pcm037 platform. This includes |
@@ -42,6 +47,7 @@ config MACH_PCM037 | |||
42 | config MACH_PCM037_EET | 47 | config MACH_PCM037_EET |
43 | bool "Support pcm037 EET board extensions" | 48 | bool "Support pcm037 EET board extensions" |
44 | depends on MACH_PCM037 | 49 | depends on MACH_PCM037 |
50 | select IMX_HAVE_PLATFORM_SPI_IMX | ||
45 | help | 51 | help |
46 | Add support for PCM037 EET baseboard extensions. If you are using the | 52 | Add support for PCM037 EET baseboard extensions. If you are using the |
47 | OLED display with EET, use "video=mx3fb:CMEL-OLED" kernel | 53 | OLED display with EET, use "video=mx3fb:CMEL-OLED" kernel |
@@ -51,6 +57,9 @@ config MACH_MX31LITE | |||
51 | bool "Support MX31 LITEKIT (LogicPD)" | 57 | bool "Support MX31 LITEKIT (LogicPD)" |
52 | select ARCH_MX31 | 58 | select ARCH_MX31 |
53 | select MXC_ULPI if USB_ULPI | 59 | select MXC_ULPI if USB_ULPI |
60 | select IMX_HAVE_PLATFORM_IMX_UART | ||
61 | select IMX_HAVE_PLATFORM_MXC_NAND | ||
62 | select IMX_HAVE_PLATFORM_SPI_IMX | ||
54 | help | 63 | help |
55 | Include support for MX31 LITEKIT platform. This includes specific | 64 | Include support for MX31 LITEKIT platform. This includes specific |
56 | configurations for the board and its peripherals. | 65 | configurations for the board and its peripherals. |
@@ -58,6 +67,10 @@ config MACH_MX31LITE | |||
58 | config MACH_MX31_3DS | 67 | config MACH_MX31_3DS |
59 | bool "Support MX31PDK (3DS)" | 68 | bool "Support MX31PDK (3DS)" |
60 | select ARCH_MX31 | 69 | select ARCH_MX31 |
70 | select MXC_DEBUG_BOARD | ||
71 | select IMX_HAVE_PLATFORM_IMX_UART | ||
72 | select IMX_HAVE_PLATFORM_MXC_NAND | ||
73 | select IMX_HAVE_PLATFORM_SPI_IMX | ||
61 | help | 74 | help |
62 | Include support for MX31PDK (3DS) platform. This includes specific | 75 | Include support for MX31PDK (3DS) platform. This includes specific |
63 | configurations for the board and its peripherals. | 76 | configurations for the board and its peripherals. |
@@ -74,6 +87,9 @@ config MACH_MX31_3DS_MXC_NAND_USE_BBT | |||
74 | config MACH_MX31MOBOARD | 87 | config MACH_MX31MOBOARD |
75 | bool "Support mx31moboard platforms (EPFL Mobots group)" | 88 | bool "Support mx31moboard platforms (EPFL Mobots group)" |
76 | select ARCH_MX31 | 89 | select ARCH_MX31 |
90 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
91 | select IMX_HAVE_PLATFORM_IMX_UART | ||
92 | select IMX_HAVE_PLATFORM_SPI_IMX | ||
77 | select MXC_ULPI if USB_ULPI | 93 | select MXC_ULPI if USB_ULPI |
78 | help | 94 | help |
79 | Include support for mx31moboard platform. This includes specific | 95 | Include support for mx31moboard platform. This includes specific |
@@ -82,6 +98,8 @@ config MACH_MX31MOBOARD | |||
82 | config MACH_MX31LILLY | 98 | config MACH_MX31LILLY |
83 | bool "Support MX31 LILLY-1131 platforms (INCO startec)" | 99 | bool "Support MX31 LILLY-1131 platforms (INCO startec)" |
84 | select ARCH_MX31 | 100 | select ARCH_MX31 |
101 | select IMX_HAVE_PLATFORM_IMX_UART | ||
102 | select IMX_HAVE_PLATFORM_SPI_IMX | ||
85 | select MXC_ULPI if USB_ULPI | 103 | select MXC_ULPI if USB_ULPI |
86 | help | 104 | help |
87 | Include support for mx31 based LILLY1131 modules. This includes | 105 | Include support for mx31 based LILLY1131 modules. This includes |
@@ -90,6 +108,7 @@ config MACH_MX31LILLY | |||
90 | config MACH_QONG | 108 | config MACH_QONG |
91 | bool "Support Dave/DENX QongEVB-LITE platform" | 109 | bool "Support Dave/DENX QongEVB-LITE platform" |
92 | select ARCH_MX31 | 110 | select ARCH_MX31 |
111 | select IMX_HAVE_PLATFORM_IMX_UART | ||
93 | help | 112 | help |
94 | Include support for Dave/DENX QongEVB-LITE platform. This includes | 113 | Include support for Dave/DENX QongEVB-LITE platform. This includes |
95 | specific configurations for the board and its peripherals. | 114 | specific configurations for the board and its peripherals. |
@@ -97,6 +116,10 @@ config MACH_QONG | |||
97 | config MACH_PCM043 | 116 | config MACH_PCM043 |
98 | bool "Support Phytec pcm043 (i.MX35) platforms" | 117 | bool "Support Phytec pcm043 (i.MX35) platforms" |
99 | select ARCH_MX35 | 118 | select ARCH_MX35 |
119 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
120 | select IMX_HAVE_PLATFORM_IMX_UART | ||
121 | select IMX_HAVE_PLATFORM_MXC_NAND | ||
122 | select IMX_HAVE_PLATFORM_FLEXCAN | ||
100 | select MXC_ULPI if USB_ULPI | 123 | select MXC_ULPI if USB_ULPI |
101 | help | 124 | help |
102 | Include support for Phytec pcm043 platform. This includes | 125 | Include support for Phytec pcm043 platform. This includes |
@@ -105,6 +128,9 @@ config MACH_PCM043 | |||
105 | config MACH_ARMADILLO5X0 | 128 | config MACH_ARMADILLO5X0 |
106 | bool "Support Atmark Armadillo-500 Development Base Board" | 129 | bool "Support Atmark Armadillo-500 Development Base Board" |
107 | select ARCH_MX31 | 130 | select ARCH_MX31 |
131 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
132 | select IMX_HAVE_PLATFORM_IMX_UART | ||
133 | select IMX_HAVE_PLATFORM_MXC_NAND | ||
108 | select MXC_ULPI if USB_ULPI | 134 | select MXC_ULPI if USB_ULPI |
109 | help | 135 | help |
110 | Include support for Atmark Armadillo-500 platform. This includes | 136 | Include support for Atmark Armadillo-500 platform. This includes |
@@ -113,6 +139,7 @@ config MACH_ARMADILLO5X0 | |||
113 | config MACH_MX35_3DS | 139 | config MACH_MX35_3DS |
114 | bool "Support MX35PDK platform" | 140 | bool "Support MX35PDK platform" |
115 | select ARCH_MX35 | 141 | select ARCH_MX35 |
142 | select IMX_HAVE_PLATFORM_IMX_UART | ||
116 | default n | 143 | default n |
117 | help | 144 | help |
118 | Include support for MX35PDK platform. This includes specific | 145 | Include support for MX35PDK platform. This includes specific |
@@ -121,8 +148,34 @@ config MACH_MX35_3DS | |||
121 | config MACH_KZM_ARM11_01 | 148 | config MACH_KZM_ARM11_01 |
122 | bool "Support KZM-ARM11-01(Kyoto Microcomputer)" | 149 | bool "Support KZM-ARM11-01(Kyoto Microcomputer)" |
123 | select ARCH_MX31 | 150 | select ARCH_MX31 |
151 | select IMX_HAVE_PLATFORM_IMX_UART | ||
124 | help | 152 | help |
125 | Include support for KZM-ARM11-01. This includes specific | 153 | Include support for KZM-ARM11-01. This includes specific |
126 | configurations for the board and its peripherals. | 154 | configurations for the board and its peripherals. |
127 | 155 | ||
156 | config MACH_EUKREA_CPUIMX35 | ||
157 | bool "Support Eukrea CPUIMX35 Platform" | ||
158 | select ARCH_MX35 | ||
159 | select IMX_HAVE_PLATFORM_IMX_UART | ||
160 | select IMX_HAVE_PLATFORM_IMX_I2C | ||
161 | select IMX_HAVE_PLATFORM_MXC_NAND | ||
162 | select MXC_ULPI if USB_ULPI | ||
163 | help | ||
164 | Include support for Eukrea CPUIMX35 platform. This includes | ||
165 | specific configurations for the board and its peripherals. | ||
166 | |||
167 | choice | ||
168 | prompt "Baseboard" | ||
169 | depends on MACH_EUKREA_CPUIMX35 | ||
170 | default MACH_EUKREA_MBIMXSD35_BASEBOARD | ||
171 | |||
172 | config MACH_EUKREA_MBIMXSD35_BASEBOARD | ||
173 | prompt "Eukrea MBIMXSD development board" | ||
174 | bool | ||
175 | help | ||
176 | This adds board specific devices that can be found on Eukrea's | ||
177 | MBIMXSD evaluation board. | ||
178 | |||
179 | endchoice | ||
180 | |||
128 | endif | 181 | endif |
diff --git a/arch/arm/mach-mx3/Makefile b/arch/arm/mach-mx3/Makefile index 5d650fda5d5d..2bd7beceb991 100644 --- a/arch/arm/mach-mx3/Makefile +++ b/arch/arm/mach-mx3/Makefile | |||
@@ -22,5 +22,7 @@ obj-$(CONFIG_MACH_MX31MOBOARD) += mach-mx31moboard.o mx31moboard-devboard.o \ | |||
22 | obj-$(CONFIG_MACH_QONG) += mach-qong.o | 22 | obj-$(CONFIG_MACH_QONG) += mach-qong.o |
23 | obj-$(CONFIG_MACH_PCM043) += mach-pcm043.o | 23 | obj-$(CONFIG_MACH_PCM043) += mach-pcm043.o |
24 | obj-$(CONFIG_MACH_ARMADILLO5X0) += mach-armadillo5x0.o | 24 | obj-$(CONFIG_MACH_ARMADILLO5X0) += mach-armadillo5x0.o |
25 | obj-$(CONFIG_MACH_MX35_3DS) += mach-mx35pdk.o | 25 | obj-$(CONFIG_MACH_MX35_3DS) += mach-mx35_3ds.o |
26 | obj-$(CONFIG_MACH_KZM_ARM11_01) += mach-kzm_arm11_01.o | 26 | obj-$(CONFIG_MACH_KZM_ARM11_01) += mach-kzm_arm11_01.o |
27 | obj-$(CONFIG_MACH_EUKREA_CPUIMX35) += mach-cpuimx35.o | ||
28 | obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd-baseboard.o | ||
diff --git a/arch/arm/mach-mx3/clock-imx35.c b/arch/arm/mach-mx3/clock-imx35.c index 9f3e943e2232..d3af0fdf8475 100644 --- a/arch/arm/mach-mx3/clock-imx35.c +++ b/arch/arm/mach-mx3/clock-imx35.c | |||
@@ -359,7 +359,7 @@ DEFINE_CLOCK(i2c1_clk, 0, CCM_CGR1, 10, get_rate_ipg_per, NULL); | |||
359 | DEFINE_CLOCK(i2c2_clk, 1, CCM_CGR1, 12, get_rate_ipg_per, NULL); | 359 | DEFINE_CLOCK(i2c2_clk, 1, CCM_CGR1, 12, get_rate_ipg_per, NULL); |
360 | DEFINE_CLOCK(i2c3_clk, 2, CCM_CGR1, 14, get_rate_ipg_per, NULL); | 360 | DEFINE_CLOCK(i2c3_clk, 2, CCM_CGR1, 14, get_rate_ipg_per, NULL); |
361 | DEFINE_CLOCK(iomuxc_clk, 0, CCM_CGR1, 16, NULL, NULL); | 361 | DEFINE_CLOCK(iomuxc_clk, 0, CCM_CGR1, 16, NULL, NULL); |
362 | DEFINE_CLOCK(ipu_clk, 0, CCM_CGR1, 18, NULL, NULL); | 362 | DEFINE_CLOCK(ipu_clk, 0, CCM_CGR1, 18, get_rate_ahb, NULL); |
363 | DEFINE_CLOCK(kpp_clk, 0, CCM_CGR1, 20, get_rate_ipg, NULL); | 363 | DEFINE_CLOCK(kpp_clk, 0, CCM_CGR1, 20, get_rate_ipg, NULL); |
364 | DEFINE_CLOCK(mlb_clk, 0, CCM_CGR1, 22, get_rate_ahb, NULL); | 364 | DEFINE_CLOCK(mlb_clk, 0, CCM_CGR1, 22, get_rate_ahb, NULL); |
365 | DEFINE_CLOCK(mshc_clk, 0, CCM_CGR1, 24, get_rate_mshc, NULL); | 365 | DEFINE_CLOCK(mshc_clk, 0, CCM_CGR1, 24, get_rate_mshc, NULL); |
@@ -428,8 +428,8 @@ static struct clk nfc_clk = { | |||
428 | static struct clk_lookup lookups[] = { | 428 | static struct clk_lookup lookups[] = { |
429 | _REGISTER_CLOCK(NULL, "asrc", asrc_clk) | 429 | _REGISTER_CLOCK(NULL, "asrc", asrc_clk) |
430 | _REGISTER_CLOCK(NULL, "ata", ata_clk) | 430 | _REGISTER_CLOCK(NULL, "ata", ata_clk) |
431 | _REGISTER_CLOCK(NULL, "can", can1_clk) | 431 | _REGISTER_CLOCK("flexcan.0", NULL, can1_clk) |
432 | _REGISTER_CLOCK(NULL, "can", can2_clk) | 432 | _REGISTER_CLOCK("flexcan.1", NULL, can2_clk) |
433 | _REGISTER_CLOCK("spi_imx.0", NULL, cspi1_clk) | 433 | _REGISTER_CLOCK("spi_imx.0", NULL, cspi1_clk) |
434 | _REGISTER_CLOCK("spi_imx.1", NULL, cspi2_clk) | 434 | _REGISTER_CLOCK("spi_imx.1", NULL, cspi2_clk) |
435 | _REGISTER_CLOCK(NULL, "ect", ect_clk) | 435 | _REGISTER_CLOCK(NULL, "ect", ect_clk) |
diff --git a/arch/arm/mach-mx3/devices-imx31.h b/arch/arm/mach-mx3/devices-imx31.h new file mode 100644 index 000000000000..3b1a44a20585 --- /dev/null +++ b/arch/arm/mach-mx3/devices-imx31.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <mach/mx31.h> | ||
10 | #include <mach/devices-common.h> | ||
11 | |||
12 | #define imx31_add_imx_i2c0(pdata) \ | ||
13 | imx_add_imx_i2c(0, MX31_I2C1_BASE_ADDR, SZ_4K, MX31_INT_I2C1, pdata) | ||
14 | #define imx31_add_imx_i2c1(pdata) \ | ||
15 | imx_add_imx_i2c(1, MX31_I2C2_BASE_ADDR, SZ_4K, MX31_INT_I2C2, pdata) | ||
16 | #define imx31_add_imx_i2c2(pdata) \ | ||
17 | imx_add_imx_i2c(2, MX31_I2C3_BASE_ADDR, SZ_4K, MX31_INT_I2C3, pdata) | ||
18 | |||
19 | #define imx31_add_imx_uart0(pdata) \ | ||
20 | imx_add_imx_uart_1irq(0, MX31_UART1_BASE_ADDR, SZ_16K, MX31_INT_UART1, pdata) | ||
21 | #define imx31_add_imx_uart1(pdata) \ | ||
22 | imx_add_imx_uart_1irq(1, MX31_UART2_BASE_ADDR, SZ_16K, MX31_INT_UART2, pdata) | ||
23 | #define imx31_add_imx_uart2(pdata) \ | ||
24 | imx_add_imx_uart_1irq(2, MX31_UART3_BASE_ADDR, SZ_16K, MX31_INT_UART3, pdata) | ||
25 | #define imx31_add_imx_uart3(pdata) \ | ||
26 | imx_add_imx_uart_1irq(3, MX31_UART4_BASE_ADDR, SZ_16K, MX31_INT_UART4, pdata) | ||
27 | #define imx31_add_imx_uart4(pdata) \ | ||
28 | imx_add_imx_uart_1irq(4, MX31_UART5_BASE_ADDR, SZ_16K, MX31_INT_UART5, pdata) | ||
29 | |||
30 | #define imx31_add_mxc_nand(pdata) \ | ||
31 | imx_add_mxc_nand_v1(MX31_NFC_BASE_ADDR, MX31_INT_NANDFC, pdata) | ||
32 | |||
33 | #define imx31_add_spi_imx0(pdata) \ | ||
34 | imx_add_spi_imx(0, MX31_CSPI1_BASE_ADDR, SZ_4K, MX31_INT_CSPI1, pdata) | ||
35 | #define imx31_add_spi_imx1(pdata) \ | ||
36 | imx_add_spi_imx(1, MX31_CSPI2_BASE_ADDR, SZ_4K, MX31_INT_CSPI2, pdata) | ||
37 | #define imx31_add_spi_imx2(pdata) \ | ||
38 | imx_add_spi_imx(2, MX31_CSPI3_BASE_ADDR, SZ_4K, MX31_INT_CSPI3, pdata) | ||
diff --git a/arch/arm/mach-mx3/devices-imx35.h b/arch/arm/mach-mx3/devices-imx35.h new file mode 100644 index 000000000000..f6a431a4c3d2 --- /dev/null +++ b/arch/arm/mach-mx3/devices-imx35.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <mach/mx35.h> | ||
10 | #include <mach/devices-common.h> | ||
11 | |||
12 | #define imx35_add_flexcan0(pdata) \ | ||
13 | imx_add_flexcan(0, MX35_CAN1_BASE_ADDR, SZ_16K, MX35_INT_CAN1, pdata) | ||
14 | #define imx35_add_flexcan1(pdata) \ | ||
15 | imx_add_flexcan(1, MX35_CAN2_BASE_ADDR, SZ_16K, MX35_INT_CAN2, pdata) | ||
16 | |||
17 | #define imx35_add_imx_i2c0(pdata) \ | ||
18 | imx_add_imx_i2c(0, MX35_I2C1_BASE_ADDR, SZ_4K, MX35_INT_I2C1, pdata) | ||
19 | #define imx35_add_imx_i2c1(pdata) \ | ||
20 | imx_add_imx_i2c(1, MX35_I2C2_BASE_ADDR, SZ_4K, MX35_INT_I2C2, pdata) | ||
21 | #define imx35_add_imx_i2c2(pdata) \ | ||
22 | imx_add_imx_i2c(2, MX35_I2C3_BASE_ADDR, SZ_4K, MX35_INT_I2C3, pdata) | ||
23 | |||
24 | #define imx35_add_imx_uart0(pdata) \ | ||
25 | imx_add_imx_uart_1irq(0, MX35_UART1_BASE_ADDR, SZ_16K, MX35_INT_UART1, pdata) | ||
26 | #define imx35_add_imx_uart1(pdata) \ | ||
27 | imx_add_imx_uart_1irq(1, MX35_UART2_BASE_ADDR, SZ_16K, MX35_INT_UART2, pdata) | ||
28 | #define imx35_add_imx_uart2(pdata) \ | ||
29 | imx_add_imx_uart_1irq(2, MX35_UART3_BASE_ADDR, SZ_16K, MX35_INT_UART3, pdata) | ||
30 | |||
31 | #define imx35_add_mxc_nand(pdata) \ | ||
32 | imx_add_mxc_nand_v21(MX35_NFC_BASE_ADDR, MX35_INT_NANDFC, pdata) | ||
33 | |||
34 | #define imx35_add_spi_imx0(pdata) \ | ||
35 | imx_add_spi_imx(0, MX35_CSPI1_BASE_ADDR, SZ_4K, MX35_INT_CSPI1, pdata) | ||
36 | #define imx35_add_spi_imx1(pdata) \ | ||
37 | imx_add_spi_imx(1, MX35_CSPI2_BASE_ADDR, SZ_4K, MX35_INT_CSPI2, pdata) | ||
diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c index db7acd6e9101..a4fd1a26fc91 100644 --- a/arch/arm/mach-mx3/devices.c +++ b/arch/arm/mach-mx3/devices.c | |||
@@ -25,108 +25,10 @@ | |||
25 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
26 | #include <mach/irqs.h> | 26 | #include <mach/irqs.h> |
27 | #include <mach/common.h> | 27 | #include <mach/common.h> |
28 | #include <mach/imx-uart.h> | ||
29 | #include <mach/mx3_camera.h> | 28 | #include <mach/mx3_camera.h> |
30 | 29 | ||
31 | #include "devices.h" | 30 | #include "devices.h" |
32 | 31 | ||
33 | static struct resource uart0[] = { | ||
34 | { | ||
35 | .start = UART1_BASE_ADDR, | ||
36 | .end = UART1_BASE_ADDR + 0x0B5, | ||
37 | .flags = IORESOURCE_MEM, | ||
38 | }, { | ||
39 | .start = MXC_INT_UART1, | ||
40 | .end = MXC_INT_UART1, | ||
41 | .flags = IORESOURCE_IRQ, | ||
42 | }, | ||
43 | }; | ||
44 | |||
45 | struct platform_device mxc_uart_device0 = { | ||
46 | .name = "imx-uart", | ||
47 | .id = 0, | ||
48 | .resource = uart0, | ||
49 | .num_resources = ARRAY_SIZE(uart0), | ||
50 | }; | ||
51 | |||
52 | static struct resource uart1[] = { | ||
53 | { | ||
54 | .start = UART2_BASE_ADDR, | ||
55 | .end = UART2_BASE_ADDR + 0x0B5, | ||
56 | .flags = IORESOURCE_MEM, | ||
57 | }, { | ||
58 | .start = MXC_INT_UART2, | ||
59 | .end = MXC_INT_UART2, | ||
60 | .flags = IORESOURCE_IRQ, | ||
61 | }, | ||
62 | }; | ||
63 | |||
64 | struct platform_device mxc_uart_device1 = { | ||
65 | .name = "imx-uart", | ||
66 | .id = 1, | ||
67 | .resource = uart1, | ||
68 | .num_resources = ARRAY_SIZE(uart1), | ||
69 | }; | ||
70 | |||
71 | static struct resource uart2[] = { | ||
72 | { | ||
73 | .start = UART3_BASE_ADDR, | ||
74 | .end = UART3_BASE_ADDR + 0x0B5, | ||
75 | .flags = IORESOURCE_MEM, | ||
76 | }, { | ||
77 | .start = MXC_INT_UART3, | ||
78 | .end = MXC_INT_UART3, | ||
79 | .flags = IORESOURCE_IRQ, | ||
80 | }, | ||
81 | }; | ||
82 | |||
83 | struct platform_device mxc_uart_device2 = { | ||
84 | .name = "imx-uart", | ||
85 | .id = 2, | ||
86 | .resource = uart2, | ||
87 | .num_resources = ARRAY_SIZE(uart2), | ||
88 | }; | ||
89 | |||
90 | #ifdef CONFIG_ARCH_MX31 | ||
91 | static struct resource uart3[] = { | ||
92 | { | ||
93 | .start = UART4_BASE_ADDR, | ||
94 | .end = UART4_BASE_ADDR + 0x0B5, | ||
95 | .flags = IORESOURCE_MEM, | ||
96 | }, { | ||
97 | .start = MXC_INT_UART4, | ||
98 | .end = MXC_INT_UART4, | ||
99 | .flags = IORESOURCE_IRQ, | ||
100 | }, | ||
101 | }; | ||
102 | |||
103 | struct platform_device mxc_uart_device3 = { | ||
104 | .name = "imx-uart", | ||
105 | .id = 3, | ||
106 | .resource = uart3, | ||
107 | .num_resources = ARRAY_SIZE(uart3), | ||
108 | }; | ||
109 | |||
110 | static struct resource uart4[] = { | ||
111 | { | ||
112 | .start = UART5_BASE_ADDR, | ||
113 | .end = UART5_BASE_ADDR + 0x0B5, | ||
114 | .flags = IORESOURCE_MEM, | ||
115 | }, { | ||
116 | .start = MXC_INT_UART5, | ||
117 | .end = MXC_INT_UART5, | ||
118 | .flags = IORESOURCE_IRQ, | ||
119 | }, | ||
120 | }; | ||
121 | |||
122 | struct platform_device mxc_uart_device4 = { | ||
123 | .name = "imx-uart", | ||
124 | .id = 4, | ||
125 | .resource = uart4, | ||
126 | .num_resources = ARRAY_SIZE(uart4), | ||
127 | }; | ||
128 | #endif /* CONFIG_ARCH_MX31 */ | ||
129 | |||
130 | /* GPIO port description */ | 32 | /* GPIO port description */ |
131 | static struct mxc_gpio_port imx_gpio_ports[] = { | 33 | static struct mxc_gpio_port imx_gpio_ports[] = { |
132 | { | 34 | { |
@@ -147,7 +49,7 @@ static struct mxc_gpio_port imx_gpio_ports[] = { | |||
147 | } | 49 | } |
148 | }; | 50 | }; |
149 | 51 | ||
150 | int __init mxc_register_gpios(void) | 52 | int __init imx3x_register_gpios(void) |
151 | { | 53 | { |
152 | return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); | 54 | return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); |
153 | } | 55 | } |
@@ -167,82 +69,6 @@ struct platform_device mxc_w1_master_device = { | |||
167 | .resource = mxc_w1_master_resources, | 69 | .resource = mxc_w1_master_resources, |
168 | }; | 70 | }; |
169 | 71 | ||
170 | static struct resource mxc_nand_resources[] = { | ||
171 | { | ||
172 | .start = 0, /* runtime dependent */ | ||
173 | .end = 0, | ||
174 | .flags = IORESOURCE_MEM, | ||
175 | }, { | ||
176 | .start = MXC_INT_NANDFC, | ||
177 | .end = MXC_INT_NANDFC, | ||
178 | .flags = IORESOURCE_IRQ, | ||
179 | }, | ||
180 | }; | ||
181 | |||
182 | struct platform_device mxc_nand_device = { | ||
183 | .name = "mxc_nand", | ||
184 | .id = 0, | ||
185 | .num_resources = ARRAY_SIZE(mxc_nand_resources), | ||
186 | .resource = mxc_nand_resources, | ||
187 | }; | ||
188 | |||
189 | static struct resource mxc_i2c0_resources[] = { | ||
190 | { | ||
191 | .start = I2C_BASE_ADDR, | ||
192 | .end = I2C_BASE_ADDR + SZ_4K - 1, | ||
193 | .flags = IORESOURCE_MEM, | ||
194 | }, { | ||
195 | .start = MXC_INT_I2C, | ||
196 | .end = MXC_INT_I2C, | ||
197 | .flags = IORESOURCE_IRQ, | ||
198 | }, | ||
199 | }; | ||
200 | |||
201 | struct platform_device mxc_i2c_device0 = { | ||
202 | .name = "imx-i2c", | ||
203 | .id = 0, | ||
204 | .num_resources = ARRAY_SIZE(mxc_i2c0_resources), | ||
205 | .resource = mxc_i2c0_resources, | ||
206 | }; | ||
207 | |||
208 | static struct resource mxc_i2c1_resources[] = { | ||
209 | { | ||
210 | .start = I2C2_BASE_ADDR, | ||
211 | .end = I2C2_BASE_ADDR + SZ_4K - 1, | ||
212 | .flags = IORESOURCE_MEM, | ||
213 | }, { | ||
214 | .start = MXC_INT_I2C2, | ||
215 | .end = MXC_INT_I2C2, | ||
216 | .flags = IORESOURCE_IRQ, | ||
217 | }, | ||
218 | }; | ||
219 | |||
220 | struct platform_device mxc_i2c_device1 = { | ||
221 | .name = "imx-i2c", | ||
222 | .id = 1, | ||
223 | .num_resources = ARRAY_SIZE(mxc_i2c1_resources), | ||
224 | .resource = mxc_i2c1_resources, | ||
225 | }; | ||
226 | |||
227 | static struct resource mxc_i2c2_resources[] = { | ||
228 | { | ||
229 | .start = I2C3_BASE_ADDR, | ||
230 | .end = I2C3_BASE_ADDR + SZ_4K - 1, | ||
231 | .flags = IORESOURCE_MEM, | ||
232 | }, { | ||
233 | .start = MXC_INT_I2C3, | ||
234 | .end = MXC_INT_I2C3, | ||
235 | .flags = IORESOURCE_IRQ, | ||
236 | }, | ||
237 | }; | ||
238 | |||
239 | struct platform_device mxc_i2c_device2 = { | ||
240 | .name = "imx-i2c", | ||
241 | .id = 2, | ||
242 | .num_resources = ARRAY_SIZE(mxc_i2c2_resources), | ||
243 | .resource = mxc_i2c2_resources, | ||
244 | }; | ||
245 | |||
246 | #ifdef CONFIG_ARCH_MX31 | 72 | #ifdef CONFIG_ARCH_MX31 |
247 | static struct resource mxcsdhc0_resources[] = { | 73 | static struct resource mxcsdhc0_resources[] = { |
248 | { | 74 | { |
@@ -455,68 +281,7 @@ struct platform_device mxc_usbh2 = { | |||
455 | .num_resources = ARRAY_SIZE(mxc_usbh2_resources), | 281 | .num_resources = ARRAY_SIZE(mxc_usbh2_resources), |
456 | }; | 282 | }; |
457 | 283 | ||
458 | /* | 284 | #if defined(CONFIG_ARCH_MX35) |
459 | * SPI master controller | ||
460 | * 3 channels | ||
461 | */ | ||
462 | static struct resource mxc_spi_0_resources[] = { | ||
463 | { | ||
464 | .start = CSPI1_BASE_ADDR, | ||
465 | .end = CSPI1_BASE_ADDR + SZ_4K - 1, | ||
466 | .flags = IORESOURCE_MEM, | ||
467 | }, { | ||
468 | .start = MXC_INT_CSPI1, | ||
469 | .end = MXC_INT_CSPI1, | ||
470 | .flags = IORESOURCE_IRQ, | ||
471 | }, | ||
472 | }; | ||
473 | |||
474 | static struct resource mxc_spi_1_resources[] = { | ||
475 | { | ||
476 | .start = CSPI2_BASE_ADDR, | ||
477 | .end = CSPI2_BASE_ADDR + SZ_4K - 1, | ||
478 | .flags = IORESOURCE_MEM, | ||
479 | }, { | ||
480 | .start = MXC_INT_CSPI2, | ||
481 | .end = MXC_INT_CSPI2, | ||
482 | .flags = IORESOURCE_IRQ, | ||
483 | }, | ||
484 | }; | ||
485 | |||
486 | static struct resource mxc_spi_2_resources[] = { | ||
487 | { | ||
488 | .start = CSPI3_BASE_ADDR, | ||
489 | .end = CSPI3_BASE_ADDR + SZ_4K - 1, | ||
490 | .flags = IORESOURCE_MEM, | ||
491 | }, { | ||
492 | .start = MXC_INT_CSPI3, | ||
493 | .end = MXC_INT_CSPI3, | ||
494 | .flags = IORESOURCE_IRQ, | ||
495 | }, | ||
496 | }; | ||
497 | |||
498 | struct platform_device mxc_spi_device0 = { | ||
499 | .name = "spi_imx", | ||
500 | .id = 0, | ||
501 | .num_resources = ARRAY_SIZE(mxc_spi_0_resources), | ||
502 | .resource = mxc_spi_0_resources, | ||
503 | }; | ||
504 | |||
505 | struct platform_device mxc_spi_device1 = { | ||
506 | .name = "spi_imx", | ||
507 | .id = 1, | ||
508 | .num_resources = ARRAY_SIZE(mxc_spi_1_resources), | ||
509 | .resource = mxc_spi_1_resources, | ||
510 | }; | ||
511 | |||
512 | struct platform_device mxc_spi_device2 = { | ||
513 | .name = "spi_imx", | ||
514 | .id = 2, | ||
515 | .num_resources = ARRAY_SIZE(mxc_spi_2_resources), | ||
516 | .resource = mxc_spi_2_resources, | ||
517 | }; | ||
518 | |||
519 | #ifdef CONFIG_ARCH_MX35 | ||
520 | static struct resource mxc_fec_resources[] = { | 285 | static struct resource mxc_fec_resources[] = { |
521 | { | 286 | { |
522 | .start = MXC_FEC_BASE_ADDR, | 287 | .start = MXC_FEC_BASE_ADDR, |
@@ -628,16 +393,15 @@ struct platform_device imx_kpp_device = { | |||
628 | 393 | ||
629 | static int __init mx3_devices_init(void) | 394 | static int __init mx3_devices_init(void) |
630 | { | 395 | { |
396 | #if defined(CONFIG_ARCH_MX31) | ||
631 | if (cpu_is_mx31()) { | 397 | if (cpu_is_mx31()) { |
632 | mxc_nand_resources[0].start = MX31_NFC_BASE_ADDR; | ||
633 | mxc_nand_resources[0].end = MX31_NFC_BASE_ADDR + 0xfff; | ||
634 | imx_wdt_resources[0].start = MX31_WDOG_BASE_ADDR; | 398 | imx_wdt_resources[0].start = MX31_WDOG_BASE_ADDR; |
635 | imx_wdt_resources[0].end = MX31_WDOG_BASE_ADDR + 0x3fff; | 399 | imx_wdt_resources[0].end = MX31_WDOG_BASE_ADDR + 0x3fff; |
636 | mxc_register_device(&mxc_rnga_device, NULL); | 400 | mxc_register_device(&mxc_rnga_device, NULL); |
637 | } | 401 | } |
402 | #endif | ||
403 | #if defined(CONFIG_ARCH_MX35) | ||
638 | if (cpu_is_mx35()) { | 404 | if (cpu_is_mx35()) { |
639 | mxc_nand_resources[0].start = MX35_NFC_BASE_ADDR; | ||
640 | mxc_nand_resources[0].end = MX35_NFC_BASE_ADDR + 0x1fff; | ||
641 | otg_resources[0].start = MX35_OTG_BASE_ADDR; | 405 | otg_resources[0].start = MX35_OTG_BASE_ADDR; |
642 | otg_resources[0].end = MX35_OTG_BASE_ADDR + 0x1ff; | 406 | otg_resources[0].end = MX35_OTG_BASE_ADDR + 0x1ff; |
643 | otg_resources[1].start = MXC_INT_USBOTG; | 407 | otg_resources[1].start = MXC_INT_USBOTG; |
@@ -653,6 +417,7 @@ static int __init mx3_devices_init(void) | |||
653 | imx_wdt_resources[0].start = MX35_WDOG_BASE_ADDR; | 417 | imx_wdt_resources[0].start = MX35_WDOG_BASE_ADDR; |
654 | imx_wdt_resources[0].end = MX35_WDOG_BASE_ADDR + 0x3fff; | 418 | imx_wdt_resources[0].end = MX35_WDOG_BASE_ADDR + 0x3fff; |
655 | } | 419 | } |
420 | #endif | ||
656 | 421 | ||
657 | return 0; | 422 | return 0; |
658 | } | 423 | } |
diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h index 2c3c8646a29e..e5535234839f 100644 --- a/arch/arm/mach-mx3/devices.h +++ b/arch/arm/mach-mx3/devices.h | |||
@@ -1,14 +1,4 @@ | |||
1 | |||
2 | extern struct platform_device mxc_uart_device0; | ||
3 | extern struct platform_device mxc_uart_device1; | ||
4 | extern struct platform_device mxc_uart_device2; | ||
5 | extern struct platform_device mxc_uart_device3; | ||
6 | extern struct platform_device mxc_uart_device4; | ||
7 | extern struct platform_device mxc_w1_master_device; | 1 | extern struct platform_device mxc_w1_master_device; |
8 | extern struct platform_device mxc_nand_device; | ||
9 | extern struct platform_device mxc_i2c_device0; | ||
10 | extern struct platform_device mxc_i2c_device1; | ||
11 | extern struct platform_device mxc_i2c_device2; | ||
12 | extern struct platform_device mx3_ipu; | 2 | extern struct platform_device mx3_ipu; |
13 | extern struct platform_device mx3_fb; | 3 | extern struct platform_device mx3_fb; |
14 | extern struct platform_device mx3_camera; | 4 | extern struct platform_device mx3_camera; |
@@ -20,9 +10,6 @@ extern struct platform_device mxc_otg_host; | |||
20 | extern struct platform_device mxc_usbh1; | 10 | extern struct platform_device mxc_usbh1; |
21 | extern struct platform_device mxc_usbh2; | 11 | extern struct platform_device mxc_usbh2; |
22 | extern struct platform_device mxc_rnga_device; | 12 | extern struct platform_device mxc_rnga_device; |
23 | extern struct platform_device mxc_spi_device0; | ||
24 | extern struct platform_device mxc_spi_device1; | ||
25 | extern struct platform_device mxc_spi_device2; | ||
26 | extern struct platform_device imx_ssi_device0; | 13 | extern struct platform_device imx_ssi_device0; |
27 | extern struct platform_device imx_ssi_device1; | 14 | extern struct platform_device imx_ssi_device1; |
28 | extern struct platform_device imx_ssi_device1; | 15 | extern struct platform_device imx_ssi_device1; |
diff --git a/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c b/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c new file mode 100644 index 000000000000..1dc5004df866 --- /dev/null +++ b/arch/arm/mach-mx3/eukrea_mbimxsd-baseboard.c | |||
@@ -0,0 +1,263 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Eric Benard - eric@eukrea.com | ||
3 | * | ||
4 | * Based on pcm970-baseboard.c which is : | ||
5 | * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de) | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * as published by the Free Software Foundation; either version 2 | ||
10 | * of the License, or (at your option) any later version. | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
19 | * MA 02110-1301, USA. | ||
20 | */ | ||
21 | |||
22 | #include <linux/types.h> | ||
23 | #include <linux/init.h> | ||
24 | |||
25 | #include <linux/gpio.h> | ||
26 | #include <linux/interrupt.h> | ||
27 | #include <linux/leds.h> | ||
28 | #include <linux/platform_device.h> | ||
29 | #include <linux/gpio_keys.h> | ||
30 | #include <linux/input.h> | ||
31 | #include <video/platform_lcd.h> | ||
32 | #include <linux/i2c.h> | ||
33 | |||
34 | #include <asm/mach-types.h> | ||
35 | #include <asm/mach/arch.h> | ||
36 | #include <asm/mach/time.h> | ||
37 | #include <asm/mach/map.h> | ||
38 | |||
39 | #include <mach/hardware.h> | ||
40 | #include <mach/common.h> | ||
41 | #include <mach/imx-uart.h> | ||
42 | #include <mach/iomux-mx35.h> | ||
43 | #include <mach/ipu.h> | ||
44 | #include <mach/mx3fb.h> | ||
45 | #include <mach/audmux.h> | ||
46 | #include <mach/ssi.h> | ||
47 | |||
48 | #include "devices-imx35.h" | ||
49 | #include "devices.h" | ||
50 | |||
51 | static const struct fb_videomode fb_modedb[] = { | ||
52 | { | ||
53 | .name = "CMO_QVGA", | ||
54 | .refresh = 60, | ||
55 | .xres = 320, | ||
56 | .yres = 240, | ||
57 | .pixclock = KHZ2PICOS(6500), | ||
58 | .left_margin = 68, | ||
59 | .right_margin = 20, | ||
60 | .upper_margin = 15, | ||
61 | .lower_margin = 4, | ||
62 | .hsync_len = 30, | ||
63 | .vsync_len = 3, | ||
64 | .sync = 0, | ||
65 | .vmode = FB_VMODE_NONINTERLACED, | ||
66 | .flag = 0, | ||
67 | }, | ||
68 | }; | ||
69 | |||
70 | static struct ipu_platform_data mx3_ipu_data = { | ||
71 | .irq_base = MXC_IPU_IRQ_START, | ||
72 | }; | ||
73 | |||
74 | static struct mx3fb_platform_data mx3fb_pdata = { | ||
75 | .dma_dev = &mx3_ipu.dev, | ||
76 | .name = "CMO_QVGA", | ||
77 | .mode = fb_modedb, | ||
78 | .num_modes = ARRAY_SIZE(fb_modedb), | ||
79 | }; | ||
80 | |||
81 | static struct pad_desc eukrea_mbimxsd_pads[] = { | ||
82 | /* LCD */ | ||
83 | MX35_PAD_LD0__IPU_DISPB_DAT_0, | ||
84 | MX35_PAD_LD1__IPU_DISPB_DAT_1, | ||
85 | MX35_PAD_LD2__IPU_DISPB_DAT_2, | ||
86 | MX35_PAD_LD3__IPU_DISPB_DAT_3, | ||
87 | MX35_PAD_LD4__IPU_DISPB_DAT_4, | ||
88 | MX35_PAD_LD5__IPU_DISPB_DAT_5, | ||
89 | MX35_PAD_LD6__IPU_DISPB_DAT_6, | ||
90 | MX35_PAD_LD7__IPU_DISPB_DAT_7, | ||
91 | MX35_PAD_LD8__IPU_DISPB_DAT_8, | ||
92 | MX35_PAD_LD9__IPU_DISPB_DAT_9, | ||
93 | MX35_PAD_LD10__IPU_DISPB_DAT_10, | ||
94 | MX35_PAD_LD11__IPU_DISPB_DAT_11, | ||
95 | MX35_PAD_LD12__IPU_DISPB_DAT_12, | ||
96 | MX35_PAD_LD13__IPU_DISPB_DAT_13, | ||
97 | MX35_PAD_LD14__IPU_DISPB_DAT_14, | ||
98 | MX35_PAD_LD15__IPU_DISPB_DAT_15, | ||
99 | MX35_PAD_LD16__IPU_DISPB_DAT_16, | ||
100 | MX35_PAD_LD17__IPU_DISPB_DAT_17, | ||
101 | MX35_PAD_D3_HSYNC__IPU_DISPB_D3_HSYNC, | ||
102 | MX35_PAD_D3_FPSHIFT__IPU_DISPB_D3_CLK, | ||
103 | MX35_PAD_D3_DRDY__IPU_DISPB_D3_DRDY, | ||
104 | MX35_PAD_D3_VSYNC__IPU_DISPB_D3_VSYNC, | ||
105 | /* Backlight */ | ||
106 | MX35_PAD_CONTRAST__IPU_DISPB_CONTR, | ||
107 | /* LCD_PWR */ | ||
108 | MX35_PAD_D3_CLS__GPIO1_4, | ||
109 | /* LED */ | ||
110 | MX35_PAD_LD23__GPIO3_29, | ||
111 | /* SWITCH */ | ||
112 | MX35_PAD_LD19__GPIO3_25, | ||
113 | /* UART2 */ | ||
114 | MX35_PAD_CTS2__UART2_CTS, | ||
115 | MX35_PAD_RTS2__UART2_RTS, | ||
116 | MX35_PAD_TXD2__UART2_TXD_MUX, | ||
117 | MX35_PAD_RXD2__UART2_RXD_MUX, | ||
118 | /* I2S */ | ||
119 | MX35_PAD_STXFS4__AUDMUX_AUD4_TXFS, | ||
120 | MX35_PAD_STXD4__AUDMUX_AUD4_TXD, | ||
121 | MX35_PAD_SRXD4__AUDMUX_AUD4_RXD, | ||
122 | MX35_PAD_SCK4__AUDMUX_AUD4_TXC, | ||
123 | }; | ||
124 | |||
125 | #define GPIO_LED1 (2 * 32 + 29) | ||
126 | #define GPIO_SWITCH1 (2 * 32 + 25) | ||
127 | #define GPIO_LCDPWR (4) | ||
128 | |||
129 | static void eukrea_mbimxsd_lcd_power_set(struct plat_lcd_data *pd, | ||
130 | unsigned int power) | ||
131 | { | ||
132 | if (power) | ||
133 | gpio_direction_output(GPIO_LCDPWR, 1); | ||
134 | else | ||
135 | gpio_direction_output(GPIO_LCDPWR, 0); | ||
136 | } | ||
137 | |||
138 | static struct plat_lcd_data eukrea_mbimxsd_lcd_power_data = { | ||
139 | .set_power = eukrea_mbimxsd_lcd_power_set, | ||
140 | }; | ||
141 | |||
142 | static struct platform_device eukrea_mbimxsd_lcd_powerdev = { | ||
143 | .name = "platform-lcd", | ||
144 | .dev.platform_data = &eukrea_mbimxsd_lcd_power_data, | ||
145 | }; | ||
146 | |||
147 | static struct gpio_led eukrea_mbimxsd_leds[] = { | ||
148 | { | ||
149 | .name = "led1", | ||
150 | .default_trigger = "heartbeat", | ||
151 | .active_low = 1, | ||
152 | .gpio = GPIO_LED1, | ||
153 | }, | ||
154 | }; | ||
155 | |||
156 | static struct gpio_led_platform_data eukrea_mbimxsd_led_info = { | ||
157 | .leds = eukrea_mbimxsd_leds, | ||
158 | .num_leds = ARRAY_SIZE(eukrea_mbimxsd_leds), | ||
159 | }; | ||
160 | |||
161 | static struct platform_device eukrea_mbimxsd_leds_gpio = { | ||
162 | .name = "leds-gpio", | ||
163 | .id = -1, | ||
164 | .dev = { | ||
165 | .platform_data = &eukrea_mbimxsd_led_info, | ||
166 | }, | ||
167 | }; | ||
168 | |||
169 | static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = { | ||
170 | { | ||
171 | .gpio = GPIO_SWITCH1, | ||
172 | .code = BTN_0, | ||
173 | .desc = "BP1", | ||
174 | .active_low = 1, | ||
175 | .wakeup = 1, | ||
176 | }, | ||
177 | }; | ||
178 | |||
179 | static struct gpio_keys_platform_data eukrea_mbimxsd_button_data = { | ||
180 | .buttons = eukrea_mbimxsd_gpio_buttons, | ||
181 | .nbuttons = ARRAY_SIZE(eukrea_mbimxsd_gpio_buttons), | ||
182 | }; | ||
183 | |||
184 | static struct platform_device eukrea_mbimxsd_button_device = { | ||
185 | .name = "gpio-keys", | ||
186 | .id = -1, | ||
187 | .num_resources = 0, | ||
188 | .dev = { | ||
189 | .platform_data = &eukrea_mbimxsd_button_data, | ||
190 | } | ||
191 | }; | ||
192 | |||
193 | static struct platform_device *platform_devices[] __initdata = { | ||
194 | &eukrea_mbimxsd_leds_gpio, | ||
195 | &eukrea_mbimxsd_button_device, | ||
196 | &eukrea_mbimxsd_lcd_powerdev, | ||
197 | }; | ||
198 | |||
199 | static const struct imxuart_platform_data uart_pdata __initconst = { | ||
200 | .flags = IMXUART_HAVE_RTSCTS, | ||
201 | }; | ||
202 | |||
203 | static struct i2c_board_info eukrea_mbimxsd_i2c_devices[] = { | ||
204 | { | ||
205 | I2C_BOARD_INFO("tlv320aic23", 0x1a), | ||
206 | }, | ||
207 | }; | ||
208 | |||
209 | struct imx_ssi_platform_data eukrea_mbimxsd_ssi_pdata = { | ||
210 | .flags = IMX_SSI_SYN | IMX_SSI_NET | IMX_SSI_USE_I2S_SLAVE, | ||
211 | }; | ||
212 | |||
213 | /* | ||
214 | * system init for baseboard usage. Will be called by cpuimx35 init. | ||
215 | * | ||
216 | * Add platform devices present on this baseboard and init | ||
217 | * them from CPU side as far as required to use them later on | ||
218 | */ | ||
219 | void __init eukrea_mbimxsd_baseboard_init(void) | ||
220 | { | ||
221 | if (mxc_iomux_v3_setup_multiple_pads(eukrea_mbimxsd_pads, | ||
222 | ARRAY_SIZE(eukrea_mbimxsd_pads))) | ||
223 | printk(KERN_ERR "error setting mbimxsd pads !\n"); | ||
224 | |||
225 | #if defined(CONFIG_SND_SOC_EUKREA_TLV320) | ||
226 | /* SSI unit master I2S codec connected to SSI_AUD4 */ | ||
227 | mxc_audmux_v2_configure_port(0, | ||
228 | MXC_AUDMUX_V2_PTCR_SYN | | ||
229 | MXC_AUDMUX_V2_PTCR_TFSDIR | | ||
230 | MXC_AUDMUX_V2_PTCR_TFSEL(3) | | ||
231 | MXC_AUDMUX_V2_PTCR_TCLKDIR | | ||
232 | MXC_AUDMUX_V2_PTCR_TCSEL(3), | ||
233 | MXC_AUDMUX_V2_PDCR_RXDSEL(3) | ||
234 | ); | ||
235 | mxc_audmux_v2_configure_port(3, | ||
236 | MXC_AUDMUX_V2_PTCR_SYN, | ||
237 | MXC_AUDMUX_V2_PDCR_RXDSEL(0) | ||
238 | ); | ||
239 | #endif | ||
240 | |||
241 | imx35_add_imx_uart1(&uart_pdata); | ||
242 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); | ||
243 | mxc_register_device(&mx3_fb, &mx3fb_pdata); | ||
244 | |||
245 | mxc_register_device(&imx_ssi_device0, &eukrea_mbimxsd_ssi_pdata); | ||
246 | |||
247 | gpio_request(GPIO_LED1, "LED1"); | ||
248 | gpio_direction_output(GPIO_LED1, 1); | ||
249 | gpio_free(GPIO_LED1); | ||
250 | |||
251 | gpio_request(GPIO_SWITCH1, "SWITCH1"); | ||
252 | gpio_direction_input(GPIO_SWITCH1); | ||
253 | gpio_free(GPIO_SWITCH1); | ||
254 | |||
255 | gpio_request(GPIO_LCDPWR, "LCDPWR"); | ||
256 | gpio_direction_output(GPIO_LCDPWR, 1); | ||
257 | gpio_free(GPIO_SWITCH1); | ||
258 | |||
259 | i2c_register_board_info(0, eukrea_mbimxsd_i2c_devices, | ||
260 | ARRAY_SIZE(eukrea_mbimxsd_i2c_devices)); | ||
261 | |||
262 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | ||
263 | } | ||
diff --git a/arch/arm/mach-mx3/mach-armadillo5x0.c b/arch/arm/mach-mx3/mach-armadillo5x0.c index 5f72ec91af2d..96aadcadb4ff 100644 --- a/arch/arm/mach-mx3/mach-armadillo5x0.c +++ b/arch/arm/mach-mx3/mach-armadillo5x0.c | |||
@@ -48,16 +48,14 @@ | |||
48 | #include <asm/mach/map.h> | 48 | #include <asm/mach/map.h> |
49 | 49 | ||
50 | #include <mach/common.h> | 50 | #include <mach/common.h> |
51 | #include <mach/imx-uart.h> | ||
52 | #include <mach/iomux-mx3.h> | 51 | #include <mach/iomux-mx3.h> |
53 | #include <mach/board-armadillo5x0.h> | ||
54 | #include <mach/mmc.h> | 52 | #include <mach/mmc.h> |
55 | #include <mach/ipu.h> | 53 | #include <mach/ipu.h> |
56 | #include <mach/mx3fb.h> | 54 | #include <mach/mx3fb.h> |
57 | #include <mach/mxc_nand.h> | ||
58 | #include <mach/mxc_ehci.h> | 55 | #include <mach/mxc_ehci.h> |
59 | #include <mach/ulpi.h> | 56 | #include <mach/ulpi.h> |
60 | 57 | ||
58 | #include "devices-imx31.h" | ||
61 | #include "devices.h" | 59 | #include "devices.h" |
62 | #include "crm_regs.h" | 60 | #include "crm_regs.h" |
63 | 61 | ||
@@ -301,7 +299,8 @@ static struct platform_device armadillo5x0_button_device = { | |||
301 | /* | 299 | /* |
302 | * NAND Flash | 300 | * NAND Flash |
303 | */ | 301 | */ |
304 | static struct mxc_nand_platform_data armadillo5x0_nand_flash_pdata = { | 302 | static const struct mxc_nand_platform_data |
303 | armadillo5x0_nand_board_info __initconst = { | ||
305 | .width = 1, | 304 | .width = 1, |
306 | .hw_ecc = 1, | 305 | .hw_ecc = 1, |
307 | }; | 306 | }; |
@@ -493,13 +492,12 @@ static struct platform_device armadillo5x0_smc911x_device = { | |||
493 | }; | 492 | }; |
494 | 493 | ||
495 | /* UART device data */ | 494 | /* UART device data */ |
496 | static struct imxuart_platform_data uart_pdata = { | 495 | static const struct imxuart_platform_data uart_pdata __initconst = { |
497 | .flags = IMXUART_HAVE_RTSCTS, | 496 | .flags = IMXUART_HAVE_RTSCTS, |
498 | }; | 497 | }; |
499 | 498 | ||
500 | static struct platform_device *devices[] __initdata = { | 499 | static struct platform_device *devices[] __initdata = { |
501 | &armadillo5x0_smc911x_device, | 500 | &armadillo5x0_smc911x_device, |
502 | &mxc_i2c_device1, | ||
503 | &armadillo5x0_button_device, | 501 | &armadillo5x0_button_device, |
504 | }; | 502 | }; |
505 | 503 | ||
@@ -512,10 +510,11 @@ static void __init armadillo5x0_init(void) | |||
512 | ARRAY_SIZE(armadillo5x0_pins), "armadillo5x0"); | 510 | ARRAY_SIZE(armadillo5x0_pins), "armadillo5x0"); |
513 | 511 | ||
514 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 512 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
513 | imx31_add_imx_i2c1(NULL); | ||
515 | 514 | ||
516 | /* Register UART */ | 515 | /* Register UART */ |
517 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 516 | imx31_add_imx_uart0(&uart_pdata); |
518 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | 517 | imx31_add_imx_uart1(&uart_pdata); |
519 | 518 | ||
520 | /* SMSC9118 IRQ pin */ | 519 | /* SMSC9118 IRQ pin */ |
521 | gpio_direction_input(MX31_PIN_GPIO1_0); | 520 | gpio_direction_input(MX31_PIN_GPIO1_0); |
@@ -532,7 +531,7 @@ static void __init armadillo5x0_init(void) | |||
532 | &armadillo5x0_nor_flash_pdata); | 531 | &armadillo5x0_nor_flash_pdata); |
533 | 532 | ||
534 | /* Register NAND Flash */ | 533 | /* Register NAND Flash */ |
535 | mxc_register_device(&mxc_nand_device, &armadillo5x0_nand_flash_pdata); | 534 | imx31_add_mxc_nand(&armadillo5x0_nand_board_info); |
536 | 535 | ||
537 | /* set NAND page size to 2k if not configured via boot mode pins */ | 536 | /* set NAND page size to 2k if not configured via boot mode pins */ |
538 | __raw_writel(__raw_readl(MXC_CCM_RCSR) | (1 << 30), MXC_CCM_RCSR); | 537 | __raw_writel(__raw_readl(MXC_CCM_RCSR) | (1 << 30), MXC_CCM_RCSR); |
diff --git a/arch/arm/mach-mx3/mach-cpuimx35.c b/arch/arm/mach-mx3/mach-cpuimx35.c new file mode 100644 index 000000000000..63f970f340a2 --- /dev/null +++ b/arch/arm/mach-mx3/mach-cpuimx35.c | |||
@@ -0,0 +1,227 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Eric Benard - eric@eukrea.com | ||
3 | * Copyright (C) 2009 Sascha Hauer, Pengutronix | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #include <linux/types.h> | ||
21 | #include <linux/init.h> | ||
22 | |||
23 | #include <linux/platform_device.h> | ||
24 | #include <linux/mtd/physmap.h> | ||
25 | #include <linux/memory.h> | ||
26 | #include <linux/gpio.h> | ||
27 | #include <linux/interrupt.h> | ||
28 | #include <linux/delay.h> | ||
29 | #include <linux/i2c.h> | ||
30 | #include <linux/i2c/tsc2007.h> | ||
31 | #include <linux/usb/otg.h> | ||
32 | #include <linux/usb/ulpi.h> | ||
33 | #include <linux/fsl_devices.h> | ||
34 | |||
35 | #include <asm/mach-types.h> | ||
36 | #include <asm/mach/arch.h> | ||
37 | #include <asm/mach/time.h> | ||
38 | #include <asm/mach/map.h> | ||
39 | |||
40 | #include <mach/eukrea-baseboards.h> | ||
41 | #include <mach/hardware.h> | ||
42 | #include <mach/common.h> | ||
43 | #include <mach/iomux-mx35.h> | ||
44 | #include <mach/mxc_nand.h> | ||
45 | #include <mach/mxc_ehci.h> | ||
46 | #include <mach/ulpi.h> | ||
47 | |||
48 | #include "devices-imx35.h" | ||
49 | #include "devices.h" | ||
50 | |||
51 | static const struct imxuart_platform_data uart_pdata __initconst = { | ||
52 | .flags = IMXUART_HAVE_RTSCTS, | ||
53 | }; | ||
54 | |||
55 | static const struct imxi2c_platform_data | ||
56 | eukrea_cpuimx35_i2c0_data __initconst = { | ||
57 | .bitrate = 50000, | ||
58 | }; | ||
59 | |||
60 | #define TSC2007_IRQGPIO (2 * 32 + 2) | ||
61 | static int ts_get_pendown_state(void) | ||
62 | { | ||
63 | int val = 0; | ||
64 | gpio_free(TSC2007_IRQGPIO); | ||
65 | gpio_request(TSC2007_IRQGPIO, NULL); | ||
66 | gpio_direction_input(TSC2007_IRQGPIO); | ||
67 | |||
68 | val = gpio_get_value(TSC2007_IRQGPIO); | ||
69 | |||
70 | gpio_free(TSC2007_IRQGPIO); | ||
71 | gpio_request(TSC2007_IRQGPIO, NULL); | ||
72 | |||
73 | return val ? 0 : 1; | ||
74 | } | ||
75 | |||
76 | static int ts_init(void) | ||
77 | { | ||
78 | gpio_request(TSC2007_IRQGPIO, NULL); | ||
79 | return 0; | ||
80 | } | ||
81 | |||
82 | static struct tsc2007_platform_data tsc2007_info = { | ||
83 | .model = 2007, | ||
84 | .x_plate_ohms = 180, | ||
85 | .get_pendown_state = ts_get_pendown_state, | ||
86 | .init_platform_hw = ts_init, | ||
87 | }; | ||
88 | |||
89 | static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = { | ||
90 | { | ||
91 | I2C_BOARD_INFO("pcf8563", 0x51), | ||
92 | }, { | ||
93 | I2C_BOARD_INFO("tsc2007", 0x48), | ||
94 | .type = "tsc2007", | ||
95 | .platform_data = &tsc2007_info, | ||
96 | .irq = gpio_to_irq(TSC2007_IRQGPIO), | ||
97 | }, | ||
98 | }; | ||
99 | |||
100 | static struct platform_device *devices[] __initdata = { | ||
101 | &mxc_fec_device, | ||
102 | &imx_wdt_device0, | ||
103 | }; | ||
104 | |||
105 | static struct pad_desc eukrea_cpuimx35_pads[] = { | ||
106 | /* UART1 */ | ||
107 | MX35_PAD_CTS1__UART1_CTS, | ||
108 | MX35_PAD_RTS1__UART1_RTS, | ||
109 | MX35_PAD_TXD1__UART1_TXD_MUX, | ||
110 | MX35_PAD_RXD1__UART1_RXD_MUX, | ||
111 | /* FEC */ | ||
112 | MX35_PAD_FEC_TX_CLK__FEC_TX_CLK, | ||
113 | MX35_PAD_FEC_RX_CLK__FEC_RX_CLK, | ||
114 | MX35_PAD_FEC_RX_DV__FEC_RX_DV, | ||
115 | MX35_PAD_FEC_COL__FEC_COL, | ||
116 | MX35_PAD_FEC_RDATA0__FEC_RDATA_0, | ||
117 | MX35_PAD_FEC_TDATA0__FEC_TDATA_0, | ||
118 | MX35_PAD_FEC_TX_EN__FEC_TX_EN, | ||
119 | MX35_PAD_FEC_MDC__FEC_MDC, | ||
120 | MX35_PAD_FEC_MDIO__FEC_MDIO, | ||
121 | MX35_PAD_FEC_TX_ERR__FEC_TX_ERR, | ||
122 | MX35_PAD_FEC_RX_ERR__FEC_RX_ERR, | ||
123 | MX35_PAD_FEC_CRS__FEC_CRS, | ||
124 | MX35_PAD_FEC_RDATA1__FEC_RDATA_1, | ||
125 | MX35_PAD_FEC_TDATA1__FEC_TDATA_1, | ||
126 | MX35_PAD_FEC_RDATA2__FEC_RDATA_2, | ||
127 | MX35_PAD_FEC_TDATA2__FEC_TDATA_2, | ||
128 | MX35_PAD_FEC_RDATA3__FEC_RDATA_3, | ||
129 | MX35_PAD_FEC_TDATA3__FEC_TDATA_3, | ||
130 | /* I2C1 */ | ||
131 | MX35_PAD_I2C1_CLK__I2C1_SCL, | ||
132 | MX35_PAD_I2C1_DAT__I2C1_SDA, | ||
133 | /* TSC2007 IRQ */ | ||
134 | MX35_PAD_ATA_DA2__GPIO3_2, | ||
135 | }; | ||
136 | |||
137 | static const struct mxc_nand_platform_data | ||
138 | eukrea_cpuimx35_nand_board_info __initconst = { | ||
139 | .width = 1, | ||
140 | .hw_ecc = 1, | ||
141 | .flash_bbt = 1, | ||
142 | }; | ||
143 | |||
144 | static struct mxc_usbh_platform_data otg_pdata = { | ||
145 | .portsc = MXC_EHCI_MODE_UTMI, | ||
146 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, | ||
147 | }; | ||
148 | |||
149 | static struct mxc_usbh_platform_data usbh1_pdata = { | ||
150 | .portsc = MXC_EHCI_MODE_SERIAL, | ||
151 | .flags = MXC_EHCI_INTERFACE_SINGLE_UNI | MXC_EHCI_INTERNAL_PHY | | ||
152 | MXC_EHCI_IPPUE_DOWN, | ||
153 | }; | ||
154 | |||
155 | static struct fsl_usb2_platform_data otg_device_pdata = { | ||
156 | .operating_mode = FSL_USB2_DR_DEVICE, | ||
157 | .phy_mode = FSL_USB2_PHY_UTMI, | ||
158 | }; | ||
159 | |||
160 | static int otg_mode_host; | ||
161 | |||
162 | static int __init eukrea_cpuimx35_otg_mode(char *options) | ||
163 | { | ||
164 | if (!strcmp(options, "host")) | ||
165 | otg_mode_host = 1; | ||
166 | else if (!strcmp(options, "device")) | ||
167 | otg_mode_host = 0; | ||
168 | else | ||
169 | pr_info("otg_mode neither \"host\" nor \"device\". " | ||
170 | "Defaulting to device\n"); | ||
171 | return 0; | ||
172 | } | ||
173 | __setup("otg_mode=", eukrea_cpuimx35_otg_mode); | ||
174 | |||
175 | /* | ||
176 | * Board specific initialization. | ||
177 | */ | ||
178 | static void __init mxc_board_init(void) | ||
179 | { | ||
180 | mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx35_pads, | ||
181 | ARRAY_SIZE(eukrea_cpuimx35_pads)); | ||
182 | |||
183 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
184 | |||
185 | imx35_add_imx_uart0(&uart_pdata); | ||
186 | imx35_add_mxc_nand(&eukrea_cpuimx35_nand_board_info); | ||
187 | |||
188 | i2c_register_board_info(0, eukrea_cpuimx35_i2c_devices, | ||
189 | ARRAY_SIZE(eukrea_cpuimx35_i2c_devices)); | ||
190 | imx35_add_imx_i2c0(&eukrea_cpuimx35_i2c0_data); | ||
191 | |||
192 | #if defined(CONFIG_USB_ULPI) | ||
193 | if (otg_mode_host) { | ||
194 | otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | ||
195 | USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); | ||
196 | |||
197 | mxc_register_device(&mxc_otg_host, &otg_pdata); | ||
198 | } | ||
199 | mxc_register_device(&mxc_usbh1, &usbh1_pdata); | ||
200 | #endif | ||
201 | if (!otg_mode_host) | ||
202 | mxc_register_device(&mxc_otg_udc_device, &otg_device_pdata); | ||
203 | |||
204 | #ifdef CONFIG_MACH_EUKREA_MBIMXSD_BASEBOARD | ||
205 | eukrea_mbimxsd_baseboard_init(); | ||
206 | #endif | ||
207 | } | ||
208 | |||
209 | static void __init eukrea_cpuimx35_timer_init(void) | ||
210 | { | ||
211 | mx35_clocks_init(); | ||
212 | } | ||
213 | |||
214 | struct sys_timer eukrea_cpuimx35_timer = { | ||
215 | .init = eukrea_cpuimx35_timer_init, | ||
216 | }; | ||
217 | |||
218 | MACHINE_START(EUKREA_CPUIMX35, "Eukrea CPUIMX35") | ||
219 | /* Maintainer: Eukrea Electromatique */ | ||
220 | .phys_io = MX35_AIPS1_BASE_ADDR, | ||
221 | .io_pg_offst = ((MX35_AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | ||
222 | .boot_params = MX3x_PHYS_OFFSET + 0x100, | ||
223 | .map_io = mx35_map_io, | ||
224 | .init_irq = mx35_init_irq, | ||
225 | .init_machine = mxc_board_init, | ||
226 | .timer = &eukrea_cpuimx35_timer, | ||
227 | MACHINE_END | ||
diff --git a/arch/arm/mach-mx3/mach-kzm_arm11_01.c b/arch/arm/mach-mx3/mach-kzm_arm11_01.c index f085d5d1a6de..5b23e416d6c7 100644 --- a/arch/arm/mach-mx3/mach-kzm_arm11_01.c +++ b/arch/arm/mach-mx3/mach-kzm_arm11_01.c | |||
@@ -16,10 +16,6 @@ | |||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
18 | * GNU General Public License for more details. | 18 | * GNU General Public License for more details. |
19 | * | ||
20 | * You should have received a copy of the GNU General Public License | ||
21 | * along with this program; if not, write to the Free Software | ||
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
23 | */ | 19 | */ |
24 | 20 | ||
25 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
@@ -37,13 +33,12 @@ | |||
37 | #include <asm/mach/map.h> | 33 | #include <asm/mach/map.h> |
38 | #include <asm/mach/time.h> | 34 | #include <asm/mach/time.h> |
39 | 35 | ||
40 | #include <mach/board-kzmarm11.h> | ||
41 | #include <mach/clock.h> | 36 | #include <mach/clock.h> |
42 | #include <mach/common.h> | 37 | #include <mach/common.h> |
43 | #include <mach/imx-uart.h> | ||
44 | #include <mach/iomux-mx3.h> | 38 | #include <mach/iomux-mx3.h> |
45 | #include <mach/memory.h> | 39 | #include <mach/memory.h> |
46 | 40 | ||
41 | #include "devices-imx31.h" | ||
47 | #include "devices.h" | 42 | #include "devices.h" |
48 | 43 | ||
49 | #define KZM_ARM11_IO_ADDRESS(x) ( \ | 44 | #define KZM_ARM11_IO_ADDRESS(x) ( \ |
@@ -51,6 +46,23 @@ | |||
51 | IMX_IO_ADDRESS(x, MX31_CS5) ?: \ | 46 | IMX_IO_ADDRESS(x, MX31_CS5) ?: \ |
52 | MX31_IO_ADDRESS(x)) | 47 | MX31_IO_ADDRESS(x)) |
53 | 48 | ||
49 | /* | ||
50 | * KZM-ARM11-01 Board Control Registers on FPGA | ||
51 | */ | ||
52 | #define KZM_ARM11_CTL1 (MX31_CS4_BASE_ADDR + 0x1000) | ||
53 | #define KZM_ARM11_CTL2 (MX31_CS4_BASE_ADDR + 0x1001) | ||
54 | #define KZM_ARM11_RSW1 (MX31_CS4_BASE_ADDR + 0x1002) | ||
55 | #define KZM_ARM11_BACK_LIGHT (MX31_CS4_BASE_ADDR + 0x1004) | ||
56 | #define KZM_ARM11_FPGA_REV (MX31_CS4_BASE_ADDR + 0x1008) | ||
57 | #define KZM_ARM11_7SEG_LED (MX31_CS4_BASE_ADDR + 0x1010) | ||
58 | #define KZM_ARM11_LEDS (MX31_CS4_BASE_ADDR + 0x1020) | ||
59 | #define KZM_ARM11_DIPSW2 (MX31_CS4_BASE_ADDR + 0x1003) | ||
60 | |||
61 | /* | ||
62 | * External UART for touch panel on FPGA | ||
63 | */ | ||
64 | #define KZM_ARM11_16550 (MX31_CS4_BASE_ADDR + 0x1050) | ||
65 | |||
54 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) | 66 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) |
55 | /* | 67 | /* |
56 | * KZM-ARM11-01 has an external UART on FPGA | 68 | * KZM-ARM11-01 has an external UART on FPGA |
@@ -173,15 +185,14 @@ static inline int kzm_init_smsc9118(void) | |||
173 | #endif | 185 | #endif |
174 | 186 | ||
175 | #if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE) | 187 | #if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE) |
176 | static struct imxuart_platform_data uart_pdata = { | 188 | static const struct imxuart_platform_data uart_pdata __initconst = { |
177 | .flags = IMXUART_HAVE_RTSCTS, | 189 | .flags = IMXUART_HAVE_RTSCTS, |
178 | }; | 190 | }; |
179 | 191 | ||
180 | static void __init kzm_init_imx_uart(void) | 192 | static void __init kzm_init_imx_uart(void) |
181 | { | 193 | { |
182 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 194 | imx31_add_imx_uart0(&uart_pdata); |
183 | 195 | imx31_add_imx_uart1(&uart_pdata); | |
184 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | ||
185 | } | 196 | } |
186 | #else | 197 | #else |
187 | static inline void kzm_init_imx_uart(void) | 198 | static inline void kzm_init_imx_uart(void) |
diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c index 58e57291b79d..6fe69e124d30 100644 --- a/arch/arm/mach-mx3/mach-mx31_3ds.c +++ b/arch/arm/mach-mx3/mach-mx31_3ds.c | |||
@@ -10,10 +10,6 @@ | |||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | 13 | */ |
18 | 14 | ||
19 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
@@ -22,7 +18,6 @@ | |||
22 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
23 | #include <linux/irq.h> | 19 | #include <linux/irq.h> |
24 | #include <linux/gpio.h> | 20 | #include <linux/gpio.h> |
25 | #include <linux/smsc911x.h> | ||
26 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
27 | #include <linux/mfd/mc13783.h> | 22 | #include <linux/mfd/mc13783.h> |
28 | #include <linux/spi/spi.h> | 23 | #include <linux/spi/spi.h> |
@@ -37,19 +32,47 @@ | |||
37 | #include <asm/memory.h> | 32 | #include <asm/memory.h> |
38 | #include <asm/mach/map.h> | 33 | #include <asm/mach/map.h> |
39 | #include <mach/common.h> | 34 | #include <mach/common.h> |
40 | #include <mach/board-mx31_3ds.h> | ||
41 | #include <mach/imx-uart.h> | ||
42 | #include <mach/iomux-mx3.h> | 35 | #include <mach/iomux-mx3.h> |
43 | #include <mach/mxc_nand.h> | 36 | #include <mach/3ds_debugboard.h> |
44 | #include <mach/spi.h> | 37 | |
38 | #include "devices-imx31.h" | ||
45 | #include "devices.h" | 39 | #include "devices.h" |
46 | 40 | ||
47 | /*! | 41 | /* Definitions for components on the Debug board */ |
48 | * @file mx31_3ds.c | 42 | |
49 | * | 43 | /* Base address of CPLD controller on the Debug board */ |
50 | * @brief This file contains the board-specific initialization routines. | 44 | #define DEBUG_BASE_ADDRESS CS5_IO_ADDRESS(MX3x_CS5_BASE_ADDR) |
51 | * | 45 | |
52 | * @ingroup System | 46 | /* LAN9217 ethernet base address */ |
47 | #define LAN9217_BASE_ADDR MX3x_CS5_BASE_ADDR | ||
48 | |||
49 | /* CPLD config and interrupt base address */ | ||
50 | #define CPLD_ADDR (DEBUG_BASE_ADDRESS + 0x20000) | ||
51 | |||
52 | /* status, interrupt */ | ||
53 | #define CPLD_INT_STATUS_REG (CPLD_ADDR + 0x10) | ||
54 | #define CPLD_INT_MASK_REG (CPLD_ADDR + 0x38) | ||
55 | #define CPLD_INT_RESET_REG (CPLD_ADDR + 0x20) | ||
56 | /* magic word for debug CPLD */ | ||
57 | #define CPLD_MAGIC_NUMBER1_REG (CPLD_ADDR + 0x40) | ||
58 | #define CPLD_MAGIC_NUMBER2_REG (CPLD_ADDR + 0x48) | ||
59 | /* CPLD code version */ | ||
60 | #define CPLD_CODE_VER_REG (CPLD_ADDR + 0x50) | ||
61 | /* magic word for debug CPLD */ | ||
62 | #define CPLD_MAGIC_NUMBER3_REG (CPLD_ADDR + 0x58) | ||
63 | |||
64 | /* CPLD IRQ line for external uart, external ethernet etc */ | ||
65 | #define EXPIO_PARENT_INT IOMUX_TO_IRQ(MX31_PIN_GPIO1_1) | ||
66 | |||
67 | #define MXC_EXP_IO_BASE (MXC_BOARD_IRQ_START) | ||
68 | #define MXC_IRQ_TO_EXPIO(irq) ((irq) - MXC_EXP_IO_BASE) | ||
69 | |||
70 | #define EXPIO_INT_ENET (MXC_EXP_IO_BASE + 0) | ||
71 | |||
72 | #define MXC_MAX_EXP_IO_LINES 16 | ||
73 | |||
74 | /* | ||
75 | * This file contains the board-specific initialization routines. | ||
53 | */ | 76 | */ |
54 | 77 | ||
55 | static int mx31_3ds_pins[] = { | 78 | static int mx31_3ds_pins[] = { |
@@ -145,7 +168,7 @@ static int spi1_internal_chipselect[] = { | |||
145 | MXC_SPI_CS(2), | 168 | MXC_SPI_CS(2), |
146 | }; | 169 | }; |
147 | 170 | ||
148 | static struct spi_imx_master spi1_pdata = { | 171 | static const struct spi_imx_master spi1_pdata __initconst = { |
149 | .chipselect = spi1_internal_chipselect, | 172 | .chipselect = spi1_internal_chipselect, |
150 | .num_chipselect = ARRAY_SIZE(spi1_internal_chipselect), | 173 | .num_chipselect = ARRAY_SIZE(spi1_internal_chipselect), |
151 | }; | 174 | }; |
@@ -165,7 +188,8 @@ static struct spi_board_info mx31_3ds_spi_devs[] __initdata = { | |||
165 | /* | 188 | /* |
166 | * NAND Flash | 189 | * NAND Flash |
167 | */ | 190 | */ |
168 | static struct mxc_nand_platform_data imx31_3ds_nand_flash_pdata = { | 191 | static const struct mxc_nand_platform_data |
192 | mx31_3ds_nand_board_info __initconst = { | ||
169 | .width = 1, | 193 | .width = 1, |
170 | .hw_ecc = 1, | 194 | .hw_ecc = 1, |
171 | #ifdef MACH_MX31_3DS_MXC_NAND_USE_BBT | 195 | #ifdef MACH_MX31_3DS_MXC_NAND_USE_BBT |
@@ -182,8 +206,10 @@ static struct mxc_nand_platform_data imx31_3ds_nand_flash_pdata = { | |||
182 | 206 | ||
183 | #define USBOTG_RST_B IOMUX_TO_GPIO(MX31_PIN_USB_PWR) | 207 | #define USBOTG_RST_B IOMUX_TO_GPIO(MX31_PIN_USB_PWR) |
184 | 208 | ||
185 | static void mx31_3ds_usbotg_init(void) | 209 | static int mx31_3ds_usbotg_init(void) |
186 | { | 210 | { |
211 | int err; | ||
212 | |||
187 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA0, USB_PAD_CFG); | 213 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA0, USB_PAD_CFG); |
188 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA1, USB_PAD_CFG); | 214 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA1, USB_PAD_CFG); |
189 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA2, USB_PAD_CFG); | 215 | mxc_iomux_set_pad(MX31_PIN_USBOTG_DATA2, USB_PAD_CFG); |
@@ -197,10 +223,25 @@ static void mx31_3ds_usbotg_init(void) | |||
197 | mxc_iomux_set_pad(MX31_PIN_USBOTG_NXT, USB_PAD_CFG); | 223 | mxc_iomux_set_pad(MX31_PIN_USBOTG_NXT, USB_PAD_CFG); |
198 | mxc_iomux_set_pad(MX31_PIN_USBOTG_STP, USB_PAD_CFG); | 224 | mxc_iomux_set_pad(MX31_PIN_USBOTG_STP, USB_PAD_CFG); |
199 | 225 | ||
200 | gpio_request(USBOTG_RST_B, "otgusb-reset"); | 226 | err = gpio_request(USBOTG_RST_B, "otgusb-reset"); |
201 | gpio_direction_output(USBOTG_RST_B, 0); | 227 | if (err) { |
228 | pr_err("Failed to request the USB OTG reset gpio\n"); | ||
229 | return err; | ||
230 | } | ||
231 | |||
232 | err = gpio_direction_output(USBOTG_RST_B, 0); | ||
233 | if (err) { | ||
234 | pr_err("Failed to drive the USB OTG reset gpio\n"); | ||
235 | goto usbotg_free_reset; | ||
236 | } | ||
237 | |||
202 | mdelay(1); | 238 | mdelay(1); |
203 | gpio_set_value(USBOTG_RST_B, 1); | 239 | gpio_set_value(USBOTG_RST_B, 1); |
240 | return 0; | ||
241 | |||
242 | usbotg_free_reset: | ||
243 | gpio_free(USBOTG_RST_B); | ||
244 | return err; | ||
204 | } | 245 | } |
205 | 246 | ||
206 | static struct fsl_usb2_platform_data usbotg_pdata = { | 247 | static struct fsl_usb2_platform_data usbotg_pdata = { |
@@ -208,178 +249,16 @@ static struct fsl_usb2_platform_data usbotg_pdata = { | |||
208 | .phy_mode = FSL_USB2_PHY_ULPI, | 249 | .phy_mode = FSL_USB2_PHY_ULPI, |
209 | }; | 250 | }; |
210 | 251 | ||
211 | static struct imxuart_platform_data uart_pdata = { | 252 | static const struct imxuart_platform_data uart_pdata __initconst = { |
212 | .flags = IMXUART_HAVE_RTSCTS, | 253 | .flags = IMXUART_HAVE_RTSCTS, |
213 | }; | 254 | }; |
214 | 255 | ||
215 | /* | 256 | /* |
216 | * Support for the SMSC9217 on the Debug board. | ||
217 | */ | ||
218 | |||
219 | static struct smsc911x_platform_config smsc911x_config = { | ||
220 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | ||
221 | .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, | ||
222 | .flags = SMSC911X_USE_16BIT | SMSC911X_FORCE_INTERNAL_PHY, | ||
223 | .phy_interface = PHY_INTERFACE_MODE_MII, | ||
224 | }; | ||
225 | |||
226 | static struct resource smsc911x_resources[] = { | ||
227 | { | ||
228 | .start = LAN9217_BASE_ADDR, | ||
229 | .end = LAN9217_BASE_ADDR + 0xff, | ||
230 | .flags = IORESOURCE_MEM, | ||
231 | }, { | ||
232 | .start = EXPIO_INT_ENET, | ||
233 | .end = EXPIO_INT_ENET, | ||
234 | .flags = IORESOURCE_IRQ, | ||
235 | }, | ||
236 | }; | ||
237 | |||
238 | static struct platform_device smsc911x_device = { | ||
239 | .name = "smsc911x", | ||
240 | .id = -1, | ||
241 | .num_resources = ARRAY_SIZE(smsc911x_resources), | ||
242 | .resource = smsc911x_resources, | ||
243 | .dev = { | ||
244 | .platform_data = &smsc911x_config, | ||
245 | }, | ||
246 | }; | ||
247 | |||
248 | /* | ||
249 | * Routines for the CPLD on the debug board. It contains a CPLD handling | ||
250 | * LEDs, switches, interrupts for Ethernet. | ||
251 | */ | ||
252 | |||
253 | static void mx31_3ds_expio_irq_handler(uint32_t irq, struct irq_desc *desc) | ||
254 | { | ||
255 | uint32_t imr_val; | ||
256 | uint32_t int_valid; | ||
257 | uint32_t expio_irq; | ||
258 | |||
259 | imr_val = __raw_readw(CPLD_INT_MASK_REG); | ||
260 | int_valid = __raw_readw(CPLD_INT_STATUS_REG) & ~imr_val; | ||
261 | |||
262 | expio_irq = MXC_EXP_IO_BASE; | ||
263 | for (; int_valid != 0; int_valid >>= 1, expio_irq++) { | ||
264 | if ((int_valid & 1) == 0) | ||
265 | continue; | ||
266 | generic_handle_irq(expio_irq); | ||
267 | } | ||
268 | } | ||
269 | |||
270 | /* | ||
271 | * Disable an expio pin's interrupt by setting the bit in the imr. | ||
272 | * @param irq an expio virtual irq number | ||
273 | */ | ||
274 | static void expio_mask_irq(uint32_t irq) | ||
275 | { | ||
276 | uint16_t reg; | ||
277 | uint32_t expio = MXC_IRQ_TO_EXPIO(irq); | ||
278 | |||
279 | /* mask the interrupt */ | ||
280 | reg = __raw_readw(CPLD_INT_MASK_REG); | ||
281 | reg |= 1 << expio; | ||
282 | __raw_writew(reg, CPLD_INT_MASK_REG); | ||
283 | } | ||
284 | |||
285 | /* | ||
286 | * Acknowledge an expanded io pin's interrupt by clearing the bit in the isr. | ||
287 | * @param irq an expanded io virtual irq number | ||
288 | */ | ||
289 | static void expio_ack_irq(uint32_t irq) | ||
290 | { | ||
291 | uint32_t expio = MXC_IRQ_TO_EXPIO(irq); | ||
292 | |||
293 | /* clear the interrupt status */ | ||
294 | __raw_writew(1 << expio, CPLD_INT_RESET_REG); | ||
295 | __raw_writew(0, CPLD_INT_RESET_REG); | ||
296 | /* mask the interrupt */ | ||
297 | expio_mask_irq(irq); | ||
298 | } | ||
299 | |||
300 | /* | ||
301 | * Enable a expio pin's interrupt by clearing the bit in the imr. | ||
302 | * @param irq a expio virtual irq number | ||
303 | */ | ||
304 | static void expio_unmask_irq(uint32_t irq) | ||
305 | { | ||
306 | uint16_t reg; | ||
307 | uint32_t expio = MXC_IRQ_TO_EXPIO(irq); | ||
308 | |||
309 | /* unmask the interrupt */ | ||
310 | reg = __raw_readw(CPLD_INT_MASK_REG); | ||
311 | reg &= ~(1 << expio); | ||
312 | __raw_writew(reg, CPLD_INT_MASK_REG); | ||
313 | } | ||
314 | |||
315 | static struct irq_chip expio_irq_chip = { | ||
316 | .ack = expio_ack_irq, | ||
317 | .mask = expio_mask_irq, | ||
318 | .unmask = expio_unmask_irq, | ||
319 | }; | ||
320 | |||
321 | static int __init mx31_3ds_init_expio(void) | ||
322 | { | ||
323 | int i; | ||
324 | int ret; | ||
325 | |||
326 | /* Check if there's a debug board connected */ | ||
327 | if ((__raw_readw(CPLD_MAGIC_NUMBER1_REG) != 0xAAAA) || | ||
328 | (__raw_readw(CPLD_MAGIC_NUMBER2_REG) != 0x5555) || | ||
329 | (__raw_readw(CPLD_MAGIC_NUMBER3_REG) != 0xCAFE)) { | ||
330 | /* No Debug board found */ | ||
331 | return -ENODEV; | ||
332 | } | ||
333 | |||
334 | pr_info("i.MX31 3DS Debug board detected, rev = 0x%04X\n", | ||
335 | __raw_readw(CPLD_CODE_VER_REG)); | ||
336 | |||
337 | /* | ||
338 | * Configure INT line as GPIO input | ||
339 | */ | ||
340 | ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO1_1), "sms9217-irq"); | ||
341 | if (ret) | ||
342 | pr_warning("could not get LAN irq gpio\n"); | ||
343 | else | ||
344 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO1_1)); | ||
345 | |||
346 | /* Disable the interrupts and clear the status */ | ||
347 | __raw_writew(0, CPLD_INT_MASK_REG); | ||
348 | __raw_writew(0xFFFF, CPLD_INT_RESET_REG); | ||
349 | __raw_writew(0, CPLD_INT_RESET_REG); | ||
350 | __raw_writew(0x1F, CPLD_INT_MASK_REG); | ||
351 | for (i = MXC_EXP_IO_BASE; | ||
352 | i < (MXC_EXP_IO_BASE + MXC_MAX_EXP_IO_LINES); | ||
353 | i++) { | ||
354 | set_irq_chip(i, &expio_irq_chip); | ||
355 | set_irq_handler(i, handle_level_irq); | ||
356 | set_irq_flags(i, IRQF_VALID); | ||
357 | } | ||
358 | set_irq_type(EXPIO_PARENT_INT, IRQ_TYPE_LEVEL_LOW); | ||
359 | set_irq_chained_handler(EXPIO_PARENT_INT, mx31_3ds_expio_irq_handler); | ||
360 | |||
361 | return 0; | ||
362 | } | ||
363 | |||
364 | /* | ||
365 | * This structure defines the MX31 memory map. | ||
366 | */ | ||
367 | static struct map_desc mx31_3ds_io_desc[] __initdata = { | ||
368 | { | ||
369 | .virtual = MX31_CS5_BASE_ADDR_VIRT, | ||
370 | .pfn = __phys_to_pfn(MX31_CS5_BASE_ADDR), | ||
371 | .length = MX31_CS5_SIZE, | ||
372 | .type = MT_DEVICE, | ||
373 | }, | ||
374 | }; | ||
375 | |||
376 | /* | ||
377 | * Set up static virtual mappings. | 257 | * Set up static virtual mappings. |
378 | */ | 258 | */ |
379 | static void __init mx31_3ds_map_io(void) | 259 | static void __init mx31_3ds_map_io(void) |
380 | { | 260 | { |
381 | mx31_map_io(); | 261 | mx31_map_io(); |
382 | iotable_init(mx31_3ds_io_desc, ARRAY_SIZE(mx31_3ds_io_desc)); | ||
383 | } | 262 | } |
384 | 263 | ||
385 | /*! | 264 | /*! |
@@ -390,10 +269,10 @@ static void __init mxc_board_init(void) | |||
390 | mxc_iomux_setup_multiple_pins(mx31_3ds_pins, ARRAY_SIZE(mx31_3ds_pins), | 269 | mxc_iomux_setup_multiple_pins(mx31_3ds_pins, ARRAY_SIZE(mx31_3ds_pins), |
391 | "mx31_3ds"); | 270 | "mx31_3ds"); |
392 | 271 | ||
393 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 272 | imx31_add_imx_uart0(&uart_pdata); |
394 | mxc_register_device(&mxc_nand_device, &imx31_3ds_nand_flash_pdata); | 273 | imx31_add_mxc_nand(&mx31_3ds_nand_board_info); |
395 | 274 | ||
396 | mxc_register_device(&mxc_spi_device1, &spi1_pdata); | 275 | imx31_add_spi_imx0(&spi1_pdata); |
397 | spi_register_board_info(mx31_3ds_spi_devs, | 276 | spi_register_board_info(mx31_3ds_spi_devs, |
398 | ARRAY_SIZE(mx31_3ds_spi_devs)); | 277 | ARRAY_SIZE(mx31_3ds_spi_devs)); |
399 | 278 | ||
@@ -402,8 +281,9 @@ static void __init mxc_board_init(void) | |||
402 | mx31_3ds_usbotg_init(); | 281 | mx31_3ds_usbotg_init(); |
403 | mxc_register_device(&mxc_otg_udc_device, &usbotg_pdata); | 282 | mxc_register_device(&mxc_otg_udc_device, &usbotg_pdata); |
404 | 283 | ||
405 | if (!mx31_3ds_init_expio()) | 284 | if (!mxc_expio_init(CS5_BASE_ADDR, EXPIO_PARENT_INT)) |
406 | platform_device_register(&smsc911x_device); | 285 | printk(KERN_WARNING "Init of the debugboard failed, all " |
286 | "devices on the board are unusable.\n"); | ||
407 | } | 287 | } |
408 | 288 | ||
409 | static void __init mx31_3ds_timer_init(void) | 289 | static void __init mx31_3ds_timer_init(void) |
diff --git a/arch/arm/mach-mx3/mach-mx31ads.c b/arch/arm/mach-mx3/mach-mx31ads.c index b3d1a1895c20..94b3e7c42404 100644 --- a/arch/arm/mach-mx3/mach-mx31ads.c +++ b/arch/arm/mach-mx3/mach-mx31ads.c | |||
@@ -12,10 +12,6 @@ | |||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | 15 | */ |
20 | 16 | ||
21 | #include <linux/types.h> | 17 | #include <linux/types.h> |
@@ -33,8 +29,6 @@ | |||
33 | #include <asm/memory.h> | 29 | #include <asm/memory.h> |
34 | #include <asm/mach/map.h> | 30 | #include <asm/mach/map.h> |
35 | #include <mach/common.h> | 31 | #include <mach/common.h> |
36 | #include <mach/board-mx31ads.h> | ||
37 | #include <mach/imx-uart.h> | ||
38 | #include <mach/iomux-mx3.h> | 32 | #include <mach/iomux-mx3.h> |
39 | 33 | ||
40 | #ifdef CONFIG_MACH_MX31ADS_WM1133_EV1 | 34 | #ifdef CONFIG_MACH_MX31ADS_WM1133_EV1 |
@@ -43,14 +37,45 @@ | |||
43 | #include <linux/mfd/wm8350/pmic.h> | 37 | #include <linux/mfd/wm8350/pmic.h> |
44 | #endif | 38 | #endif |
45 | 39 | ||
40 | #include "devices-imx31.h" | ||
46 | #include "devices.h" | 41 | #include "devices.h" |
47 | 42 | ||
48 | /*! | 43 | /* Base address of PBC controller */ |
49 | * @file mx31ads.c | 44 | #define PBC_BASE_ADDRESS MX31_CS4_BASE_ADDR_VIRT |
50 | * | 45 | /* Offsets for the PBC Controller register */ |
51 | * @brief This file contains the board-specific initialization routines. | 46 | |
52 | * | 47 | /* PBC Board interrupt status register */ |
53 | * @ingroup System | 48 | #define PBC_INTSTATUS 0x000016 |
49 | |||
50 | /* PBC Board interrupt current status register */ | ||
51 | #define PBC_INTCURR_STATUS 0x000018 | ||
52 | |||
53 | /* PBC Interrupt mask register set address */ | ||
54 | #define PBC_INTMASK_SET 0x00001A | ||
55 | |||
56 | /* PBC Interrupt mask register clear address */ | ||
57 | #define PBC_INTMASK_CLEAR 0x00001C | ||
58 | |||
59 | /* External UART A */ | ||
60 | #define PBC_SC16C652_UARTA 0x010000 | ||
61 | |||
62 | /* External UART B */ | ||
63 | #define PBC_SC16C652_UARTB 0x010010 | ||
64 | |||
65 | #define PBC_INTSTATUS_REG (PBC_INTSTATUS + PBC_BASE_ADDRESS) | ||
66 | #define PBC_INTMASK_SET_REG (PBC_INTMASK_SET + PBC_BASE_ADDRESS) | ||
67 | #define PBC_INTMASK_CLEAR_REG (PBC_INTMASK_CLEAR + PBC_BASE_ADDRESS) | ||
68 | #define EXPIO_PARENT_INT IOMUX_TO_IRQ(MX31_PIN_GPIO1_4) | ||
69 | |||
70 | #define MXC_EXP_IO_BASE (MXC_BOARD_IRQ_START) | ||
71 | #define MXC_IRQ_TO_EXPIO(irq) ((irq) - MXC_EXP_IO_BASE) | ||
72 | |||
73 | #define EXPIO_INT_XUART_INTA (MXC_EXP_IO_BASE + 10) | ||
74 | #define EXPIO_INT_XUART_INTB (MXC_EXP_IO_BASE + 11) | ||
75 | |||
76 | #define MXC_MAX_EXP_IO_LINES 16 | ||
77 | /* | ||
78 | * This file contains the board-specific initialization routines. | ||
54 | */ | 79 | */ |
55 | 80 | ||
56 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) | 81 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) |
@@ -98,7 +123,7 @@ static inline int mxc_init_extuart(void) | |||
98 | #endif | 123 | #endif |
99 | 124 | ||
100 | #if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE) | 125 | #if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE) |
101 | static struct imxuart_platform_data uart_pdata = { | 126 | static const struct imxuart_platform_data uart_pdata __initconst = { |
102 | .flags = IMXUART_HAVE_RTSCTS, | 127 | .flags = IMXUART_HAVE_RTSCTS, |
103 | }; | 128 | }; |
104 | 129 | ||
@@ -112,7 +137,7 @@ static unsigned int uart_pins[] = { | |||
112 | static inline void mxc_init_imx_uart(void) | 137 | static inline void mxc_init_imx_uart(void) |
113 | { | 138 | { |
114 | mxc_iomux_setup_multiple_pins(uart_pins, ARRAY_SIZE(uart_pins), "uart-0"); | 139 | mxc_iomux_setup_multiple_pins(uart_pins, ARRAY_SIZE(uart_pins), "uart-0"); |
115 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 140 | imx31_add_imx_uart0(&uart_pdata); |
116 | } | 141 | } |
117 | #else /* !SERIAL_IMX */ | 142 | #else /* !SERIAL_IMX */ |
118 | static inline void mxc_init_imx_uart(void) | 143 | static inline void mxc_init_imx_uart(void) |
@@ -475,7 +500,7 @@ static void mxc_init_i2c(void) | |||
475 | mxc_iomux_mode(IOMUX_MODE(MX31_PIN_CSPI2_MOSI, IOMUX_CONFIG_ALT1)); | 500 | mxc_iomux_mode(IOMUX_MODE(MX31_PIN_CSPI2_MOSI, IOMUX_CONFIG_ALT1)); |
476 | mxc_iomux_mode(IOMUX_MODE(MX31_PIN_CSPI2_MISO, IOMUX_CONFIG_ALT1)); | 501 | mxc_iomux_mode(IOMUX_MODE(MX31_PIN_CSPI2_MISO, IOMUX_CONFIG_ALT1)); |
477 | 502 | ||
478 | mxc_register_device(&mxc_i2c_device1, NULL); | 503 | imx31_add_imx_i2c1(NULL); |
479 | } | 504 | } |
480 | #else | 505 | #else |
481 | static void mxc_init_i2c(void) | 506 | static void mxc_init_i2c(void) |
diff --git a/arch/arm/mach-mx3/mach-mx31lilly.c b/arch/arm/mach-mx3/mach-mx31lilly.c index b2c7f512070f..8f66f65e80e2 100644 --- a/arch/arm/mach-mx3/mach-mx31lilly.c +++ b/arch/arm/mach-mx3/mach-mx31lilly.c | |||
@@ -18,10 +18,6 @@ | |||
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
20 | * GNU General Public License for more details. | 20 | * GNU General Public License for more details. |
21 | * | ||
22 | * You should have received a copy of the GNU General Public License | ||
23 | * along with this program; if not, write to the Free Software | ||
24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
25 | */ | 21 | */ |
26 | 22 | ||
27 | #include <linux/types.h> | 23 | #include <linux/types.h> |
@@ -46,10 +42,10 @@ | |||
46 | #include <mach/common.h> | 42 | #include <mach/common.h> |
47 | #include <mach/iomux-mx3.h> | 43 | #include <mach/iomux-mx3.h> |
48 | #include <mach/board-mx31lilly.h> | 44 | #include <mach/board-mx31lilly.h> |
49 | #include <mach/spi.h> | ||
50 | #include <mach/mxc_ehci.h> | 45 | #include <mach/mxc_ehci.h> |
51 | #include <mach/ulpi.h> | 46 | #include <mach/ulpi.h> |
52 | 47 | ||
48 | #include "devices-imx31.h" | ||
53 | #include "devices.h" | 49 | #include "devices.h" |
54 | 50 | ||
55 | /* | 51 | /* |
@@ -269,12 +265,12 @@ static int spi_internal_chipselect[] = { | |||
269 | MXC_SPI_CS(2), | 265 | MXC_SPI_CS(2), |
270 | }; | 266 | }; |
271 | 267 | ||
272 | static struct spi_imx_master spi0_pdata = { | 268 | static const struct spi_imx_master spi0_pdata __initconst = { |
273 | .chipselect = spi_internal_chipselect, | 269 | .chipselect = spi_internal_chipselect, |
274 | .num_chipselect = ARRAY_SIZE(spi_internal_chipselect), | 270 | .num_chipselect = ARRAY_SIZE(spi_internal_chipselect), |
275 | }; | 271 | }; |
276 | 272 | ||
277 | static struct spi_imx_master spi1_pdata = { | 273 | static const struct spi_imx_master spi1_pdata __initconst = { |
278 | .chipselect = spi_internal_chipselect, | 274 | .chipselect = spi_internal_chipselect, |
279 | .num_chipselect = ARRAY_SIZE(spi_internal_chipselect), | 275 | .num_chipselect = ARRAY_SIZE(spi_internal_chipselect), |
280 | }; | 276 | }; |
@@ -289,6 +285,7 @@ static struct spi_board_info mc13783_dev __initdata = { | |||
289 | .bus_num = 1, | 285 | .bus_num = 1, |
290 | .chip_select = 0, | 286 | .chip_select = 0, |
291 | .platform_data = &mc13783_pdata, | 287 | .platform_data = &mc13783_pdata, |
288 | .irq = IOMUX_TO_IRQ(MX31_PIN_GPIO1_3), | ||
292 | }; | 289 | }; |
293 | 290 | ||
294 | static struct platform_device *devices[] __initdata = { | 291 | static struct platform_device *devices[] __initdata = { |
@@ -331,8 +328,8 @@ static void __init mx31lilly_board_init(void) | |||
331 | mxc_iomux_alloc_pin(MX31_PIN_CSPI2_SS1__SS1, "SPI2_SS1"); | 328 | mxc_iomux_alloc_pin(MX31_PIN_CSPI2_SS1__SS1, "SPI2_SS1"); |
332 | mxc_iomux_alloc_pin(MX31_PIN_CSPI2_SS2__SS2, "SPI2_SS2"); | 329 | mxc_iomux_alloc_pin(MX31_PIN_CSPI2_SS2__SS2, "SPI2_SS2"); |
333 | 330 | ||
334 | mxc_register_device(&mxc_spi_device0, &spi0_pdata); | 331 | imx31_add_spi_imx0(&spi0_pdata); |
335 | mxc_register_device(&mxc_spi_device1, &spi1_pdata); | 332 | imx31_add_spi_imx1(&spi1_pdata); |
336 | spi_register_board_info(&mc13783_dev, 1); | 333 | spi_register_board_info(&mc13783_dev, 1); |
337 | 334 | ||
338 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 335 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
diff --git a/arch/arm/mach-mx3/mach-mx31lite.c b/arch/arm/mach-mx3/mach-mx31lite.c index 2b6d11400877..da236c497d2a 100644 --- a/arch/arm/mach-mx3/mach-mx31lite.c +++ b/arch/arm/mach-mx3/mach-mx31lite.c | |||
@@ -13,10 +13,6 @@ | |||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * GNU General Public License for more details. | 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 | */ | 16 | */ |
21 | 17 | ||
22 | #include <linux/types.h> | 18 | #include <linux/types.h> |
@@ -42,14 +38,12 @@ | |||
42 | #include <mach/hardware.h> | 38 | #include <mach/hardware.h> |
43 | #include <mach/common.h> | 39 | #include <mach/common.h> |
44 | #include <mach/board-mx31lite.h> | 40 | #include <mach/board-mx31lite.h> |
45 | #include <mach/imx-uart.h> | ||
46 | #include <mach/iomux-mx3.h> | 41 | #include <mach/iomux-mx3.h> |
47 | #include <mach/irqs.h> | 42 | #include <mach/irqs.h> |
48 | #include <mach/mxc_nand.h> | ||
49 | #include <mach/spi.h> | ||
50 | #include <mach/mxc_ehci.h> | 43 | #include <mach/mxc_ehci.h> |
51 | #include <mach/ulpi.h> | 44 | #include <mach/ulpi.h> |
52 | 45 | ||
46 | #include "devices-imx31.h" | ||
53 | #include "devices.h" | 47 | #include "devices.h" |
54 | 48 | ||
55 | /* | 49 | /* |
@@ -69,7 +63,8 @@ static unsigned int mx31lite_pins[] = { | |||
69 | MX31_PIN_CSPI2_SS2__SS2, | 63 | MX31_PIN_CSPI2_SS2__SS2, |
70 | }; | 64 | }; |
71 | 65 | ||
72 | static struct mxc_nand_platform_data mx31lite_nand_board_info = { | 66 | static const struct mxc_nand_platform_data |
67 | mx31lite_nand_board_info __initconst = { | ||
73 | .width = 1, | 68 | .width = 1, |
74 | .hw_ecc = 1, | 69 | .hw_ecc = 1, |
75 | }; | 70 | }; |
@@ -112,7 +107,7 @@ static int spi_internal_chipselect[] = { | |||
112 | MXC_SPI_CS(0), | 107 | MXC_SPI_CS(0), |
113 | }; | 108 | }; |
114 | 109 | ||
115 | static struct spi_imx_master spi1_pdata = { | 110 | static const struct spi_imx_master spi1_pdata __initconst = { |
116 | .chipselect = spi_internal_chipselect, | 111 | .chipselect = spi_internal_chipselect, |
117 | .num_chipselect = ARRAY_SIZE(spi_internal_chipselect), | 112 | .num_chipselect = ARRAY_SIZE(spi_internal_chipselect), |
118 | }; | 113 | }; |
@@ -253,9 +248,9 @@ static void __init mxc_board_init(void) | |||
253 | 248 | ||
254 | /* NOR and NAND flash */ | 249 | /* NOR and NAND flash */ |
255 | platform_device_register(&physmap_flash_device); | 250 | platform_device_register(&physmap_flash_device); |
256 | mxc_register_device(&mxc_nand_device, &mx31lite_nand_board_info); | 251 | imx31_add_mxc_nand(&mx31lite_nand_board_info); |
257 | 252 | ||
258 | mxc_register_device(&mxc_spi_device1, &spi1_pdata); | 253 | imx31_add_spi_imx1(&spi1_pdata); |
259 | spi_register_board_info(&mc13783_spi_dev, 1); | 254 | spi_register_board_info(&mc13783_spi_dev, 1); |
260 | 255 | ||
261 | #if defined(CONFIG_USB_ULPI) | 256 | #if defined(CONFIG_USB_ULPI) |
diff --git a/arch/arm/mach-mx3/mach-mx31moboard.c b/arch/arm/mach-mx3/mach-mx31moboard.c index 62b5e40165df..67776bc61c33 100644 --- a/arch/arm/mach-mx3/mach-mx31moboard.c +++ b/arch/arm/mach-mx3/mach-mx31moboard.c | |||
@@ -10,10 +10,6 @@ | |||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | 13 | */ |
18 | 14 | ||
19 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
@@ -42,16 +38,15 @@ | |||
42 | #include <mach/board-mx31moboard.h> | 38 | #include <mach/board-mx31moboard.h> |
43 | #include <mach/common.h> | 39 | #include <mach/common.h> |
44 | #include <mach/hardware.h> | 40 | #include <mach/hardware.h> |
45 | #include <mach/imx-uart.h> | ||
46 | #include <mach/iomux-mx3.h> | 41 | #include <mach/iomux-mx3.h> |
47 | #include <mach/ipu.h> | 42 | #include <mach/ipu.h> |
48 | #include <mach/i2c.h> | ||
49 | #include <mach/mmc.h> | 43 | #include <mach/mmc.h> |
50 | #include <mach/mxc_ehci.h> | 44 | #include <mach/mxc_ehci.h> |
51 | #include <mach/mx3_camera.h> | 45 | #include <mach/mx3_camera.h> |
52 | #include <mach/spi.h> | 46 | #include <mach/spi.h> |
53 | #include <mach/ulpi.h> | 47 | #include <mach/ulpi.h> |
54 | 48 | ||
49 | #include "devices-imx31.h" | ||
55 | #include "devices.h" | 50 | #include "devices.h" |
56 | 51 | ||
57 | static unsigned int moboard_pins[] = { | 52 | static unsigned int moboard_pins[] = { |
@@ -130,24 +125,36 @@ static struct platform_device mx31moboard_flash = { | |||
130 | 125 | ||
131 | static int moboard_uart0_init(struct platform_device *pdev) | 126 | static int moboard_uart0_init(struct platform_device *pdev) |
132 | { | 127 | { |
133 | gpio_request(IOMUX_TO_GPIO(MX31_PIN_CTS1), "uart0-cts-hack"); | 128 | int ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_CTS1), "uart0-cts-hack"); |
134 | gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_CTS1), 0); | 129 | if (ret) |
135 | return 0; | 130 | return ret; |
131 | |||
132 | ret = gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_CTS1), 0); | ||
133 | if (ret) | ||
134 | gpio_free(IOMUX_TO_GPIO(MX31_PIN_CTS1)); | ||
135 | |||
136 | return ret; | ||
137 | } | ||
138 | |||
139 | static void moboard_uart0_exit(struct platform_device *pdev) | ||
140 | { | ||
141 | gpio_free(IOMUX_TO_GPIO(MX31_PIN_CTS1)); | ||
136 | } | 142 | } |
137 | 143 | ||
138 | static struct imxuart_platform_data uart0_pdata = { | 144 | static const struct imxuart_platform_data uart0_pdata __initconst = { |
139 | .init = moboard_uart0_init, | 145 | .init = moboard_uart0_init, |
146 | .exit = moboard_uart0_exit, | ||
140 | }; | 147 | }; |
141 | 148 | ||
142 | static struct imxuart_platform_data uart4_pdata = { | 149 | static const struct imxuart_platform_data uart4_pdata __initconst = { |
143 | .flags = IMXUART_HAVE_RTSCTS, | 150 | .flags = IMXUART_HAVE_RTSCTS, |
144 | }; | 151 | }; |
145 | 152 | ||
146 | static struct imxi2c_platform_data moboard_i2c0_pdata = { | 153 | static const struct imxi2c_platform_data moboard_i2c0_data __initconst = { |
147 | .bitrate = 400000, | 154 | .bitrate = 400000, |
148 | }; | 155 | }; |
149 | 156 | ||
150 | static struct imxi2c_platform_data moboard_i2c1_pdata = { | 157 | static const struct imxi2c_platform_data moboard_i2c1_data __initconst = { |
151 | .bitrate = 100000, | 158 | .bitrate = 100000, |
152 | }; | 159 | }; |
153 | 160 | ||
@@ -156,7 +163,7 @@ static int moboard_spi1_cs[] = { | |||
156 | MXC_SPI_CS(2), | 163 | MXC_SPI_CS(2), |
157 | }; | 164 | }; |
158 | 165 | ||
159 | static struct spi_imx_master moboard_spi1_master = { | 166 | static const struct spi_imx_master moboard_spi1_pdata __initconst = { |
160 | .chipselect = moboard_spi1_cs, | 167 | .chipselect = moboard_spi1_cs, |
161 | .num_chipselect = ARRAY_SIZE(moboard_spi1_cs), | 168 | .num_chipselect = ARRAY_SIZE(moboard_spi1_cs), |
162 | }; | 169 | }; |
@@ -286,7 +293,7 @@ static int moboard_spi2_cs[] = { | |||
286 | MXC_SPI_CS(1), | 293 | MXC_SPI_CS(1), |
287 | }; | 294 | }; |
288 | 295 | ||
289 | static struct spi_imx_master moboard_spi2_master = { | 296 | static const struct spi_imx_master moboard_spi2_pdata __initconst = { |
290 | .chipselect = moboard_spi2_cs, | 297 | .chipselect = moboard_spi2_cs, |
291 | .num_chipselect = ARRAY_SIZE(moboard_spi2_cs), | 298 | .num_chipselect = ARRAY_SIZE(moboard_spi2_cs), |
292 | }; | 299 | }; |
@@ -499,15 +506,14 @@ static void __init mxc_board_init(void) | |||
499 | 506 | ||
500 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 507 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
501 | 508 | ||
502 | mxc_register_device(&mxc_uart_device0, &uart0_pdata); | 509 | imx31_add_imx_uart0(&uart0_pdata); |
503 | 510 | imx31_add_imx_uart4(&uart4_pdata); | |
504 | mxc_register_device(&mxc_uart_device4, &uart4_pdata); | ||
505 | 511 | ||
506 | mxc_register_device(&mxc_i2c_device0, &moboard_i2c0_pdata); | 512 | imx31_add_imx_i2c0(&moboard_i2c0_data); |
507 | mxc_register_device(&mxc_i2c_device1, &moboard_i2c1_pdata); | 513 | imx31_add_imx_i2c1(&moboard_i2c1_data); |
508 | 514 | ||
509 | mxc_register_device(&mxc_spi_device1, &moboard_spi1_master); | 515 | imx31_add_spi_imx1(&moboard_spi1_pdata); |
510 | mxc_register_device(&mxc_spi_device2, &moboard_spi2_master); | 516 | imx31_add_spi_imx2(&moboard_spi2_pdata); |
511 | 517 | ||
512 | gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3), "pmic-irq"); | 518 | gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3), "pmic-irq"); |
513 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); | 519 | gpio_direction_input(IOMUX_TO_GPIO(MX31_PIN_GPIO1_3)); |
diff --git a/arch/arm/mach-mx3/mach-mx35pdk.c b/arch/arm/mach-mx3/mach-mx35_3ds.c index bcac84d4dca4..1c30d7212f17 100644 --- a/arch/arm/mach-mx3/mach-mx35pdk.c +++ b/arch/arm/mach-mx3/mach-mx35_3ds.c | |||
@@ -12,10 +12,12 @@ | |||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
15 | * | 15 | */ |
16 | * You should have received a copy of the GNU General Public License | 16 | |
17 | * along with this program; if not, write to the Free Software | 17 | /* |
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * This machine is known as: |
19 | * - i.MX35 3-Stack Development System | ||
20 | * - i.MX35 Platform Development Kit (i.MX35 PDK) | ||
19 | */ | 21 | */ |
20 | 22 | ||
21 | #include <linux/types.h> | 23 | #include <linux/types.h> |
@@ -32,12 +34,12 @@ | |||
32 | 34 | ||
33 | #include <mach/hardware.h> | 35 | #include <mach/hardware.h> |
34 | #include <mach/common.h> | 36 | #include <mach/common.h> |
35 | #include <mach/imx-uart.h> | ||
36 | #include <mach/iomux-mx35.h> | 37 | #include <mach/iomux-mx35.h> |
37 | 38 | ||
39 | #include "devices-imx35.h" | ||
38 | #include "devices.h" | 40 | #include "devices.h" |
39 | 41 | ||
40 | static struct imxuart_platform_data uart_pdata = { | 42 | static const struct imxuart_platform_data uart_pdata __initconst = { |
41 | .flags = IMXUART_HAVE_RTSCTS, | 43 | .flags = IMXUART_HAVE_RTSCTS, |
42 | }; | 44 | }; |
43 | 45 | ||
@@ -90,7 +92,7 @@ static void __init mxc_board_init(void) | |||
90 | 92 | ||
91 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 93 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
92 | 94 | ||
93 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 95 | imx35_add_imx_uart0(&uart_pdata); |
94 | 96 | ||
95 | mxc_register_device(&mxc_otg_udc_device, &usb_pdata); | 97 | mxc_register_device(&mxc_otg_udc_device, &usb_pdata); |
96 | } | 98 | } |
diff --git a/arch/arm/mach-mx3/mach-pcm037.c b/arch/arm/mach-mx3/mach-pcm037.c index cce410662383..8a292dd1a714 100644 --- a/arch/arm/mach-mx3/mach-pcm037.c +++ b/arch/arm/mach-mx3/mach-pcm037.c | |||
@@ -10,10 +10,6 @@ | |||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | 13 | */ |
18 | 14 | ||
19 | #include <linux/types.h> | 15 | #include <linux/types.h> |
@@ -43,20 +39,17 @@ | |||
43 | #include <asm/mach/arch.h> | 39 | #include <asm/mach/arch.h> |
44 | #include <asm/mach/time.h> | 40 | #include <asm/mach/time.h> |
45 | #include <asm/mach/map.h> | 41 | #include <asm/mach/map.h> |
46 | #include <mach/board-pcm037.h> | ||
47 | #include <mach/common.h> | 42 | #include <mach/common.h> |
48 | #include <mach/hardware.h> | 43 | #include <mach/hardware.h> |
49 | #include <mach/i2c.h> | ||
50 | #include <mach/imx-uart.h> | ||
51 | #include <mach/iomux-mx3.h> | 44 | #include <mach/iomux-mx3.h> |
52 | #include <mach/ipu.h> | 45 | #include <mach/ipu.h> |
53 | #include <mach/mmc.h> | 46 | #include <mach/mmc.h> |
54 | #include <mach/mx3_camera.h> | 47 | #include <mach/mx3_camera.h> |
55 | #include <mach/mx3fb.h> | 48 | #include <mach/mx3fb.h> |
56 | #include <mach/mxc_nand.h> | ||
57 | #include <mach/mxc_ehci.h> | 49 | #include <mach/mxc_ehci.h> |
58 | #include <mach/ulpi.h> | 50 | #include <mach/ulpi.h> |
59 | 51 | ||
52 | #include "devices-imx31.h" | ||
60 | #include "devices.h" | 53 | #include "devices.h" |
61 | #include "pcm037.h" | 54 | #include "pcm037.h" |
62 | 55 | ||
@@ -225,7 +218,7 @@ static struct platform_device pcm037_flash = { | |||
225 | .num_resources = 1, | 218 | .num_resources = 1, |
226 | }; | 219 | }; |
227 | 220 | ||
228 | static struct imxuart_platform_data uart_pdata = { | 221 | static const struct imxuart_platform_data uart_pdata __initconst = { |
229 | .flags = IMXUART_HAVE_RTSCTS, | 222 | .flags = IMXUART_HAVE_RTSCTS, |
230 | }; | 223 | }; |
231 | 224 | ||
@@ -279,16 +272,17 @@ static struct platform_device pcm037_sram_device = { | |||
279 | .resource = &pcm038_sram_resource, | 272 | .resource = &pcm038_sram_resource, |
280 | }; | 273 | }; |
281 | 274 | ||
282 | static struct mxc_nand_platform_data pcm037_nand_board_info = { | 275 | static const struct mxc_nand_platform_data |
276 | pcm037_nand_board_info __initconst = { | ||
283 | .width = 1, | 277 | .width = 1, |
284 | .hw_ecc = 1, | 278 | .hw_ecc = 1, |
285 | }; | 279 | }; |
286 | 280 | ||
287 | static struct imxi2c_platform_data pcm037_i2c_1_data = { | 281 | static const struct imxi2c_platform_data pcm037_i2c1_data __initconst = { |
288 | .bitrate = 100000, | 282 | .bitrate = 100000, |
289 | }; | 283 | }; |
290 | 284 | ||
291 | static struct imxi2c_platform_data pcm037_i2c_2_data = { | 285 | static const struct imxi2c_platform_data pcm037_i2c2_data __initconst = { |
292 | .bitrate = 20000, | 286 | .bitrate = 20000, |
293 | }; | 287 | }; |
294 | 288 | ||
@@ -545,6 +539,7 @@ static struct platform_device pcm970_sja1000 = { | |||
545 | .num_resources = ARRAY_SIZE(pcm970_sja1000_resources), | 539 | .num_resources = ARRAY_SIZE(pcm970_sja1000_resources), |
546 | }; | 540 | }; |
547 | 541 | ||
542 | #if defined(CONFIG_USB_ULPI) | ||
548 | static struct mxc_usbh_platform_data otg_pdata = { | 543 | static struct mxc_usbh_platform_data otg_pdata = { |
549 | .portsc = MXC_EHCI_MODE_ULPI, | 544 | .portsc = MXC_EHCI_MODE_ULPI, |
550 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, | 545 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, |
@@ -554,6 +549,7 @@ static struct mxc_usbh_platform_data usbh2_pdata = { | |||
554 | .portsc = MXC_EHCI_MODE_ULPI, | 549 | .portsc = MXC_EHCI_MODE_ULPI, |
555 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, | 550 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, |
556 | }; | 551 | }; |
552 | #endif | ||
557 | 553 | ||
558 | static struct fsl_usb2_platform_data otg_device_pdata = { | 554 | static struct fsl_usb2_platform_data otg_device_pdata = { |
559 | .operating_mode = FSL_USB2_DR_DEVICE, | 555 | .operating_mode = FSL_USB2_DR_DEVICE, |
@@ -581,7 +577,6 @@ __setup("otg_mode=", pcm037_otg_mode); | |||
581 | static void __init mxc_board_init(void) | 577 | static void __init mxc_board_init(void) |
582 | { | 578 | { |
583 | int ret; | 579 | int ret; |
584 | u32 tmp; | ||
585 | 580 | ||
586 | mxc_iomux_set_gpr(MUX_PGP_UH2, 1); | 581 | mxc_iomux_set_gpr(MUX_PGP_UH2, 1); |
587 | 582 | ||
@@ -614,9 +609,10 @@ static void __init mxc_board_init(void) | |||
614 | 609 | ||
615 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 610 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
616 | 611 | ||
617 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 612 | imx31_add_imx_uart0(&uart_pdata); |
618 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | 613 | /* XXX: should't this have .flags = 0 (i.e. no RTSCTS) on PCM037_EET? */ |
619 | mxc_register_device(&mxc_uart_device2, &uart_pdata); | 614 | imx31_add_imx_uart1(&uart_pdata); |
615 | imx31_add_imx_uart2(&uart_pdata); | ||
620 | 616 | ||
621 | mxc_register_device(&mxc_w1_master_device, NULL); | 617 | mxc_register_device(&mxc_w1_master_device, NULL); |
622 | 618 | ||
@@ -634,10 +630,10 @@ static void __init mxc_board_init(void) | |||
634 | i2c_register_board_info(1, pcm037_i2c_devices, | 630 | i2c_register_board_info(1, pcm037_i2c_devices, |
635 | ARRAY_SIZE(pcm037_i2c_devices)); | 631 | ARRAY_SIZE(pcm037_i2c_devices)); |
636 | 632 | ||
637 | mxc_register_device(&mxc_i2c_device1, &pcm037_i2c_1_data); | 633 | imx31_add_imx_i2c1(&pcm037_i2c1_data); |
638 | mxc_register_device(&mxc_i2c_device2, &pcm037_i2c_2_data); | 634 | imx31_add_imx_i2c2(&pcm037_i2c2_data); |
639 | 635 | ||
640 | mxc_register_device(&mxc_nand_device, &pcm037_nand_board_info); | 636 | imx31_add_mxc_nand(&pcm037_nand_board_info); |
641 | mxc_register_device(&mxcsdhc_device0, &sdhc_pdata); | 637 | mxc_register_device(&mxcsdhc_device0, &sdhc_pdata); |
642 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); | 638 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); |
643 | mxc_register_device(&mx3_fb, &mx3fb_pdata); | 639 | mxc_register_device(&mx3_fb, &mx3fb_pdata); |
diff --git a/arch/arm/mach-mx3/mach-pcm037_eet.c b/arch/arm/mach-mx3/mach-pcm037_eet.c index 8d386000fc40..c8b98218efee 100644 --- a/arch/arm/mach-mx3/mach-pcm037_eet.c +++ b/arch/arm/mach-mx3/mach-pcm037_eet.c | |||
@@ -13,9 +13,6 @@ | |||
13 | #include <linux/spi/spi.h> | 13 | #include <linux/spi/spi.h> |
14 | 14 | ||
15 | #include <mach/common.h> | 15 | #include <mach/common.h> |
16 | #if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) | ||
17 | #include <mach/spi.h> | ||
18 | #endif | ||
19 | #include <mach/iomux-mx3.h> | 16 | #include <mach/iomux-mx3.h> |
20 | 17 | ||
21 | #include <asm/mach-types.h> | 18 | #include <asm/mach-types.h> |
@@ -64,7 +61,7 @@ static struct spi_board_info pcm037_spi_dev[] = { | |||
64 | #if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) | 61 | #if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) |
65 | static int pcm037_spi1_cs[] = {MXC_SPI_CS(1), IOMUX_TO_GPIO(MX31_PIN_KEY_COL7)}; | 62 | static int pcm037_spi1_cs[] = {MXC_SPI_CS(1), IOMUX_TO_GPIO(MX31_PIN_KEY_COL7)}; |
66 | 63 | ||
67 | struct spi_imx_master pcm037_spi1_master = { | 64 | static const struct spi_imx_master pcm037_spi1_pdata __initconst = { |
68 | .chipselect = pcm037_spi1_cs, | 65 | .chipselect = pcm037_spi1_cs, |
69 | .num_chipselect = ARRAY_SIZE(pcm037_spi1_cs), | 66 | .num_chipselect = ARRAY_SIZE(pcm037_spi1_cs), |
70 | }; | 67 | }; |
@@ -184,7 +181,7 @@ static int eet_init_devices(void) | |||
184 | /* SPI */ | 181 | /* SPI */ |
185 | spi_register_board_info(pcm037_spi_dev, ARRAY_SIZE(pcm037_spi_dev)); | 182 | spi_register_board_info(pcm037_spi_dev, ARRAY_SIZE(pcm037_spi_dev)); |
186 | #if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) | 183 | #if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) |
187 | mxc_register_device(&mxc_spi_device0, &pcm037_spi1_master); | 184 | imx35_add_spi_imx0(&pcm037_spi1_pdata); |
188 | #endif | 185 | #endif |
189 | 186 | ||
190 | platform_device_register(&pcm037_gpio_keys_device); | 187 | platform_device_register(&pcm037_gpio_keys_device); |
diff --git a/arch/arm/mach-mx3/mach-pcm043.c b/arch/arm/mach-mx3/mach-pcm043.c index 78d9185a9d4b..47f5311b301a 100644 --- a/arch/arm/mach-mx3/mach-pcm043.c +++ b/arch/arm/mach-mx3/mach-pcm043.c | |||
@@ -10,10 +10,6 @@ | |||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | 13 | */ |
18 | 14 | ||
19 | #include <linux/types.h> | 15 | #include <linux/types.h> |
@@ -40,19 +36,15 @@ | |||
40 | 36 | ||
41 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
42 | #include <mach/common.h> | 38 | #include <mach/common.h> |
43 | #include <mach/imx-uart.h> | ||
44 | #if defined CONFIG_I2C_IMX || defined CONFIG_I2C_IMX_MODULE | ||
45 | #include <mach/i2c.h> | ||
46 | #endif | ||
47 | #include <mach/iomux-mx35.h> | 39 | #include <mach/iomux-mx35.h> |
48 | #include <mach/ipu.h> | 40 | #include <mach/ipu.h> |
49 | #include <mach/mx3fb.h> | 41 | #include <mach/mx3fb.h> |
50 | #include <mach/mxc_nand.h> | ||
51 | #include <mach/mxc_ehci.h> | 42 | #include <mach/mxc_ehci.h> |
52 | #include <mach/ulpi.h> | 43 | #include <mach/ulpi.h> |
53 | #include <mach/audmux.h> | 44 | #include <mach/audmux.h> |
54 | #include <mach/ssi.h> | 45 | #include <mach/ssi.h> |
55 | 46 | ||
47 | #include "devices-imx35.h" | ||
56 | #include "devices.h" | 48 | #include "devices.h" |
57 | 49 | ||
58 | static const struct fb_videomode fb_modedb[] = { | 50 | static const struct fb_videomode fb_modedb[] = { |
@@ -122,12 +114,12 @@ static struct platform_device pcm043_flash = { | |||
122 | .num_resources = 1, | 114 | .num_resources = 1, |
123 | }; | 115 | }; |
124 | 116 | ||
125 | static struct imxuart_platform_data uart_pdata = { | 117 | static const struct imxuart_platform_data uart_pdata __initconst = { |
126 | .flags = IMXUART_HAVE_RTSCTS, | 118 | .flags = IMXUART_HAVE_RTSCTS, |
127 | }; | 119 | }; |
128 | 120 | ||
129 | #if defined CONFIG_I2C_IMX || defined CONFIG_I2C_IMX_MODULE | 121 | #if defined CONFIG_I2C_IMX || defined CONFIG_I2C_IMX_MODULE |
130 | static struct imxi2c_platform_data pcm043_i2c_1_data = { | 122 | static const struct imxi2c_platform_data pcm043_i2c0_data __initconst = { |
131 | .bitrate = 50000, | 123 | .bitrate = 50000, |
132 | }; | 124 | }; |
133 | 125 | ||
@@ -222,6 +214,9 @@ static struct pad_desc pcm043_pads[] = { | |||
222 | MX35_PAD_STXD4__AUDMUX_AUD4_TXD, | 214 | MX35_PAD_STXD4__AUDMUX_AUD4_TXD, |
223 | MX35_PAD_SRXD4__AUDMUX_AUD4_RXD, | 215 | MX35_PAD_SRXD4__AUDMUX_AUD4_RXD, |
224 | MX35_PAD_SCK4__AUDMUX_AUD4_TXC, | 216 | MX35_PAD_SCK4__AUDMUX_AUD4_TXC, |
217 | /* CAN2 */ | ||
218 | MX35_PAD_TX5_RX0__CAN2_TXCAN, | ||
219 | MX35_PAD_TX4_RX1__CAN2_RXCAN, | ||
225 | }; | 220 | }; |
226 | 221 | ||
227 | #define AC97_GPIO_TXFS (1 * 32 + 31) | 222 | #define AC97_GPIO_TXFS (1 * 32 + 31) |
@@ -304,11 +299,13 @@ static struct imx_ssi_platform_data pcm043_ssi_pdata = { | |||
304 | .flags = IMX_SSI_USE_AC97, | 299 | .flags = IMX_SSI_USE_AC97, |
305 | }; | 300 | }; |
306 | 301 | ||
307 | static struct mxc_nand_platform_data pcm037_nand_board_info = { | 302 | static const struct mxc_nand_platform_data |
303 | pcm037_nand_board_info __initconst = { | ||
308 | .width = 1, | 304 | .width = 1, |
309 | .hw_ecc = 1, | 305 | .hw_ecc = 1, |
310 | }; | 306 | }; |
311 | 307 | ||
308 | #if defined(CONFIG_USB_ULPI) | ||
312 | static struct mxc_usbh_platform_data otg_pdata = { | 309 | static struct mxc_usbh_platform_data otg_pdata = { |
313 | .portsc = MXC_EHCI_MODE_UTMI, | 310 | .portsc = MXC_EHCI_MODE_UTMI, |
314 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, | 311 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, |
@@ -319,6 +316,7 @@ static struct mxc_usbh_platform_data usbh1_pdata = { | |||
319 | .flags = MXC_EHCI_INTERFACE_SINGLE_UNI | MXC_EHCI_INTERNAL_PHY | | 316 | .flags = MXC_EHCI_INTERFACE_SINGLE_UNI | MXC_EHCI_INTERNAL_PHY | |
320 | MXC_EHCI_IPPUE_DOWN, | 317 | MXC_EHCI_IPPUE_DOWN, |
321 | }; | 318 | }; |
319 | #endif | ||
322 | 320 | ||
323 | static struct fsl_usb2_platform_data otg_device_pdata = { | 321 | static struct fsl_usb2_platform_data otg_device_pdata = { |
324 | .operating_mode = FSL_USB2_DR_DEVICE, | 322 | .operating_mode = FSL_USB2_DR_DEVICE, |
@@ -361,17 +359,17 @@ static void __init mxc_board_init(void) | |||
361 | 359 | ||
362 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 360 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
363 | 361 | ||
364 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 362 | imx35_add_imx_uart0(&uart_pdata); |
365 | mxc_register_device(&mxc_nand_device, &pcm037_nand_board_info); | 363 | imx35_add_mxc_nand(&pcm037_nand_board_info); |
366 | mxc_register_device(&imx_ssi_device0, &pcm043_ssi_pdata); | 364 | mxc_register_device(&imx_ssi_device0, &pcm043_ssi_pdata); |
367 | 365 | ||
368 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | 366 | imx35_add_imx_uart1(&uart_pdata); |
369 | 367 | ||
370 | #if defined CONFIG_I2C_IMX || defined CONFIG_I2C_IMX_MODULE | 368 | #if defined CONFIG_I2C_IMX || defined CONFIG_I2C_IMX_MODULE |
371 | i2c_register_board_info(0, pcm043_i2c_devices, | 369 | i2c_register_board_info(0, pcm043_i2c_devices, |
372 | ARRAY_SIZE(pcm043_i2c_devices)); | 370 | ARRAY_SIZE(pcm043_i2c_devices)); |
373 | 371 | ||
374 | mxc_register_device(&mxc_i2c_device0, &pcm043_i2c_1_data); | 372 | imx35_add_imx_i2c0(&pcm043_i2c0_data); |
375 | #endif | 373 | #endif |
376 | 374 | ||
377 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); | 375 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); |
@@ -390,6 +388,7 @@ static void __init mxc_board_init(void) | |||
390 | if (!otg_mode_host) | 388 | if (!otg_mode_host) |
391 | mxc_register_device(&mxc_otg_udc_device, &otg_device_pdata); | 389 | mxc_register_device(&mxc_otg_udc_device, &otg_device_pdata); |
392 | 390 | ||
391 | imx35_add_flexcan1(NULL); | ||
393 | } | 392 | } |
394 | 393 | ||
395 | static void __init pcm043_timer_init(void) | 394 | static void __init pcm043_timer_init(void) |
diff --git a/arch/arm/mach-mx3/mach-qong.c b/arch/arm/mach-mx3/mach-qong.c index e5b5b8323a17..d44ac70222a5 100644 --- a/arch/arm/mach-mx3/mach-qong.c +++ b/arch/arm/mach-mx3/mach-qong.c | |||
@@ -10,10 +10,6 @@ | |||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | 13 | */ |
18 | 14 | ||
19 | #include <linux/types.h> | 15 | #include <linux/types.h> |
@@ -34,9 +30,9 @@ | |||
34 | #include <mach/common.h> | 30 | #include <mach/common.h> |
35 | #include <asm/page.h> | 31 | #include <asm/page.h> |
36 | #include <asm/setup.h> | 32 | #include <asm/setup.h> |
37 | #include <mach/board-qong.h> | ||
38 | #include <mach/imx-uart.h> | ||
39 | #include <mach/iomux-mx3.h> | 33 | #include <mach/iomux-mx3.h> |
34 | |||
35 | #include "devices-imx31.h" | ||
40 | #include "devices.h" | 36 | #include "devices.h" |
41 | 37 | ||
42 | /* FPGA defines */ | 38 | /* FPGA defines */ |
@@ -62,7 +58,7 @@ | |||
62 | * This file contains the board-specific initialization routines. | 58 | * This file contains the board-specific initialization routines. |
63 | */ | 59 | */ |
64 | 60 | ||
65 | static struct imxuart_platform_data uart_pdata = { | 61 | static const struct imxuart_platform_data uart_pdata __initconst = { |
66 | .flags = IMXUART_HAVE_RTSCTS, | 62 | .flags = IMXUART_HAVE_RTSCTS, |
67 | }; | 63 | }; |
68 | 64 | ||
@@ -73,11 +69,11 @@ static int uart_pins[] = { | |||
73 | MX31_PIN_RXD1__RXD1 | 69 | MX31_PIN_RXD1__RXD1 |
74 | }; | 70 | }; |
75 | 71 | ||
76 | static inline void mxc_init_imx_uart(void) | 72 | static inline void __init mxc_init_imx_uart(void) |
77 | { | 73 | { |
78 | mxc_iomux_setup_multiple_pins(uart_pins, ARRAY_SIZE(uart_pins), | 74 | mxc_iomux_setup_multiple_pins(uart_pins, ARRAY_SIZE(uart_pins), |
79 | "uart-0"); | 75 | "uart-0"); |
80 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 76 | imx31_add_imx_uart0(&uart_pdata); |
81 | } | 77 | } |
82 | 78 | ||
83 | static struct resource dnet_resources[] = { | 79 | static struct resource dnet_resources[] = { |
@@ -116,7 +112,7 @@ static struct physmap_flash_data qong_flash_data = { | |||
116 | 112 | ||
117 | static struct resource qong_flash_resource = { | 113 | static struct resource qong_flash_resource = { |
118 | .start = MX31_CS0_BASE_ADDR, | 114 | .start = MX31_CS0_BASE_ADDR, |
119 | .end = MX31_CS0_BASE_ADDR + QONG_NOR_SIZE - 1, | 115 | .end = MX31_CS0_BASE_ADDR + SZ_128M - 1, |
120 | .flags = IORESOURCE_MEM, | 116 | .flags = IORESOURCE_MEM, |
121 | }; | 117 | }; |
122 | 118 | ||
diff --git a/arch/arm/mach-mx3/mm.c b/arch/arm/mach-mx3/mm.c index 6858a4f9806c..20e48c0195c4 100644 --- a/arch/arm/mach-mx3/mm.c +++ b/arch/arm/mach-mx3/mm.c | |||
@@ -14,10 +14,6 @@ | |||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | * GNU General Public License for more details. | 16 | * GNU General Public License for more details. |
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | */ | 17 | */ |
22 | 18 | ||
23 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
@@ -97,9 +93,12 @@ void __init mx35_map_io(void) | |||
97 | } | 93 | } |
98 | #endif | 94 | #endif |
99 | 95 | ||
96 | int imx3x_register_gpios(void); | ||
97 | |||
100 | void __init mx31_init_irq(void) | 98 | void __init mx31_init_irq(void) |
101 | { | 99 | { |
102 | mxc_init_irq(IO_ADDRESS(AVIC_BASE_ADDR)); | 100 | mxc_init_irq(IO_ADDRESS(AVIC_BASE_ADDR)); |
101 | imx3x_register_gpios(); | ||
103 | } | 102 | } |
104 | 103 | ||
105 | void __init mx35_init_irq(void) | 104 | void __init mx35_init_irq(void) |
diff --git a/arch/arm/mach-mx3/mx31lilly-db.c b/arch/arm/mach-mx3/mx31lilly-db.c index 7aebd74a12e8..827fd3c80201 100644 --- a/arch/arm/mach-mx3/mx31lilly-db.c +++ b/arch/arm/mach-mx3/mx31lilly-db.c | |||
@@ -18,10 +18,6 @@ | |||
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
20 | * GNU General Public License for more details. | 20 | * GNU General Public License for more details. |
21 | * | ||
22 | * You should have received a copy of the GNU General Public License | ||
23 | * along with this program; if not, write to the Free Software | ||
24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
25 | */ | 21 | */ |
26 | 22 | ||
27 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
@@ -36,13 +32,13 @@ | |||
36 | 32 | ||
37 | #include <mach/hardware.h> | 33 | #include <mach/hardware.h> |
38 | #include <mach/common.h> | 34 | #include <mach/common.h> |
39 | #include <mach/imx-uart.h> | ||
40 | #include <mach/iomux-mx3.h> | 35 | #include <mach/iomux-mx3.h> |
41 | #include <mach/board-mx31lilly.h> | 36 | #include <mach/board-mx31lilly.h> |
42 | #include <mach/mmc.h> | 37 | #include <mach/mmc.h> |
43 | #include <mach/mx3fb.h> | 38 | #include <mach/mx3fb.h> |
44 | #include <mach/ipu.h> | 39 | #include <mach/ipu.h> |
45 | 40 | ||
41 | #include "devices-imx31.h" | ||
46 | #include "devices.h" | 42 | #include "devices.h" |
47 | 43 | ||
48 | /* | 44 | /* |
@@ -96,7 +92,7 @@ static unsigned int lilly_db_board_pins[] __initdata = { | |||
96 | }; | 92 | }; |
97 | 93 | ||
98 | /* UART */ | 94 | /* UART */ |
99 | static struct imxuart_platform_data uart_pdata __initdata = { | 95 | static const struct imxuart_platform_data uart_pdata __initconst = { |
100 | .flags = IMXUART_HAVE_RTSCTS, | 96 | .flags = IMXUART_HAVE_RTSCTS, |
101 | }; | 97 | }; |
102 | 98 | ||
@@ -217,9 +213,9 @@ void __init mx31lilly_db_init(void) | |||
217 | mxc_iomux_setup_multiple_pins(lilly_db_board_pins, | 213 | mxc_iomux_setup_multiple_pins(lilly_db_board_pins, |
218 | ARRAY_SIZE(lilly_db_board_pins), | 214 | ARRAY_SIZE(lilly_db_board_pins), |
219 | "development board pins"); | 215 | "development board pins"); |
220 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 216 | imx31_add_imx_uart0(&uart_pdata); |
221 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | 217 | imx31_add_imx_uart1(&uart_pdata); |
222 | mxc_register_device(&mxc_uart_device2, &uart_pdata); | 218 | imx31_add_imx_uart2(&uart_pdata); |
223 | mxc_register_device(&mxcsdhc_device0, &mmc_pdata); | 219 | mxc_register_device(&mxcsdhc_device0, &mmc_pdata); |
224 | mx31lilly_init_fb(); | 220 | mx31lilly_init_fb(); |
225 | } | 221 | } |
diff --git a/arch/arm/mach-mx3/mx31lite-db.c b/arch/arm/mach-mx3/mx31lite-db.c index 5f05bfbec380..7b0e74e275ba 100644 --- a/arch/arm/mach-mx3/mx31lite-db.c +++ b/arch/arm/mach-mx3/mx31lite-db.c | |||
@@ -18,10 +18,6 @@ | |||
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
20 | * GNU General Public License for more details. | 20 | * GNU General Public License for more details. |
21 | * | ||
22 | * You should have received a copy of the GNU General Public License | ||
23 | * along with this program; if not, write to the Free Software | ||
24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
25 | */ | 21 | */ |
26 | 22 | ||
27 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
@@ -37,12 +33,11 @@ | |||
37 | 33 | ||
38 | #include <mach/hardware.h> | 34 | #include <mach/hardware.h> |
39 | #include <mach/common.h> | 35 | #include <mach/common.h> |
40 | #include <mach/imx-uart.h> | ||
41 | #include <mach/iomux-mx3.h> | 36 | #include <mach/iomux-mx3.h> |
42 | #include <mach/board-mx31lite.h> | 37 | #include <mach/board-mx31lite.h> |
43 | #include <mach/mmc.h> | 38 | #include <mach/mmc.h> |
44 | #include <mach/spi.h> | ||
45 | 39 | ||
40 | #include "devices-imx31.h" | ||
46 | #include "devices.h" | 41 | #include "devices.h" |
47 | 42 | ||
48 | /* | 43 | /* |
@@ -76,7 +71,7 @@ static unsigned int litekit_db_board_pins[] __initdata = { | |||
76 | }; | 71 | }; |
77 | 72 | ||
78 | /* UART */ | 73 | /* UART */ |
79 | static struct imxuart_platform_data uart_pdata __initdata = { | 74 | static const struct imxuart_platform_data uart_pdata __initconst = { |
80 | .flags = IMXUART_HAVE_RTSCTS, | 75 | .flags = IMXUART_HAVE_RTSCTS, |
81 | }; | 76 | }; |
82 | 77 | ||
@@ -161,7 +156,7 @@ static int spi_internal_chipselect[] = { | |||
161 | MXC_SPI_CS(2), | 156 | MXC_SPI_CS(2), |
162 | }; | 157 | }; |
163 | 158 | ||
164 | static struct spi_imx_master spi0_pdata = { | 159 | static const struct spi_imx_master spi0_pdata __initconst = { |
165 | .chipselect = spi_internal_chipselect, | 160 | .chipselect = spi_internal_chipselect, |
166 | .num_chipselect = ARRAY_SIZE(spi_internal_chipselect), | 161 | .num_chipselect = ARRAY_SIZE(spi_internal_chipselect), |
167 | }; | 162 | }; |
@@ -201,9 +196,9 @@ void __init mx31lite_db_init(void) | |||
201 | mxc_iomux_setup_multiple_pins(litekit_db_board_pins, | 196 | mxc_iomux_setup_multiple_pins(litekit_db_board_pins, |
202 | ARRAY_SIZE(litekit_db_board_pins), | 197 | ARRAY_SIZE(litekit_db_board_pins), |
203 | "development board pins"); | 198 | "development board pins"); |
204 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 199 | imx31_add_imx_uart0(&uart_pdata); |
205 | mxc_register_device(&mxcsdhc_device0, &mmc_pdata); | 200 | mxc_register_device(&mxcsdhc_device0, &mmc_pdata); |
206 | mxc_register_device(&mxc_spi_device0, &spi0_pdata); | 201 | imx31_add_spi_imx0(&spi0_pdata); |
207 | platform_device_register(&litekit_led_device); | 202 | platform_device_register(&litekit_led_device); |
208 | mxc_register_device(&imx_wdt_device0, NULL); | 203 | mxc_register_device(&imx_wdt_device0, NULL); |
209 | mxc_register_device(&imx_rtc_device0, NULL); | 204 | mxc_register_device(&imx_rtc_device0, NULL); |
diff --git a/arch/arm/mach-mx3/mx31moboard-devboard.c b/arch/arm/mach-mx3/mx31moboard-devboard.c index 582299cb2c08..fc395a7a8599 100644 --- a/arch/arm/mach-mx3/mx31moboard-devboard.c +++ b/arch/arm/mach-mx3/mx31moboard-devboard.c | |||
@@ -10,10 +10,6 @@ | |||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | 13 | */ |
18 | 14 | ||
19 | #include <linux/gpio.h> | 15 | #include <linux/gpio.h> |
@@ -27,13 +23,13 @@ | |||
27 | #include <linux/usb/otg.h> | 23 | #include <linux/usb/otg.h> |
28 | 24 | ||
29 | #include <mach/common.h> | 25 | #include <mach/common.h> |
30 | #include <mach/imx-uart.h> | ||
31 | #include <mach/iomux-mx3.h> | 26 | #include <mach/iomux-mx3.h> |
32 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
33 | #include <mach/mmc.h> | 28 | #include <mach/mmc.h> |
34 | #include <mach/mxc_ehci.h> | 29 | #include <mach/mxc_ehci.h> |
35 | #include <mach/ulpi.h> | 30 | #include <mach/ulpi.h> |
36 | 31 | ||
32 | #include "devices-imx31.h" | ||
37 | #include "devices.h" | 33 | #include "devices.h" |
38 | 34 | ||
39 | static unsigned int devboard_pins[] = { | 35 | static unsigned int devboard_pins[] = { |
@@ -56,7 +52,7 @@ static unsigned int devboard_pins[] = { | |||
56 | MX31_PIN_RI_DCE1__GPIO2_10, MX31_PIN_DCD_DCE1__GPIO2_11, | 52 | MX31_PIN_RI_DCE1__GPIO2_10, MX31_PIN_DCD_DCE1__GPIO2_11, |
57 | }; | 53 | }; |
58 | 54 | ||
59 | static struct imxuart_platform_data uart_pdata = { | 55 | static const struct imxuart_platform_data uart_pdata __initconst = { |
60 | .flags = IMXUART_HAVE_RTSCTS, | 56 | .flags = IMXUART_HAVE_RTSCTS, |
61 | }; | 57 | }; |
62 | 58 | ||
@@ -230,7 +226,7 @@ void __init mx31moboard_devboard_init(void) | |||
230 | mxc_iomux_setup_multiple_pins(devboard_pins, ARRAY_SIZE(devboard_pins), | 226 | mxc_iomux_setup_multiple_pins(devboard_pins, ARRAY_SIZE(devboard_pins), |
231 | "devboard"); | 227 | "devboard"); |
232 | 228 | ||
233 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | 229 | imx31_add_imx_uart1(&uart_pdata); |
234 | 230 | ||
235 | mxc_register_device(&mxcsdhc_device1, &sdhc2_pdata); | 231 | mxc_register_device(&mxcsdhc_device1, &sdhc2_pdata); |
236 | 232 | ||
diff --git a/arch/arm/mach-mx3/mx31moboard-marxbot.c b/arch/arm/mach-mx3/mx31moboard-marxbot.c index 4930f8c27e66..0551eb39d97e 100644 --- a/arch/arm/mach-mx3/mx31moboard-marxbot.c +++ b/arch/arm/mach-mx3/mx31moboard-marxbot.c | |||
@@ -10,10 +10,6 @@ | |||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | 13 | */ |
18 | 14 | ||
19 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
diff --git a/arch/arm/mach-mx3/mx31moboard-smartbot.c b/arch/arm/mach-mx3/mx31moboard-smartbot.c index 293eea6d9d97..40c3e7564cb6 100644 --- a/arch/arm/mach-mx3/mx31moboard-smartbot.c +++ b/arch/arm/mach-mx3/mx31moboard-smartbot.c | |||
@@ -10,10 +10,6 @@ | |||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | 13 | */ |
18 | 14 | ||
19 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
@@ -30,7 +26,6 @@ | |||
30 | 26 | ||
31 | #include <mach/common.h> | 27 | #include <mach/common.h> |
32 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
33 | #include <mach/imx-uart.h> | ||
34 | #include <mach/iomux-mx3.h> | 29 | #include <mach/iomux-mx3.h> |
35 | #include <mach/board-mx31moboard.h> | 30 | #include <mach/board-mx31moboard.h> |
36 | #include <mach/mxc_ehci.h> | 31 | #include <mach/mxc_ehci.h> |
@@ -38,6 +33,7 @@ | |||
38 | 33 | ||
39 | #include <media/soc_camera.h> | 34 | #include <media/soc_camera.h> |
40 | 35 | ||
36 | #include "devices-imx31.h" | ||
41 | #include "devices.h" | 37 | #include "devices.h" |
42 | 38 | ||
43 | static unsigned int smartbot_pins[] = { | 39 | static unsigned int smartbot_pins[] = { |
@@ -59,7 +55,7 @@ static unsigned int smartbot_pins[] = { | |||
59 | MX31_PIN_RI_DCE1__GPIO2_10, MX31_PIN_DCD_DCE1__GPIO2_11, | 55 | MX31_PIN_RI_DCE1__GPIO2_10, MX31_PIN_DCD_DCE1__GPIO2_11, |
60 | }; | 56 | }; |
61 | 57 | ||
62 | static struct imxuart_platform_data uart_pdata = { | 58 | static const struct imxuart_platform_data uart_pdata __initconst = { |
63 | .flags = IMXUART_HAVE_RTSCTS, | 59 | .flags = IMXUART_HAVE_RTSCTS, |
64 | }; | 60 | }; |
65 | 61 | ||
@@ -183,8 +179,7 @@ void __init mx31moboard_smartbot_init(int board) | |||
183 | mxc_iomux_setup_multiple_pins(smartbot_pins, ARRAY_SIZE(smartbot_pins), | 179 | mxc_iomux_setup_multiple_pins(smartbot_pins, ARRAY_SIZE(smartbot_pins), |
184 | "smartbot"); | 180 | "smartbot"); |
185 | 181 | ||
186 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | 182 | imx31_add_imx_uart1(&uart_pdata); |
187 | |||
188 | 183 | ||
189 | switch (board) { | 184 | switch (board) { |
190 | case MX31SMARTBOT: | 185 | case MX31SMARTBOT: |
diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig index 1576d51e676c..0848db5dd364 100644 --- a/arch/arm/mach-mx5/Kconfig +++ b/arch/arm/mach-mx5/Kconfig | |||
@@ -15,4 +15,31 @@ config MACH_MX51_BABBAGE | |||
15 | u-boot. This includes specific configurations for the board and its | 15 | u-boot. This includes specific configurations for the board and its |
16 | peripherals. | 16 | peripherals. |
17 | 17 | ||
18 | config MACH_MX51_3DS | ||
19 | bool "Support MX51PDK (3DS)" | ||
20 | select MXC_DEBUG_BOARD | ||
21 | help | ||
22 | Include support for MX51PDK (3DS) platform. This includes specific | ||
23 | configurations for the board and its peripherals. | ||
24 | |||
25 | config MACH_EUKREA_CPUIMX51 | ||
26 | bool "Support Eukrea CPUIMX51 module" | ||
27 | help | ||
28 | Include support for Eukrea CPUIMX51 platform. This includes | ||
29 | specific configurations for the module and its peripherals. | ||
30 | |||
31 | choice | ||
32 | prompt "Baseboard" | ||
33 | depends on MACH_EUKREA_CPUIMX51 | ||
34 | default MACH_EUKREA_MBIMX51_BASEBOARD | ||
35 | |||
36 | config MACH_EUKREA_MBIMX51_BASEBOARD | ||
37 | prompt "Eukrea MBIMX51 development board" | ||
38 | bool | ||
39 | help | ||
40 | This adds board specific devices that can be found on Eukrea's | ||
41 | MBIMX51 evaluation board. | ||
42 | |||
43 | endchoice | ||
44 | |||
18 | endif | 45 | endif |
diff --git a/arch/arm/mach-mx5/Makefile b/arch/arm/mach-mx5/Makefile index bf23f869ef51..86c66e7f52f3 100644 --- a/arch/arm/mach-mx5/Makefile +++ b/arch/arm/mach-mx5/Makefile | |||
@@ -6,4 +6,6 @@ | |||
6 | obj-y := cpu.o mm.o clock-mx51.o devices.o | 6 | obj-y := cpu.o mm.o clock-mx51.o devices.o |
7 | 7 | ||
8 | obj-$(CONFIG_MACH_MX51_BABBAGE) += board-mx51_babbage.o | 8 | obj-$(CONFIG_MACH_MX51_BABBAGE) += board-mx51_babbage.o |
9 | 9 | obj-$(CONFIG_MACH_MX51_3DS) += board-mx51_3ds.o | |
10 | obj-$(CONFIG_MACH_EUKREA_CPUIMX51) += board-cpuimx51.o | ||
11 | obj-$(CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD) += eukrea_mbimx51-baseboard.o | ||
diff --git a/arch/arm/mach-mx5/board-cpuimx51.c b/arch/arm/mach-mx5/board-cpuimx51.c new file mode 100644 index 000000000000..623607a20f57 --- /dev/null +++ b/arch/arm/mach-mx5/board-cpuimx51.c | |||
@@ -0,0 +1,293 @@ | |||
1 | /* | ||
2 | * | ||
3 | * Copyright (C) 2010 Eric Bénard <eric@eukrea.com> | ||
4 | * | ||
5 | * based on board-mx51_babbage.c which is | ||
6 | * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved. | ||
7 | * Copyright (C) 2009-2010 Amit Kucheria <amit.kucheria@canonical.com> | ||
8 | * | ||
9 | * The code contained herein is licensed under the GNU General Public | ||
10 | * License. You may obtain a copy of the GNU General Public License | ||
11 | * Version 2 or later at the following locations: | ||
12 | * | ||
13 | * http://www.opensource.org/licenses/gpl-license.html | ||
14 | * http://www.gnu.org/copyleft/gpl.html | ||
15 | */ | ||
16 | |||
17 | #include <linux/init.h> | ||
18 | #include <linux/platform_device.h> | ||
19 | #include <linux/serial_8250.h> | ||
20 | #include <linux/i2c.h> | ||
21 | #include <linux/gpio.h> | ||
22 | #include <linux/delay.h> | ||
23 | #include <linux/io.h> | ||
24 | #include <linux/interrupt.h> | ||
25 | #include <linux/irq.h> | ||
26 | #include <linux/fsl_devices.h> | ||
27 | |||
28 | #include <mach/eukrea-baseboards.h> | ||
29 | #include <mach/common.h> | ||
30 | #include <mach/hardware.h> | ||
31 | #include <mach/imx-uart.h> | ||
32 | #include <mach/iomux-mx51.h> | ||
33 | #include <mach/i2c.h> | ||
34 | #include <mach/mxc_ehci.h> | ||
35 | |||
36 | #include <asm/irq.h> | ||
37 | #include <asm/setup.h> | ||
38 | #include <asm/mach-types.h> | ||
39 | #include <asm/mach/arch.h> | ||
40 | #include <asm/mach/time.h> | ||
41 | |||
42 | #include "devices.h" | ||
43 | |||
44 | #define CPUIMX51_USBH1_STP (0*32 + 27) | ||
45 | #define CPUIMX51_QUARTA_GPIO (2*32 + 28) | ||
46 | #define CPUIMX51_QUARTB_GPIO (2*32 + 25) | ||
47 | #define CPUIMX51_QUARTC_GPIO (2*32 + 26) | ||
48 | #define CPUIMX51_QUARTD_GPIO (2*32 + 27) | ||
49 | #define CPUIMX51_QUARTA_IRQ (MXC_INTERNAL_IRQS + CPUIMX51_QUARTA_GPIO) | ||
50 | #define CPUIMX51_QUARTB_IRQ (MXC_INTERNAL_IRQS + CPUIMX51_QUARTB_GPIO) | ||
51 | #define CPUIMX51_QUARTC_IRQ (MXC_INTERNAL_IRQS + CPUIMX51_QUARTC_GPIO) | ||
52 | #define CPUIMX51_QUARTD_IRQ (MXC_INTERNAL_IRQS + CPUIMX51_QUARTD_GPIO) | ||
53 | #define CPUIMX51_QUART_XTAL 14745600 | ||
54 | #define CPUIMX51_QUART_REGSHIFT 17 | ||
55 | |||
56 | /* USB_CTRL_1 */ | ||
57 | #define MX51_USB_CTRL_1_OFFSET 0x10 | ||
58 | #define MX51_USB_CTRL_UH1_EXT_CLK_EN (1 << 25) | ||
59 | |||
60 | #define MX51_USB_PLLDIV_12_MHZ 0x00 | ||
61 | #define MX51_USB_PLL_DIV_19_2_MHZ 0x01 | ||
62 | #define MX51_USB_PLL_DIV_24_MHZ 0x02 | ||
63 | |||
64 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) | ||
65 | static struct plat_serial8250_port serial_platform_data[] = { | ||
66 | { | ||
67 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x400000), | ||
68 | .irq = CPUIMX51_QUARTA_IRQ, | ||
69 | .irqflags = IRQF_TRIGGER_HIGH, | ||
70 | .uartclk = CPUIMX51_QUART_XTAL, | ||
71 | .regshift = CPUIMX51_QUART_REGSHIFT, | ||
72 | .iotype = UPIO_MEM, | ||
73 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, | ||
74 | }, { | ||
75 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x800000), | ||
76 | .irq = CPUIMX51_QUARTB_IRQ, | ||
77 | .irqflags = IRQF_TRIGGER_HIGH, | ||
78 | .uartclk = CPUIMX51_QUART_XTAL, | ||
79 | .regshift = CPUIMX51_QUART_REGSHIFT, | ||
80 | .iotype = UPIO_MEM, | ||
81 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, | ||
82 | }, { | ||
83 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x1000000), | ||
84 | .irq = CPUIMX51_QUARTC_IRQ, | ||
85 | .irqflags = IRQF_TRIGGER_HIGH, | ||
86 | .uartclk = CPUIMX51_QUART_XTAL, | ||
87 | .regshift = CPUIMX51_QUART_REGSHIFT, | ||
88 | .iotype = UPIO_MEM, | ||
89 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, | ||
90 | }, { | ||
91 | .mapbase = (unsigned long)(MX51_CS1_BASE_ADDR + 0x2000000), | ||
92 | .irq = CPUIMX51_QUARTD_IRQ, | ||
93 | .irqflags = IRQF_TRIGGER_HIGH, | ||
94 | .uartclk = CPUIMX51_QUART_XTAL, | ||
95 | .regshift = CPUIMX51_QUART_REGSHIFT, | ||
96 | .iotype = UPIO_MEM, | ||
97 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP, | ||
98 | }, { | ||
99 | } | ||
100 | }; | ||
101 | |||
102 | static struct platform_device serial_device = { | ||
103 | .name = "serial8250", | ||
104 | .id = 0, | ||
105 | .dev = { | ||
106 | .platform_data = serial_platform_data, | ||
107 | }, | ||
108 | }; | ||
109 | #endif | ||
110 | |||
111 | static struct platform_device *devices[] __initdata = { | ||
112 | &mxc_fec_device, | ||
113 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) | ||
114 | &serial_device, | ||
115 | #endif | ||
116 | }; | ||
117 | |||
118 | static struct pad_desc eukrea_cpuimx51_pads[] = { | ||
119 | /* UART1 */ | ||
120 | MX51_PAD_UART1_RXD__UART1_RXD, | ||
121 | MX51_PAD_UART1_TXD__UART1_TXD, | ||
122 | MX51_PAD_UART1_RTS__UART1_RTS, | ||
123 | MX51_PAD_UART1_CTS__UART1_CTS, | ||
124 | |||
125 | /* I2C2 */ | ||
126 | MX51_PAD_GPIO_1_2__I2C2_SCL, | ||
127 | MX51_PAD_GPIO_1_3__I2C2_SDA, | ||
128 | MX51_PAD_NANDF_D10__GPIO_3_30, | ||
129 | |||
130 | /* QUART IRQ */ | ||
131 | MX51_PAD_NANDF_D15__GPIO_3_25, | ||
132 | MX51_PAD_NANDF_D14__GPIO_3_26, | ||
133 | MX51_PAD_NANDF_D13__GPIO_3_27, | ||
134 | MX51_PAD_NANDF_D12__GPIO_3_28, | ||
135 | |||
136 | /* USB HOST1 */ | ||
137 | MX51_PAD_USBH1_CLK__USBH1_CLK, | ||
138 | MX51_PAD_USBH1_DIR__USBH1_DIR, | ||
139 | MX51_PAD_USBH1_NXT__USBH1_NXT, | ||
140 | MX51_PAD_USBH1_DATA0__USBH1_DATA0, | ||
141 | MX51_PAD_USBH1_DATA1__USBH1_DATA1, | ||
142 | MX51_PAD_USBH1_DATA2__USBH1_DATA2, | ||
143 | MX51_PAD_USBH1_DATA3__USBH1_DATA3, | ||
144 | MX51_PAD_USBH1_DATA4__USBH1_DATA4, | ||
145 | MX51_PAD_USBH1_DATA5__USBH1_DATA5, | ||
146 | MX51_PAD_USBH1_DATA6__USBH1_DATA6, | ||
147 | MX51_PAD_USBH1_DATA7__USBH1_DATA7, | ||
148 | MX51_PAD_USBH1_STP__USBH1_STP, | ||
149 | }; | ||
150 | |||
151 | static struct imxuart_platform_data uart_pdata = { | ||
152 | .flags = IMXUART_HAVE_RTSCTS, | ||
153 | }; | ||
154 | |||
155 | static struct imxi2c_platform_data eukrea_cpuimx51_i2c_data = { | ||
156 | .bitrate = 100000, | ||
157 | }; | ||
158 | |||
159 | static struct i2c_board_info eukrea_cpuimx51_i2c_devices[] = { | ||
160 | { | ||
161 | I2C_BOARD_INFO("pcf8563", 0x51), | ||
162 | }, | ||
163 | }; | ||
164 | |||
165 | /* This function is board specific as the bit mask for the plldiv will also | ||
166 | be different for other Freescale SoCs, thus a common bitmask is not | ||
167 | possible and cannot get place in /plat-mxc/ehci.c.*/ | ||
168 | static int initialize_otg_port(struct platform_device *pdev) | ||
169 | { | ||
170 | u32 v; | ||
171 | void __iomem *usb_base; | ||
172 | void __iomem *usbother_base; | ||
173 | |||
174 | usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); | ||
175 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; | ||
176 | |||
177 | /* Set the PHY clock to 19.2MHz */ | ||
178 | v = __raw_readl(usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET); | ||
179 | v &= ~MX5_USB_UTMI_PHYCTRL1_PLLDIV_MASK; | ||
180 | v |= MX51_USB_PLL_DIV_19_2_MHZ; | ||
181 | __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC2_OFFSET); | ||
182 | iounmap(usb_base); | ||
183 | return 0; | ||
184 | } | ||
185 | |||
186 | static int initialize_usbh1_port(struct platform_device *pdev) | ||
187 | { | ||
188 | u32 v; | ||
189 | void __iomem *usb_base; | ||
190 | void __iomem *usbother_base; | ||
191 | |||
192 | usb_base = ioremap(MX51_OTG_BASE_ADDR, SZ_4K); | ||
193 | usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET; | ||
194 | |||
195 | /* The clock for the USBH1 ULPI port will come externally from the PHY. */ | ||
196 | v = __raw_readl(usbother_base + MX51_USB_CTRL_1_OFFSET); | ||
197 | __raw_writel(v | MX51_USB_CTRL_UH1_EXT_CLK_EN, usbother_base + MX51_USB_CTRL_1_OFFSET); | ||
198 | iounmap(usb_base); | ||
199 | return 0; | ||
200 | } | ||
201 | |||
202 | static struct mxc_usbh_platform_data dr_utmi_config = { | ||
203 | .init = initialize_otg_port, | ||
204 | .portsc = MXC_EHCI_UTMI_16BIT, | ||
205 | .flags = MXC_EHCI_INTERNAL_PHY, | ||
206 | }; | ||
207 | |||
208 | static struct fsl_usb2_platform_data usb_pdata = { | ||
209 | .operating_mode = FSL_USB2_DR_DEVICE, | ||
210 | .phy_mode = FSL_USB2_PHY_UTMI_WIDE, | ||
211 | }; | ||
212 | |||
213 | static struct mxc_usbh_platform_data usbh1_config = { | ||
214 | .init = initialize_usbh1_port, | ||
215 | .portsc = MXC_EHCI_MODE_ULPI, | ||
216 | .flags = (MXC_EHCI_POWER_PINS_ENABLED | MXC_EHCI_ITC_NO_THRESHOLD), | ||
217 | }; | ||
218 | |||
219 | static int otg_mode_host; | ||
220 | |||
221 | static int __init eukrea_cpuimx51_otg_mode(char *options) | ||
222 | { | ||
223 | if (!strcmp(options, "host")) | ||
224 | otg_mode_host = 1; | ||
225 | else if (!strcmp(options, "device")) | ||
226 | otg_mode_host = 0; | ||
227 | else | ||
228 | pr_info("otg_mode neither \"host\" nor \"device\". " | ||
229 | "Defaulting to device\n"); | ||
230 | return 0; | ||
231 | } | ||
232 | __setup("otg_mode=", eukrea_cpuimx51_otg_mode); | ||
233 | |||
234 | /* | ||
235 | * Board specific initialization. | ||
236 | */ | ||
237 | static void __init eukrea_cpuimx51_init(void) | ||
238 | { | ||
239 | mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx51_pads, | ||
240 | ARRAY_SIZE(eukrea_cpuimx51_pads)); | ||
241 | |||
242 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | ||
243 | gpio_request(CPUIMX51_QUARTA_GPIO, "quarta_irq"); | ||
244 | gpio_direction_input(CPUIMX51_QUARTA_GPIO); | ||
245 | gpio_free(CPUIMX51_QUARTA_GPIO); | ||
246 | gpio_request(CPUIMX51_QUARTB_GPIO, "quartb_irq"); | ||
247 | gpio_direction_input(CPUIMX51_QUARTB_GPIO); | ||
248 | gpio_free(CPUIMX51_QUARTB_GPIO); | ||
249 | gpio_request(CPUIMX51_QUARTC_GPIO, "quartc_irq"); | ||
250 | gpio_direction_input(CPUIMX51_QUARTC_GPIO); | ||
251 | gpio_free(CPUIMX51_QUARTC_GPIO); | ||
252 | gpio_request(CPUIMX51_QUARTD_GPIO, "quartd_irq"); | ||
253 | gpio_direction_input(CPUIMX51_QUARTD_GPIO); | ||
254 | gpio_free(CPUIMX51_QUARTD_GPIO); | ||
255 | |||
256 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
257 | |||
258 | mxc_register_device(&mxc_i2c_device1, &eukrea_cpuimx51_i2c_data); | ||
259 | i2c_register_board_info(1, eukrea_cpuimx51_i2c_devices, | ||
260 | ARRAY_SIZE(eukrea_cpuimx51_i2c_devices)); | ||
261 | |||
262 | if (otg_mode_host) | ||
263 | mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config); | ||
264 | else { | ||
265 | initialize_otg_port(NULL); | ||
266 | mxc_register_device(&mxc_usbdr_udc_device, &usb_pdata); | ||
267 | } | ||
268 | mxc_register_device(&mxc_usbh1_device, &usbh1_config); | ||
269 | |||
270 | #ifdef CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD | ||
271 | eukrea_mbimx51_baseboard_init(); | ||
272 | #endif | ||
273 | } | ||
274 | |||
275 | static void __init eukrea_cpuimx51_timer_init(void) | ||
276 | { | ||
277 | mx51_clocks_init(32768, 24000000, 22579200, 0); | ||
278 | } | ||
279 | |||
280 | static struct sys_timer mxc_timer = { | ||
281 | .init = eukrea_cpuimx51_timer_init, | ||
282 | }; | ||
283 | |||
284 | MACHINE_START(EUKREA_CPUIMX51, "Eukrea CPUIMX51 Module") | ||
285 | /* Maintainer: Eric Bénard <eric@eukrea.com> */ | ||
286 | .phys_io = MX51_AIPS1_BASE_ADDR, | ||
287 | .io_pg_offst = ((MX51_AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | ||
288 | .boot_params = PHYS_OFFSET + 0x100, | ||
289 | .map_io = mx51_map_io, | ||
290 | .init_irq = mx51_init_irq, | ||
291 | .init_machine = eukrea_cpuimx51_init, | ||
292 | .timer = &mxc_timer, | ||
293 | MACHINE_END | ||
diff --git a/arch/arm/mach-mx5/board-mx51_3ds.c b/arch/arm/mach-mx5/board-mx51_3ds.c new file mode 100644 index 000000000000..f95c2fd94667 --- /dev/null +++ b/arch/arm/mach-mx5/board-mx51_3ds.c | |||
@@ -0,0 +1,164 @@ | |||
1 | /* | ||
2 | * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright (C) 2010 Jason Wang <jason77.wang@gmail.com> | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/irq.h> | ||
14 | #include <linux/platform_device.h> | ||
15 | #include <linux/input/matrix_keypad.h> | ||
16 | |||
17 | #include <asm/mach-types.h> | ||
18 | #include <asm/mach/arch.h> | ||
19 | #include <asm/mach/time.h> | ||
20 | |||
21 | #include <mach/hardware.h> | ||
22 | #include <mach/common.h> | ||
23 | #include <mach/iomux-mx51.h> | ||
24 | #include <mach/imx-uart.h> | ||
25 | #include <mach/3ds_debugboard.h> | ||
26 | |||
27 | #include "devices.h" | ||
28 | |||
29 | #define EXPIO_PARENT_INT (MXC_INTERNAL_IRQS + GPIO_PORTA + 6) | ||
30 | |||
31 | static struct pad_desc mx51_3ds_pads[] = { | ||
32 | /* UART1 */ | ||
33 | MX51_PAD_UART1_RXD__UART1_RXD, | ||
34 | MX51_PAD_UART1_TXD__UART1_TXD, | ||
35 | MX51_PAD_UART1_RTS__UART1_RTS, | ||
36 | MX51_PAD_UART1_CTS__UART1_CTS, | ||
37 | |||
38 | /* UART2 */ | ||
39 | MX51_PAD_UART2_RXD__UART2_RXD, | ||
40 | MX51_PAD_UART2_TXD__UART2_TXD, | ||
41 | MX51_PAD_EIM_D25__UART2_CTS, | ||
42 | MX51_PAD_EIM_D26__UART2_RTS, | ||
43 | |||
44 | /* UART3 */ | ||
45 | MX51_PAD_UART3_RXD__UART3_RXD, | ||
46 | MX51_PAD_UART3_TXD__UART3_TXD, | ||
47 | MX51_PAD_EIM_D24__UART3_CTS, | ||
48 | MX51_PAD_EIM_D27__UART3_RTS, | ||
49 | |||
50 | /* CPLD PARENT IRQ PIN */ | ||
51 | MX51_PAD_GPIO_1_6__GPIO_1_6, | ||
52 | |||
53 | /* KPP */ | ||
54 | MX51_PAD_KEY_ROW0__KEY_ROW0, | ||
55 | MX51_PAD_KEY_ROW1__KEY_ROW1, | ||
56 | MX51_PAD_KEY_ROW2__KEY_ROW2, | ||
57 | MX51_PAD_KEY_ROW3__KEY_ROW3, | ||
58 | MX51_PAD_KEY_COL0__KEY_COL0, | ||
59 | MX51_PAD_KEY_COL1__KEY_COL1, | ||
60 | MX51_PAD_KEY_COL2__KEY_COL2, | ||
61 | MX51_PAD_KEY_COL3__KEY_COL3, | ||
62 | MX51_PAD_KEY_COL4__KEY_COL4, | ||
63 | MX51_PAD_KEY_COL5__KEY_COL5, | ||
64 | }; | ||
65 | |||
66 | /* Serial ports */ | ||
67 | #if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE) | ||
68 | static struct imxuart_platform_data uart_pdata = { | ||
69 | .flags = IMXUART_HAVE_RTSCTS, | ||
70 | }; | ||
71 | |||
72 | static inline void mxc_init_imx_uart(void) | ||
73 | { | ||
74 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | ||
75 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | ||
76 | mxc_register_device(&mxc_uart_device2, &uart_pdata); | ||
77 | } | ||
78 | #else /* !SERIAL_IMX */ | ||
79 | static inline void mxc_init_imx_uart(void) | ||
80 | { | ||
81 | } | ||
82 | #endif /* SERIAL_IMX */ | ||
83 | |||
84 | #if defined(CONFIG_KEYBOARD_IMX) || defined(CONFIG_KEYBOARD_IMX_MODULE) | ||
85 | static int mx51_3ds_board_keymap[] = { | ||
86 | KEY(0, 0, KEY_1), | ||
87 | KEY(0, 1, KEY_2), | ||
88 | KEY(0, 2, KEY_3), | ||
89 | KEY(0, 3, KEY_F1), | ||
90 | KEY(0, 4, KEY_UP), | ||
91 | KEY(0, 5, KEY_F2), | ||
92 | |||
93 | KEY(1, 0, KEY_4), | ||
94 | KEY(1, 1, KEY_5), | ||
95 | KEY(1, 2, KEY_6), | ||
96 | KEY(1, 3, KEY_LEFT), | ||
97 | KEY(1, 4, KEY_SELECT), | ||
98 | KEY(1, 5, KEY_RIGHT), | ||
99 | |||
100 | KEY(2, 0, KEY_7), | ||
101 | KEY(2, 1, KEY_8), | ||
102 | KEY(2, 2, KEY_9), | ||
103 | KEY(2, 3, KEY_F3), | ||
104 | KEY(2, 4, KEY_DOWN), | ||
105 | KEY(2, 5, KEY_F4), | ||
106 | |||
107 | KEY(3, 0, KEY_0), | ||
108 | KEY(3, 1, KEY_OK), | ||
109 | KEY(3, 2, KEY_ESC), | ||
110 | KEY(3, 3, KEY_ENTER), | ||
111 | KEY(3, 4, KEY_MENU), | ||
112 | KEY(3, 5, KEY_BACK) | ||
113 | }; | ||
114 | |||
115 | static struct matrix_keymap_data mx51_3ds_map_data = { | ||
116 | .keymap = mx51_3ds_board_keymap, | ||
117 | .keymap_size = ARRAY_SIZE(mx51_3ds_board_keymap), | ||
118 | }; | ||
119 | |||
120 | static void mxc_init_keypad(void) | ||
121 | { | ||
122 | mxc_register_device(&mxc_keypad_device, &mx51_3ds_map_data); | ||
123 | } | ||
124 | #else | ||
125 | static inline void mxc_init_keypad(void) | ||
126 | { | ||
127 | } | ||
128 | #endif | ||
129 | |||
130 | /* | ||
131 | * Board specific initialization. | ||
132 | */ | ||
133 | static void __init mxc_board_init(void) | ||
134 | { | ||
135 | mxc_iomux_v3_setup_multiple_pads(mx51_3ds_pads, | ||
136 | ARRAY_SIZE(mx51_3ds_pads)); | ||
137 | mxc_init_imx_uart(); | ||
138 | |||
139 | if (mxc_expio_init(MX51_CS5_BASE_ADDR, EXPIO_PARENT_INT)) | ||
140 | printk(KERN_WARNING "Init of the debugboard failed, all " | ||
141 | "devices on the board are unusable.\n"); | ||
142 | |||
143 | mxc_init_keypad(); | ||
144 | } | ||
145 | |||
146 | static void __init mx51_3ds_timer_init(void) | ||
147 | { | ||
148 | mx51_clocks_init(32768, 24000000, 22579200, 0); | ||
149 | } | ||
150 | |||
151 | static struct sys_timer mxc_timer = { | ||
152 | .init = mx51_3ds_timer_init, | ||
153 | }; | ||
154 | |||
155 | MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board") | ||
156 | /* Maintainer: Freescale Semiconductor, Inc. */ | ||
157 | .phys_io = MX51_AIPS1_BASE_ADDR, | ||
158 | .io_pg_offst = ((MX51_AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | ||
159 | .boot_params = PHYS_OFFSET + 0x100, | ||
160 | .map_io = mx51_map_io, | ||
161 | .init_irq = mx51_init_irq, | ||
162 | .init_machine = mxc_board_init, | ||
163 | .timer = &mxc_timer, | ||
164 | MACHINE_END | ||
diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c index ed885f9d7b73..6e384d92e625 100644 --- a/arch/arm/mach-mx5/board-mx51_babbage.c +++ b/arch/arm/mach-mx5/board-mx51_babbage.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/i2c.h> | ||
15 | #include <linux/gpio.h> | 16 | #include <linux/gpio.h> |
16 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
17 | #include <linux/io.h> | 18 | #include <linux/io.h> |
@@ -21,6 +22,7 @@ | |||
21 | #include <mach/hardware.h> | 22 | #include <mach/hardware.h> |
22 | #include <mach/imx-uart.h> | 23 | #include <mach/imx-uart.h> |
23 | #include <mach/iomux-mx51.h> | 24 | #include <mach/iomux-mx51.h> |
25 | #include <mach/i2c.h> | ||
24 | #include <mach/mxc_ehci.h> | 26 | #include <mach/mxc_ehci.h> |
25 | 27 | ||
26 | #include <asm/irq.h> | 28 | #include <asm/irq.h> |
@@ -64,6 +66,18 @@ static struct pad_desc mx51babbage_pads[] = { | |||
64 | MX51_PAD_EIM_D27__UART3_RTS, | 66 | MX51_PAD_EIM_D27__UART3_RTS, |
65 | MX51_PAD_EIM_D24__UART3_CTS, | 67 | MX51_PAD_EIM_D24__UART3_CTS, |
66 | 68 | ||
69 | /* I2C1 */ | ||
70 | MX51_PAD_EIM_D16__I2C1_SDA, | ||
71 | MX51_PAD_EIM_D19__I2C1_SCL, | ||
72 | |||
73 | /* I2C2 */ | ||
74 | MX51_PAD_KEY_COL4__I2C2_SCL, | ||
75 | MX51_PAD_KEY_COL5__I2C2_SDA, | ||
76 | |||
77 | /* HSI2C */ | ||
78 | MX51_PAD_I2C1_CLK__HSI2C_CLK, | ||
79 | MX51_PAD_I2C1_DAT__HSI2C_DAT, | ||
80 | |||
67 | /* USB HOST1 */ | 81 | /* USB HOST1 */ |
68 | MX51_PAD_USBH1_CLK__USBH1_CLK, | 82 | MX51_PAD_USBH1_CLK__USBH1_CLK, |
69 | MX51_PAD_USBH1_DIR__USBH1_DIR, | 83 | MX51_PAD_USBH1_DIR__USBH1_DIR, |
@@ -78,7 +92,7 @@ static struct pad_desc mx51babbage_pads[] = { | |||
78 | MX51_PAD_USBH1_DATA7__USBH1_DATA7, | 92 | MX51_PAD_USBH1_DATA7__USBH1_DATA7, |
79 | 93 | ||
80 | /* USB HUB reset line*/ | 94 | /* USB HUB reset line*/ |
81 | MX51_PAD_GPIO_1_7__GPIO1_7, | 95 | MX51_PAD_GPIO_1_7__GPIO_1_7, |
82 | }; | 96 | }; |
83 | 97 | ||
84 | /* Serial ports */ | 98 | /* Serial ports */ |
@@ -99,6 +113,14 @@ static inline void mxc_init_imx_uart(void) | |||
99 | } | 113 | } |
100 | #endif /* SERIAL_IMX */ | 114 | #endif /* SERIAL_IMX */ |
101 | 115 | ||
116 | static struct imxi2c_platform_data babbage_i2c_data = { | ||
117 | .bitrate = 100000, | ||
118 | }; | ||
119 | |||
120 | static struct imxi2c_platform_data babbage_hsi2c_data = { | ||
121 | .bitrate = 400000, | ||
122 | }; | ||
123 | |||
102 | static int gpio_usbh1_active(void) | 124 | static int gpio_usbh1_active(void) |
103 | { | 125 | { |
104 | struct pad_desc usbh1stp_gpio = MX51_PAD_USBH1_STP__GPIO_1_27; | 126 | struct pad_desc usbh1stp_gpio = MX51_PAD_USBH1_STP__GPIO_1_27; |
@@ -230,6 +252,10 @@ static void __init mxc_board_init(void) | |||
230 | mxc_init_imx_uart(); | 252 | mxc_init_imx_uart(); |
231 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 253 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
232 | 254 | ||
255 | mxc_register_device(&mxc_i2c_device0, &babbage_i2c_data); | ||
256 | mxc_register_device(&mxc_i2c_device1, &babbage_i2c_data); | ||
257 | mxc_register_device(&mxc_hsi2c_device, &babbage_hsi2c_data); | ||
258 | |||
233 | if (otg_mode_host) | 259 | if (otg_mode_host) |
234 | mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config); | 260 | mxc_register_device(&mxc_usbdr_host_device, &dr_utmi_config); |
235 | else { | 261 | else { |
diff --git a/arch/arm/mach-mx5/clock-mx51.c b/arch/arm/mach-mx5/clock-mx51.c index d9f612d3370e..6af69def357f 100644 --- a/arch/arm/mach-mx5/clock-mx51.c +++ b/arch/arm/mach-mx5/clock-mx51.c | |||
@@ -758,6 +758,10 @@ static struct clk gpt_32k_clk = { | |||
758 | .parent = &ckil_clk, | 758 | .parent = &ckil_clk, |
759 | }; | 759 | }; |
760 | 760 | ||
761 | static struct clk kpp_clk = { | ||
762 | .id = 0, | ||
763 | }; | ||
764 | |||
761 | #define DEFINE_CLOCK(name, i, er, es, gr, sr, p, s) \ | 765 | #define DEFINE_CLOCK(name, i, er, es, gr, sr, p, s) \ |
762 | static struct clk name = { \ | 766 | static struct clk name = { \ |
763 | .id = i, \ | 767 | .id = i, \ |
@@ -798,6 +802,14 @@ DEFINE_CLOCK(gpt_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG9_OFFSET, | |||
798 | DEFINE_CLOCK(gpt_ipg_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG10_OFFSET, | 802 | DEFINE_CLOCK(gpt_ipg_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG10_OFFSET, |
799 | NULL, NULL, &ipg_clk, NULL); | 803 | NULL, NULL, &ipg_clk, NULL); |
800 | 804 | ||
805 | /* I2C */ | ||
806 | DEFINE_CLOCK(i2c1_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG9_OFFSET, | ||
807 | NULL, NULL, &ipg_clk, NULL); | ||
808 | DEFINE_CLOCK(i2c2_clk, 1, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG10_OFFSET, | ||
809 | NULL, NULL, &ipg_clk, NULL); | ||
810 | DEFINE_CLOCK(hsi2c_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG11_OFFSET, | ||
811 | NULL, NULL, &ipg_clk, NULL); | ||
812 | |||
801 | /* FEC */ | 813 | /* FEC */ |
802 | DEFINE_CLOCK(fec_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG12_OFFSET, | 814 | DEFINE_CLOCK(fec_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG12_OFFSET, |
803 | NULL, NULL, &ipg_clk, NULL); | 815 | NULL, NULL, &ipg_clk, NULL); |
@@ -815,12 +827,16 @@ static struct clk_lookup lookups[] = { | |||
815 | _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk) | 827 | _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk) |
816 | _REGISTER_CLOCK(NULL, "gpt", gpt_clk) | 828 | _REGISTER_CLOCK(NULL, "gpt", gpt_clk) |
817 | _REGISTER_CLOCK("fec.0", NULL, fec_clk) | 829 | _REGISTER_CLOCK("fec.0", NULL, fec_clk) |
830 | _REGISTER_CLOCK("imx-i2c.0", NULL, i2c1_clk) | ||
831 | _REGISTER_CLOCK("imx-i2c.1", NULL, i2c2_clk) | ||
832 | _REGISTER_CLOCK("imx-i2c.2", NULL, hsi2c_clk) | ||
818 | _REGISTER_CLOCK("mxc-ehci.0", "usb", usboh3_clk) | 833 | _REGISTER_CLOCK("mxc-ehci.0", "usb", usboh3_clk) |
819 | _REGISTER_CLOCK("mxc-ehci.0", "usb_ahb", ahb_clk) | 834 | _REGISTER_CLOCK("mxc-ehci.0", "usb_ahb", ahb_clk) |
820 | _REGISTER_CLOCK("mxc-ehci.1", "usb", usboh3_clk) | 835 | _REGISTER_CLOCK("mxc-ehci.1", "usb", usboh3_clk) |
821 | _REGISTER_CLOCK("mxc-ehci.1", "usb_ahb", ahb_clk) | 836 | _REGISTER_CLOCK("mxc-ehci.1", "usb_ahb", ahb_clk) |
822 | _REGISTER_CLOCK("fsl-usb2-udc", "usb", usboh3_clk) | 837 | _REGISTER_CLOCK("fsl-usb2-udc", "usb", usboh3_clk) |
823 | _REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", ahb_clk) | 838 | _REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", ahb_clk) |
839 | _REGISTER_CLOCK("imx-keypad.0", NULL, kpp_clk) | ||
824 | }; | 840 | }; |
825 | 841 | ||
826 | static void clk_tree_init(void) | 842 | static void clk_tree_init(void) |
diff --git a/arch/arm/mach-mx5/devices.c b/arch/arm/mach-mx5/devices.c index 7130449aacdc..1920ff4963b2 100644 --- a/arch/arm/mach-mx5/devices.c +++ b/arch/arm/mach-mx5/devices.c | |||
@@ -93,6 +93,64 @@ struct platform_device mxc_fec_device = { | |||
93 | .resource = mxc_fec_resources, | 93 | .resource = mxc_fec_resources, |
94 | }; | 94 | }; |
95 | 95 | ||
96 | static struct resource mxc_i2c0_resources[] = { | ||
97 | { | ||
98 | .start = MX51_I2C1_BASE_ADDR, | ||
99 | .end = MX51_I2C1_BASE_ADDR + SZ_4K - 1, | ||
100 | .flags = IORESOURCE_MEM, | ||
101 | }, { | ||
102 | .start = MX51_MXC_INT_I2C1, | ||
103 | .end = MX51_MXC_INT_I2C1, | ||
104 | .flags = IORESOURCE_IRQ, | ||
105 | }, | ||
106 | }; | ||
107 | |||
108 | struct platform_device mxc_i2c_device0 = { | ||
109 | .name = "imx-i2c", | ||
110 | .id = 0, | ||
111 | .num_resources = ARRAY_SIZE(mxc_i2c0_resources), | ||
112 | .resource = mxc_i2c0_resources, | ||
113 | }; | ||
114 | |||
115 | static struct resource mxc_i2c1_resources[] = { | ||
116 | { | ||
117 | .start = MX51_I2C2_BASE_ADDR, | ||
118 | .end = MX51_I2C2_BASE_ADDR + SZ_4K - 1, | ||
119 | .flags = IORESOURCE_MEM, | ||
120 | }, { | ||
121 | .start = MX51_MXC_INT_I2C2, | ||
122 | .end = MX51_MXC_INT_I2C2, | ||
123 | .flags = IORESOURCE_IRQ, | ||
124 | }, | ||
125 | }; | ||
126 | |||
127 | struct platform_device mxc_i2c_device1 = { | ||
128 | .name = "imx-i2c", | ||
129 | .id = 1, | ||
130 | .num_resources = ARRAY_SIZE(mxc_i2c1_resources), | ||
131 | .resource = mxc_i2c1_resources, | ||
132 | }; | ||
133 | |||
134 | static struct resource mxc_hsi2c_resources[] = { | ||
135 | { | ||
136 | .start = MX51_HSI2C_DMA_BASE_ADDR, | ||
137 | .end = MX51_HSI2C_DMA_BASE_ADDR + SZ_16K - 1, | ||
138 | .flags = IORESOURCE_MEM, | ||
139 | }, | ||
140 | { | ||
141 | .start = MX51_MXC_INT_HS_I2C, | ||
142 | .end = MX51_MXC_INT_HS_I2C, | ||
143 | .flags = IORESOURCE_IRQ, | ||
144 | }, | ||
145 | }; | ||
146 | |||
147 | struct platform_device mxc_hsi2c_device = { | ||
148 | .name = "imx-i2c", | ||
149 | .id = 2, | ||
150 | .num_resources = ARRAY_SIZE(mxc_hsi2c_resources), | ||
151 | .resource = mxc_hsi2c_resources | ||
152 | }; | ||
153 | |||
96 | static u64 usb_dma_mask = DMA_BIT_MASK(32); | 154 | static u64 usb_dma_mask = DMA_BIT_MASK(32); |
97 | 155 | ||
98 | static struct resource usbotg_resources[] = { | 156 | static struct resource usbotg_resources[] = { |
@@ -168,34 +226,57 @@ struct platform_device mxc_wdt = { | |||
168 | .resource = mxc_wdt_resources, | 226 | .resource = mxc_wdt_resources, |
169 | }; | 227 | }; |
170 | 228 | ||
229 | static struct resource mxc_kpp_resources[] = { | ||
230 | { | ||
231 | .start = MX51_MXC_INT_KPP, | ||
232 | .end = MX51_MXC_INT_KPP, | ||
233 | .flags = IORESOURCE_IRQ, | ||
234 | } , { | ||
235 | .start = MX51_KPP_BASE_ADDR, | ||
236 | .end = MX51_KPP_BASE_ADDR + 0x8 - 1, | ||
237 | .flags = IORESOURCE_MEM, | ||
238 | }, | ||
239 | }; | ||
240 | |||
241 | struct platform_device mxc_keypad_device = { | ||
242 | .name = "imx-keypad", | ||
243 | .id = 0, | ||
244 | .num_resources = ARRAY_SIZE(mxc_kpp_resources), | ||
245 | .resource = mxc_kpp_resources, | ||
246 | }; | ||
247 | |||
171 | static struct mxc_gpio_port mxc_gpio_ports[] = { | 248 | static struct mxc_gpio_port mxc_gpio_ports[] = { |
172 | { | 249 | { |
173 | .chip.label = "gpio-0", | 250 | .chip.label = "gpio-0", |
174 | .base = MX51_IO_ADDRESS(MX51_GPIO1_BASE_ADDR), | 251 | .base = MX51_IO_ADDRESS(MX51_GPIO1_BASE_ADDR), |
175 | .irq = MX51_MXC_INT_GPIO1_LOW, | 252 | .irq = MX51_MXC_INT_GPIO1_LOW, |
253 | .irq_high = MX51_MXC_INT_GPIO1_HIGH, | ||
176 | .virtual_irq_start = MXC_GPIO_IRQ_START | 254 | .virtual_irq_start = MXC_GPIO_IRQ_START |
177 | }, | 255 | }, |
178 | { | 256 | { |
179 | .chip.label = "gpio-1", | 257 | .chip.label = "gpio-1", |
180 | .base = MX51_IO_ADDRESS(MX51_GPIO2_BASE_ADDR), | 258 | .base = MX51_IO_ADDRESS(MX51_GPIO2_BASE_ADDR), |
181 | .irq = MX51_MXC_INT_GPIO2_LOW, | 259 | .irq = MX51_MXC_INT_GPIO2_LOW, |
260 | .irq_high = MX51_MXC_INT_GPIO2_HIGH, | ||
182 | .virtual_irq_start = MXC_GPIO_IRQ_START + 32 * 1 | 261 | .virtual_irq_start = MXC_GPIO_IRQ_START + 32 * 1 |
183 | }, | 262 | }, |
184 | { | 263 | { |
185 | .chip.label = "gpio-2", | 264 | .chip.label = "gpio-2", |
186 | .base = MX51_IO_ADDRESS(MX51_GPIO3_BASE_ADDR), | 265 | .base = MX51_IO_ADDRESS(MX51_GPIO3_BASE_ADDR), |
187 | .irq = MX51_MXC_INT_GPIO3_LOW, | 266 | .irq = MX51_MXC_INT_GPIO3_LOW, |
267 | .irq_high = MX51_MXC_INT_GPIO3_HIGH, | ||
188 | .virtual_irq_start = MXC_GPIO_IRQ_START + 32 * 2 | 268 | .virtual_irq_start = MXC_GPIO_IRQ_START + 32 * 2 |
189 | }, | 269 | }, |
190 | { | 270 | { |
191 | .chip.label = "gpio-3", | 271 | .chip.label = "gpio-3", |
192 | .base = MX51_IO_ADDRESS(MX51_GPIO4_BASE_ADDR), | 272 | .base = MX51_IO_ADDRESS(MX51_GPIO4_BASE_ADDR), |
193 | .irq = MX51_MXC_INT_GPIO4_LOW, | 273 | .irq = MX51_MXC_INT_GPIO4_LOW, |
274 | .irq_high = MX51_MXC_INT_GPIO4_HIGH, | ||
194 | .virtual_irq_start = MXC_GPIO_IRQ_START + 32 * 3 | 275 | .virtual_irq_start = MXC_GPIO_IRQ_START + 32 * 3 |
195 | }, | 276 | }, |
196 | }; | 277 | }; |
197 | 278 | ||
198 | int __init mxc_register_gpios(void) | 279 | int __init imx51_register_gpios(void) |
199 | { | 280 | { |
200 | return mxc_gpio_init(mxc_gpio_ports, ARRAY_SIZE(mxc_gpio_ports)); | 281 | return mxc_gpio_init(mxc_gpio_ports, ARRAY_SIZE(mxc_gpio_ports)); |
201 | } | 282 | } |
diff --git a/arch/arm/mach-mx5/devices.h b/arch/arm/mach-mx5/devices.h index c879ae71cd5b..e509cfaad1d4 100644 --- a/arch/arm/mach-mx5/devices.h +++ b/arch/arm/mach-mx5/devices.h | |||
@@ -6,3 +6,7 @@ extern struct platform_device mxc_usbdr_host_device; | |||
6 | extern struct platform_device mxc_usbh1_device; | 6 | extern struct platform_device mxc_usbh1_device; |
7 | extern struct platform_device mxc_usbdr_udc_device; | 7 | extern struct platform_device mxc_usbdr_udc_device; |
8 | extern struct platform_device mxc_wdt; | 8 | extern struct platform_device mxc_wdt; |
9 | extern struct platform_device mxc_i2c_device0; | ||
10 | extern struct platform_device mxc_i2c_device1; | ||
11 | extern struct platform_device mxc_hsi2c_device; | ||
12 | extern struct platform_device mxc_keypad_device; | ||
diff --git a/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c b/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c new file mode 100644 index 000000000000..ffa93d1d6ef8 --- /dev/null +++ b/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c | |||
@@ -0,0 +1,200 @@ | |||
1 | /* | ||
2 | * | ||
3 | * Copyright (C) 2010 Eric Bénard <eric@eukrea.com> | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/init.h> | ||
14 | #include <linux/platform_device.h> | ||
15 | #include <linux/serial_8250.h> | ||
16 | #include <linux/i2c.h> | ||
17 | #include <linux/gpio.h> | ||
18 | #include <linux/io.h> | ||
19 | #include <linux/interrupt.h> | ||
20 | #include <linux/irq.h> | ||
21 | #include <linux/fsl_devices.h> | ||
22 | #include <linux/i2c/tsc2007.h> | ||
23 | #include <linux/leds.h> | ||
24 | #include <linux/input/matrix_keypad.h> | ||
25 | |||
26 | #include <mach/common.h> | ||
27 | #include <mach/hardware.h> | ||
28 | #include <mach/imx-uart.h> | ||
29 | #include <mach/iomux-mx51.h> | ||
30 | |||
31 | #include <asm/mach/arch.h> | ||
32 | |||
33 | #include "devices.h" | ||
34 | |||
35 | #define MBIMX51_TSC2007_GPIO (2*32 + 30) | ||
36 | #define MBIMX51_TSC2007_IRQ (MXC_INTERNAL_IRQS + MBIMX51_TSC2007_GPIO) | ||
37 | #define MBIMX51_LED0 (2*32 + 5) | ||
38 | #define MBIMX51_LED1 (2*32 + 6) | ||
39 | #define MBIMX51_LED2 (2*32 + 7) | ||
40 | #define MBIMX51_LED3 (2*32 + 8) | ||
41 | |||
42 | static struct gpio_led mbimx51_leds[] = { | ||
43 | { | ||
44 | .name = "led0", | ||
45 | .default_trigger = "heartbeat", | ||
46 | .active_low = 1, | ||
47 | .gpio = MBIMX51_LED0, | ||
48 | }, | ||
49 | { | ||
50 | .name = "led1", | ||
51 | .default_trigger = "nand-disk", | ||
52 | .active_low = 1, | ||
53 | .gpio = MBIMX51_LED1, | ||
54 | }, | ||
55 | { | ||
56 | .name = "led2", | ||
57 | .default_trigger = "mmc0", | ||
58 | .active_low = 1, | ||
59 | .gpio = MBIMX51_LED2, | ||
60 | }, | ||
61 | { | ||
62 | .name = "led3", | ||
63 | .default_trigger = "default-on", | ||
64 | .active_low = 1, | ||
65 | .gpio = MBIMX51_LED3, | ||
66 | }, | ||
67 | }; | ||
68 | |||
69 | static struct gpio_led_platform_data mbimx51_leds_info = { | ||
70 | .leds = mbimx51_leds, | ||
71 | .num_leds = ARRAY_SIZE(mbimx51_leds), | ||
72 | }; | ||
73 | |||
74 | static struct platform_device mbimx51_leds_gpio = { | ||
75 | .name = "leds-gpio", | ||
76 | .id = -1, | ||
77 | .dev = { | ||
78 | .platform_data = &mbimx51_leds_info, | ||
79 | }, | ||
80 | }; | ||
81 | |||
82 | static struct platform_device *devices[] __initdata = { | ||
83 | &mbimx51_leds_gpio, | ||
84 | }; | ||
85 | |||
86 | static struct pad_desc mbimx51_pads[] = { | ||
87 | /* UART2 */ | ||
88 | MX51_PAD_UART2_RXD__UART2_RXD, | ||
89 | MX51_PAD_UART2_TXD__UART2_TXD, | ||
90 | |||
91 | /* UART3 */ | ||
92 | MX51_PAD_UART3_RXD__UART3_RXD, | ||
93 | MX51_PAD_UART3_TXD__UART3_TXD, | ||
94 | MX51_PAD_KEY_COL4__UART3_RTS, | ||
95 | MX51_PAD_KEY_COL5__UART3_CTS, | ||
96 | |||
97 | /* TSC2007 IRQ */ | ||
98 | MX51_PAD_NANDF_D10__GPIO_3_30, | ||
99 | |||
100 | /* LEDS */ | ||
101 | MX51_PAD_DISPB2_SER_DIN__GPIO_3_5, | ||
102 | MX51_PAD_DISPB2_SER_DIO__GPIO_3_6, | ||
103 | MX51_PAD_DISPB2_SER_CLK__GPIO_3_7, | ||
104 | MX51_PAD_DISPB2_SER_RS__GPIO_3_8, | ||
105 | |||
106 | /* KPP */ | ||
107 | MX51_PAD_KEY_ROW0__KEY_ROW0, | ||
108 | MX51_PAD_KEY_ROW1__KEY_ROW1, | ||
109 | MX51_PAD_KEY_ROW2__KEY_ROW2, | ||
110 | MX51_PAD_KEY_ROW3__KEY_ROW3, | ||
111 | MX51_PAD_KEY_COL0__KEY_COL0, | ||
112 | MX51_PAD_KEY_COL1__KEY_COL1, | ||
113 | MX51_PAD_KEY_COL2__KEY_COL2, | ||
114 | MX51_PAD_KEY_COL3__KEY_COL3, | ||
115 | }; | ||
116 | |||
117 | static struct imxuart_platform_data uart_pdata = { | ||
118 | .flags = IMXUART_HAVE_RTSCTS, | ||
119 | }; | ||
120 | |||
121 | static int mbimx51_keymap[] = { | ||
122 | KEY(0, 0, KEY_1), | ||
123 | KEY(0, 1, KEY_2), | ||
124 | KEY(0, 2, KEY_3), | ||
125 | KEY(0, 3, KEY_UP), | ||
126 | |||
127 | KEY(1, 0, KEY_4), | ||
128 | KEY(1, 1, KEY_5), | ||
129 | KEY(1, 2, KEY_6), | ||
130 | KEY(1, 3, KEY_LEFT), | ||
131 | |||
132 | KEY(2, 0, KEY_7), | ||
133 | KEY(2, 1, KEY_8), | ||
134 | KEY(2, 2, KEY_9), | ||
135 | KEY(2, 3, KEY_RIGHT), | ||
136 | |||
137 | KEY(3, 0, KEY_0), | ||
138 | KEY(3, 1, KEY_DOWN), | ||
139 | KEY(3, 2, KEY_ESC), | ||
140 | KEY(3, 3, KEY_ENTER), | ||
141 | }; | ||
142 | |||
143 | static struct matrix_keymap_data mbimx51_map_data = { | ||
144 | .keymap = mbimx51_keymap, | ||
145 | .keymap_size = ARRAY_SIZE(mbimx51_keymap), | ||
146 | }; | ||
147 | |||
148 | static int tsc2007_get_pendown_state(void) | ||
149 | { | ||
150 | return !gpio_get_value(MBIMX51_TSC2007_GPIO); | ||
151 | } | ||
152 | |||
153 | struct tsc2007_platform_data tsc2007_data = { | ||
154 | .model = 2007, | ||
155 | .x_plate_ohms = 180, | ||
156 | .get_pendown_state = tsc2007_get_pendown_state, | ||
157 | }; | ||
158 | |||
159 | static struct i2c_board_info mbimx51_i2c_devices[] = { | ||
160 | { | ||
161 | I2C_BOARD_INFO("tsc2007", 0x48), | ||
162 | .irq = MBIMX51_TSC2007_IRQ, | ||
163 | .platform_data = &tsc2007_data, | ||
164 | }, | ||
165 | }; | ||
166 | |||
167 | /* | ||
168 | * baseboard initialization. | ||
169 | */ | ||
170 | void __init eukrea_mbimx51_baseboard_init(void) | ||
171 | { | ||
172 | mxc_iomux_v3_setup_multiple_pads(mbimx51_pads, | ||
173 | ARRAY_SIZE(mbimx51_pads)); | ||
174 | |||
175 | mxc_register_device(&mxc_uart_device1, NULL); | ||
176 | mxc_register_device(&mxc_uart_device2, &uart_pdata); | ||
177 | |||
178 | gpio_request(MBIMX51_LED0, "LED0"); | ||
179 | gpio_direction_output(MBIMX51_LED0, 1); | ||
180 | gpio_free(MBIMX51_LED0); | ||
181 | gpio_request(MBIMX51_LED1, "LED1"); | ||
182 | gpio_direction_output(MBIMX51_LED1, 1); | ||
183 | gpio_free(MBIMX51_LED1); | ||
184 | gpio_request(MBIMX51_LED2, "LED2"); | ||
185 | gpio_direction_output(MBIMX51_LED2, 1); | ||
186 | gpio_free(MBIMX51_LED2); | ||
187 | gpio_request(MBIMX51_LED3, "LED3"); | ||
188 | gpio_direction_output(MBIMX51_LED3, 1); | ||
189 | gpio_free(MBIMX51_LED3); | ||
190 | |||
191 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
192 | |||
193 | mxc_register_device(&mxc_keypad_device, &mbimx51_map_data); | ||
194 | |||
195 | gpio_request(MBIMX51_TSC2007_GPIO, "tsc2007_irq"); | ||
196 | gpio_direction_input(MBIMX51_TSC2007_GPIO); | ||
197 | set_irq_type(MBIMX51_TSC2007_IRQ, IRQF_TRIGGER_FALLING); | ||
198 | i2c_register_board_info(1, mbimx51_i2c_devices, | ||
199 | ARRAY_SIZE(mbimx51_i2c_devices)); | ||
200 | } | ||
diff --git a/arch/arm/mach-mx5/mm.c b/arch/arm/mach-mx5/mm.c index b7677ef80cc4..bc3f30db8d9a 100644 --- a/arch/arm/mach-mx5/mm.c +++ b/arch/arm/mach-mx5/mm.c | |||
@@ -65,6 +65,8 @@ void __init mx51_map_io(void) | |||
65 | iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc)); | 65 | iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc)); |
66 | } | 66 | } |
67 | 67 | ||
68 | int imx51_register_gpios(void); | ||
69 | |||
68 | void __init mx51_init_irq(void) | 70 | void __init mx51_init_irq(void) |
69 | { | 71 | { |
70 | unsigned long tzic_addr; | 72 | unsigned long tzic_addr; |
@@ -80,4 +82,5 @@ void __init mx51_init_irq(void) | |||
80 | panic("unable to map TZIC interrupt controller\n"); | 82 | panic("unable to map TZIC interrupt controller\n"); |
81 | 83 | ||
82 | tzic_init_irq(tzic_virt); | 84 | tzic_init_irq(tzic_virt); |
85 | imx51_register_gpios(); | ||
83 | } | 86 | } |
diff --git a/arch/arm/mach-mxc91231/crm_regs.h b/arch/arm/mach-mxc91231/crm_regs.h index ce4f59058189..b989baccd675 100644 --- a/arch/arm/mach-mxc91231/crm_regs.h +++ b/arch/arm/mach-mxc91231/crm_regs.h | |||
@@ -11,11 +11,6 @@ | |||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | * GNU General Public License for more details. | 13 | * GNU General Public License for more details. |
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | * | ||
19 | */ | 14 | */ |
20 | 15 | ||
21 | #ifndef _ARCH_ARM_MACH_MXC91231_CRM_REGS_H_ | 16 | #ifndef _ARCH_ARM_MACH_MXC91231_CRM_REGS_H_ |
diff --git a/arch/arm/mach-mxc91231/devices.c b/arch/arm/mach-mxc91231/devices.c index 353bd977b393..027af4f0d18a 100644 --- a/arch/arm/mach-mxc91231/devices.c +++ b/arch/arm/mach-mxc91231/devices.c | |||
@@ -135,7 +135,7 @@ static struct mxc_gpio_port mxc_gpio_ports[] = { | |||
135 | }, | 135 | }, |
136 | }; | 136 | }; |
137 | 137 | ||
138 | int __init mxc_register_gpios(void) | 138 | int __init mxc91231_register_gpios(void) |
139 | { | 139 | { |
140 | return mxc_gpio_init(mxc_gpio_ports, ARRAY_SIZE(mxc_gpio_ports)); | 140 | return mxc_gpio_init(mxc_gpio_ports, ARRAY_SIZE(mxc_gpio_ports)); |
141 | } | 141 | } |
diff --git a/arch/arm/mach-mxc91231/mm.c b/arch/arm/mach-mxc91231/mm.c index 6becda3ff331..aeccfd755fee 100644 --- a/arch/arm/mach-mxc91231/mm.c +++ b/arch/arm/mach-mxc91231/mm.c | |||
@@ -15,11 +15,6 @@ | |||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | * GNU General Public License for more details. | 17 | * GNU General Public License for more details. |
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | * | ||
23 | */ | 18 | */ |
24 | 19 | ||
25 | #include <linux/mm.h> | 20 | #include <linux/mm.h> |
@@ -88,7 +83,10 @@ void __init mxc91231_map_io(void) | |||
88 | iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc)); | 83 | iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc)); |
89 | } | 84 | } |
90 | 85 | ||
86 | int mxc91231_register_gpios(void); | ||
87 | |||
91 | void __init mxc91231_init_irq(void) | 88 | void __init mxc91231_init_irq(void) |
92 | { | 89 | { |
90 | mxc91231_register_gpios(); | ||
93 | mxc_init_irq(MXC91231_IO_ADDRESS(MXC91231_AVIC_BASE_ADDR)); | 91 | mxc_init_irq(MXC91231_IO_ADDRESS(MXC91231_AVIC_BASE_ADDR)); |
94 | } | 92 | } |
diff --git a/arch/arm/plat-mxc/3ds_debugboard.c b/arch/arm/plat-mxc/3ds_debugboard.c new file mode 100644 index 000000000000..639c54a07992 --- /dev/null +++ b/arch/arm/plat-mxc/3ds_debugboard.c | |||
@@ -0,0 +1,202 @@ | |||
1 | /* | ||
2 | * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright (C) 2010 Jason Wang <jason77.wang@gmail.com> | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/interrupt.h> | ||
14 | #include <linux/irq.h> | ||
15 | #include <linux/io.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/gpio.h> | ||
18 | #include <linux/smsc911x.h> | ||
19 | |||
20 | #include <mach/hardware.h> | ||
21 | |||
22 | /* LAN9217 ethernet base address */ | ||
23 | #define LAN9217_BASE_ADDR(n) (n + 0x0) | ||
24 | /* External UART */ | ||
25 | #define UARTA_BASE_ADDR(n) (n + 0x8000) | ||
26 | #define UARTB_BASE_ADDR(n) (n + 0x10000) | ||
27 | |||
28 | #define BOARD_IO_ADDR(n) (n + 0x20000) | ||
29 | /* LED switchs */ | ||
30 | #define LED_SWITCH_REG 0x00 | ||
31 | /* buttons */ | ||
32 | #define SWITCH_BUTTONS_REG 0x08 | ||
33 | /* status, interrupt */ | ||
34 | #define INTR_STATUS_REG 0x10 | ||
35 | #define INTR_MASK_REG 0x38 | ||
36 | #define INTR_RESET_REG 0x20 | ||
37 | /* magic word for debug CPLD */ | ||
38 | #define MAGIC_NUMBER1_REG 0x40 | ||
39 | #define MAGIC_NUMBER2_REG 0x48 | ||
40 | /* CPLD code version */ | ||
41 | #define CPLD_CODE_VER_REG 0x50 | ||
42 | /* magic word for debug CPLD */ | ||
43 | #define MAGIC_NUMBER3_REG 0x58 | ||
44 | /* module reset register*/ | ||
45 | #define MODULE_RESET_REG 0x60 | ||
46 | /* CPU ID and Personality ID */ | ||
47 | #define MCU_BOARD_ID_REG 0x68 | ||
48 | |||
49 | #define MXC_IRQ_TO_EXPIO(irq) ((irq) - MXC_BOARD_IRQ_START) | ||
50 | #define MXC_IRQ_TO_GPIO(irq) ((irq) - MXC_INTERNAL_IRQS) | ||
51 | |||
52 | #define MXC_EXP_IO_BASE (MXC_BOARD_IRQ_START) | ||
53 | #define MXC_MAX_EXP_IO_LINES 16 | ||
54 | |||
55 | /* interrupts like external uart , external ethernet etc*/ | ||
56 | #define EXPIO_INT_ENET (MXC_BOARD_IRQ_START + 0) | ||
57 | #define EXPIO_INT_XUART_A (MXC_BOARD_IRQ_START + 1) | ||
58 | #define EXPIO_INT_XUART_B (MXC_BOARD_IRQ_START + 2) | ||
59 | #define EXPIO_INT_BUTTON_A (MXC_BOARD_IRQ_START + 3) | ||
60 | #define EXPIO_INT_BUTTON_B (MXC_BOARD_IRQ_START + 4) | ||
61 | |||
62 | static void __iomem *brd_io; | ||
63 | static void expio_ack_irq(u32 irq); | ||
64 | |||
65 | static struct resource smsc911x_resources[] = { | ||
66 | { | ||
67 | .flags = IORESOURCE_MEM, | ||
68 | } , { | ||
69 | .start = EXPIO_INT_ENET, | ||
70 | .end = EXPIO_INT_ENET, | ||
71 | .flags = IORESOURCE_IRQ, | ||
72 | }, | ||
73 | }; | ||
74 | |||
75 | static struct smsc911x_platform_config smsc911x_config = { | ||
76 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | ||
77 | .flags = SMSC911X_USE_32BIT | SMSC911X_FORCE_INTERNAL_PHY, | ||
78 | }; | ||
79 | |||
80 | static struct platform_device smsc_lan9217_device = { | ||
81 | .name = "smsc911x", | ||
82 | .id = 0, | ||
83 | .dev = { | ||
84 | .platform_data = &smsc911x_config, | ||
85 | }, | ||
86 | .num_resources = ARRAY_SIZE(smsc911x_resources), | ||
87 | .resource = smsc911x_resources, | ||
88 | }; | ||
89 | |||
90 | static void mxc_expio_irq_handler(u32 irq, struct irq_desc *desc) | ||
91 | { | ||
92 | u32 imr_val; | ||
93 | u32 int_valid; | ||
94 | u32 expio_irq; | ||
95 | |||
96 | desc->chip->mask(irq); /* irq = gpio irq number */ | ||
97 | |||
98 | imr_val = __raw_readw(brd_io + INTR_MASK_REG); | ||
99 | int_valid = __raw_readw(brd_io + INTR_STATUS_REG) & ~imr_val; | ||
100 | |||
101 | expio_irq = MXC_BOARD_IRQ_START; | ||
102 | for (; int_valid != 0; int_valid >>= 1, expio_irq++) { | ||
103 | struct irq_desc *d; | ||
104 | if ((int_valid & 1) == 0) | ||
105 | continue; | ||
106 | d = irq_desc + expio_irq; | ||
107 | if (unlikely(!(d->handle_irq))) | ||
108 | pr_err("\nEXPIO irq: %d unhandled\n", expio_irq); | ||
109 | else | ||
110 | d->handle_irq(expio_irq, d); | ||
111 | } | ||
112 | |||
113 | desc->chip->ack(irq); | ||
114 | desc->chip->unmask(irq); | ||
115 | } | ||
116 | |||
117 | /* | ||
118 | * Disable an expio pin's interrupt by setting the bit in the imr. | ||
119 | * Irq is an expio virtual irq number | ||
120 | */ | ||
121 | static void expio_mask_irq(u32 irq) | ||
122 | { | ||
123 | u16 reg; | ||
124 | u32 expio = MXC_IRQ_TO_EXPIO(irq); | ||
125 | |||
126 | reg = __raw_readw(brd_io + INTR_MASK_REG); | ||
127 | reg |= (1 << expio); | ||
128 | __raw_writew(reg, brd_io + INTR_MASK_REG); | ||
129 | } | ||
130 | |||
131 | static void expio_ack_irq(u32 irq) | ||
132 | { | ||
133 | u32 expio = MXC_IRQ_TO_EXPIO(irq); | ||
134 | |||
135 | __raw_writew(1 << expio, brd_io + INTR_RESET_REG); | ||
136 | __raw_writew(0, brd_io + INTR_RESET_REG); | ||
137 | expio_mask_irq(irq); | ||
138 | } | ||
139 | |||
140 | static void expio_unmask_irq(u32 irq) | ||
141 | { | ||
142 | u16 reg; | ||
143 | u32 expio = MXC_IRQ_TO_EXPIO(irq); | ||
144 | |||
145 | reg = __raw_readw(brd_io + INTR_MASK_REG); | ||
146 | reg &= ~(1 << expio); | ||
147 | __raw_writew(reg, brd_io + INTR_MASK_REG); | ||
148 | } | ||
149 | |||
150 | static struct irq_chip expio_irq_chip = { | ||
151 | .ack = expio_ack_irq, | ||
152 | .mask = expio_mask_irq, | ||
153 | .unmask = expio_unmask_irq, | ||
154 | }; | ||
155 | |||
156 | int __init mxc_expio_init(u32 base, u32 p_irq) | ||
157 | { | ||
158 | int i; | ||
159 | |||
160 | brd_io = ioremap(BOARD_IO_ADDR(base), SZ_4K); | ||
161 | if (brd_io == NULL) | ||
162 | return -ENOMEM; | ||
163 | |||
164 | if ((__raw_readw(brd_io + MAGIC_NUMBER1_REG) != 0xAAAA) || | ||
165 | (__raw_readw(brd_io + MAGIC_NUMBER2_REG) != 0x5555) || | ||
166 | (__raw_readw(brd_io + MAGIC_NUMBER3_REG) != 0xCAFE)) { | ||
167 | pr_info("3-Stack Debug board not detected\n"); | ||
168 | iounmap(brd_io); | ||
169 | brd_io = NULL; | ||
170 | return -ENODEV; | ||
171 | } | ||
172 | |||
173 | pr_info("3-Stack Debug board detected, rev = 0x%04X\n", | ||
174 | readw(brd_io + CPLD_CODE_VER_REG)); | ||
175 | |||
176 | /* | ||
177 | * Configure INT line as GPIO input | ||
178 | */ | ||
179 | gpio_request(MXC_IRQ_TO_GPIO(p_irq), "expio_pirq"); | ||
180 | gpio_direction_input(MXC_IRQ_TO_GPIO(p_irq)); | ||
181 | |||
182 | /* disable the interrupt and clear the status */ | ||
183 | __raw_writew(0, brd_io + INTR_MASK_REG); | ||
184 | __raw_writew(0xFFFF, brd_io + INTR_RESET_REG); | ||
185 | __raw_writew(0, brd_io + INTR_RESET_REG); | ||
186 | __raw_writew(0x1F, brd_io + INTR_MASK_REG); | ||
187 | for (i = MXC_EXP_IO_BASE; | ||
188 | i < (MXC_EXP_IO_BASE + MXC_MAX_EXP_IO_LINES); i++) { | ||
189 | set_irq_chip(i, &expio_irq_chip); | ||
190 | set_irq_handler(i, handle_level_irq); | ||
191 | set_irq_flags(i, IRQF_VALID); | ||
192 | } | ||
193 | set_irq_type(p_irq, IRQF_TRIGGER_LOW); | ||
194 | set_irq_chained_handler(p_irq, mxc_expio_irq_handler); | ||
195 | |||
196 | /* Register Lan device on the debugboard */ | ||
197 | smsc911x_resources[0].start = LAN9217_BASE_ADDR(base); | ||
198 | smsc911x_resources[0].end = LAN9217_BASE_ADDR(base) + 0x100 - 1; | ||
199 | platform_device_register(&smsc_lan9217_device); | ||
200 | |||
201 | return 0; | ||
202 | } | ||
diff --git a/arch/arm/plat-mxc/Kconfig b/arch/arm/plat-mxc/Kconfig index 7f7ad6f289bd..0527e65318f4 100644 --- a/arch/arm/plat-mxc/Kconfig +++ b/arch/arm/plat-mxc/Kconfig | |||
@@ -1,5 +1,7 @@ | |||
1 | if ARCH_MXC | 1 | if ARCH_MXC |
2 | 2 | ||
3 | source "arch/arm/plat-mxc/devices/Kconfig" | ||
4 | |||
3 | menu "Freescale MXC Implementations" | 5 | menu "Freescale MXC Implementations" |
4 | 6 | ||
5 | choice | 7 | choice |
@@ -8,15 +10,12 @@ choice | |||
8 | 10 | ||
9 | config ARCH_MX1 | 11 | config ARCH_MX1 |
10 | bool "MX1-based" | 12 | bool "MX1-based" |
11 | select CPU_ARM920T | 13 | select SOC_IMX1 |
12 | select IMX_HAVE_IOMUX_V1 | ||
13 | help | 14 | help |
14 | This enables support for systems based on the Freescale i.MX1 family | 15 | This enables support for systems based on the Freescale i.MX1 family |
15 | 16 | ||
16 | config ARCH_MX2 | 17 | config ARCH_MX2 |
17 | bool "MX2-based" | 18 | bool "MX2-based" |
18 | select CPU_ARM926T | ||
19 | select IMX_HAVE_IOMUX_V1 | ||
20 | help | 19 | help |
21 | This enables support for systems based on the Freescale i.MX2 family | 20 | This enables support for systems based on the Freescale i.MX2 family |
22 | 21 | ||
@@ -25,6 +24,7 @@ config ARCH_MX25 | |||
25 | select CPU_ARM926T | 24 | select CPU_ARM926T |
26 | select ARCH_MXC_IOMUX_V3 | 25 | select ARCH_MXC_IOMUX_V3 |
27 | select HAVE_FB_IMX | 26 | select HAVE_FB_IMX |
27 | select ARCH_MXC_AUDMUX_V2 | ||
28 | help | 28 | help |
29 | This enables support for systems based on the Freescale i.MX25 family | 29 | This enables support for systems based on the Freescale i.MX25 family |
30 | 30 | ||
@@ -48,8 +48,7 @@ config ARCH_MX5 | |||
48 | 48 | ||
49 | endchoice | 49 | endchoice |
50 | 50 | ||
51 | source "arch/arm/mach-mx1/Kconfig" | 51 | source "arch/arm/mach-imx/Kconfig" |
52 | source "arch/arm/mach-mx2/Kconfig" | ||
53 | source "arch/arm/mach-mx3/Kconfig" | 52 | source "arch/arm/mach-mx3/Kconfig" |
54 | source "arch/arm/mach-mx25/Kconfig" | 53 | source "arch/arm/mach-mx25/Kconfig" |
55 | source "arch/arm/mach-mxc91231/Kconfig" | 54 | source "arch/arm/mach-mxc91231/Kconfig" |
@@ -81,6 +80,17 @@ config MXC_PWM | |||
81 | help | 80 | help |
82 | Enable support for the i.MX PWM controller(s). | 81 | Enable support for the i.MX PWM controller(s). |
83 | 82 | ||
83 | config MXC_DEBUG_BOARD | ||
84 | bool "Enable MXC debug board(for 3-stack)" | ||
85 | help | ||
86 | The debug board is an integral part of the MXC 3-stack(PDK) | ||
87 | platforms, it can be attached or removed from the peripheral | ||
88 | board. On debug board, several debug devices(ethernet, UART, | ||
89 | buttons, LEDs and JTAG) are implemented. Between the MCU and | ||
90 | these devices, a CPLD is added as a bridge which performs | ||
91 | data/address de-multiplexing and decode, signal level shift, | ||
92 | interrupt control and various board functions. | ||
93 | |||
84 | config MXC_ULPI | 94 | config MXC_ULPI |
85 | bool | 95 | bool |
86 | 96 | ||
diff --git a/arch/arm/plat-mxc/Makefile b/arch/arm/plat-mxc/Makefile index 895bc3c5e0c0..78d405ed8616 100644 --- a/arch/arm/plat-mxc/Makefile +++ b/arch/arm/plat-mxc/Makefile | |||
@@ -8,8 +8,6 @@ obj-y := irq.o clock.o gpio.o time.o devices.o cpu.o system.o | |||
8 | # MX51 uses the TZIC interrupt controller, older platforms use AVIC (irq.o) | 8 | # MX51 uses the TZIC interrupt controller, older platforms use AVIC (irq.o) |
9 | obj-$(CONFIG_MXC_TZIC) += tzic.o | 9 | obj-$(CONFIG_MXC_TZIC) += tzic.o |
10 | 10 | ||
11 | obj-$(CONFIG_ARCH_MX1) += dma-mx1-mx2.o | ||
12 | obj-$(CONFIG_ARCH_MX2) += dma-mx1-mx2.o | ||
13 | obj-$(CONFIG_IMX_HAVE_IOMUX_V1) += iomux-v1.o | 11 | obj-$(CONFIG_IMX_HAVE_IOMUX_V1) += iomux-v1.o |
14 | obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o | 12 | obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o |
15 | obj-$(CONFIG_MXC_PWM) += pwm.o | 13 | obj-$(CONFIG_MXC_PWM) += pwm.o |
@@ -17,7 +15,10 @@ obj-$(CONFIG_USB_EHCI_MXC) += ehci.o | |||
17 | obj-$(CONFIG_MXC_ULPI) += ulpi.o | 15 | obj-$(CONFIG_MXC_ULPI) += ulpi.o |
18 | obj-$(CONFIG_ARCH_MXC_AUDMUX_V1) += audmux-v1.o | 16 | obj-$(CONFIG_ARCH_MXC_AUDMUX_V1) += audmux-v1.o |
19 | obj-$(CONFIG_ARCH_MXC_AUDMUX_V2) += audmux-v2.o | 17 | obj-$(CONFIG_ARCH_MXC_AUDMUX_V2) += audmux-v2.o |
18 | obj-$(CONFIG_MXC_DEBUG_BOARD) += 3ds_debugboard.o | ||
20 | ifdef CONFIG_SND_IMX_SOC | 19 | ifdef CONFIG_SND_IMX_SOC |
21 | obj-y += ssi-fiq.o | 20 | obj-y += ssi-fiq.o |
22 | obj-y += ssi-fiq-ksym.o | 21 | obj-y += ssi-fiq-ksym.o |
23 | endif | 22 | endif |
23 | |||
24 | obj-y += devices/ | ||
diff --git a/arch/arm/plat-mxc/audmux-v1.c b/arch/arm/plat-mxc/audmux-v1.c index b62917ca3f95..1180bef7664b 100644 --- a/arch/arm/plat-mxc/audmux-v1.c +++ b/arch/arm/plat-mxc/audmux-v1.c | |||
@@ -13,10 +13,6 @@ | |||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * GNU General Public License for more details. | 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., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
20 | */ | 16 | */ |
21 | 17 | ||
22 | #include <linux/module.h> | 18 | #include <linux/module.h> |
diff --git a/arch/arm/plat-mxc/audmux-v2.c b/arch/arm/plat-mxc/audmux-v2.c index 0c2cc5cd4d83..f9e7cdbd0005 100644 --- a/arch/arm/plat-mxc/audmux-v2.c +++ b/arch/arm/plat-mxc/audmux-v2.c | |||
@@ -13,10 +13,6 @@ | |||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * GNU General Public License for more details. | 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., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
20 | */ | 16 | */ |
21 | 17 | ||
22 | #include <linux/module.h> | 18 | #include <linux/module.h> |
@@ -191,6 +187,7 @@ static int mxc_audmux_v2_init(void) | |||
191 | { | 187 | { |
192 | int ret; | 188 | int ret; |
193 | 189 | ||
190 | #if defined(CONFIG_ARCH_MX3) | ||
194 | if (cpu_is_mx31()) | 191 | if (cpu_is_mx31()) |
195 | audmux_base = MX31_IO_ADDRESS(MX31_AUDMUX_BASE_ADDR); | 192 | audmux_base = MX31_IO_ADDRESS(MX31_AUDMUX_BASE_ADDR); |
196 | 193 | ||
@@ -204,7 +201,19 @@ static int mxc_audmux_v2_init(void) | |||
204 | } | 201 | } |
205 | audmux_base = MX35_IO_ADDRESS(MX35_AUDMUX_BASE_ADDR); | 202 | audmux_base = MX35_IO_ADDRESS(MX35_AUDMUX_BASE_ADDR); |
206 | } | 203 | } |
207 | 204 | #endif | |
205 | #if defined(CONFIG_ARCH_MX25) | ||
206 | if (cpu_is_mx25()) { | ||
207 | audmux_clk = clk_get(NULL, "audmux"); | ||
208 | if (IS_ERR(audmux_clk)) { | ||
209 | ret = PTR_ERR(audmux_clk); | ||
210 | printk(KERN_ERR "%s: cannot get clock: %d\n", __func__, | ||
211 | ret); | ||
212 | return ret; | ||
213 | } | ||
214 | audmux_base = MX25_IO_ADDRESS(MX25_AUDMUX_BASE_ADDR); | ||
215 | } | ||
216 | #endif | ||
208 | audmux_debugfs_init(); | 217 | audmux_debugfs_init(); |
209 | 218 | ||
210 | return 0; | 219 | return 0; |
diff --git a/arch/arm/plat-mxc/clock.c b/arch/arm/plat-mxc/clock.c index 323ff8ccc877..2ed3ab173add 100644 --- a/arch/arm/plat-mxc/clock.c +++ b/arch/arm/plat-mxc/clock.c | |||
@@ -52,13 +52,14 @@ static void __clk_disable(struct clk *clk) | |||
52 | { | 52 | { |
53 | if (clk == NULL || IS_ERR(clk)) | 53 | if (clk == NULL || IS_ERR(clk)) |
54 | return; | 54 | return; |
55 | |||
56 | __clk_disable(clk->parent); | ||
57 | __clk_disable(clk->secondary); | ||
58 | |||
59 | WARN_ON(!clk->usecount); | 55 | WARN_ON(!clk->usecount); |
60 | if (!(--clk->usecount) && clk->disable) | 56 | |
61 | clk->disable(clk); | 57 | if (!(--clk->usecount)) { |
58 | if (clk->disable) | ||
59 | clk->disable(clk); | ||
60 | __clk_disable(clk->parent); | ||
61 | __clk_disable(clk->secondary); | ||
62 | } | ||
62 | } | 63 | } |
63 | 64 | ||
64 | static int __clk_enable(struct clk *clk) | 65 | static int __clk_enable(struct clk *clk) |
@@ -66,12 +67,13 @@ static int __clk_enable(struct clk *clk) | |||
66 | if (clk == NULL || IS_ERR(clk)) | 67 | if (clk == NULL || IS_ERR(clk)) |
67 | return -EINVAL; | 68 | return -EINVAL; |
68 | 69 | ||
69 | __clk_enable(clk->parent); | 70 | if (clk->usecount++ == 0) { |
70 | __clk_enable(clk->secondary); | 71 | __clk_enable(clk->parent); |
71 | 72 | __clk_enable(clk->secondary); | |
72 | if (clk->usecount++ == 0 && clk->enable) | ||
73 | clk->enable(clk); | ||
74 | 73 | ||
74 | if (clk->enable) | ||
75 | clk->enable(clk); | ||
76 | } | ||
75 | return 0; | 77 | return 0; |
76 | } | 78 | } |
77 | 79 | ||
@@ -160,17 +162,28 @@ EXPORT_SYMBOL(clk_set_rate); | |||
160 | int clk_set_parent(struct clk *clk, struct clk *parent) | 162 | int clk_set_parent(struct clk *clk, struct clk *parent) |
161 | { | 163 | { |
162 | int ret = -EINVAL; | 164 | int ret = -EINVAL; |
165 | struct clk *old; | ||
163 | 166 | ||
164 | if (clk == NULL || IS_ERR(clk) || parent == NULL || | 167 | if (clk == NULL || IS_ERR(clk) || parent == NULL || |
165 | IS_ERR(parent) || clk->set_parent == NULL) | 168 | IS_ERR(parent) || clk->set_parent == NULL) |
166 | return ret; | 169 | return ret; |
167 | 170 | ||
171 | if (clk->usecount) | ||
172 | clk_enable(parent); | ||
173 | |||
168 | mutex_lock(&clocks_mutex); | 174 | mutex_lock(&clocks_mutex); |
169 | ret = clk->set_parent(clk, parent); | 175 | ret = clk->set_parent(clk, parent); |
170 | if (ret == 0) | 176 | if (ret == 0) { |
177 | old = clk->parent; | ||
171 | clk->parent = parent; | 178 | clk->parent = parent; |
179 | } else { | ||
180 | old = parent; | ||
181 | } | ||
172 | mutex_unlock(&clocks_mutex); | 182 | mutex_unlock(&clocks_mutex); |
173 | 183 | ||
184 | if (clk->usecount) | ||
185 | clk_disable(old); | ||
186 | |||
174 | return ret; | 187 | return ret; |
175 | } | 188 | } |
176 | EXPORT_SYMBOL(clk_set_parent); | 189 | EXPORT_SYMBOL(clk_set_parent); |
diff --git a/arch/arm/plat-mxc/devices.c b/arch/arm/plat-mxc/devices.c index 56f2fb5cc456..735776d84956 100644 --- a/arch/arm/plat-mxc/devices.c +++ b/arch/arm/plat-mxc/devices.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/err.h> | ||
21 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
22 | #include <mach/common.h> | 23 | #include <mach/common.h> |
23 | 24 | ||
@@ -35,3 +36,35 @@ int __init mxc_register_device(struct platform_device *pdev, void *data) | |||
35 | return ret; | 36 | return ret; |
36 | } | 37 | } |
37 | 38 | ||
39 | struct platform_device *__init imx_add_platform_device(const char *name, int id, | ||
40 | const struct resource *res, unsigned int num_resources, | ||
41 | const void *data, size_t size_data) | ||
42 | { | ||
43 | int ret = -ENOMEM; | ||
44 | struct platform_device *pdev; | ||
45 | |||
46 | pdev = platform_device_alloc(name, id); | ||
47 | if (!pdev) | ||
48 | goto err; | ||
49 | |||
50 | if (res) { | ||
51 | ret = platform_device_add_resources(pdev, res, num_resources); | ||
52 | if (ret) | ||
53 | goto err; | ||
54 | } | ||
55 | |||
56 | if (data) { | ||
57 | ret = platform_device_add_data(pdev, data, size_data); | ||
58 | if (ret) | ||
59 | goto err; | ||
60 | } | ||
61 | |||
62 | ret = platform_device_add(pdev); | ||
63 | if (ret) { | ||
64 | err: | ||
65 | platform_device_put(pdev); | ||
66 | return ERR_PTR(ret); | ||
67 | } | ||
68 | |||
69 | return pdev; | ||
70 | } | ||
diff --git a/arch/arm/plat-mxc/devices/Kconfig b/arch/arm/plat-mxc/devices/Kconfig new file mode 100644 index 000000000000..9ab784b776f9 --- /dev/null +++ b/arch/arm/plat-mxc/devices/Kconfig | |||
@@ -0,0 +1,15 @@ | |||
1 | config IMX_HAVE_PLATFORM_FLEXCAN | ||
2 | select HAVE_CAN_FLEXCAN | ||
3 | bool | ||
4 | |||
5 | config IMX_HAVE_PLATFORM_IMX_I2C | ||
6 | bool | ||
7 | |||
8 | config IMX_HAVE_PLATFORM_IMX_UART | ||
9 | bool | ||
10 | |||
11 | config IMX_HAVE_PLATFORM_MXC_NAND | ||
12 | bool | ||
13 | |||
14 | config IMX_HAVE_PLATFORM_SPI_IMX | ||
15 | bool | ||
diff --git a/arch/arm/plat-mxc/devices/Makefile b/arch/arm/plat-mxc/devices/Makefile new file mode 100644 index 000000000000..347da5161f7e --- /dev/null +++ b/arch/arm/plat-mxc/devices/Makefile | |||
@@ -0,0 +1,8 @@ | |||
1 | ifdef CONFIG_CAN_FLEXCAN | ||
2 | # the ifdef can be removed once the flexcan driver has been merged | ||
3 | obj-$(CONFIG_IMX_HAVE_PLATFORM_FLEXCAN) += platform-flexcan.o | ||
4 | endif | ||
5 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_I2C) += platform-imx-i2c.o | ||
6 | obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UART) += platform-imx-uart.o | ||
7 | obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_NAND) += platform-mxc_nand.o | ||
8 | obj-$(CONFIG_IMX_HAVE_PLATFORM_SPI_IMX) += platform-spi_imx.o | ||
diff --git a/arch/arm/plat-mxc/devices/platform-flexcan.c b/arch/arm/plat-mxc/devices/platform-flexcan.c new file mode 100644 index 000000000000..5e97a01f14f3 --- /dev/null +++ b/arch/arm/plat-mxc/devices/platform-flexcan.c | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix, Marc Kleine-Budde <kernel@pengutronix.de> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it under | ||
5 | * the terms of the GNU General Public License version 2 as published by the | ||
6 | * Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #include <mach/devices-common.h> | ||
10 | |||
11 | struct platform_device *__init imx_add_flexcan(int id, | ||
12 | resource_size_t iobase, resource_size_t iosize, | ||
13 | resource_size_t irq, | ||
14 | const struct flexcan_platform_data *pdata) | ||
15 | { | ||
16 | struct resource res[] = { | ||
17 | { | ||
18 | .start = iobase, | ||
19 | .end = iobase + iosize - 1, | ||
20 | .flags = IORESOURCE_MEM, | ||
21 | }, { | ||
22 | .start = irq, | ||
23 | .end = irq, | ||
24 | .flags = IORESOURCE_IRQ, | ||
25 | }, | ||
26 | }; | ||
27 | |||
28 | return imx_add_platform_device("flexcan", id, res, ARRAY_SIZE(res), | ||
29 | pdata, sizeof(*pdata)); | ||
30 | } | ||
diff --git a/arch/arm/plat-mxc/devices/platform-imx-i2c.c b/arch/arm/plat-mxc/devices/platform-imx-i2c.c new file mode 100644 index 000000000000..d0af9f7d8aed --- /dev/null +++ b/arch/arm/plat-mxc/devices/platform-imx-i2c.c | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009-2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <mach/devices-common.h> | ||
10 | |||
11 | struct platform_device *__init imx_add_imx_i2c(int id, | ||
12 | resource_size_t iobase, resource_size_t iosize, int irq, | ||
13 | const struct imxi2c_platform_data *pdata) | ||
14 | { | ||
15 | struct resource res[] = { | ||
16 | { | ||
17 | .start = iobase, | ||
18 | .end = iobase + iosize - 1, | ||
19 | .flags = IORESOURCE_MEM, | ||
20 | }, { | ||
21 | .start = irq, | ||
22 | .end = irq, | ||
23 | .flags = IORESOURCE_IRQ, | ||
24 | }, | ||
25 | }; | ||
26 | |||
27 | return imx_add_platform_device("imx-i2c", id, res, ARRAY_SIZE(res), | ||
28 | pdata, sizeof(*pdata)); | ||
29 | } | ||
diff --git a/arch/arm/plat-mxc/devices/platform-imx-uart.c b/arch/arm/plat-mxc/devices/platform-imx-uart.c new file mode 100644 index 000000000000..fa3dff1433e8 --- /dev/null +++ b/arch/arm/plat-mxc/devices/platform-imx-uart.c | |||
@@ -0,0 +1,60 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009-2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <mach/devices-common.h> | ||
10 | |||
11 | struct platform_device *__init imx_add_imx_uart_3irq(int id, | ||
12 | resource_size_t iobase, resource_size_t iosize, | ||
13 | resource_size_t irqrx, resource_size_t irqtx, | ||
14 | resource_size_t irqrts, | ||
15 | const struct imxuart_platform_data *pdata) | ||
16 | { | ||
17 | struct resource res[] = { | ||
18 | { | ||
19 | .start = iobase, | ||
20 | .end = iobase + iosize - 1, | ||
21 | .flags = IORESOURCE_MEM, | ||
22 | }, { | ||
23 | .start = irqrx, | ||
24 | .end = irqrx, | ||
25 | .flags = IORESOURCE_IRQ, | ||
26 | }, { | ||
27 | .start = irqtx, | ||
28 | .end = irqtx, | ||
29 | .flags = IORESOURCE_IRQ, | ||
30 | }, { | ||
31 | .start = irqrts, | ||
32 | .end = irqrx, | ||
33 | .flags = IORESOURCE_IRQ, | ||
34 | }, | ||
35 | }; | ||
36 | |||
37 | return imx_add_platform_device("imx-uart", id, res, ARRAY_SIZE(res), | ||
38 | pdata, sizeof(*pdata)); | ||
39 | } | ||
40 | |||
41 | struct platform_device *__init imx_add_imx_uart_1irq(int id, | ||
42 | resource_size_t iobase, resource_size_t iosize, | ||
43 | resource_size_t irq, | ||
44 | const struct imxuart_platform_data *pdata) | ||
45 | { | ||
46 | struct resource res[] = { | ||
47 | { | ||
48 | .start = iobase, | ||
49 | .end = iobase + iosize - 1, | ||
50 | .flags = IORESOURCE_MEM, | ||
51 | }, { | ||
52 | .start = irq, | ||
53 | .end = irq, | ||
54 | .flags = IORESOURCE_IRQ, | ||
55 | }, | ||
56 | }; | ||
57 | |||
58 | return imx_add_platform_device("imx-uart", id, res, ARRAY_SIZE(res), | ||
59 | pdata, sizeof(*pdata)); | ||
60 | } | ||
diff --git a/arch/arm/plat-mxc/devices/platform-mxc_nand.c b/arch/arm/plat-mxc/devices/platform-mxc_nand.c new file mode 100644 index 000000000000..1c286418d123 --- /dev/null +++ b/arch/arm/plat-mxc/devices/platform-mxc_nand.c | |||
@@ -0,0 +1,44 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009-2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <asm/sizes.h> | ||
10 | #include <mach/devices-common.h> | ||
11 | |||
12 | static struct platform_device *__init imx_add_mxc_nand(resource_size_t iobase, | ||
13 | int irq, const struct mxc_nand_platform_data *pdata, | ||
14 | resource_size_t iosize) | ||
15 | { | ||
16 | static int id = 0; | ||
17 | |||
18 | struct resource res[] = { | ||
19 | { | ||
20 | .start = iobase, | ||
21 | .end = iobase + iosize - 1, | ||
22 | .flags = IORESOURCE_MEM, | ||
23 | }, { | ||
24 | .start = irq, | ||
25 | .end = irq, | ||
26 | .flags = IORESOURCE_IRQ, | ||
27 | }, | ||
28 | }; | ||
29 | |||
30 | return imx_add_platform_device("mxc_nand", id++, res, ARRAY_SIZE(res), | ||
31 | pdata, sizeof(*pdata)); | ||
32 | } | ||
33 | |||
34 | struct platform_device *__init imx_add_mxc_nand_v1(resource_size_t iobase, | ||
35 | int irq, const struct mxc_nand_platform_data *pdata) | ||
36 | { | ||
37 | return imx_add_mxc_nand(iobase, irq, pdata, SZ_4K); | ||
38 | } | ||
39 | |||
40 | struct platform_device *__init imx_add_mxc_nand_v21(resource_size_t iobase, | ||
41 | int irq, const struct mxc_nand_platform_data *pdata) | ||
42 | { | ||
43 | return imx_add_mxc_nand(iobase, irq, pdata, SZ_8K); | ||
44 | } | ||
diff --git a/arch/arm/plat-mxc/devices/platform-spi_imx.c b/arch/arm/plat-mxc/devices/platform-spi_imx.c new file mode 100644 index 000000000000..2831a6d3eb4b --- /dev/null +++ b/arch/arm/plat-mxc/devices/platform-spi_imx.c | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009-2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <asm/sizes.h> | ||
10 | #include <mach/devices-common.h> | ||
11 | |||
12 | struct platform_device *__init imx_add_spi_imx(int id, | ||
13 | resource_size_t iobase, resource_size_t iosize, int irq, | ||
14 | const struct spi_imx_master *pdata) | ||
15 | { | ||
16 | struct resource res[] = { | ||
17 | { | ||
18 | .start = iobase, | ||
19 | .end = iobase + iosize - 1, | ||
20 | .flags = IORESOURCE_MEM, | ||
21 | }, { | ||
22 | .start = irq, | ||
23 | .end = irq, | ||
24 | .flags = IORESOURCE_IRQ, | ||
25 | }, | ||
26 | }; | ||
27 | |||
28 | return imx_add_platform_device("spi_imx", id, res, ARRAY_SIZE(res), | ||
29 | pdata, sizeof(*pdata)); | ||
30 | } | ||
diff --git a/arch/arm/plat-mxc/ehci.c b/arch/arm/plat-mxc/ehci.c index 2a8646173c2f..35a064ff02ba 100644 --- a/arch/arm/plat-mxc/ehci.c +++ b/arch/arm/plat-mxc/ehci.c | |||
@@ -11,10 +11,6 @@ | |||
11 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
12 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | 12 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
13 | * for more details. | 13 | * for more details. |
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software Foundation, | ||
17 | * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
18 | */ | 14 | */ |
19 | 15 | ||
20 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
@@ -73,7 +69,51 @@ | |||
73 | int mxc_initialize_usb_hw(int port, unsigned int flags) | 69 | int mxc_initialize_usb_hw(int port, unsigned int flags) |
74 | { | 70 | { |
75 | unsigned int v; | 71 | unsigned int v; |
76 | #ifdef CONFIG_ARCH_MX3 | 72 | #if defined(CONFIG_ARCH_MX25) |
73 | if (cpu_is_mx25()) { | ||
74 | v = readl(MX25_IO_ADDRESS(MX25_OTG_BASE_ADDR + | ||
75 | USBCTRL_OTGBASE_OFFSET)); | ||
76 | |||
77 | switch (port) { | ||
78 | case 0: /* OTG port */ | ||
79 | v &= ~(MX35_OTG_SIC_MASK | MX35_OTG_PM_BIT); | ||
80 | v |= (flags & MXC_EHCI_INTERFACE_MASK) | ||
81 | << MX35_OTG_SIC_SHIFT; | ||
82 | if (!(flags & MXC_EHCI_POWER_PINS_ENABLED)) | ||
83 | v |= MX35_OTG_PM_BIT; | ||
84 | |||
85 | break; | ||
86 | case 1: /* H1 port */ | ||
87 | v &= ~(MX35_H1_SIC_MASK | MX35_H1_PM_BIT | MX35_H1_TLL_BIT | | ||
88 | MX35_H1_USBTE_BIT | MX35_H1_IPPUE_DOWN_BIT | MX35_H1_IPPUE_UP_BIT); | ||
89 | v |= (flags & MXC_EHCI_INTERFACE_MASK) | ||
90 | << MX35_H1_SIC_SHIFT; | ||
91 | if (!(flags & MXC_EHCI_POWER_PINS_ENABLED)) | ||
92 | v |= MX35_H1_PM_BIT; | ||
93 | |||
94 | if (!(flags & MXC_EHCI_TTL_ENABLED)) | ||
95 | v |= MX35_H1_TLL_BIT; | ||
96 | |||
97 | if (flags & MXC_EHCI_INTERNAL_PHY) | ||
98 | v |= MX35_H1_USBTE_BIT; | ||
99 | |||
100 | if (flags & MXC_EHCI_IPPUE_DOWN) | ||
101 | v |= MX35_H1_IPPUE_DOWN_BIT; | ||
102 | |||
103 | if (flags & MXC_EHCI_IPPUE_UP) | ||
104 | v |= MX35_H1_IPPUE_UP_BIT; | ||
105 | |||
106 | break; | ||
107 | default: | ||
108 | return -EINVAL; | ||
109 | } | ||
110 | |||
111 | writel(v, MX25_IO_ADDRESS(MX25_OTG_BASE_ADDR + | ||
112 | USBCTRL_OTGBASE_OFFSET)); | ||
113 | return 0; | ||
114 | } | ||
115 | #endif /* CONFIG_ARCH_MX25 */ | ||
116 | #if defined(CONFIG_ARCH_MX3) | ||
77 | if (cpu_is_mx31()) { | 117 | if (cpu_is_mx31()) { |
78 | v = readl(MX31_IO_ADDRESS(MX31_OTG_BASE_ADDR + | 118 | v = readl(MX31_IO_ADDRESS(MX31_OTG_BASE_ADDR + |
79 | USBCTRL_OTGBASE_OFFSET)); | 119 | USBCTRL_OTGBASE_OFFSET)); |
diff --git a/arch/arm/plat-mxc/gpio.c b/arch/arm/plat-mxc/gpio.c index 71437c61cfd7..57ec4a896a5d 100644 --- a/arch/arm/plat-mxc/gpio.c +++ b/arch/arm/plat-mxc/gpio.c | |||
@@ -214,13 +214,16 @@ static void _set_gpio_direction(struct gpio_chip *chip, unsigned offset, | |||
214 | struct mxc_gpio_port *port = | 214 | struct mxc_gpio_port *port = |
215 | container_of(chip, struct mxc_gpio_port, chip); | 215 | container_of(chip, struct mxc_gpio_port, chip); |
216 | u32 l; | 216 | u32 l; |
217 | unsigned long flags; | ||
217 | 218 | ||
219 | spin_lock_irqsave(&port->lock, flags); | ||
218 | l = __raw_readl(port->base + GPIO_GDIR); | 220 | l = __raw_readl(port->base + GPIO_GDIR); |
219 | if (dir) | 221 | if (dir) |
220 | l |= 1 << offset; | 222 | l |= 1 << offset; |
221 | else | 223 | else |
222 | l &= ~(1 << offset); | 224 | l &= ~(1 << offset); |
223 | __raw_writel(l, port->base + GPIO_GDIR); | 225 | __raw_writel(l, port->base + GPIO_GDIR); |
226 | spin_unlock_irqrestore(&port->lock, flags); | ||
224 | } | 227 | } |
225 | 228 | ||
226 | static void mxc_gpio_set(struct gpio_chip *chip, unsigned offset, int value) | 229 | static void mxc_gpio_set(struct gpio_chip *chip, unsigned offset, int value) |
@@ -229,9 +232,12 @@ static void mxc_gpio_set(struct gpio_chip *chip, unsigned offset, int value) | |||
229 | container_of(chip, struct mxc_gpio_port, chip); | 232 | container_of(chip, struct mxc_gpio_port, chip); |
230 | void __iomem *reg = port->base + GPIO_DR; | 233 | void __iomem *reg = port->base + GPIO_DR; |
231 | u32 l; | 234 | u32 l; |
235 | unsigned long flags; | ||
232 | 236 | ||
237 | spin_lock_irqsave(&port->lock, flags); | ||
233 | l = (__raw_readl(reg) & (~(1 << offset))) | (value << offset); | 238 | l = (__raw_readl(reg) & (~(1 << offset))) | (value << offset); |
234 | __raw_writel(l, reg); | 239 | __raw_writel(l, reg); |
240 | spin_unlock_irqrestore(&port->lock, flags); | ||
235 | } | 241 | } |
236 | 242 | ||
237 | static int mxc_gpio_get(struct gpio_chip *chip, unsigned offset) | 243 | static int mxc_gpio_get(struct gpio_chip *chip, unsigned offset) |
@@ -285,6 +291,8 @@ int __init mxc_gpio_init(struct mxc_gpio_port *port, int cnt) | |||
285 | port[i].chip.base = i * 32; | 291 | port[i].chip.base = i * 32; |
286 | port[i].chip.ngpio = 32; | 292 | port[i].chip.ngpio = 32; |
287 | 293 | ||
294 | spin_lock_init(&port[i].lock); | ||
295 | |||
288 | /* its a serious configuration bug when it fails */ | 296 | /* its a serious configuration bug when it fails */ |
289 | BUG_ON( gpiochip_add(&port[i].chip) < 0 ); | 297 | BUG_ON( gpiochip_add(&port[i].chip) < 0 ); |
290 | 298 | ||
@@ -292,6 +300,12 @@ int __init mxc_gpio_init(struct mxc_gpio_port *port, int cnt) | |||
292 | /* setup one handler for each entry */ | 300 | /* setup one handler for each entry */ |
293 | set_irq_chained_handler(port[i].irq, mx3_gpio_irq_handler); | 301 | set_irq_chained_handler(port[i].irq, mx3_gpio_irq_handler); |
294 | set_irq_data(port[i].irq, &port[i]); | 302 | set_irq_data(port[i].irq, &port[i]); |
303 | if (port[i].irq_high) { | ||
304 | /* setup handler for GPIO 16 to 31 */ | ||
305 | set_irq_chained_handler(port[i].irq_high, | ||
306 | mx3_gpio_irq_handler); | ||
307 | set_irq_data(port[i].irq_high, &port[i]); | ||
308 | } | ||
295 | } | 309 | } |
296 | } | 310 | } |
297 | 311 | ||
diff --git a/arch/arm/plat-mxc/include/mach/3ds_debugboard.h b/arch/arm/plat-mxc/include/mach/3ds_debugboard.h new file mode 100644 index 000000000000..a384fdd49c62 --- /dev/null +++ b/arch/arm/plat-mxc/include/mach/3ds_debugboard.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_MXC_3DS_DB_H__ | ||
14 | #define __ASM_ARCH_MXC_3DS_DB_H__ | ||
15 | |||
16 | extern int __init mxc_expio_init(u32 base, u32 p_irq); | ||
17 | |||
18 | #endif /* __ASM_ARCH_MXC_3DS_DB_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/board-armadillo5x0.h b/arch/arm/plat-mxc/include/mach/board-armadillo5x0.h deleted file mode 100644 index 0376c133c9f4..000000000000 --- a/arch/arm/plat-mxc/include/mach/board-armadillo5x0.h +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2009 Alberto Panizzo <maramaopercheseimorto@gmail.com>. | ||
3 | * All Rights Reserved. | ||
4 | */ | ||
5 | |||
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 version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #ifndef __ASM_ARCH_MXC_BOARD_ARMADILLO5X0_H__ | ||
13 | #define __ASM_ARCH_MXC_BOARD_ARMADILLO5X0_H__ | ||
14 | |||
15 | #endif | ||
diff --git a/arch/arm/plat-mxc/include/mach/board-kzmarm11.h b/arch/arm/plat-mxc/include/mach/board-kzmarm11.h deleted file mode 100644 index 93cc66f104c7..000000000000 --- a/arch/arm/plat-mxc/include/mach/board-kzmarm11.h +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 Yoichi Yuasa <yuasa@linux-mips.org> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
17 | */ | ||
18 | #ifndef __ARM_ARCH_BOARD_KZM_ARM11_H | ||
19 | #define __ARM_ARCH_BOARD_KZM_ARM11_H | ||
20 | |||
21 | /* | ||
22 | * KZM-ARM11-01 Board Control Registers on FPGA | ||
23 | */ | ||
24 | #define KZM_ARM11_CTL1 (MX31_CS4_BASE_ADDR + 0x1000) | ||
25 | #define KZM_ARM11_CTL2 (MX31_CS4_BASE_ADDR + 0x1001) | ||
26 | #define KZM_ARM11_RSW1 (MX31_CS4_BASE_ADDR + 0x1002) | ||
27 | #define KZM_ARM11_BACK_LIGHT (MX31_CS4_BASE_ADDR + 0x1004) | ||
28 | #define KZM_ARM11_FPGA_REV (MX31_CS4_BASE_ADDR + 0x1008) | ||
29 | #define KZM_ARM11_7SEG_LED (MX31_CS4_BASE_ADDR + 0x1010) | ||
30 | #define KZM_ARM11_LEDS (MX31_CS4_BASE_ADDR + 0x1020) | ||
31 | #define KZM_ARM11_DIPSW2 (MX31_CS4_BASE_ADDR + 0x1003) | ||
32 | |||
33 | /* | ||
34 | * External UART for touch panel on FPGA | ||
35 | */ | ||
36 | #define KZM_ARM11_16550 (MX31_CS4_BASE_ADDR + 0x1050) | ||
37 | |||
38 | #endif /* __ARM_ARCH_BOARD_KZM_ARM11_H */ | ||
39 | |||
diff --git a/arch/arm/plat-mxc/include/mach/board-mx21ads.h b/arch/arm/plat-mxc/include/mach/board-mx21ads.h deleted file mode 100644 index 0cf4fa29510c..000000000000 --- a/arch/arm/plat-mxc/include/mach/board-mx21ads.h +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
5 | /* | ||
6 | * The code contained herein is licensed under the GNU General Public | ||
7 | * License. You may obtain a copy of the GNU General Public License | ||
8 | * Version 2 or later at the following locations: | ||
9 | * | ||
10 | * http://www.opensource.org/licenses/gpl-license.html | ||
11 | * http://www.gnu.org/copyleft/gpl.html | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARCH_MXC_BOARD_MX21ADS_H__ | ||
15 | #define __ASM_ARCH_MXC_BOARD_MX21ADS_H__ | ||
16 | |||
17 | /* | ||
18 | * Memory-mapped I/O on MX21ADS base board | ||
19 | */ | ||
20 | #define MX21ADS_MMIO_BASE_ADDR 0xF5000000 | ||
21 | #define MX21ADS_MMIO_SIZE SZ_16M | ||
22 | |||
23 | #define MX21ADS_REG_ADDR(offset) (void __force __iomem *) \ | ||
24 | (MX21ADS_MMIO_BASE_ADDR + (offset)) | ||
25 | |||
26 | #define MX21ADS_CS8900A_IRQ IRQ_GPIOE(11) | ||
27 | #define MX21ADS_CS8900A_IOBASE_REG MX21ADS_REG_ADDR(0x000000) | ||
28 | #define MX21ADS_ST16C255_IOBASE_REG MX21ADS_REG_ADDR(0x200000) | ||
29 | #define MX21ADS_VERSION_REG MX21ADS_REG_ADDR(0x400000) | ||
30 | #define MX21ADS_IO_REG MX21ADS_REG_ADDR(0x800000) | ||
31 | |||
32 | /* MX21ADS_IO_REG bit definitions */ | ||
33 | #define MX21ADS_IO_SD_WP 0x0001 /* read */ | ||
34 | #define MX21ADS_IO_TP6 0x0001 /* write */ | ||
35 | #define MX21ADS_IO_SW_SEL 0x0002 /* read */ | ||
36 | #define MX21ADS_IO_TP7 0x0002 /* write */ | ||
37 | #define MX21ADS_IO_RESET_E_UART 0x0004 | ||
38 | #define MX21ADS_IO_RESET_BASE 0x0008 | ||
39 | #define MX21ADS_IO_CSI_CTL2 0x0010 | ||
40 | #define MX21ADS_IO_CSI_CTL1 0x0020 | ||
41 | #define MX21ADS_IO_CSI_CTL0 0x0040 | ||
42 | #define MX21ADS_IO_UART1_EN 0x0080 | ||
43 | #define MX21ADS_IO_UART4_EN 0x0100 | ||
44 | #define MX21ADS_IO_LCDON 0x0200 | ||
45 | #define MX21ADS_IO_IRDA_EN 0x0400 | ||
46 | #define MX21ADS_IO_IRDA_FIR_SEL 0x0800 | ||
47 | #define MX21ADS_IO_IRDA_MD0_B 0x1000 | ||
48 | #define MX21ADS_IO_IRDA_MD1 0x2000 | ||
49 | #define MX21ADS_IO_LED4_ON 0x4000 | ||
50 | #define MX21ADS_IO_LED3_ON 0x8000 | ||
51 | |||
52 | #endif /* __ASM_ARCH_MXC_BOARD_MX21ADS_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/board-mx27ads.h b/arch/arm/plat-mxc/include/mach/board-mx27ads.h deleted file mode 100644 index 7776d230327f..000000000000 --- a/arch/arm/plat-mxc/include/mach/board-mx27ads.h +++ /dev/null | |||
@@ -1,344 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
5 | /* | ||
6 | * The code contained herein is licensed under the GNU General Public | ||
7 | * License. You may obtain a copy of the GNU General Public License | ||
8 | * Version 2 or later at the following locations: | ||
9 | * | ||
10 | * http://www.opensource.org/licenses/gpl-license.html | ||
11 | * http://www.gnu.org/copyleft/gpl.html | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARCH_MXC_BOARD_MX27ADS_H__ | ||
15 | #define __ASM_ARCH_MXC_BOARD_MX27ADS_H__ | ||
16 | |||
17 | /* external interrupt multiplexer */ | ||
18 | #define MXC_EXP_IO_BASE (MXC_BOARD_IRQ_START) | ||
19 | |||
20 | #define MXC_VIRTUAL_INTS_BASE (MXC_EXP_IO_BASE + MXC_MAX_EXP_IO_LINES) | ||
21 | #define MXC_SDIO1_CARD_IRQ MXC_VIRTUAL_INTS_BASE | ||
22 | #define MXC_SDIO2_CARD_IRQ (MXC_VIRTUAL_INTS_BASE + 1) | ||
23 | #define MXC_SDIO3_CARD_IRQ (MXC_VIRTUAL_INTS_BASE + 2) | ||
24 | |||
25 | #define MXC_MAX_BOARD_INTS (MXC_MAX_EXP_IO_LINES + \ | ||
26 | MXC_MAX_VIRTUAL_INTS) | ||
27 | |||
28 | /* | ||
29 | * @name Memory Size parameters | ||
30 | */ | ||
31 | |||
32 | /* | ||
33 | * Size of SDRAM memory | ||
34 | */ | ||
35 | #define SDRAM_MEM_SIZE SZ_128M | ||
36 | |||
37 | /* | ||
38 | * PBC Controller parameters | ||
39 | */ | ||
40 | |||
41 | /* | ||
42 | * Base address of PBC controller, CS4 | ||
43 | */ | ||
44 | #define PBC_BASE_ADDRESS 0xf4300000 | ||
45 | #define PBC_REG_ADDR(offset) (void __force __iomem *) \ | ||
46 | (PBC_BASE_ADDRESS + (offset)) | ||
47 | |||
48 | /* | ||
49 | * PBC Interupt name definitions | ||
50 | */ | ||
51 | #define PBC_GPIO1_0 0 | ||
52 | #define PBC_GPIO1_1 1 | ||
53 | #define PBC_GPIO1_2 2 | ||
54 | #define PBC_GPIO1_3 3 | ||
55 | #define PBC_GPIO1_4 4 | ||
56 | #define PBC_GPIO1_5 5 | ||
57 | |||
58 | #define PBC_INTR_MAX_NUM 6 | ||
59 | #define PBC_INTR_SHARED_MAX_NUM 8 | ||
60 | |||
61 | /* When the PBC address connection is fixed in h/w, defined as 1 */ | ||
62 | #define PBC_ADDR_SH 0 | ||
63 | |||
64 | /* Offsets for the PBC Controller register */ | ||
65 | /* | ||
66 | * PBC Board version register offset | ||
67 | */ | ||
68 | #define PBC_VERSION_REG PBC_REG_ADDR(0x00000 >> PBC_ADDR_SH) | ||
69 | /* | ||
70 | * PBC Board control register 1 set address. | ||
71 | */ | ||
72 | #define PBC_BCTRL1_SET_REG PBC_REG_ADDR(0x00008 >> PBC_ADDR_SH) | ||
73 | /* | ||
74 | * PBC Board control register 1 clear address. | ||
75 | */ | ||
76 | #define PBC_BCTRL1_CLEAR_REG PBC_REG_ADDR(0x0000C >> PBC_ADDR_SH) | ||
77 | /* | ||
78 | * PBC Board control register 2 set address. | ||
79 | */ | ||
80 | #define PBC_BCTRL2_SET_REG PBC_REG_ADDR(0x00010 >> PBC_ADDR_SH) | ||
81 | /* | ||
82 | * PBC Board control register 2 clear address. | ||
83 | */ | ||
84 | #define PBC_BCTRL2_CLEAR_REG PBC_REG_ADDR(0x00014 >> PBC_ADDR_SH) | ||
85 | /* | ||
86 | * PBC Board control register 3 set address. | ||
87 | */ | ||
88 | #define PBC_BCTRL3_SET_REG PBC_REG_ADDR(0x00018 >> PBC_ADDR_SH) | ||
89 | /* | ||
90 | * PBC Board control register 3 clear address. | ||
91 | */ | ||
92 | #define PBC_BCTRL3_CLEAR_REG PBC_REG_ADDR(0x0001C >> PBC_ADDR_SH) | ||
93 | /* | ||
94 | * PBC Board control register 3 set address. | ||
95 | */ | ||
96 | #define PBC_BCTRL4_SET_REG PBC_REG_ADDR(0x00020 >> PBC_ADDR_SH) | ||
97 | /* | ||
98 | * PBC Board control register 4 clear address. | ||
99 | */ | ||
100 | #define PBC_BCTRL4_CLEAR_REG PBC_REG_ADDR(0x00024 >> PBC_ADDR_SH) | ||
101 | /*PBC_ADDR_SH | ||
102 | * PBC Board status register 1. | ||
103 | */ | ||
104 | #define PBC_BSTAT1_REG PBC_REG_ADDR(0x00028 >> PBC_ADDR_SH) | ||
105 | /* | ||
106 | * PBC Board interrupt status register. | ||
107 | */ | ||
108 | #define PBC_INTSTATUS_REG PBC_REG_ADDR(0x0002C >> PBC_ADDR_SH) | ||
109 | /* | ||
110 | * PBC Board interrupt current status register. | ||
111 | */ | ||
112 | #define PBC_INTCURR_STATUS_REG PBC_REG_ADDR(0x00034 >> PBC_ADDR_SH) | ||
113 | /* | ||
114 | * PBC Interrupt mask register set address. | ||
115 | */ | ||
116 | #define PBC_INTMASK_SET_REG PBC_REG_ADDR(0x00038 >> PBC_ADDR_SH) | ||
117 | /* | ||
118 | * PBC Interrupt mask register clear address. | ||
119 | */ | ||
120 | #define PBC_INTMASK_CLEAR_REG PBC_REG_ADDR(0x0003C >> PBC_ADDR_SH) | ||
121 | /* | ||
122 | * External UART A. | ||
123 | */ | ||
124 | #define PBC_SC16C652_UARTA_REG PBC_REG_ADDR(0x20000 >> PBC_ADDR_SH) | ||
125 | /* | ||
126 | * UART 4 Expanding Signal Status. | ||
127 | */ | ||
128 | #define PBC_UART_STATUS_REG PBC_REG_ADDR(0x22000 >> PBC_ADDR_SH) | ||
129 | /* | ||
130 | * UART 4 Expanding Signal Control Set. | ||
131 | */ | ||
132 | #define PBC_UCTRL_SET_REG PBC_REG_ADDR(0x24000 >> PBC_ADDR_SH) | ||
133 | /* | ||
134 | * UART 4 Expanding Signal Control Clear. | ||
135 | */ | ||
136 | #define PBC_UCTRL_CLR_REG PBC_REG_ADDR(0x26000 >> PBC_ADDR_SH) | ||
137 | /* | ||
138 | * Ethernet Controller IO base address. | ||
139 | */ | ||
140 | #define PBC_CS8900A_IOBASE_REG PBC_REG_ADDR(0x40000 >> PBC_ADDR_SH) | ||
141 | /* | ||
142 | * Ethernet Controller Memory base address. | ||
143 | */ | ||
144 | #define PBC_CS8900A_MEMBASE_REG PBC_REG_ADDR(0x42000 >> PBC_ADDR_SH) | ||
145 | /* | ||
146 | * Ethernet Controller DMA base address. | ||
147 | */ | ||
148 | #define PBC_CS8900A_DMABASE_REG PBC_REG_ADDR(0x44000 >> PBC_ADDR_SH) | ||
149 | |||
150 | /* PBC Board Version Register bit definition */ | ||
151 | #define PBC_VERSION_ADS 0x8000 /* Bit15=1 means version for ads */ | ||
152 | #define PBC_VERSION_EVB_REVB 0x4000 /* BIT14=1 means version for evb revb */ | ||
153 | |||
154 | /* PBC Board Control Register 1 bit definitions */ | ||
155 | #define PBC_BCTRL1_ERST 0x0001 /* Ethernet Reset */ | ||
156 | #define PBC_BCTRL1_URST 0x0002 /* Reset External UART controller */ | ||
157 | #define PBC_BCTRL1_FRST 0x0004 /* FEC Reset */ | ||
158 | #define PBC_BCTRL1_ESLEEP 0x0010 /* Enable ethernet Sleep */ | ||
159 | #define PBC_BCTRL1_LCDON 0x0800 /* Enable the LCD */ | ||
160 | |||
161 | /* PBC Board Control Register 2 bit definitions */ | ||
162 | #define PBC_BCTRL2_VCC_EN 0x0004 /* Enable VCC */ | ||
163 | #define PBC_BCTRL2_VPP_EN 0x0008 /* Enable Vpp */ | ||
164 | #define PBC_BCTRL2_ATAFEC_EN 0X0010 | ||
165 | #define PBC_BCTRL2_ATAFEC_SEL 0X0020 | ||
166 | #define PBC_BCTRL2_ATA_EN 0X0040 | ||
167 | #define PBC_BCTRL2_IRDA_SD 0X0080 | ||
168 | #define PBC_BCTRL2_IRDA_EN 0X0100 | ||
169 | #define PBC_BCTRL2_CCTL10 0X0200 | ||
170 | #define PBC_BCTRL2_CCTL11 0X0400 | ||
171 | |||
172 | /* PBC Board Control Register 3 bit definitions */ | ||
173 | #define PBC_BCTRL3_HSH_EN 0X0020 | ||
174 | #define PBC_BCTRL3_FSH_MOD 0X0040 | ||
175 | #define PBC_BCTRL3_OTG_HS_EN 0X0080 | ||
176 | #define PBC_BCTRL3_OTG_VBUS_EN 0X0100 | ||
177 | #define PBC_BCTRL3_FSH_VBUS_EN 0X0200 | ||
178 | #define PBC_BCTRL3_USB_OTG_ON 0X0800 | ||
179 | #define PBC_BCTRL3_USB_FSH_ON 0X1000 | ||
180 | |||
181 | /* PBC Board Control Register 4 bit definitions */ | ||
182 | #define PBC_BCTRL4_REGEN_SEL 0X0001 | ||
183 | #define PBC_BCTRL4_USER_OFF 0X0002 | ||
184 | #define PBC_BCTRL4_VIB_EN 0X0004 | ||
185 | #define PBC_BCTRL4_PWRGT1_EN 0X0008 | ||
186 | #define PBC_BCTRL4_PWRGT2_EN 0X0010 | ||
187 | #define PBC_BCTRL4_STDBY_PRI 0X0020 | ||
188 | |||
189 | #ifndef __ASSEMBLY__ | ||
190 | /* | ||
191 | * Enumerations for SD cards and memory stick card. This corresponds to | ||
192 | * the card EN bits in the IMR: SD1_EN | MS_EN | SD3_EN | SD2_EN. | ||
193 | */ | ||
194 | enum mxc_card_no { | ||
195 | MXC_CARD_SD2 = 0, | ||
196 | MXC_CARD_SD3, | ||
197 | MXC_CARD_MS, | ||
198 | MXC_CARD_SD1, | ||
199 | MXC_CARD_MIN = MXC_CARD_SD2, | ||
200 | MXC_CARD_MAX = MXC_CARD_SD1, | ||
201 | }; | ||
202 | #endif | ||
203 | |||
204 | #define MXC_CPLD_VER_1_50 0x01 | ||
205 | |||
206 | /* | ||
207 | * PBC BSTAT Register bit definitions | ||
208 | */ | ||
209 | #define PBC_BSTAT_PRI_INT 0X0001 | ||
210 | #define PBC_BSTAT_USB_BYP 0X0002 | ||
211 | #define PBC_BSTAT_ATA_IOCS16 0X0004 | ||
212 | #define PBC_BSTAT_ATA_CBLID 0X0008 | ||
213 | #define PBC_BSTAT_ATA_DASP 0X0010 | ||
214 | #define PBC_BSTAT_PWR_RDY 0X0020 | ||
215 | #define PBC_BSTAT_SD3_WP 0X0100 | ||
216 | #define PBC_BSTAT_SD2_WP 0X0200 | ||
217 | #define PBC_BSTAT_SD1_WP 0X0400 | ||
218 | #define PBC_BSTAT_SD3_DET 0X0800 | ||
219 | #define PBC_BSTAT_SD2_DET 0X1000 | ||
220 | #define PBC_BSTAT_SD1_DET 0X2000 | ||
221 | #define PBC_BSTAT_MS_DET 0X4000 | ||
222 | #define PBC_BSTAT_SD3_DET_BIT 11 | ||
223 | #define PBC_BSTAT_SD2_DET_BIT 12 | ||
224 | #define PBC_BSTAT_SD1_DET_BIT 13 | ||
225 | #define PBC_BSTAT_MS_DET_BIT 14 | ||
226 | #define MXC_BSTAT_BIT(n) ((n == MXC_CARD_SD2) ? PBC_BSTAT_SD2_DET : \ | ||
227 | ((n == MXC_CARD_SD3) ? PBC_BSTAT_SD3_DET : \ | ||
228 | ((n == MXC_CARD_SD1) ? PBC_BSTAT_SD1_DET : \ | ||
229 | ((n == MXC_CARD_MS) ? PBC_BSTAT_MS_DET : \ | ||
230 | 0x0)))) | ||
231 | |||
232 | /* | ||
233 | * PBC UART Control Register bit definitions | ||
234 | */ | ||
235 | #define PBC_UCTRL_DCE_DCD 0X0001 | ||
236 | #define PBC_UCTRL_DCE_DSR 0X0002 | ||
237 | #define PBC_UCTRL_DCE_RI 0X0004 | ||
238 | #define PBC_UCTRL_DTE_DTR 0X0100 | ||
239 | |||
240 | /* | ||
241 | * PBC UART Status Register bit definitions | ||
242 | */ | ||
243 | #define PBC_USTAT_DTE_DCD 0X0001 | ||
244 | #define PBC_USTAT_DTE_DSR 0X0002 | ||
245 | #define PBC_USTAT_DTE_RI 0X0004 | ||
246 | #define PBC_USTAT_DCE_DTR 0X0100 | ||
247 | |||
248 | /* | ||
249 | * PBC Interupt mask register bit definitions | ||
250 | */ | ||
251 | #define PBC_INTR_SD3_R_EN_BIT 4 | ||
252 | #define PBC_INTR_SD2_R_EN_BIT 0 | ||
253 | #define PBC_INTR_SD1_R_EN_BIT 6 | ||
254 | #define PBC_INTR_MS_R_EN_BIT 5 | ||
255 | #define PBC_INTR_SD3_EN_BIT 13 | ||
256 | #define PBC_INTR_SD2_EN_BIT 12 | ||
257 | #define PBC_INTR_MS_EN_BIT 14 | ||
258 | #define PBC_INTR_SD1_EN_BIT 15 | ||
259 | |||
260 | #define PBC_INTR_SD2_R_EN 0x0001 | ||
261 | #define PBC_INTR_LOW_BAT 0X0002 | ||
262 | #define PBC_INTR_OTG_FSOVER 0X0004 | ||
263 | #define PBC_INTR_FSH_OVER 0X0008 | ||
264 | #define PBC_INTR_SD3_R_EN 0x0010 | ||
265 | #define PBC_INTR_MS_R_EN 0x0020 | ||
266 | #define PBC_INTR_SD1_R_EN 0x0040 | ||
267 | #define PBC_INTR_FEC_INT 0X0080 | ||
268 | #define PBC_INTR_ENET_INT 0X0100 | ||
269 | #define PBC_INTR_OTGFS_INT 0X0200 | ||
270 | #define PBC_INTR_XUART_INT 0X0400 | ||
271 | #define PBC_INTR_CCTL12 0X0800 | ||
272 | #define PBC_INTR_SD2_EN 0x1000 | ||
273 | #define PBC_INTR_SD3_EN 0x2000 | ||
274 | #define PBC_INTR_MS_EN 0x4000 | ||
275 | #define PBC_INTR_SD1_EN 0x8000 | ||
276 | |||
277 | |||
278 | |||
279 | /* For interrupts like xuart, enet etc */ | ||
280 | #define EXPIO_PARENT_INT IOMUX_TO_IRQ(MX27_PIN_TIN) | ||
281 | #define MXC_MAX_EXP_IO_LINES 16 | ||
282 | |||
283 | /* | ||
284 | * This corresponds to PBC_INTMASK_SET_REG at offset 0x38. | ||
285 | * | ||
286 | */ | ||
287 | #define EXPIO_INT_LOW_BAT (MXC_EXP_IO_BASE + 1) | ||
288 | #define EXPIO_INT_OTG_FS_OVR (MXC_EXP_IO_BASE + 2) | ||
289 | #define EXPIO_INT_FSH_OVR (MXC_EXP_IO_BASE + 3) | ||
290 | #define EXPIO_INT_RES4 (MXC_EXP_IO_BASE + 4) | ||
291 | #define EXPIO_INT_RES5 (MXC_EXP_IO_BASE + 5) | ||
292 | #define EXPIO_INT_RES6 (MXC_EXP_IO_BASE + 6) | ||
293 | #define EXPIO_INT_FEC (MXC_EXP_IO_BASE + 7) | ||
294 | #define EXPIO_INT_ENET_INT (MXC_EXP_IO_BASE + 8) | ||
295 | #define EXPIO_INT_OTG_FS_INT (MXC_EXP_IO_BASE + 9) | ||
296 | #define EXPIO_INT_XUART_INTA (MXC_EXP_IO_BASE + 10) | ||
297 | #define EXPIO_INT_CCTL12_INT (MXC_EXP_IO_BASE + 11) | ||
298 | #define EXPIO_INT_SD2_EN (MXC_EXP_IO_BASE + 12) | ||
299 | #define EXPIO_INT_SD3_EN (MXC_EXP_IO_BASE + 13) | ||
300 | #define EXPIO_INT_MS_EN (MXC_EXP_IO_BASE + 14) | ||
301 | #define EXPIO_INT_SD1_EN (MXC_EXP_IO_BASE + 15) | ||
302 | |||
303 | /* | ||
304 | * This is System IRQ used by CS8900A for interrupt generation | ||
305 | * taken from platform.h | ||
306 | */ | ||
307 | #define CS8900AIRQ EXPIO_INT_ENET_INT | ||
308 | /* This is I/O Base address used to access registers of CS8900A on MXC ADS */ | ||
309 | #define CS8900A_BASE_ADDRESS (PBC_CS8900A_IOBASE_REG + 0x300) | ||
310 | |||
311 | #define MXC_PMIC_INT_LINE IOMUX_TO_IRQ(MX27_PIN_TOUT) | ||
312 | |||
313 | /* | ||
314 | * This is used to detect if the CPLD version is for mx27 evb board rev-a | ||
315 | */ | ||
316 | #define PBC_CPLD_VERSION_IS_REVA() \ | ||
317 | ((__raw_readw(PBC_VERSION_REG) & \ | ||
318 | (PBC_VERSION_ADS | PBC_VERSION_EVB_REVB))\ | ||
319 | == 0) | ||
320 | |||
321 | /* This is used to active or inactive ata signal in CPLD . | ||
322 | * It is dependent with hardware | ||
323 | */ | ||
324 | #define PBC_ATA_SIGNAL_ACTIVE() \ | ||
325 | __raw_writew( \ | ||
326 | PBC_BCTRL2_ATAFEC_EN|PBC_BCTRL2_ATAFEC_SEL|PBC_BCTRL2_ATA_EN, \ | ||
327 | PBC_BCTRL2_CLEAR_REG) | ||
328 | |||
329 | #define PBC_ATA_SIGNAL_INACTIVE() \ | ||
330 | __raw_writew( \ | ||
331 | PBC_BCTRL2_ATAFEC_EN|PBC_BCTRL2_ATAFEC_SEL|PBC_BCTRL2_ATA_EN, \ | ||
332 | PBC_BCTRL2_SET_REG) | ||
333 | |||
334 | #define MXC_BD_LED1 (1 << 5) | ||
335 | #define MXC_BD_LED2 (1 << 6) | ||
336 | #define MXC_BD_LED_ON(led) \ | ||
337 | __raw_writew(led, PBC_BCTRL1_SET_REG) | ||
338 | #define MXC_BD_LED_OFF(led) \ | ||
339 | __raw_writew(led, PBC_BCTRL1_CLEAR_REG) | ||
340 | |||
341 | /* to determine the correct external crystal reference */ | ||
342 | #define CKIH_27MHZ_BIT_SET (1 << 3) | ||
343 | |||
344 | #endif /* __ASM_ARCH_MXC_BOARD_MX27ADS_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/board-mx27lite.h b/arch/arm/plat-mxc/include/mach/board-mx27lite.h deleted file mode 100644 index ea87551d2736..000000000000 --- a/arch/arm/plat-mxc/include/mach/board-mx27lite.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2009 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_BOARD_MX27LITE_H__ | ||
12 | #define __ASM_ARCH_MXC_BOARD_MX27LITE_H__ | ||
13 | |||
14 | #endif /* __ASM_ARCH_MXC_BOARD_MX27LITE_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/board-mx27pdk.h b/arch/arm/plat-mxc/include/mach/board-mx27pdk.h deleted file mode 100644 index fec1bcfa9164..000000000000 --- a/arch/arm/plat-mxc/include/mach/board-mx27pdk.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2009 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_BOARD_MX27PDK_H__ | ||
12 | #define __ASM_ARCH_MXC_BOARD_MX27PDK_H__ | ||
13 | |||
14 | #endif /* __ASM_ARCH_MXC_BOARD_MX27PDK_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/board-mx31_3ds.h b/arch/arm/plat-mxc/include/mach/board-mx31_3ds.h deleted file mode 100644 index da92933a233b..000000000000 --- a/arch/arm/plat-mxc/include/mach/board-mx31_3ds.h +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2008 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_BOARD_MX31_3DS_H__ | ||
12 | #define __ASM_ARCH_MXC_BOARD_MX31_3DS_H__ | ||
13 | |||
14 | /* Definitions for components on the Debug board */ | ||
15 | |||
16 | /* Base address of CPLD controller on the Debug board */ | ||
17 | #define DEBUG_BASE_ADDRESS CS5_IO_ADDRESS(CS5_BASE_ADDR) | ||
18 | |||
19 | /* LAN9217 ethernet base address */ | ||
20 | #define LAN9217_BASE_ADDR CS5_BASE_ADDR | ||
21 | |||
22 | /* CPLD config and interrupt base address */ | ||
23 | #define CPLD_ADDR (DEBUG_BASE_ADDRESS + 0x20000) | ||
24 | |||
25 | /* LED switchs */ | ||
26 | #define CPLD_LED_REG (CPLD_ADDR + 0x00) | ||
27 | /* buttons */ | ||
28 | #define CPLD_SWITCH_BUTTONS_REG (EXPIO_ADDR + 0x08) | ||
29 | /* status, interrupt */ | ||
30 | #define CPLD_INT_STATUS_REG (CPLD_ADDR + 0x10) | ||
31 | #define CPLD_INT_MASK_REG (CPLD_ADDR + 0x38) | ||
32 | #define CPLD_INT_RESET_REG (CPLD_ADDR + 0x20) | ||
33 | /* magic word for debug CPLD */ | ||
34 | #define CPLD_MAGIC_NUMBER1_REG (CPLD_ADDR + 0x40) | ||
35 | #define CPLD_MAGIC_NUMBER2_REG (CPLD_ADDR + 0x48) | ||
36 | /* CPLD code version */ | ||
37 | #define CPLD_CODE_VER_REG (CPLD_ADDR + 0x50) | ||
38 | /* magic word for debug CPLD */ | ||
39 | #define CPLD_MAGIC_NUMBER3_REG (CPLD_ADDR + 0x58) | ||
40 | /* module reset register */ | ||
41 | #define CPLD_MODULE_RESET_REG (CPLD_ADDR + 0x60) | ||
42 | /* CPU ID and Personality ID */ | ||
43 | #define CPLD_MCU_BOARD_ID_REG (CPLD_ADDR + 0x68) | ||
44 | |||
45 | /* CPLD IRQ line for external uart, external ethernet etc */ | ||
46 | #define EXPIO_PARENT_INT IOMUX_TO_IRQ(MX31_PIN_GPIO1_1) | ||
47 | |||
48 | #define MXC_EXP_IO_BASE (MXC_BOARD_IRQ_START) | ||
49 | #define MXC_IRQ_TO_EXPIO(irq) ((irq) - MXC_EXP_IO_BASE) | ||
50 | |||
51 | #define EXPIO_INT_ENET (MXC_EXP_IO_BASE + 0) | ||
52 | #define EXPIO_INT_XUART_A (MXC_EXP_IO_BASE + 1) | ||
53 | #define EXPIO_INT_XUART_B (MXC_EXP_IO_BASE + 2) | ||
54 | #define EXPIO_INT_BUTTON_A (MXC_EXP_IO_BASE + 3) | ||
55 | #define EXPIO_INT_BUTTON_B (MXC_EXP_IO_BASE + 4) | ||
56 | |||
57 | #define MXC_MAX_EXP_IO_LINES 16 | ||
58 | |||
59 | #endif /* __ASM_ARCH_MXC_BOARD_MX31_3DS_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/board-mx31ads.h b/arch/arm/plat-mxc/include/mach/board-mx31ads.h deleted file mode 100644 index 095a199591c6..000000000000 --- a/arch/arm/plat-mxc/include/mach/board-mx31ads.h +++ /dev/null | |||
@@ -1,117 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2005-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_BOARD_MX31ADS_H__ | ||
12 | #define __ASM_ARCH_MXC_BOARD_MX31ADS_H__ | ||
13 | |||
14 | #include <mach/hardware.h> | ||
15 | |||
16 | /* Base address of PBC controller */ | ||
17 | #define PBC_BASE_ADDRESS MX31_CS4_BASE_ADDR_VIRT | ||
18 | /* Offsets for the PBC Controller register */ | ||
19 | |||
20 | /* PBC Board status register offset */ | ||
21 | #define PBC_BSTAT 0x000002 | ||
22 | |||
23 | /* PBC Board control register 1 set address */ | ||
24 | #define PBC_BCTRL1_SET 0x000004 | ||
25 | |||
26 | /* PBC Board control register 1 clear address */ | ||
27 | #define PBC_BCTRL1_CLEAR 0x000006 | ||
28 | |||
29 | /* PBC Board control register 2 set address */ | ||
30 | #define PBC_BCTRL2_SET 0x000008 | ||
31 | |||
32 | /* PBC Board control register 2 clear address */ | ||
33 | #define PBC_BCTRL2_CLEAR 0x00000A | ||
34 | |||
35 | /* PBC Board control register 3 set address */ | ||
36 | #define PBC_BCTRL3_SET 0x00000C | ||
37 | |||
38 | /* PBC Board control register 3 clear address */ | ||
39 | #define PBC_BCTRL3_CLEAR 0x00000E | ||
40 | |||
41 | /* PBC Board control register 4 set address */ | ||
42 | #define PBC_BCTRL4_SET 0x000010 | ||
43 | |||
44 | /* PBC Board control register 4 clear address */ | ||
45 | #define PBC_BCTRL4_CLEAR 0x000012 | ||
46 | |||
47 | /* PBC Board status register 1 */ | ||
48 | #define PBC_BSTAT1 0x000014 | ||
49 | |||
50 | /* PBC Board interrupt status register */ | ||
51 | #define PBC_INTSTATUS 0x000016 | ||
52 | |||
53 | /* PBC Board interrupt current status register */ | ||
54 | #define PBC_INTCURR_STATUS 0x000018 | ||
55 | |||
56 | /* PBC Interrupt mask register set address */ | ||
57 | #define PBC_INTMASK_SET 0x00001A | ||
58 | |||
59 | /* PBC Interrupt mask register clear address */ | ||
60 | #define PBC_INTMASK_CLEAR 0x00001C | ||
61 | |||
62 | /* External UART A */ | ||
63 | #define PBC_SC16C652_UARTA 0x010000 | ||
64 | |||
65 | /* External UART B */ | ||
66 | #define PBC_SC16C652_UARTB 0x010010 | ||
67 | |||
68 | /* Ethernet Controller IO base address */ | ||
69 | #define PBC_CS8900A_IOBASE 0x020000 | ||
70 | |||
71 | /* Ethernet Controller Memory base address */ | ||
72 | #define PBC_CS8900A_MEMBASE 0x021000 | ||
73 | |||
74 | /* Ethernet Controller DMA base address */ | ||
75 | #define PBC_CS8900A_DMABASE 0x022000 | ||
76 | |||
77 | /* External chip select 0 */ | ||
78 | #define PBC_XCS0 0x040000 | ||
79 | |||
80 | /* LCD Display enable */ | ||
81 | #define PBC_LCD_EN_B 0x060000 | ||
82 | |||
83 | /* Code test debug enable */ | ||
84 | #define PBC_CODE_B 0x070000 | ||
85 | |||
86 | /* PSRAM memory select */ | ||
87 | #define PBC_PSRAM_B 0x5000000 | ||
88 | |||
89 | #define PBC_INTSTATUS_REG (PBC_INTSTATUS + PBC_BASE_ADDRESS) | ||
90 | #define PBC_INTCURR_STATUS_REG (PBC_INTCURR_STATUS + PBC_BASE_ADDRESS) | ||
91 | #define PBC_INTMASK_SET_REG (PBC_INTMASK_SET + PBC_BASE_ADDRESS) | ||
92 | #define PBC_INTMASK_CLEAR_REG (PBC_INTMASK_CLEAR + PBC_BASE_ADDRESS) | ||
93 | #define EXPIO_PARENT_INT IOMUX_TO_IRQ(MX31_PIN_GPIO1_4) | ||
94 | |||
95 | #define MXC_EXP_IO_BASE (MXC_BOARD_IRQ_START) | ||
96 | #define MXC_IRQ_TO_EXPIO(irq) ((irq) - MXC_EXP_IO_BASE) | ||
97 | |||
98 | #define EXPIO_INT_LOW_BAT (MXC_EXP_IO_BASE + 0) | ||
99 | #define EXPIO_INT_PB_IRQ (MXC_EXP_IO_BASE + 1) | ||
100 | #define EXPIO_INT_OTG_FS_OVR (MXC_EXP_IO_BASE + 2) | ||
101 | #define EXPIO_INT_FSH_OVR (MXC_EXP_IO_BASE + 3) | ||
102 | #define EXPIO_INT_RES4 (MXC_EXP_IO_BASE + 4) | ||
103 | #define EXPIO_INT_RES5 (MXC_EXP_IO_BASE + 5) | ||
104 | #define EXPIO_INT_RES6 (MXC_EXP_IO_BASE + 6) | ||
105 | #define EXPIO_INT_RES7 (MXC_EXP_IO_BASE + 7) | ||
106 | #define EXPIO_INT_ENET_INT (MXC_EXP_IO_BASE + 8) | ||
107 | #define EXPIO_INT_OTG_FS_INT (MXC_EXP_IO_BASE + 9) | ||
108 | #define EXPIO_INT_XUART_INTA (MXC_EXP_IO_BASE + 10) | ||
109 | #define EXPIO_INT_XUART_INTB (MXC_EXP_IO_BASE + 11) | ||
110 | #define EXPIO_INT_SYNTH_IRQ (MXC_EXP_IO_BASE + 12) | ||
111 | #define EXPIO_INT_CE_INT1 (MXC_EXP_IO_BASE + 13) | ||
112 | #define EXPIO_INT_CE_INT2 (MXC_EXP_IO_BASE + 14) | ||
113 | #define EXPIO_INT_RES15 (MXC_EXP_IO_BASE + 15) | ||
114 | |||
115 | #define MXC_MAX_EXP_IO_LINES 16 | ||
116 | |||
117 | #endif /* __ASM_ARCH_MXC_BOARD_MX31ADS_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/board-mx31lilly.h b/arch/arm/plat-mxc/include/mach/board-mx31lilly.h index eb5a5024622e..0df71bfefbb1 100644 --- a/arch/arm/plat-mxc/include/mach/board-mx31lilly.h +++ b/arch/arm/plat-mxc/include/mach/board-mx31lilly.h | |||
@@ -31,7 +31,7 @@ enum mx31lilly_boards { | |||
31 | 31 | ||
32 | /* | 32 | /* |
33 | * This CPU module needs a baseboard to work. After basic initializing | 33 | * This CPU module needs a baseboard to work. After basic initializing |
34 | * its own devices, it calls baseboard's init function. | 34 | * its own devices, it calls the baseboard's init function. |
35 | */ | 35 | */ |
36 | 36 | ||
37 | extern void mx31lilly_db_init(void); | 37 | extern void mx31lilly_db_init(void); |
diff --git a/arch/arm/plat-mxc/include/mach/board-mx31lite.h b/arch/arm/plat-mxc/include/mach/board-mx31lite.h index 2b2da0367578..c1ad0ae807cc 100644 --- a/arch/arm/plat-mxc/include/mach/board-mx31lite.h +++ b/arch/arm/plat-mxc/include/mach/board-mx31lite.h | |||
@@ -32,7 +32,7 @@ enum mx31lite_boards { | |||
32 | 32 | ||
33 | /* | 33 | /* |
34 | * This CPU module needs a baseboard to work. After basic initializing | 34 | * This CPU module needs a baseboard to work. After basic initializing |
35 | * its own devices, it calls baseboard's init function. | 35 | * its own devices, it calls the baseboard's init function. |
36 | */ | 36 | */ |
37 | 37 | ||
38 | extern void mx31lite_db_init(void); | 38 | extern void mx31lite_db_init(void); |
diff --git a/arch/arm/plat-mxc/include/mach/board-mx31moboard.h b/arch/arm/plat-mxc/include/mach/board-mx31moboard.h index 36ff3cedee1a..de14543891cf 100644 --- a/arch/arm/plat-mxc/include/mach/board-mx31moboard.h +++ b/arch/arm/plat-mxc/include/mach/board-mx31moboard.h | |||
@@ -31,7 +31,7 @@ enum mx31moboard_boards { | |||
31 | 31 | ||
32 | /* | 32 | /* |
33 | * This CPU module needs a baseboard to work. After basic initializing | 33 | * This CPU module needs a baseboard to work. After basic initializing |
34 | * its own devices, it calls baseboard's init function. | 34 | * its own devices, it calls the baseboard's init function. |
35 | */ | 35 | */ |
36 | 36 | ||
37 | extern void mx31moboard_devboard_init(void); | 37 | extern void mx31moboard_devboard_init(void); |
diff --git a/arch/arm/plat-mxc/include/mach/board-mx35pdk.h b/arch/arm/plat-mxc/include/mach/board-mx35pdk.h deleted file mode 100644 index 383f1c04df06..000000000000 --- a/arch/arm/plat-mxc/include/mach/board-mx35pdk.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
18 | |||
19 | #ifndef __ASM_ARCH_MXC_BOARD_MX35PDK_H__ | ||
20 | #define __ASM_ARCH_MXC_BOARD_MX35PDK_H__ | ||
21 | |||
22 | #endif /* __ASM_ARCH_MXC_BOARD_MX35PDK_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/board-pcm037.h b/arch/arm/plat-mxc/include/mach/board-pcm037.h deleted file mode 100644 index 13411709b13a..000000000000 --- a/arch/arm/plat-mxc/include/mach/board-pcm037.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008 Sascha Hauer, Pengutronix | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
18 | |||
19 | #ifndef __ASM_ARCH_MXC_BOARD_PCM037_H__ | ||
20 | #define __ASM_ARCH_MXC_BOARD_PCM037_H__ | ||
21 | |||
22 | #endif /* __ASM_ARCH_MXC_BOARD_PCM037_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/board-pcm038.h b/arch/arm/plat-mxc/include/mach/board-pcm038.h index 410f9786ed22..6f371e35753d 100644 --- a/arch/arm/plat-mxc/include/mach/board-pcm038.h +++ b/arch/arm/plat-mxc/include/mach/board-pcm038.h | |||
@@ -22,7 +22,7 @@ | |||
22 | #ifndef __ASSEMBLY__ | 22 | #ifndef __ASSEMBLY__ |
23 | /* | 23 | /* |
24 | * This CPU module needs a baseboard to work. After basic initializing | 24 | * This CPU module needs a baseboard to work. After basic initializing |
25 | * its own devices, it calls baseboard's init function. | 25 | * its own devices, it calls the baseboard's init function. |
26 | * TODO: Add your own baseboard init function and call it from | 26 | * TODO: Add your own baseboard init function and call it from |
27 | * inside pcm038_init(). | 27 | * inside pcm038_init(). |
28 | * | 28 | * |
diff --git a/arch/arm/plat-mxc/include/mach/board-pcm043.h b/arch/arm/plat-mxc/include/mach/board-pcm043.h deleted file mode 100644 index 1ac4e1682e5c..000000000000 --- a/arch/arm/plat-mxc/include/mach/board-pcm043.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008 Sascha Hauer, Pengutronix | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
18 | |||
19 | #ifndef __ASM_ARCH_MXC_BOARD_PCM043_H__ | ||
20 | #define __ASM_ARCH_MXC_BOARD_PCM043_H__ | ||
21 | |||
22 | #endif /* __ASM_ARCH_MXC_BOARD_PCM043_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/board-qong.h b/arch/arm/plat-mxc/include/mach/board-qong.h deleted file mode 100644 index 6d88c7af4b23..000000000000 --- a/arch/arm/plat-mxc/include/mach/board-qong.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2009 Ilya Yanok, Emcraft Systems Ltd, <yanok@emcraft.com> | ||
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_BOARD_QONG_H__ | ||
12 | #define __ASM_ARCH_MXC_BOARD_QONG_H__ | ||
13 | |||
14 | /* NOR FLASH */ | ||
15 | #define QONG_NOR_SIZE (128*1024*1024) | ||
16 | |||
17 | #endif /* __ASM_ARCH_MXC_BOARD_QONG_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/debug-macro.S b/arch/arm/plat-mxc/include/mach/debug-macro.S index 0b6e11eaeb8c..25606409aabc 100644 --- a/arch/arm/plat-mxc/include/mach/debug-macro.S +++ b/arch/arm/plat-mxc/include/mach/debug-macro.S | |||
@@ -23,8 +23,8 @@ | |||
23 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" | 23 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" |
24 | #endif | 24 | #endif |
25 | #include <mach/mx25.h> | 25 | #include <mach/mx25.h> |
26 | #define UART_PADDR UART1_BASE_ADDR | 26 | #define UART_PADDR MX25_UART1_BASE_ADDR |
27 | #define UART_VADDR MX25_AIPS1_IO_ADDRESS(UART1_BASE_ADDR) | 27 | #define UART_VADDR MX25_AIPS1_IO_ADDRESS(MX25_UART1_BASE_ADDR) |
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | #ifdef CONFIG_ARCH_MX2 | 30 | #ifdef CONFIG_ARCH_MX2 |
diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h b/arch/arm/plat-mxc/include/mach/devices-common.h new file mode 100644 index 000000000000..c5f68c587309 --- /dev/null +++ b/arch/arm/plat-mxc/include/mach/devices-common.h | |||
@@ -0,0 +1,60 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009-2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <linux/kernel.h> | ||
10 | #include <linux/platform_device.h> | ||
11 | #include <linux/init.h> | ||
12 | |||
13 | struct platform_device *imx_add_platform_device(const char *name, int id, | ||
14 | const struct resource *res, unsigned int num_resources, | ||
15 | const void *data, size_t size_data); | ||
16 | |||
17 | #if defined (CONFIG_CAN_FLEXCAN) || defined (CONFIG_CAN_FLEXCAN_MODULE) | ||
18 | #include <linux/can/platform/flexcan.h> | ||
19 | struct platform_device *__init imx_add_flexcan(int id, | ||
20 | resource_size_t iobase, resource_size_t iosize, | ||
21 | resource_size_t irq, | ||
22 | const struct flexcan_platform_data *pdata); | ||
23 | #else | ||
24 | /* the ifdef can be removed once the flexcan driver has been merged */ | ||
25 | struct flexcan_platform_data; | ||
26 | static inline struct platform_device *__init imx_add_flexcan(int id, | ||
27 | resource_size_t iobase, resource_size_t iosize, | ||
28 | resource_size_t irq, | ||
29 | const struct flexcan_platform_data *pdata) | ||
30 | { | ||
31 | return NULL; | ||
32 | } | ||
33 | #endif | ||
34 | |||
35 | #include <mach/i2c.h> | ||
36 | struct platform_device *__init imx_add_imx_i2c(int id, | ||
37 | resource_size_t iobase, resource_size_t iosize, int irq, | ||
38 | const struct imxi2c_platform_data *pdata); | ||
39 | |||
40 | #include <mach/imx-uart.h> | ||
41 | struct platform_device *__init imx_add_imx_uart_3irq(int id, | ||
42 | resource_size_t iobase, resource_size_t iosize, | ||
43 | resource_size_t irqrx, resource_size_t irqtx, | ||
44 | resource_size_t irqrts, | ||
45 | const struct imxuart_platform_data *pdata); | ||
46 | struct platform_device *__init imx_add_imx_uart_1irq(int id, | ||
47 | resource_size_t iobase, resource_size_t iosize, | ||
48 | resource_size_t irq, | ||
49 | const struct imxuart_platform_data *pdata); | ||
50 | |||
51 | #include <mach/mxc_nand.h> | ||
52 | struct platform_device *__init imx_add_mxc_nand_v1(resource_size_t iobase, | ||
53 | int irq, const struct mxc_nand_platform_data *pdata); | ||
54 | struct platform_device *__init imx_add_mxc_nand_v21(resource_size_t iobase, | ||
55 | int irq, const struct mxc_nand_platform_data *pdata); | ||
56 | |||
57 | #include <mach/spi.h> | ||
58 | struct platform_device *__init imx_add_spi_imx(int id, | ||
59 | resource_size_t iobase, resource_size_t iosize, int irq, | ||
60 | const struct spi_imx_master *pdata); | ||
diff --git a/arch/arm/plat-mxc/include/mach/board-eukrea_cpuimx27.h b/arch/arm/plat-mxc/include/mach/eukrea-baseboards.h index a1fd5830af48..634e3f4c454d 100644 --- a/arch/arm/plat-mxc/include/mach/board-eukrea_cpuimx27.h +++ b/arch/arm/plat-mxc/include/mach/eukrea-baseboards.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2009 Eric Benard - eric@eukrea.com | 2 | * Copyright (C) 2010 Eric Benard - eric@eukrea.com |
3 | * | 3 | * |
4 | * Based on board-pcm038.h which is : | 4 | * Based on board-pcm038.h which is : |
5 | * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de) | 5 | * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de) |
@@ -19,22 +19,29 @@ | |||
19 | * MA 02110-1301, USA. | 19 | * MA 02110-1301, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #ifndef __ASM_ARCH_MXC_BOARD_EUKREA_CPUIMX27_H__ | 22 | #ifndef __MACH_EUKREA_BASEBOARDS_H__ |
23 | #define __ASM_ARCH_MXC_BOARD_EUKREA_CPUIMX27_H__ | 23 | #define __MACH_EUKREA_BASEBOARDS_H__ |
24 | 24 | ||
25 | #ifndef __ASSEMBLY__ | 25 | #ifndef __ASSEMBLY__ |
26 | /* | 26 | /* |
27 | * This CPU module needs a baseboard to work. After basic initializing | 27 | * This CPU module needs a baseboard to work. After basic initializing |
28 | * its own devices, it calls baseboard's init function. | 28 | * its own devices, it calls baseboard's init function. |
29 | * TODO: Add your own baseboard init function and call it from | 29 | * TODO: Add your own baseboard init function and call it from |
30 | * inside eukrea_cpuimx27_init(). | 30 | * inside eukrea_cpuimx25_init() eukrea_cpuimx27_init() |
31 | * eukrea_cpuimx35_init() or eukrea_cpuimx51_init(). | ||
31 | * | 32 | * |
32 | * This example here is for the development board. Refer | 33 | * This example here is for the development board. Refer |
33 | * eukrea_mbimx27-baseboard.c | 34 | * mach-mx25/eukrea_mbimxsd-baseboard.c for cpuimx25 |
35 | * mach-imx/eukrea_mbimx27-baseboard.c for cpuimx27 | ||
36 | * mach-mx3/eukrea_mbimxsd-baseboard.c for cpuimx35 | ||
37 | * mach-mx5/eukrea_mbimx51-baseboard.c for cpuimx51 | ||
34 | */ | 38 | */ |
35 | 39 | ||
40 | extern void eukrea_mbimx25_baseboard_init(void); | ||
36 | extern void eukrea_mbimx27_baseboard_init(void); | 41 | extern void eukrea_mbimx27_baseboard_init(void); |
42 | extern void eukrea_mbimx35_baseboard_init(void); | ||
43 | extern void eukrea_mbimx51_baseboard_init(void); | ||
37 | 44 | ||
38 | #endif | 45 | #endif |
39 | 46 | ||
40 | #endif /* __ASM_ARCH_MXC_BOARD_EUKREA_CPUIMX27_H__ */ | 47 | #endif /* __MACH_EUKREA_BASEBOARDS_H__ */ |
diff --git a/arch/arm/plat-mxc/include/mach/gpio.h b/arch/arm/plat-mxc/include/mach/gpio.h index 894d2f87c856..661fbc605759 100644 --- a/arch/arm/plat-mxc/include/mach/gpio.h +++ b/arch/arm/plat-mxc/include/mach/gpio.h | |||
@@ -33,9 +33,11 @@ | |||
33 | struct mxc_gpio_port { | 33 | struct mxc_gpio_port { |
34 | void __iomem *base; | 34 | void __iomem *base; |
35 | int irq; | 35 | int irq; |
36 | int irq_high; | ||
36 | int virtual_irq_start; | 37 | int virtual_irq_start; |
37 | struct gpio_chip chip; | 38 | struct gpio_chip chip; |
38 | u32 both_edges; | 39 | u32 both_edges; |
40 | spinlock_t lock; | ||
39 | }; | 41 | }; |
40 | 42 | ||
41 | int mxc_gpio_init(struct mxc_gpio_port*, int); | 43 | int mxc_gpio_init(struct mxc_gpio_port*, int); |
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx25.h b/arch/arm/plat-mxc/include/mach/iomux-mx25.h index f39220d1b67a..d7f52c91f82e 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mx25.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx25.h | |||
@@ -252,6 +252,7 @@ | |||
252 | #define MX25_PAD_OE_ACD__GPIO_1_25 IOMUX_PAD(0x30c, 0x114, 0x15, 0, 0, NO_PAD_CTRL) | 252 | #define MX25_PAD_OE_ACD__GPIO_1_25 IOMUX_PAD(0x30c, 0x114, 0x15, 0, 0, NO_PAD_CTRL) |
253 | 253 | ||
254 | #define MX25_PAD_CONTRAST__CONTRAST IOMUX_PAD(0x310, 0x118, 0x10, 0, 0, NO_PAD_CTRL) | 254 | #define MX25_PAD_CONTRAST__CONTRAST IOMUX_PAD(0x310, 0x118, 0x10, 0, 0, NO_PAD_CTRL) |
255 | #define MX25_PAD_CONTRAST__PWM4_PWMO IOMUX_PAD(0x310, 0x118, 0x14, 0, 0, NO_PAD_CTRL) | ||
255 | #define MX25_PAD_CONTRAST__FEC_CRS IOMUX_PAD(0x310, 0x118, 0x15, 0x508, 1, NO_PAD_CTRL) | 256 | #define MX25_PAD_CONTRAST__FEC_CRS IOMUX_PAD(0x310, 0x118, 0x15, 0x508, 1, NO_PAD_CTRL) |
256 | 257 | ||
257 | #define MX25_PAD_PWM__PWM IOMUX_PAD(0x314, 0x11c, 0x10, 0, 0, NO_PAD_CTRL) | 258 | #define MX25_PAD_PWM__PWM IOMUX_PAD(0x314, 0x11c, 0x10, 0, 0, NO_PAD_CTRL) |
@@ -371,30 +372,41 @@ | |||
371 | #define MX25_PAD_SD1_DATA3__FEC_CRS IOMUX_PAD(0x39c, 0x1a4, 0x10, 0x508, 2, NO_PAD_CTRL) | 372 | #define MX25_PAD_SD1_DATA3__FEC_CRS IOMUX_PAD(0x39c, 0x1a4, 0x10, 0x508, 2, NO_PAD_CTRL) |
372 | #define MX25_PAD_SD1_DATA3__GPIO_2_28 IOMUX_PAD(0x39c, 0x1a4, 0x15, 0, 0, NO_PAD_CTRL) | 373 | #define MX25_PAD_SD1_DATA3__GPIO_2_28 IOMUX_PAD(0x39c, 0x1a4, 0x15, 0, 0, NO_PAD_CTRL) |
373 | 374 | ||
374 | #define MX25_PAD_KPP_ROW0__KPP_ROW0 IOMUX_PAD(0x3a0, 0x1a8, 0x10, 0, 0, PAD_CTL_PKE) | 375 | #define KPP_CTL_ROW (PAD_CTL_PKE | PAD_CTL_PUE | PAD_CTL_PUS_100K_UP) |
376 | #define KPP_CTL_COL (PAD_CTL_PKE | PAD_CTL_PUE | PAD_CTL_PUS_100K_UP | PAD_CTL_ODE) | ||
377 | |||
378 | #define MX25_PAD_KPP_ROW0__KPP_ROW0 IOMUX_PAD(0x3a0, 0x1a8, 0x10, 0, 0, KPP_CTL_ROW) | ||
375 | #define MX25_PAD_KPP_ROW0__GPIO_2_29 IOMUX_PAD(0x3a0, 0x1a8, 0x15, 0, 0, NO_PAD_CTRL) | 379 | #define MX25_PAD_KPP_ROW0__GPIO_2_29 IOMUX_PAD(0x3a0, 0x1a8, 0x15, 0, 0, NO_PAD_CTRL) |
376 | 380 | ||
377 | #define MX25_PAD_KPP_ROW1__KPP_ROW1 IOMUX_PAD(0x3a4, 0x1ac, 0x10, 0, 0, PAD_CTL_PKE) | 381 | #define MX25_PAD_KPP_ROW1__KPP_ROW1 IOMUX_PAD(0x3a4, 0x1ac, 0x10, 0, 0, KPP_CTL_ROW) |
378 | #define MX25_PAD_KPP_ROW1__GPIO_2_30 IOMUX_PAD(0x3a4, 0x1ac, 0x15, 0, 0, NO_PAD_CTRL) | 382 | #define MX25_PAD_KPP_ROW1__GPIO_2_30 IOMUX_PAD(0x3a4, 0x1ac, 0x15, 0, 0, NO_PAD_CTRL) |
379 | 383 | ||
380 | #define MX25_PAD_KPP_ROW2__KPP_ROW2 IOMUX_PAD(0x3a8, 0x1b0, 0x10, 0, 0, PAD_CTL_PKE) | 384 | #define MX25_PAD_KPP_ROW2__KPP_ROW2 IOMUX_PAD(0x3a8, 0x1b0, 0x10, 0, 0, KPP_CTL_ROW) |
381 | #define MX25_PAD_KPP_ROW2__CSI_D0 IOMUX_PAD(0x3a8, 0x1b0, 0x13, 0x488, 2, NO_PAD_CTRL) | 385 | #define MX25_PAD_KPP_ROW2__CSI_D0 IOMUX_PAD(0x3a8, 0x1b0, 0x13, 0x488, 2, NO_PAD_CTRL) |
382 | #define MX25_PAD_KPP_ROW2__GPIO_2_31 IOMUX_PAD(0x3a8, 0x1b0, 0x15, 0, 0, NO_PAD_CTRL) | 386 | #define MX25_PAD_KPP_ROW2__GPIO_2_31 IOMUX_PAD(0x3a8, 0x1b0, 0x15, 0, 0, NO_PAD_CTRL) |
383 | 387 | ||
384 | #define MX25_PAD_KPP_ROW3__KPP_ROW3 IOMUX_PAD(0x3ac, 0x1b4, 0x10, 0, 0, PAD_CTL_PKE) | 388 | #define MX25_PAD_KPP_ROW3__KPP_ROW3 IOMUX_PAD(0x3ac, 0x1b4, 0x10, 0, 0, KPP_CTL_ROW) |
385 | #define MX25_PAD_KPP_ROW3__CSI_LD1 IOMUX_PAD(0x3ac, 0x1b4, 0x13, 0x48c, 2, NO_PAD_CTRL) | 389 | #define MX25_PAD_KPP_ROW3__CSI_LD1 IOMUX_PAD(0x3ac, 0x1b4, 0x13, 0x48c, 2, NO_PAD_CTRL) |
386 | #define MX25_PAD_KPP_ROW3__GPIO_3_0 IOMUX_PAD(0x3ac, 0x1b4, 0x15, 0, 0, NO_PAD_CTRL) | 390 | #define MX25_PAD_KPP_ROW3__GPIO_3_0 IOMUX_PAD(0x3ac, 0x1b4, 0x15, 0, 0, NO_PAD_CTRL) |
387 | 391 | ||
388 | #define MX25_PAD_KPP_COL0__KPP_COL0 IOMUX_PAD(0x3b0, 0x1b8, 0x10, 0, 0, PAD_CTL_PKE | PAD_CTL_ODE) | 392 | #define MX25_PAD_KPP_COL0__KPP_COL0 IOMUX_PAD(0x3b0, 0x1b8, 0x10, 0, 0, KPP_CTL_COL) |
393 | #define MX25_PAD_KPP_COL0__UART4_RXD_MUX IOMUX_PAD(0x3b0, 0x1b8, 0x11, 0x570, 1, NO_PAD_CTRL) | ||
394 | #define MX25_PAD_KPP_COL0__AUD5_TXD IOMUX_PAD(0x3b0, 0x1b8, 0x12, 0, 0, PAD_CTL_PKE | PAD_CTL_PUS_100K_UP) | ||
389 | #define MX25_PAD_KPP_COL0__GPIO_3_1 IOMUX_PAD(0x3b0, 0x1b8, 0x15, 0, 0, NO_PAD_CTRL) | 395 | #define MX25_PAD_KPP_COL0__GPIO_3_1 IOMUX_PAD(0x3b0, 0x1b8, 0x15, 0, 0, NO_PAD_CTRL) |
390 | 396 | ||
391 | #define MX25_PAD_KPP_COL1__KPP_COL1 IOMUX_PAD(0x3b4, 0x1bc, 0x10, 0, 0, PAD_CTL_PKE | PAD_CTL_ODE) | 397 | #define MX25_PAD_KPP_COL1__KPP_COL1 IOMUX_PAD(0x3b4, 0x1bc, 0x10, 0, 0, KPP_CTL_COL) |
398 | #define MX25_PAD_KPP_COL1__UART4_TXD_MUX IOMUX_PAD(0x3b4, 0x1bc, 0x11, 0, 0, NO_PAD_CTRL) | ||
399 | #define MX25_PAD_KPP_COL1__AUD5_RXD IOMUX_PAD(0x3b4, 0x1bc, 0x12, 0, 0, PAD_CTL_PKE | PAD_CTL_PUS_100K_UP) | ||
392 | #define MX25_PAD_KPP_COL1__GPIO_3_2 IOMUX_PAD(0x3b4, 0x1bc, 0x15, 0, 0, NO_PAD_CTRL) | 400 | #define MX25_PAD_KPP_COL1__GPIO_3_2 IOMUX_PAD(0x3b4, 0x1bc, 0x15, 0, 0, NO_PAD_CTRL) |
393 | 401 | ||
394 | #define MX25_PAD_KPP_COL2__KPP_COL2 IOMUX_PAD(0x3b8, 0x1c0, 0x10, 0, 0, PAD_CTL_PKE | PAD_CTL_ODE) | 402 | #define MX25_PAD_KPP_COL2__KPP_COL2 IOMUX_PAD(0x3b8, 0x1c0, 0x10, 0, 0, KPP_CTL_COL) |
403 | #define MX25_PAD_KPP_COL2__UART4_RTS IOMUX_PAD(0x3b8, 0x1c0, 0x11, 0, 0, NO_PAD_CTRL) | ||
404 | #define MX25_PAD_KPP_COL2__AUD5_TXC IOMUX_PAD(0x3b8, 0x1c0, 0x12, 0, 0, PAD_CTL_PKE | PAD_CTL_PUS_100K_UP) | ||
395 | #define MX25_PAD_KPP_COL2__GPIO_3_3 IOMUX_PAD(0x3b8, 0x1c0, 0x15, 0, 0, NO_PAD_CTRL) | 405 | #define MX25_PAD_KPP_COL2__GPIO_3_3 IOMUX_PAD(0x3b8, 0x1c0, 0x15, 0, 0, NO_PAD_CTRL) |
396 | 406 | ||
397 | #define MX25_PAD_KPP_COL3__KPP_COL3 IOMUX_PAD(0x3bc, 0x1c4, 0x10, 0, 0, PAD_CTL_PKE | PAD_CTL_ODE) | 407 | #define MX25_PAD_KPP_COL3__KPP_COL3 IOMUX_PAD(0x3bc, 0x1c4, 0x10, 0, 0, KPP_CTL_COL) |
408 | #define MX25_PAD_KPP_COL3__UART4_CTS IOMUX_PAD(0x3bc, 0x1c4, 0x11, 0, 0, NO_PAD_CTRL) | ||
409 | #define MX25_PAD_KPP_COL3__AUD5_TXFS IOMUX_PAD(0x3bc, 0x1c4, 0x12, 0, 0, PAD_CTL_PKE | PAD_CTL_PUS_100K_UP) | ||
398 | #define MX25_PAD_KPP_COL3__GPIO_3_4 IOMUX_PAD(0x3bc, 0x1c4, 0x15, 0, 0, NO_PAD_CTRL) | 410 | #define MX25_PAD_KPP_COL3__GPIO_3_4 IOMUX_PAD(0x3bc, 0x1c4, 0x15, 0, 0, NO_PAD_CTRL) |
399 | 411 | ||
400 | #define MX25_PAD_FEC_MDC__FEC_MDC IOMUX_PAD(0x3c0, 0x1c8, 0x10, 0, 0, NO_PAD_CTRL) | 412 | #define MX25_PAD_FEC_MDC__FEC_MDC IOMUX_PAD(0x3c0, 0x1c8, 0x10, 0, 0, NO_PAD_CTRL) |
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx51.h b/arch/arm/plat-mxc/include/mach/iomux-mx51.h index ab0f95d953d0..21bfa46785bb 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mx51.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx51.h | |||
@@ -27,8 +27,8 @@ typedef enum iomux_config { | |||
27 | IOMUX_CONFIG_ALT5, | 27 | IOMUX_CONFIG_ALT5, |
28 | IOMUX_CONFIG_ALT6, | 28 | IOMUX_CONFIG_ALT6, |
29 | IOMUX_CONFIG_ALT7, | 29 | IOMUX_CONFIG_ALT7, |
30 | IOMUX_CONFIG_GPIO, /* added to help user use GPIO mode */ | 30 | IOMUX_CONFIG_GPIO, /* added to help user use GPIO mode */ |
31 | IOMUX_CONFIG_SION = 0x1 << 4, /* LOOPBACK:MUX SION bit */ | 31 | IOMUX_CONFIG_SION = 0x1 << 4, /* LOOPBACK:MUX SION bit */ |
32 | } iomux_pin_cfg_t; | 32 | } iomux_pin_cfg_t; |
33 | 33 | ||
34 | /* Pad control groupings */ | 34 | /* Pad control groupings */ |
@@ -38,6 +38,8 @@ typedef enum iomux_config { | |||
38 | PAD_CTL_SRE_FAST) | 38 | PAD_CTL_SRE_FAST) |
39 | #define MX51_UART3_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_DSE_HIGH | \ | 39 | #define MX51_UART3_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_DSE_HIGH | \ |
40 | PAD_CTL_SRE_FAST) | 40 | PAD_CTL_SRE_FAST) |
41 | #define MX51_I2C_PAD_CTRL (PAD_CTL_SRE_FAST | PAD_CTL_ODE | \ | ||
42 | PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP | PAD_CTL_HYS) | ||
41 | #define MX51_USBH1_PAD_CTRL (PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH | \ | 43 | #define MX51_USBH1_PAD_CTRL (PAD_CTL_SRE_FAST | PAD_CTL_DSE_HIGH | \ |
42 | PAD_CTL_PUS_100K_UP | PAD_CTL_PUE | \ | 44 | PAD_CTL_PUS_100K_UP | PAD_CTL_PUE | \ |
43 | PAD_CTL_PKE | PAD_CTL_HYS) | 45 | PAD_CTL_PKE | PAD_CTL_HYS) |
@@ -46,289 +48,278 @@ typedef enum iomux_config { | |||
46 | 48 | ||
47 | /* | 49 | /* |
48 | * The naming convention for the pad modes is MX51_PAD_<padname>__<padmode> | 50 | * The naming convention for the pad modes is MX51_PAD_<padname>__<padmode> |
49 | * If <padname> or <padmode> refers to a GPIO, it is named | 51 | * If <padname> or <padmode> refers to a GPIO, it is named GPIO_<unit>_<num> |
50 | * GPIO_<unit>_<num> see also iomux-v3.h | 52 | * See also iomux-v3.h |
51 | */ | 53 | */ |
52 | 54 | ||
53 | /* | 55 | /* PAD MUX ALT INPSE PATH PADCTRL */ |
54 | * FIXME: This was converted using scripts from existing Freescale code to | 56 | #define MX51_PAD_EIM_DA0__EIM_DA0 IOMUX_PAD(0x7a8, 0x01c, 0, 0x0, 0, NO_PAD_CTRL) |
55 | * this form used upstream. Need to verify the name format. | 57 | #define MX51_PAD_EIM_DA1__EIM_DA1 IOMUX_PAD(0x7a8, 0x020, 0, 0x0, 0, NO_PAD_CTRL) |
56 | */ | 58 | #define MX51_PAD_EIM_DA2__EIM_DA2 IOMUX_PAD(0x7a8, 0x024, 0, 0x0, 0, NO_PAD_CTRL) |
57 | 59 | #define MX51_PAD_EIM_DA3__EIM_DA3 IOMUX_PAD(0x7a8, 0x028, 0, 0x0, 0, NO_PAD_CTRL) | |
58 | /* PAD MUX ALT INPSE PATH PADCTRL */ | 60 | #define MX51_PAD_EIM_DA4__EIM_DA4 IOMUX_PAD(0x7ac, 0x02c, 0, 0x0, 0, NO_PAD_CTRL) |
59 | 61 | #define MX51_PAD_EIM_DA5__EIM_DA5 IOMUX_PAD(0x7ac, 0x030, 0, 0x0, 0, NO_PAD_CTRL) | |
60 | #define MX51_PAD_GPIO_2_0__EIM_D16 IOMUX_PAD(0x3f0, 0x05c, 1, 0x0, 0, NO_PAD_CTRL) | 62 | #define MX51_PAD_EIM_DA6__EIM_DA6 IOMUX_PAD(0x7ac, 0x034, 0, 0x0, 0, NO_PAD_CTRL) |
61 | #define MX51_PAD_GPIO_2_1__EIM_D17 IOMUX_PAD(0x3f4, 0x060, 1, 0x0, 0, NO_PAD_CTRL) | 63 | #define MX51_PAD_EIM_DA7__EIM_DA7 IOMUX_PAD(0x7ac, 0x038, 0, 0x0, 0, NO_PAD_CTRL) |
62 | #define MX51_PAD_GPIO_2_2__EIM_D18 IOMUX_PAD(0x3f8, 0x064, 1, 0x0, 0, NO_PAD_CTRL) | 64 | #define MX51_PAD_EIM_DA8__EIM_DA8 IOMUX_PAD(0x7b0, 0x03c, 0, 0x0, 0, NO_PAD_CTRL) |
63 | #define MX51_PAD_GPIO_2_3__EIM_D19 IOMUX_PAD(0x3fc, 0x068, 1, 0x0, 0, NO_PAD_CTRL) | 65 | #define MX51_PAD_EIM_DA9__EIM_DA9 IOMUX_PAD(0x7b0, 0x040, 0, 0x0, 0, NO_PAD_CTRL) |
64 | #define MX51_PAD_GPIO_2_4__EIM_D20 IOMUX_PAD(0x400, 0x06c, 1, 0x0, 0, NO_PAD_CTRL) | 66 | #define MX51_PAD_EIM_DA10__EIM_DA10 IOMUX_PAD(0x7b0, 0x044, 0, 0x0, 0, NO_PAD_CTRL) |
65 | #define MX51_PAD_GPIO_2_5__EIM_D21 IOMUX_PAD(0x404, 0x070, 1, 0x0, 0, NO_PAD_CTRL) | 67 | #define MX51_PAD_EIM_DA11__EIM_DA11 IOMUX_PAD(0x7b0, 0x048, 0, 0x0, 0, NO_PAD_CTRL) |
66 | #define MX51_PAD_EIM_D21__GPIO_2_5 IOMUX_PAD(0x404, 0x070, IOMUX_CONFIG_ALT1, 0x0, 0, MX51_GPIO_PAD_CTRL) | 68 | #define MX51_PAD_EIM_DA12__EIM_DA12 IOMUX_PAD(0x7bc, 0x04c, 0, 0x0, 0, NO_PAD_CTRL) |
67 | #define MX51_PAD_GPIO_2_6__EIM_D22 IOMUX_PAD(0x408, 0x074, 1, 0x0, 0, NO_PAD_CTRL) | 69 | #define MX51_PAD_EIM_DA13__EIM_DA13 IOMUX_PAD(0x7bc, 0x050, 0, 0x0, 0, NO_PAD_CTRL) |
68 | #define MX51_PAD_GPIO_2_7__EIM_D23 IOMUX_PAD(0x40c, 0x078, 1, 0x0, 0, NO_PAD_CTRL) | 70 | #define MX51_PAD_EIM_DA14__EIM_DA14 IOMUX_PAD(0x7bc, 0x054, 0, 0x0, 0, NO_PAD_CTRL) |
69 | 71 | #define MX51_PAD_EIM_DA15__EIM_DA15 IOMUX_PAD(0x7bc, 0x058, 0, 0x0, 0, NO_PAD_CTRL) | |
70 | /* Babbage UART3 */ | 72 | #define MX51_PAD_EIM_D16__GPIO_2_0 IOMUX_PAD(0x3f0, 0x05c, 1, 0x0, 0, NO_PAD_CTRL) |
71 | #define MX51_PAD_EIM_D24__UART3_CTS IOMUX_PAD(0x410, 0x07c, IOMUX_CONFIG_ALT3, 0x0, 0, MX51_UART3_PAD_CTRL) | 73 | #define MX51_PAD_EIM_D16__I2C1_SDA IOMUX_PAD(0x3f0, 0x05c, (4 | IOMUX_CONFIG_SION), \ |
72 | #define MX51_PAD_EIM_D25__UART3_RXD IOMUX_PAD(0x414, 0x080, IOMUX_CONFIG_ALT3, 0x9f4, 0, MX51_UART3_PAD_CTRL) | 74 | 0x09b4, 0, MX51_I2C_PAD_CTRL) |
73 | #define MX51_PAD_EIM_D26__UART3_TXD IOMUX_PAD(0x418, 0x084, IOMUX_CONFIG_ALT3, 0x0, 0, MX51_UART3_PAD_CTRL) | 75 | #define MX51_PAD_EIM_D17__GPIO_2_1 IOMUX_PAD(0x3f4, 0x060, 1, 0x0, 0, NO_PAD_CTRL) |
74 | #define MX51_PAD_EIM_D27__UART3_RTS IOMUX_PAD(0x41c, 0x088, IOMUX_CONFIG_ALT3, 0x9f0, 0, MX51_UART3_PAD_CTRL) | 76 | #define MX51_PAD_EIM_D18__GPIO_2_2 IOMUX_PAD(0x3f8, 0x064, 1, 0x0, 0, NO_PAD_CTRL) |
75 | 77 | #define MX51_PAD_EIM_D19__GPIO_2_3 IOMUX_PAD(0x3fc, 0x068, 1, 0x0, 0, NO_PAD_CTRL) | |
76 | #define MX51_PAD_EIM_D28__EIM_D28 IOMUX_PAD(0x420, 0x08c, 0, 0x0, 0, NO_PAD_CTRL) | 78 | #define MX51_PAD_EIM_D19__I2C1_SCL IOMUX_PAD(0x3fc, 0x068, (4 | IOMUX_CONFIG_SION), \ |
77 | #define MX51_PAD_EIM_D29__EIM_D29 IOMUX_PAD(0x424, 0x090, 0, 0x0, 0, NO_PAD_CTRL) | 79 | 0x09b0, 0, MX51_I2C_PAD_CTRL) |
78 | #define MX51_PAD_EIM_D30__EIM_D30 IOMUX_PAD(0x428, 0x094, 0, 0x0, 0, NO_PAD_CTRL) | 80 | #define MX51_PAD_EIM_D20__GPIO_2_4 IOMUX_PAD(0x400, 0x06c, 1, 0x0, 0, NO_PAD_CTRL) |
79 | #define MX51_PAD_EIM_D31__EIM_D31 IOMUX_PAD(0x42c, 0x09c, 0, 0x0, 0, NO_PAD_CTRL) | 81 | #define MX51_PAD_EIM_D21__GPIO_2_5 IOMUX_PAD(0x404, 0x070, 1, 0x0, 0, MX51_GPIO_PAD_CTRL) |
80 | 82 | #define MX51_PAD_EIM_D22__GPIO_2_6 IOMUX_PAD(0x408, 0x074, 1, 0x0, 0, NO_PAD_CTRL) | |
81 | #define MX51_PAD_GPIO_2_10__EIM_A16 IOMUX_PAD(0x430, 0x09c, 1, 0x0, 0, NO_PAD_CTRL) | 83 | #define MX51_PAD_EIM_D23__GPIO_2_7 IOMUX_PAD(0x40c, 0x078, 1, 0x0, 0, NO_PAD_CTRL) |
82 | #define MX51_PAD_GPIO_2_11__EIM_A17 IOMUX_PAD(0x434, 0x0a0, 1, 0x0, 0, NO_PAD_CTRL) | 84 | #define MX51_PAD_EIM_D24__UART3_CTS IOMUX_PAD(0x410, 0x07c, 3, 0x0, 0, MX51_UART3_PAD_CTRL) |
83 | #define MX51_PAD_GPIO_2_12__EIM_A18 IOMUX_PAD(0x438, 0x0a4, 1, 0x0, 0, NO_PAD_CTRL) | 85 | #define MX51_PAD_EIM_D25__UART3_RXD IOMUX_PAD(0x414, 0x080, 3, 0x9f4, 0, MX51_UART3_PAD_CTRL) |
84 | #define MX51_PAD_GPIO_2_13__EIM_A19 IOMUX_PAD(0x43c, 0x0a8, 1, 0x0, 0, NO_PAD_CTRL) | 86 | #define MX51_PAD_EIM_D25__UART2_CTS IOMUX_PAD(0x414, 0x080, 4, 0x0, 0, MX51_UART2_PAD_CTRL) |
85 | #define MX51_PAD_GPIO_2_14__EIM_A20 IOMUX_PAD(0x440, 0x0ac, 1, 0x0, 0, NO_PAD_CTRL) | 87 | #define MX51_PAD_EIM_D26__UART3_TXD IOMUX_PAD(0x418, 0x084, 3, 0x0, 0, MX51_UART3_PAD_CTRL) |
86 | #define MX51_PAD_GPIO_2_15__EIM_A21 IOMUX_PAD(0x444, 0x0b0, 1, 0x0, 0, NO_PAD_CTRL) | 88 | #define MX51_PAD_EIM_D26__UART2_RTS IOMUX_PAD(0x418, 0x084, 4, 0x9e8, 3, MX51_UART2_PAD_CTRL) |
87 | #define MX51_PAD_GPIO_2_16__EIM_A22 IOMUX_PAD(0x448, 0x0b4, 1, 0x0, 0, NO_PAD_CTRL) | 89 | #define MX51_PAD_EIM_D27__UART3_RTS IOMUX_PAD(0x41c, 0x088, 3, 0x9f0, 3, MX51_UART3_PAD_CTRL) |
88 | #define MX51_PAD_GPIO_2_17__EIM_A23 IOMUX_PAD(0x44c, 0x0b8, 1, 0x0, 0, NO_PAD_CTRL) | 90 | #define MX51_PAD_EIM_D28__EIM_D28 IOMUX_PAD(0x420, 0x08c, 0, 0x0, 0, NO_PAD_CTRL) |
89 | 91 | #define MX51_PAD_EIM_D29__EIM_D29 IOMUX_PAD(0x424, 0x090, 0, 0x0, 0, NO_PAD_CTRL) | |
90 | #define MX51_PAD_GPIO_2_18__EIM_A24 IOMUX_PAD(0x450, 0x0bc, 1, 0x0, 0, NO_PAD_CTRL) | 92 | #define MX51_PAD_EIM_D30__EIM_D30 IOMUX_PAD(0x428, 0x094, 0, 0x0, 0, NO_PAD_CTRL) |
91 | #define MX51_PAD_GPIO_2_19__EIM_A25 IOMUX_PAD(0x454, 0x0c0, 1, 0x0, 0, NO_PAD_CTRL) | 93 | #define MX51_PAD_EIM_D31__EIM_D31 IOMUX_PAD(0x42c, 0x09c, 0, 0x0, 0, NO_PAD_CTRL) |
92 | #define MX51_PAD_GPIO_2_20__EIM_A26 IOMUX_PAD(0x458, 0x0c4, 1, 0x0, 0, NO_PAD_CTRL) | 94 | #define MX51_PAD_EIM_A16__GPIO_2_10 IOMUX_PAD(0x430, 0x09c, 1, 0x0, 0, NO_PAD_CTRL) |
93 | #define MX51_PAD_GPIO_2_21__EIM_A27 IOMUX_PAD(0x45c, 0x0c8, 1, 0x0, 0, NO_PAD_CTRL) | 95 | #define MX51_PAD_EIM_A17__GPIO_2_11 IOMUX_PAD(0x434, 0x0a0, 1, 0x0, 0, NO_PAD_CTRL) |
94 | #define MX51_PAD_EIM_EB0__EIM_EB0 IOMUX_PAD(0x460, 0x0cc, 0, 0x0, 0, NO_PAD_CTRL) | 96 | #define MX51_PAD_EIM_A18__GPIO_2_12 IOMUX_PAD(0x438, 0x0a4, 1, 0x0, 0, NO_PAD_CTRL) |
95 | #define MX51_PAD_EIM_EB1__EIM_EB1 IOMUX_PAD(0x464, 0x0d0, 0, 0x0, 0, NO_PAD_CTRL) | 97 | #define MX51_PAD_EIM_A19__GPIO_2_13 IOMUX_PAD(0x43c, 0x0a8, 1, 0x0, 0, NO_PAD_CTRL) |
96 | #define MX51_PAD_GPIO_2_22__EIM_EB2 IOMUX_PAD(0x468, 0x0d4, 1, 0x0, 0, NO_PAD_CTRL) | 98 | #define MX51_PAD_EIM_A20__GPIO_2_14 IOMUX_PAD(0x440, 0x0ac, 1, 0x0, 0, NO_PAD_CTRL) |
97 | #define MX51_PAD_GPIO_2_23__EIM_EB3 IOMUX_PAD(0x46c, 0x0d8, 1, 0x0, 0, NO_PAD_CTRL) | 99 | #define MX51_PAD_EIM_A21__GPIO_2_15 IOMUX_PAD(0x444, 0x0b0, 1, 0x0, 0, NO_PAD_CTRL) |
98 | 100 | #define MX51_PAD_EIM_A22__GPIO_2_16 IOMUX_PAD(0x448, 0x0b4, 1, 0x0, 0, NO_PAD_CTRL) | |
99 | #define MX51_PAD_GPIO_2_24__EIM_OE IOMUX_PAD(0x470, 0x0dc, 1, 0x0, 0, NO_PAD_CTRL) | 101 | #define MX51_PAD_EIM_A23__GPIO_2_17 IOMUX_PAD(0x44c, 0x0b8, 1, 0x0, 0, NO_PAD_CTRL) |
100 | #define MX51_PAD_GPIO_2_25__EIM_CS0 IOMUX_PAD(0x474, 0x0e0, 1, 0x0, 0, NO_PAD_CTRL) | 102 | #define MX51_PAD_EIM_A24__GPIO_2_18 IOMUX_PAD(0x450, 0x0bc, 1, 0x0, 0, NO_PAD_CTRL) |
101 | #define MX51_PAD_GPIO_2_26__EIM_CS1 IOMUX_PAD(0x478, 0x0e4, 1, 0x0, 0, NO_PAD_CTRL) | 103 | #define MX51_PAD_EIM_A25__GPIO_2_19 IOMUX_PAD(0x454, 0x0c0, 1, 0x0, 0, NO_PAD_CTRL) |
102 | #define MX51_PAD_GPIO_2_27__EIM_CS2 IOMUX_PAD(0x47c, 0x0e8, 1, 0x0, 0, NO_PAD_CTRL) | 104 | #define MX51_PAD_EIM_A26__GPIO_2_20 IOMUX_PAD(0x458, 0x0c4, 1, 0x0, 0, NO_PAD_CTRL) |
103 | #define MX51_PAD_GPIO_2_28__EIM_CS3 IOMUX_PAD(0x480, 0x0ec, 1, 0x0, 0, NO_PAD_CTRL) | 105 | #define MX51_PAD_EIM_A27__GPIO_2_21 IOMUX_PAD(0x45c, 0x0c8, 1, 0x0, 0, NO_PAD_CTRL) |
104 | #define MX51_PAD_GPIO_2_29__EIM_CS4 IOMUX_PAD(0x484, 0x0f0, 1, 0x0, 0, NO_PAD_CTRL) | 106 | #define MX51_PAD_EIM_EB0__EIM_EB0 IOMUX_PAD(0x460, 0x0cc, 0, 0x0, 0, NO_PAD_CTRL) |
105 | #define MX51_PAD_GPIO_2_30__EIM_CS5 IOMUX_PAD(0x488, 0x0f4, 1, 0x0, 0, NO_PAD_CTRL) | 107 | #define MX51_PAD_EIM_EB1__EIM_EB1 IOMUX_PAD(0x464, 0x0d0, 0, 0x0, 0, NO_PAD_CTRL) |
106 | #define MX51_PAD_GPIO_2_31__EIM_DTACK IOMUX_PAD(0x48c, 0x0f8, 1, 0x0, 0, NO_PAD_CTRL) | 108 | #define MX51_PAD_EIM_EB2__GPIO_2_22 IOMUX_PAD(0x468, 0x0d4, 1, 0x0, 0, NO_PAD_CTRL) |
107 | 109 | #define MX51_PAD_EIM_EB3__GPIO_2_23 IOMUX_PAD(0x46c, 0x0d8, 1, 0x0, 0, NO_PAD_CTRL) | |
108 | #define MX51_PAD_GPIO_3_1__EIM_LBA IOMUX_PAD(0x494, 0xFC, 1, 0x0, 0, NO_PAD_CTRL) | 110 | #define MX51_PAD_EIM_OE__GPIO_2_24 IOMUX_PAD(0x470, 0x0dc, 1, 0x0, 0, NO_PAD_CTRL) |
109 | #define MX51_PAD_GPIO_3_2__EIM_CRE IOMUX_PAD(0x4A0, 0x100, 1, 0x0, 0, NO_PAD_CTRL) | 111 | #define MX51_PAD_EIM_CS0__GPIO_2_25 IOMUX_PAD(0x474, 0x0e0, 1, 0x0, 0, NO_PAD_CTRL) |
110 | #define MX51_PAD_DRAM_CS1__DRAM_CS1 IOMUX_PAD(0x4D0, 0x104, 0, 0x0, 0, NO_PAD_CTRL) | 112 | #define MX51_PAD_EIM_CS1__GPIO_2_26 IOMUX_PAD(0x478, 0x0e4, 1, 0x0, 0, NO_PAD_CTRL) |
111 | #define MX51_PAD_GPIO_3_3__NANDF_WE_B IOMUX_PAD(0x4E4, 0x108, 3, 0x0, 0, NO_PAD_CTRL) | 113 | #define MX51_PAD_EIM_CS2__GPIO_2_27 IOMUX_PAD(0x47c, 0x0e8, 1, 0x0, 0, NO_PAD_CTRL) |
112 | #define MX51_PAD_GPIO_3_4__NANDF_RE_B IOMUX_PAD(0x4E8, 0x10C, 3, 0x0, 0, NO_PAD_CTRL) | 114 | #define MX51_PAD_EIM_CS3__GPIO_2_28 IOMUX_PAD(0x480, 0x0ec, 1, 0x0, 0, NO_PAD_CTRL) |
113 | #define MX51_PAD_GPIO_3_5__NANDF_ALE IOMUX_PAD(0x4EC, 0x110, 3, 0x0, 0, NO_PAD_CTRL) | 115 | #define MX51_PAD_EIM_CS4__GPIO_2_29 IOMUX_PAD(0x484, 0x0f0, 1, 0x0, 0, NO_PAD_CTRL) |
114 | #define MX51_PAD_GPIO_3_6__NANDF_CLE IOMUX_PAD(0x4F0, 0x114, 3, 0x0, 0, NO_PAD_CTRL) | 116 | #define MX51_PAD_EIM_CS5__GPIO_2_30 IOMUX_PAD(0x488, 0x0f4, 1, 0x0, 0, NO_PAD_CTRL) |
115 | #define MX51_PAD_GPIO_3_7__NANDF_WP_B IOMUX_PAD(0x4F4, 0x118, 3, 0x0, 0, NO_PAD_CTRL) | 117 | #define MX51_PAD_EIM_DTACK__GPIO_2_31 IOMUX_PAD(0x48c, 0x0f8, 1, 0x0, 0, NO_PAD_CTRL) |
116 | #define MX51_PAD_GPIO_3_8__NANDF_RB0 IOMUX_PAD(0x4F8, 0x11C, 3, 0x0, 0, NO_PAD_CTRL) | 118 | #define MX51_PAD_EIM_LBA__GPIO_3_1 IOMUX_PAD(0x494, 0x0FC, 1, 0x0, 0, NO_PAD_CTRL) |
117 | #define MX51_PAD_GPIO_3_9__NANDF_RB1 IOMUX_PAD(0x4FC, 0x120, 3, 0x0, 0, NO_PAD_CTRL) | 119 | #define MX51_PAD_EIM_CRE__GPIO_3_2 IOMUX_PAD(0x4A0, 0x100, 1, 0x0, 0, NO_PAD_CTRL) |
118 | #define MX51_PAD_GPIO_3_10__NANDF_RB2 IOMUX_PAD(0x500, 0x124, 3, 0x0, 0, NO_PAD_CTRL) | 120 | #define MX51_PAD_DRAM_CS1__DRAM_CS1 IOMUX_PAD(0x4D0, 0x104, 0, 0x0, 0, NO_PAD_CTRL) |
119 | #define MX51_PAD_GPIO_3_11__NANDF_RB3 IOMUX_PAD(0x504, 0x128, 3, 0x0, 0, NO_PAD_CTRL) | 121 | #define MX51_PAD_NANDF_WE_B__GPIO_3_3 IOMUX_PAD(0x4E4, 0x108, 3, 0x0, 0, NO_PAD_CTRL) |
120 | #define MX51_PAD_GPIO_3_12__GPIO_NAND IOMUX_PAD(0x514, 0x12C, 3, 0x0, 0, NO_PAD_CTRL) | 122 | #define MX51_PAD_NANDF_RE_B__GPIO_3_4 IOMUX_PAD(0x4E8, 0x10C, 3, 0x0, 0, NO_PAD_CTRL) |
121 | /* REVISIT: Not sure of these values | 123 | #define MX51_PAD_NANDF_ALE__GPIO_3_5 IOMUX_PAD(0x4EC, 0x110, 3, 0x0, 0, NO_PAD_CTRL) |
122 | 124 | #define MX51_PAD_NANDF_CLE__GPIO_3_6 IOMUX_PAD(0x4F0, 0x114, 3, 0x0, 0, NO_PAD_CTRL) | |
123 | #define MX51_PAD_GPIO_1___NANDF_RB4 IOMUX_PAD(, , , 0x0, 0, NO_PAD_CTRL) | 125 | #define MX51_PAD_NANDF_WP_B__GPIO_3_7 IOMUX_PAD(0x4F4, 0x118, 3, 0x0, 0, NO_PAD_CTRL) |
124 | #define MX51_PAD_GPIO_3_13__NANDF_RB5 IOMUX_PAD(0x5D8, 0x130, 3, 0x0, 0, NO_PAD_CTRL) | 126 | #define MX51_PAD_NANDF_RB0__GPIO_3_8 IOMUX_PAD(0x4F8, 0x11C, 3, 0x0, 0, NO_PAD_CTRL) |
125 | #define MX51_PAD_GPIO_3_15__NANDF_RB7 IOMUX_PAD(0x5E0, 0x138, 3, 0x0, 0, NO_PAD_CTRL) | 127 | #define MX51_PAD_NANDF_RB1__GPIO_3_9 IOMUX_PAD(0x4FC, 0x120, 3, 0x0, 0, NO_PAD_CTRL) |
126 | */ | 128 | #define MX51_PAD_NANDF_RB2__GPIO_3_10 IOMUX_PAD(0x500, 0x124, 3, 0x0, 0, NO_PAD_CTRL) |
127 | #define MX51_PAD_GPIO_3_14__NANDF_RB6 IOMUX_PAD(0x5DC, 0x134, 3, 0x0, 0, NO_PAD_CTRL) | 129 | #define MX51_PAD_NANDF_RB3__GPIO_3_11 IOMUX_PAD(0x504, 0x128, 3, 0x0, 0, NO_PAD_CTRL) |
128 | #define MX51_PAD_GPIO_3_16__NANDF_CS0 IOMUX_PAD(0x518, 0x130, 3, 0x0, 0, NO_PAD_CTRL) | 130 | #define MX51_PAD_GPIO_NAND__GPIO_3_12 IOMUX_PAD(0x514, 0x12C, 3, 0x0, 0, NO_PAD_CTRL) |
129 | #define MX51_PAD_GPIO_3_17__NANDF_CS1 IOMUX_PAD(0x51C, 0x134, 3, 0x0, 0, NO_PAD_CTRL) | 131 | #define MX51_PAD_NANDF_CS0__GPIO_3_16 IOMUX_PAD(0x518, 0x130, 3, 0x0, 0, NO_PAD_CTRL) |
130 | #define MX51_PAD_GPIO_3_18__NANDF_CS2 IOMUX_PAD(0x520, 0x138, 3, 0x0, 0, NO_PAD_CTRL) | 132 | #define MX51_PAD_NANDF_CS1__GPIO_3_17 IOMUX_PAD(0x51C, 0x134, 3, 0x0, 0, NO_PAD_CTRL) |
131 | #define MX51_PAD_GPIO_3_19__NANDF_CS3 IOMUX_PAD(0x524, 0x13C, 3, 0x0, 0, NO_PAD_CTRL) | 133 | #define MX51_PAD_NANDF_CS2__GPIO_3_18 IOMUX_PAD(0x520, 0x138, 3, 0x0, 0, NO_PAD_CTRL) |
132 | #define MX51_PAD_GPIO_3_20__NANDF_CS4 IOMUX_PAD(0x528, 0x140, 3, 0x0, 0, NO_PAD_CTRL) | 134 | #define MX51_PAD_NANDF_CS3__GPIO_3_19 IOMUX_PAD(0x524, 0x13C, 3, 0x0, 0, NO_PAD_CTRL) |
133 | #define MX51_PAD_GPIO_3_21__NANDF_CS5 IOMUX_PAD(0x52C, 0x144, 3, 0x0, 0, NO_PAD_CTRL) | 135 | #define MX51_PAD_NANDF_CS4__GPIO_3_20 IOMUX_PAD(0x528, 0x140, 3, 0x0, 0, NO_PAD_CTRL) |
134 | #define MX51_PAD_GPIO_3_22__NANDF_CS6 IOMUX_PAD(0x530, 0x148, 3, 0x0, 0, NO_PAD_CTRL) | 136 | #define MX51_PAD_NANDF_CS5__GPIO_3_21 IOMUX_PAD(0x52C, 0x144, 3, 0x0, 0, NO_PAD_CTRL) |
135 | #define MX51_PAD_GPIO_3_23__NANDF_CS7 IOMUX_PAD(0x534, 0x14C, 3, 0x0, 0, NO_PAD_CTRL) | 137 | #define MX51_PAD_NANDF_CS6__GPIO_3_22 IOMUX_PAD(0x530, 0x148, 3, 0x0, 0, NO_PAD_CTRL) |
136 | #define MX51_PAD_GPIO_3_24__NANDF_RDY_INT IOMUX_PAD(0x538, 0x150, 3, 0x0, 0, NO_PAD_CTRL) | 138 | #define MX51_PAD_NANDF_CS7__GPIO_3_23 IOMUX_PAD(0x534, 0x14C, 3, 0x0, 0, NO_PAD_CTRL) |
137 | #define MX51_PAD_GPIO_3_25__NANDF_D15 IOMUX_PAD(0x53C, 0x154, 3, 0x0, 0, NO_PAD_CTRL) | 139 | #define MX51_PAD_NANDF_RDY_INT__GPIO_3_24 IOMUX_PAD(0x538, 0x150, 3, 0x0, 0, NO_PAD_CTRL) |
138 | #define MX51_PAD_GPIO_3_26__NANDF_D14 IOMUX_PAD(0x540, 0x158, 3, 0x0, 0, NO_PAD_CTRL) | 140 | #define MX51_PAD_NANDF_D15__GPIO_3_25 IOMUX_PAD(0x53C, 0x154, 3, 0x0, 0, NO_PAD_CTRL) |
139 | #define MX51_PAD_GPIO_3_27__NANDF_D13 IOMUX_PAD(0x544, 0x15C, 3, 0x0, 0, NO_PAD_CTRL) | 141 | #define MX51_PAD_NANDF_D14__GPIO_3_26 IOMUX_PAD(0x540, 0x158, 3, 0x0, 0, NO_PAD_CTRL) |
140 | #define MX51_PAD_GPIO_3_28__NANDF_D12 IOMUX_PAD(0x548, 0x160, 3, 0x0, 0, NO_PAD_CTRL) | 142 | #define MX51_PAD_NANDF_D13__GPIO_3_27 IOMUX_PAD(0x544, 0x15C, 3, 0x0, 0, NO_PAD_CTRL) |
141 | #define MX51_PAD_GPIO_3_29__NANDF_D11 IOMUX_PAD(0x54C, 0x164, 3, 0x0, 0, NO_PAD_CTRL) | 143 | #define MX51_PAD_NANDF_D12__GPIO_3_28 IOMUX_PAD(0x548, 0x160, 3, 0x0, 0, NO_PAD_CTRL) |
142 | #define MX51_PAD_GPIO_3_30__NANDF_D10 IOMUX_PAD(0x550, 0x168, 3, 0x0, 0, NO_PAD_CTRL) | 144 | #define MX51_PAD_NANDF_D11__GPIO_3_29 IOMUX_PAD(0x54C, 0x164, 3, 0x0, 0, NO_PAD_CTRL) |
143 | #define MX51_PAD_GPIO_3_31__NANDF_D9 IOMUX_PAD(0x554, 0x16C, 3, 0x0, 0, NO_PAD_CTRL) | 145 | #define MX51_PAD_NANDF_D10__GPIO_3_30 IOMUX_PAD(0x550, 0x168, 3, 0x0, 0, NO_PAD_CTRL) |
144 | #define MX51_PAD_GPIO_4_0__NANDF_D8 IOMUX_PAD(0x558, 0x170, 3, 0x0, 0, NO_PAD_CTRL) | 146 | #define MX51_PAD_NANDF_D9__GPIO_3_31 IOMUX_PAD(0x554, 0x16C, 3, 0x0, 0, NO_PAD_CTRL) |
145 | #define MX51_PAD_GPIO_4_1__NANDF_D7 IOMUX_PAD(0x55C, 0x174, 3, 0x0, 0, NO_PAD_CTRL) | 147 | #define MX51_PAD_NANDF_D8__GPIO_4_0 IOMUX_PAD(0x558, 0x170, 3, 0x0, 0, NO_PAD_CTRL) |
146 | #define MX51_PAD_GPIO_4_2__NANDF_D6 IOMUX_PAD(0x560, 0x178, 3, 0x0, 0, NO_PAD_CTRL) | 148 | #define MX51_PAD_NANDF_D7__GPIO_4_1 IOMUX_PAD(0x55C, 0x174, 3, 0x0, 0, NO_PAD_CTRL) |
147 | #define MX51_PAD_GPIO_4_3__NANDF_D5 IOMUX_PAD(0x564, 0x17C, 3, 0x0, 0, NO_PAD_CTRL) | 149 | #define MX51_PAD_NANDF_D6__GPIO_4_2 IOMUX_PAD(0x560, 0x178, 3, 0x0, 0, NO_PAD_CTRL) |
148 | #define MX51_PAD_GPIO_4_4__NANDF_D4 IOMUX_PAD(0x568, 0x180, 3, 0x0, 0, NO_PAD_CTRL) | 150 | #define MX51_PAD_NANDF_D5__GPIO_4_3 IOMUX_PAD(0x564, 0x17C, 3, 0x0, 0, NO_PAD_CTRL) |
149 | #define MX51_PAD_GPIO_4_5__NANDF_D3 IOMUX_PAD(0x56C, 0x184, 3, 0x0, 0, NO_PAD_CTRL) | 151 | #define MX51_PAD_NANDF_D4__GPIO_4_4 IOMUX_PAD(0x568, 0x180, 3, 0x0, 0, NO_PAD_CTRL) |
150 | #define MX51_PAD_GPIO_4_6__NANDF_D2 IOMUX_PAD(0x570, 0x188, 3, 0x0, 0, NO_PAD_CTRL) | 152 | #define MX51_PAD_NANDF_D3__GPIO_4_5 IOMUX_PAD(0x56C, 0x184, 3, 0x0, 0, NO_PAD_CTRL) |
151 | #define MX51_PAD_GPIO_4_7__NANDF_D1 IOMUX_PAD(0x574, 0x18C, 3, 0x0, 0, NO_PAD_CTRL) | 153 | #define MX51_PAD_NANDF_D2__GPIO_4_6 IOMUX_PAD(0x570, 0x188, 3, 0x0, 0, NO_PAD_CTRL) |
152 | #define MX51_PAD_GPIO_4_8__NANDF_D0 IOMUX_PAD(0x578, 0x190, 3, 0x0, 0, NO_PAD_CTRL) | 154 | #define MX51_PAD_NANDF_D1__GPIO_4_7 IOMUX_PAD(0x574, 0x18C, 3, 0x0, 0, NO_PAD_CTRL) |
153 | #define MX51_PAD_GPIO_3_12__CSI1_D8 IOMUX_PAD(0x57C, 0x194, 3, 0x0, 0, NO_PAD_CTRL) | 155 | #define MX51_PAD_NANDF_D0__GPIO_4_8 IOMUX_PAD(0x578, 0x190, 3, 0x0, 0, NO_PAD_CTRL) |
154 | #define MX51_PAD_GPIO_3_13__CSI1_D9 IOMUX_PAD(0x580, 0x198, 3, 0x0, 0, NO_PAD_CTRL) | 156 | #define MX51_PAD_CSI1_D8__GPIO_3_12 IOMUX_PAD(0x57C, 0x194, 3, 0x0, 0, NO_PAD_CTRL) |
155 | #define MX51_PAD_CSI1_D10__CSI1_D10 IOMUX_PAD(0x584, 0x19C, 0, 0x0, 0, NO_PAD_CTRL) | 157 | #define MX51_PAD_CSI1_D9__GPIO_3_13 IOMUX_PAD(0x580, 0x198, 3, 0x0, 0, NO_PAD_CTRL) |
156 | #define MX51_PAD_CSI1_D11__CSI1_D11 IOMUX_PAD(0x588, 0x1A0, 0, 0x0, 0, NO_PAD_CTRL) | 158 | #define MX51_PAD_CSI1_D10__CSI1_D10 IOMUX_PAD(0x584, 0x19C, 0, 0x0, 0, NO_PAD_CTRL) |
157 | #define MX51_PAD_CSI1_D12__CSI1_D12 IOMUX_PAD(0x58C, 0x1A4, 0, 0x0, 0, NO_PAD_CTRL) | 159 | #define MX51_PAD_CSI1_D11__CSI1_D11 IOMUX_PAD(0x588, 0x1A0, 0, 0x0, 0, NO_PAD_CTRL) |
158 | #define MX51_PAD_CSI1_D13__CSI1_D13 IOMUX_PAD(0x590, 0x1A8, 0, 0x0, 0, NO_PAD_CTRL) | 160 | #define MX51_PAD_CSI1_D12__CSI1_D12 IOMUX_PAD(0x58C, 0x1A4, 0, 0x0, 0, NO_PAD_CTRL) |
159 | #define MX51_PAD_CSI1_D14__CSI1_D14 IOMUX_PAD(0x594, 0x1AC, 0, 0x0, 0, NO_PAD_CTRL) | 161 | #define MX51_PAD_CSI1_D13__CSI1_D13 IOMUX_PAD(0x590, 0x1A8, 0, 0x0, 0, NO_PAD_CTRL) |
160 | #define MX51_PAD_CSI1_D15__CSI1_D15 IOMUX_PAD(0x598, 0x1B0, 0, 0x0, 0, NO_PAD_CTRL) | 162 | #define MX51_PAD_CSI1_D14__CSI1_D14 IOMUX_PAD(0x594, 0x1AC, 0, 0x0, 0, NO_PAD_CTRL) |
161 | #define MX51_PAD_CSI1_D16__CSI1_D16 IOMUX_PAD(0x59C, 0x1B4, 0, 0x0, 0, NO_PAD_CTRL) | 163 | #define MX51_PAD_CSI1_D15__CSI1_D15 IOMUX_PAD(0x598, 0x1B0, 0, 0x0, 0, NO_PAD_CTRL) |
162 | #define MX51_PAD_CSI1_D17__CSI1_D17 IOMUX_PAD(0x5A0, 0x1B8, 0, 0x0, 0, NO_PAD_CTRL) | 164 | #define MX51_PAD_CSI1_D16__CSI1_D16 IOMUX_PAD(0x59C, 0x1B4, 0, 0x0, 0, NO_PAD_CTRL) |
163 | #define MX51_PAD_CSI1_D18__CSI1_D18 IOMUX_PAD(0x5A4, 0x1BC, 0, 0x0, 0, NO_PAD_CTRL) | 165 | #define MX51_PAD_CSI1_D17__CSI1_D17 IOMUX_PAD(0x5A0, 0x1B8, 0, 0x0, 0, NO_PAD_CTRL) |
164 | #define MX51_PAD_CSI1_D19__CSI1_D19 IOMUX_PAD(0x5A8, 0x1C0, 0, 0x0, 0, NO_PAD_CTRL) | 166 | #define MX51_PAD_CSI1_D18__CSI1_D18 IOMUX_PAD(0x5A4, 0x1BC, 0, 0x0, 0, NO_PAD_CTRL) |
165 | #define MX51_PAD_CSI1_VSYNC__CSI1_VSYNC IOMUX_PAD(0x5AC, 0x1C4, 0, 0x0, 0, NO_PAD_CTRL) | 167 | #define MX51_PAD_CSI1_D19__CSI1_D19 IOMUX_PAD(0x5A8, 0x1C0, 0, 0x0, 0, NO_PAD_CTRL) |
166 | #define MX51_PAD_CSI1_HSYNC__CSI1_HSYNC IOMUX_PAD(0x5B0, 0x1C8, 0, 0x0, 0, NO_PAD_CTRL) | 168 | #define MX51_PAD_CSI1_VSYNC__CSI1_VSYNC IOMUX_PAD(0x5AC, 0x1C4, 0, 0x0, 0, NO_PAD_CTRL) |
167 | #define MX51_PAD_CSI1_PIXCLK__CSI1_PIXCLK IOMUX_PAD(0x5B4, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | 169 | #define MX51_PAD_CSI1_HSYNC__CSI1_HSYNC IOMUX_PAD(0x5B0, 0x1C8, 0, 0x0, 0, NO_PAD_CTRL) |
168 | #define MX51_PAD_CSI1_MCLK__CSI1_MCLK IOMUX_PAD(0x5B8, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | 170 | #define MX51_PAD_CSI1_PIXCLK__CSI1_PIXCLK IOMUX_PAD(0x5B4, 0x000, 0, 0x0, 0, NO_PAD_CTRL) |
169 | #define MX51_PAD_CSI1_PKE0__CSI1_PKE0 IOMUX_PAD(0x860, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | 171 | #define MX51_PAD_CSI1_MCLK__CSI1_MCLK IOMUX_PAD(0x5B8, 0x000, 0, 0x0, 0, NO_PAD_CTRL) |
170 | #define MX51_PAD_GPIO_4_9__CSI2_D12 IOMUX_PAD(0x5BC, 0x1CC, 3, 0x0, 0, NO_PAD_CTRL) | 172 | #define MX51_PAD_CSI1_PKE0__CSI1_PKE0 IOMUX_PAD(0x860, 0x000, 0, 0x0, 0, NO_PAD_CTRL) |
171 | #define MX51_PAD_GPIO_4_10__CSI2_D13 IOMUX_PAD(0x5C0, 0x1D0, 3, 0x0, 0, NO_PAD_CTRL) | 173 | #define MX51_PAD_CSI2_D12__GPIO_4_9 IOMUX_PAD(0x5BC, 0x1CC, 3, 0x0, 0, NO_PAD_CTRL) |
172 | #define MX51_PAD_GPIO_4_11__CSI2_D14 IOMUX_PAD(0x5C4, 0x1D4, 3, 0x0, 0, NO_PAD_CTRL) | 174 | #define MX51_PAD_CSI2_D13__GPIO_4_10 IOMUX_PAD(0x5C0, 0x1D0, 3, 0x0, 0, NO_PAD_CTRL) |
173 | #define MX51_PAD_GPIO_4_12__CSI2_D15 IOMUX_PAD(0x5C8, 0x1D8, 3, 0x0, 0, NO_PAD_CTRL) | 175 | #define MX51_PAD_CSI2_D14__GPIO_4_11 IOMUX_PAD(0x5C4, 0x1D4, 3, 0x0, 0, NO_PAD_CTRL) |
174 | #define MX51_PAD_GPIO_4_11__CSI2_D16 IOMUX_PAD(0x5CC, 0x1DC, 3, 0x0, 0, NO_PAD_CTRL) | 176 | #define MX51_PAD_CSI2_D15__GPIO_4_12 IOMUX_PAD(0x5C8, 0x1D8, 3, 0x0, 0, NO_PAD_CTRL) |
175 | #define MX51_PAD_GPIO_4_12__CSI2_D17 IOMUX_PAD(0x5D0, 0x1E0, 3, 0x0, 0, NO_PAD_CTRL) | 177 | #define MX51_PAD_CSI2_D16__GPIO_4_11 IOMUX_PAD(0x5CC, 0x1DC, 3, 0x0, 0, NO_PAD_CTRL) |
176 | #define MX51_PAD_GPIO_4_11__CSI2_D18 IOMUX_PAD(0x5D4, 0x1E4, 3, 0x0, 0, NO_PAD_CTRL) | 178 | #define MX51_PAD_CSI2_D17__GPIO_4_12 IOMUX_PAD(0x5D0, 0x1E0, 3, 0x0, 0, NO_PAD_CTRL) |
177 | #define MX51_PAD_GPIO_4_12__CSI2_D19 IOMUX_PAD(0x5D8, 0x1E8, 3, 0x0, 0, NO_PAD_CTRL) | 179 | #define MX51_PAD_CSI2_D18__GPIO_4_11 IOMUX_PAD(0x5D4, 0x1E4, 3, 0x0, 0, NO_PAD_CTRL) |
178 | #define MX51_PAD_GPIO_4_13__CSI2_VSYNC IOMUX_PAD(0x5DC, 0x1EC, 3, 0x0, 0, NO_PAD_CTRL) | 180 | #define MX51_PAD_CSI2_D19__GPIO_4_12 IOMUX_PAD(0x5D8, 0x1E8, 3, 0x0, 0, NO_PAD_CTRL) |
179 | #define MX51_PAD_GPIO_4_14__CSI2_HSYNC IOMUX_PAD(0x5E0, 0x1F0, 3, 0x0, 0, NO_PAD_CTRL) | 181 | #define MX51_PAD_CSI2_VSYNC__GPIO_4_13 IOMUX_PAD(0x5DC, 0x1EC, 3, 0x0, 0, NO_PAD_CTRL) |
180 | #define MX51_PAD_GPIO_4_15__CSI2_PIXCLK IOMUX_PAD(0x5E4, 0x1F4, 3, 0x0, 0, NO_PAD_CTRL) | 182 | #define MX51_PAD_CSI2_HSYNC__GPIO_4_14 IOMUX_PAD(0x5E0, 0x1F0, 3, 0x0, 0, NO_PAD_CTRL) |
181 | #define MX51_PAD_CSI2_PKE0__CSI2_PKE0 IOMUX_PAD(0x81C, 0x0, 0, 0x0, 0, NO_PAD_CTRL) | 183 | #define MX51_PAD_CSI2_PIXCLK__GPIO_4_15 IOMUX_PAD(0x5E4, 0x1F4, 3, 0x0, 0, NO_PAD_CTRL) |
182 | #define MX51_PAD_GPIO_4_16__I2C1_CLK IOMUX_PAD(0x5E8, 0x1F8, 3, 0x0, 0, NO_PAD_CTRL) | 184 | #define MX51_PAD_I2C1_CLK__GPIO_4_16 IOMUX_PAD(0x5E8, 0x1F8, 3, 0x0, 0, NO_PAD_CTRL) |
183 | #define MX51_PAD_GPIO_4_17__I2C1_DAT IOMUX_PAD(0x5EC, 0x1FC, 3, 0x0, 0, NO_PAD_CTRL) | 185 | #define MX51_PAD_I2C1_CLK__HSI2C_CLK IOMUX_PAD(0x5E8, 0x1F8, 0, 0x0, 0, NO_PAD_CTRL) |
184 | #define MX51_PAD_GPIO_4_18__AUD3_BB_TXD IOMUX_PAD(0x5F0, 0x200, 3, 0x0, 0, NO_PAD_CTRL) | 186 | #define MX51_PAD_I2C1_DAT__GPIO_4_17 IOMUX_PAD(0x5EC, 0x1FC, 3, 0x0, 0, NO_PAD_CTRL) |
185 | #define MX51_PAD_GPIO_4_19__AUD3_BB_RXD IOMUX_PAD(0x5F4, 0x204, 3, 0x0, 0, NO_PAD_CTRL) | 187 | #define MX51_PAD_I2C1_DAT__HSI2C_DAT IOMUX_PAD(0x5EC, 0x1FC, 0, 0x0, 0, NO_PAD_CTRL) |
186 | #define MX51_PAD_GPIO_4_20__AUD3_BB_CK IOMUX_PAD(0x5F8, 0x208, 3, 0x0, 0, NO_PAD_CTRL) | 188 | #define MX51_PAD_AUD3_BB_TXD__GPIO_4_18 IOMUX_PAD(0x5F0, 0x200, 3, 0x0, 0, NO_PAD_CTRL) |
187 | #define MX51_PAD_GPIO_4_21__AUD3_BB_FS IOMUX_PAD(0x5FC, 0x20C, 3, 0x0, 0, NO_PAD_CTRL) | 189 | #define MX51_PAD_AUD3_BB_RXD__GPIO_4_19 IOMUX_PAD(0x5F4, 0x204, 3, 0x0, 0, NO_PAD_CTRL) |
188 | #define MX51_PAD_GPIO_4_22__CSPI1_MOSI IOMUX_PAD(0x600, 0x210, 3, 0x0, 0, NO_PAD_CTRL) | 190 | #define MX51_PAD_AUD3_BB_CK__GPIO_4_20 IOMUX_PAD(0x5F8, 0x208, 3, 0x0, 0, NO_PAD_CTRL) |
189 | #define MX51_PAD_GPIO_4_23__CSPI1_MISO IOMUX_PAD(0x604, 0x214, 3, 0x0, 0, NO_PAD_CTRL) | 191 | #define MX51_PAD_AUD3_BB_FS__GPIO_4_21 IOMUX_PAD(0x5FC, 0x20C, 3, 0x0, 0, NO_PAD_CTRL) |
190 | #define MX51_PAD_GPIO_4_24__CSPI1_SS0 IOMUX_PAD(0x608, 0x218, 3, 0x0, 0, NO_PAD_CTRL) | 192 | #define MX51_PAD_CSPI1_MOSI__GPIO_4_22 IOMUX_PAD(0x600, 0x210, 3, 0x0, 0, NO_PAD_CTRL) |
191 | #define MX51_PAD_GPIO_4_25__CSPI1_SS1 IOMUX_PAD(0x60C, 0x21C, 3, 0x0, 0, NO_PAD_CTRL) | 193 | #define MX51_PAD_CSPI1_MISO__GPIO_4_23 IOMUX_PAD(0x604, 0x214, 3, 0x0, 0, NO_PAD_CTRL) |
192 | #define MX51_PAD_GPIO_4_26__CSPI1_RDY IOMUX_PAD(0x610, 0x220, 3, 0x0, 0, NO_PAD_CTRL) | 194 | #define MX51_PAD_CSPI1_SS0__GPIO_4_24 IOMUX_PAD(0x608, 0x218, 3, 0x0, 0, NO_PAD_CTRL) |
193 | #define MX51_PAD_GPIO_4_27__CSPI1_SCLK IOMUX_PAD(0x614, 0x224, 3, 0x0, 0, NO_PAD_CTRL) | 195 | #define MX51_PAD_CSPI1_SS1__GPIO_4_25 IOMUX_PAD(0x60C, 0x21C, 3, 0x0, 0, NO_PAD_CTRL) |
194 | 196 | #define MX51_PAD_CSPI1_RDY__GPIO_4_26 IOMUX_PAD(0x610, 0x220, 3, 0x0, 0, NO_PAD_CTRL) | |
195 | /* Babbage UART1 */ | 197 | #define MX51_PAD_CSPI1_SCLK__GPIO_4_27 IOMUX_PAD(0x614, 0x224, 3, 0x0, 0, NO_PAD_CTRL) |
196 | #define MX51_PAD_UART1_RXD__UART1_RXD IOMUX_PAD(0x618, 0x228, IOMUX_CONFIG_ALT0, 0x9e4, 0, MX51_UART1_PAD_CTRL | PAD_CTL_SRE_FAST) | 198 | #define MX51_PAD_UART1_RXD__UART1_RXD IOMUX_PAD(0x618, 0x228, 0, 0x9e4, 0, MX51_UART1_PAD_CTRL | PAD_CTL_SRE_FAST) |
197 | #define MX51_PAD_UART1_TXD__UART1_TXD IOMUX_PAD(0x61C, 0x22C, IOMUX_CONFIG_ALT0, 0x0, 0, MX51_UART1_PAD_CTRL | PAD_CTL_SRE_FAST) | 199 | #define MX51_PAD_UART1_TXD__UART1_TXD IOMUX_PAD(0x61C, 0x22C, 0, 0x0, 0, MX51_UART1_PAD_CTRL | PAD_CTL_SRE_FAST) |
198 | #define MX51_PAD_UART1_RTS__UART1_RTS IOMUX_PAD(0x620, 0x230, IOMUX_CONFIG_ALT0, 0x9e0, 0, MX51_UART1_PAD_CTRL) | 200 | #define MX51_PAD_UART1_RTS__UART1_RTS IOMUX_PAD(0x620, 0x230, 0, 0x9e0, 0, MX51_UART1_PAD_CTRL) |
199 | #define MX51_PAD_UART1_CTS__UART1_CTS IOMUX_PAD(0x624, 0x234, IOMUX_CONFIG_ALT0, 0x0, 0, MX51_UART1_PAD_CTRL) | 201 | #define MX51_PAD_UART1_CTS__UART1_CTS IOMUX_PAD(0x624, 0x234, 0, 0x0, 0, MX51_UART1_PAD_CTRL) |
200 | 202 | #define MX51_PAD_UART2_RXD__UART2_RXD IOMUX_PAD(0x628, 0x238, 0, 0x9ec, 2, MX51_UART2_PAD_CTRL) | |
201 | /* Babbage UART2 */ | 203 | #define MX51_PAD_UART2_TXD__UART2_TXD IOMUX_PAD(0x62C, 0x23C, 0, 0x0, 0, MX51_UART2_PAD_CTRL) |
202 | #define MX51_PAD_UART2_RXD__UART2_RXD IOMUX_PAD(0x628, 0x238, IOMUX_CONFIG_ALT0, 0x9ec, 2, MX51_UART2_PAD_CTRL) | 204 | #define MX51_PAD_UART3_RXD__UART3_RXD IOMUX_PAD(0x630, 0x240, 1, 0x9f4, 4, MX51_UART3_PAD_CTRL) |
203 | #define MX51_PAD_UART2_TXD__UART2_TXD IOMUX_PAD(0x62C, 0x23C, IOMUX_CONFIG_ALT0, 0x0, 0, MX51_UART2_PAD_CTRL) | 205 | #define MX51_PAD_UART3_RXD__GPIO_1_22 IOMUX_PAD(0x630, 0x240, 3, 0x0, 0, NO_PAD_CTRL) |
204 | 206 | #define MX51_PAD_UART3_TXD__UART3_TXD IOMUX_PAD(0x634, 0x244, 1, 0x0, 0, MX51_UART3_PAD_CTRL) | |
205 | #define MX51_PAD_GPIO_1_22__UART3_RXD IOMUX_PAD(0x630, 0x240, 3, 0x0, 0, NO_PAD_CTRL) | 207 | #define MX51_PAD_UART3_TXD__GPIO_1_23 IOMUX_PAD(0x634, 0x244, 3, 0x0, 0, NO_PAD_CTRL) |
206 | #define MX51_PAD_GPIO_1_23__UART3_TXD IOMUX_PAD(0x634, 0x244, 3, 0x0, 0, NO_PAD_CTRL) | 208 | #define MX51_PAD_OWIRE_LINE__GPIO_1_24 IOMUX_PAD(0x638, 0x248, 3, 0x0, 0, NO_PAD_CTRL) |
207 | #define MX51_PAD_GPIO_1_24__OWIRE_LINE IOMUX_PAD(0x638, 0x248, 3, 0x0, 0, NO_PAD_CTRL) | 209 | #define MX51_PAD_KEY_ROW0__KEY_ROW0 IOMUX_PAD(0x63C, 0x24C, 0, 0x0, 0, NO_PAD_CTRL) |
208 | #define MX51_PAD_KEY_ROW0__KEY_ROW0 IOMUX_PAD(0x63C, 0x24C, 0, 0x0, 0, NO_PAD_CTRL) | 210 | #define MX51_PAD_KEY_ROW1__KEY_ROW1 IOMUX_PAD(0x640, 0x250, 0, 0x0, 0, NO_PAD_CTRL) |
209 | #define MX51_PAD_KEY_ROW1__KEY_ROW1 IOMUX_PAD(0x640, 0x250, 0, 0x0, 0, NO_PAD_CTRL) | 211 | #define MX51_PAD_KEY_ROW2__KEY_ROW2 IOMUX_PAD(0x644, 0x254, 0, 0x0, 0, NO_PAD_CTRL) |
210 | #define MX51_PAD_KEY_ROW2__KEY_ROW2 IOMUX_PAD(0x644, 0x254, 0, 0x0, 0, NO_PAD_CTRL) | 212 | #define MX51_PAD_KEY_ROW3__KEY_ROW3 IOMUX_PAD(0x648, 0x258, 0, 0x0, 0, NO_PAD_CTRL) |
211 | #define MX51_PAD_KEY_ROW3__KEY_ROW3 IOMUX_PAD(0x648, 0x258, 0, 0x0, 0, NO_PAD_CTRL) | 213 | #define MX51_PAD_KEY_COL0__KEY_COL0 IOMUX_PAD(0x64C, 0x25C, 0, 0x0, 0, NO_PAD_CTRL) |
212 | #define MX51_PAD_KEY_COL0__KEY_COL0 IOMUX_PAD(0x64C, 0x25C, 0, 0x0, 0, NO_PAD_CTRL) | 214 | #define MX51_PAD_KEY_COL1__KEY_COL1 IOMUX_PAD(0x650, 0x260, 0, 0x0, 0, NO_PAD_CTRL) |
213 | #define MX51_PAD_KEY_COL1__KEY_COL1 IOMUX_PAD(0x650, 0x260, 0, 0x0, 0, NO_PAD_CTRL) | 215 | #define MX51_PAD_KEY_COL2__KEY_COL2 IOMUX_PAD(0x654, 0x264, 0, 0x0, 0, NO_PAD_CTRL) |
214 | #define MX51_PAD_KEY_COL2__KEY_COL2 IOMUX_PAD(0x654, 0x264, 0, 0x0, 0, NO_PAD_CTRL) | 216 | #define MX51_PAD_KEY_COL3__KEY_COL3 IOMUX_PAD(0x658, 0x268, 0, 0x0, 0, NO_PAD_CTRL) |
215 | #define MX51_PAD_KEY_COL3__KEY_COL3 IOMUX_PAD(0x658, 0x268, 0, 0x0, 0, NO_PAD_CTRL) | 217 | #define MX51_PAD_KEY_COL4__KEY_COL4 IOMUX_PAD(0x65C, 0x26C, 0, 0x0, 0, NO_PAD_CTRL) |
216 | #define MX51_PAD_KEY_COL4__KEY_COL4 IOMUX_PAD(0x65C, 0x26C, 0, 0x0, 0, NO_PAD_CTRL) | 218 | #define MX51_PAD_KEY_COL4__UART3_RTS IOMUX_PAD(0x65C, 0x26C, 2, 0x9f0, 4, MX51_UART3_PAD_CTRL) |
217 | #define MX51_PAD_KEY_COL5__KEY_COL5 IOMUX_PAD(0x660, 0x270, 0, 0x0, 0, NO_PAD_CTRL) | 219 | #define MX51_PAD_KEY_COL4__I2C2_SCL IOMUX_PAD(0x65C, 0x26C, (3 | IOMUX_CONFIG_SION), \ |
218 | #define MX51_PAD_USBH1_CLK__USBH1_CLK IOMUX_PAD(0x678, 0x278, IOMUX_CONFIG_ALT0, 0x0, 0, MX51_USBH1_PAD_CTRL) | 220 | 0x09b8, 1, MX51_I2C_PAD_CTRL) |
219 | #define MX51_PAD_USBH1_DIR__USBH1_DIR IOMUX_PAD(0x67C, 0x27C, IOMUX_CONFIG_ALT0, 0x0, 0, MX51_USBH1_PAD_CTRL) | 221 | #define MX51_PAD_KEY_COL5__KEY_COL5 IOMUX_PAD(0x660, 0x270, 0, 0x0, 0, NO_PAD_CTRL) |
220 | #define MX51_PAD_USBH1_STP__USBH1_STP IOMUX_PAD(0x680, 0x280, IOMUX_CONFIG_ALT0, 0x0, 0, MX51_USBH1_PAD_CTRL) | 222 | #define MX51_PAD_KEY_COL5__UART3_CTS IOMUX_PAD(0x660, 0x270, 2, 0, 0, MX51_UART3_PAD_CTRL) |
221 | #define MX51_PAD_USBH1_STP__GPIO_1_27 IOMUX_PAD(0x680, 0x280, IOMUX_CONFIG_GPIO, 0x0, 0, MX51_USBH1_PAD_CTRL) | 223 | #define MX51_PAD_KEY_COL5__I2C2_SDA IOMUX_PAD(0x660, 0x270, (3 | IOMUX_CONFIG_SION), \ |
222 | #define MX51_PAD_USBH1_NXT__USBH1_NXT IOMUX_PAD(0x684, 0x284, IOMUX_CONFIG_ALT0, 0x0, 0, MX51_USBH1_PAD_CTRL) | 224 | 0x09bc, 1, MX51_I2C_PAD_CTRL) |
223 | #define MX51_PAD_USBH1_DATA0__USBH1_DATA0 IOMUX_PAD(0x688, 0x288, IOMUX_CONFIG_ALT0, 0x0, 0, MX51_USBH1_PAD_CTRL) | 225 | #define MX51_PAD_USBH1_CLK__USBH1_CLK IOMUX_PAD(0x678, 0x278, 0, 0x0, 0, MX51_USBH1_PAD_CTRL) |
224 | #define MX51_PAD_USBH1_DATA1__USBH1_DATA1 IOMUX_PAD(0x68C, 0x28C, IOMUX_CONFIG_ALT0, 0x0, 0, MX51_USBH1_PAD_CTRL) | 226 | #define MX51_PAD_USBH1_DIR__USBH1_DIR IOMUX_PAD(0x67C, 0x27C, 0, 0x0, 0, MX51_USBH1_PAD_CTRL) |
225 | #define MX51_PAD_USBH1_DATA2__USBH1_DATA2 IOMUX_PAD(0x690, 0x290, IOMUX_CONFIG_ALT0, 0x0, 0, MX51_USBH1_PAD_CTRL) | 227 | #define MX51_PAD_USBH1_STP__USBH1_STP IOMUX_PAD(0x680, 0x280, 0, 0x0, 0, MX51_USBH1_PAD_CTRL) |
226 | #define MX51_PAD_USBH1_DATA3__USBH1_DATA3 IOMUX_PAD(0x694, 0x294, IOMUX_CONFIG_ALT0, 0x0, 0, MX51_USBH1_PAD_CTRL) | 228 | #define MX51_PAD_USBH1_STP__GPIO_1_27 IOMUX_PAD(0x680, 0x280, 2, 0x0, 0, MX51_USBH1_PAD_CTRL) |
227 | #define MX51_PAD_USBH1_DATA4__USBH1_DATA4 IOMUX_PAD(0x698, 0x298, IOMUX_CONFIG_ALT0, 0x0, 0, MX51_USBH1_PAD_CTRL) | 229 | #define MX51_PAD_USBH1_NXT__USBH1_NXT IOMUX_PAD(0x684, 0x284, 0, 0x0, 0, MX51_USBH1_PAD_CTRL) |
228 | #define MX51_PAD_USBH1_DATA5__USBH1_DATA5 IOMUX_PAD(0x69C, 0x29C, IOMUX_CONFIG_ALT0, 0x0, 0, MX51_USBH1_PAD_CTRL) | 230 | #define MX51_PAD_USBH1_DATA0__USBH1_DATA0 IOMUX_PAD(0x688, 0x288, 0, 0x0, 0, MX51_USBH1_PAD_CTRL) |
229 | #define MX51_PAD_USBH1_DATA6__USBH1_DATA6 IOMUX_PAD(0x6A0, 0x2A0, IOMUX_CONFIG_ALT0, 0x0, 0, MX51_USBH1_PAD_CTRL) | 231 | #define MX51_PAD_USBH1_DATA1__USBH1_DATA1 IOMUX_PAD(0x68C, 0x28C, 0, 0x0, 0, MX51_USBH1_PAD_CTRL) |
230 | #define MX51_PAD_USBH1_DATA7__USBH1_DATA7 IOMUX_PAD(0x6A4, 0x2A4, IOMUX_CONFIG_ALT0, 0x0, 0, MX51_USBH1_PAD_CTRL) | 232 | #define MX51_PAD_USBH1_DATA2__USBH1_DATA2 IOMUX_PAD(0x690, 0x290, 0, 0x0, 0, MX51_USBH1_PAD_CTRL) |
231 | #define MX51_PAD_GPIO_3_0__DI1_PIN11 IOMUX_PAD(0x6A8, 0x2A8, 4, 0x0, 0, NO_PAD_CTRL) | 233 | #define MX51_PAD_USBH1_DATA3__USBH1_DATA3 IOMUX_PAD(0x694, 0x294, 0, 0x0, 0, MX51_USBH1_PAD_CTRL) |
232 | #define MX51_PAD_GPIO_3_1__DI1_PIN12 IOMUX_PAD(0x6AC, 0x2AC, 4, 0x0, 0, NO_PAD_CTRL) | 234 | #define MX51_PAD_USBH1_DATA4__USBH1_DATA4 IOMUX_PAD(0x698, 0x298, 0, 0x0, 0, MX51_USBH1_PAD_CTRL) |
233 | #define MX51_PAD_GPIO_3_2__DI1_PIN13 IOMUX_PAD(0x6B0, 0x2B0, 4, 0x0, 0, NO_PAD_CTRL) | 235 | #define MX51_PAD_USBH1_DATA5__USBH1_DATA5 IOMUX_PAD(0x69C, 0x29C, 0, 0x0, 0, MX51_USBH1_PAD_CTRL) |
234 | #define MX51_PAD_GPIO_3_3__DI1_D0_CS IOMUX_PAD(0x6B4, 0x2B4, 4, 0x0, 0, NO_PAD_CTRL) | 236 | #define MX51_PAD_USBH1_DATA6__USBH1_DATA6 IOMUX_PAD(0x6A0, 0x2A0, 0, 0x0, 0, MX51_USBH1_PAD_CTRL) |
235 | #define MX51_PAD_GPIO_3_4__DI1_D1_CS IOMUX_PAD(0x6B8, 0x2B8, 4, 0x0, 0, NO_PAD_CTRL) | 237 | #define MX51_PAD_USBH1_DATA7__USBH1_DATA7 IOMUX_PAD(0x6A4, 0x2A4, 0, 0x0, 0, MX51_USBH1_PAD_CTRL) |
236 | #define MX51_PAD_GPIO_3_5__DISPB2_SER_DIN IOMUX_PAD(0x6BC, 0x2BC, 4, 0x0, 0, NO_PAD_CTRL) | 238 | #define MX51_PAD_DI1_PIN11__GPIO_3_0 IOMUX_PAD(0x6A8, 0x2A8, 4, 0x0, 0, NO_PAD_CTRL) |
237 | #define MX51_PAD_GPIO_3_6__DISPB2_SER_DIO IOMUX_PAD(0x6C0, 0x2C0, 4, 0x0, 0, NO_PAD_CTRL) | 239 | #define MX51_PAD_DI1_PIN12__GPIO_3_1 IOMUX_PAD(0x6AC, 0x2AC, 4, 0x0, 0, NO_PAD_CTRL) |
238 | #define MX51_PAD_GPIO_3_7__DISPB2_SER_CLK IOMUX_PAD(0x6C4, 0x2C4, 4, 0x0, 0, NO_PAD_CTRL) | 240 | #define MX51_PAD_DI1_PIN13__GPIO_3_2 IOMUX_PAD(0x6B0, 0x2B0, 4, 0x0, 0, NO_PAD_CTRL) |
239 | #define MX51_PAD_GPIO_3_8__DISPB2_SER_RS IOMUX_PAD(0x6C8, 0x2C8, 4, 0x0, 0, NO_PAD_CTRL) | 241 | #define MX51_PAD_DI1_D0_CS__GPIO_3_3 IOMUX_PAD(0x6B4, 0x2B4, 4, 0x0, 0, NO_PAD_CTRL) |
240 | #define MX51_PAD_DISP1_DAT0__DISP1_DAT0 IOMUX_PAD(0x6CC, 0x2CC, 0, 0x0, 0, NO_PAD_CTRL) | 242 | #define MX51_PAD_DI1_D1_CS__GPIO_3_4 IOMUX_PAD(0x6B8, 0x2B8, 4, 0x0, 0, NO_PAD_CTRL) |
241 | #define MX51_PAD_DISP1_DAT1__DISP1_DAT1 IOMUX_PAD(0x6D0, 0x2D0, 0, 0x0, 0, NO_PAD_CTRL) | 243 | #define MX51_PAD_DISPB2_SER_DIN__GPIO_3_5 IOMUX_PAD(0x6BC, 0x2BC, 4, 0x0, 0, NO_PAD_CTRL) |
242 | #define MX51_PAD_DISP1_DAT2__DISP1_DAT2 IOMUX_PAD(0x6D4, 0x2D4, 0, 0x0, 0, NO_PAD_CTRL) | 244 | #define MX51_PAD_DISPB2_SER_DIO__GPIO_3_6 IOMUX_PAD(0x6C0, 0x2C0, 4, 0x0, 0, NO_PAD_CTRL) |
243 | #define MX51_PAD_DISP1_DAT3__DISP1_DAT3 IOMUX_PAD(0x6D8, 0x2D8, 0, 0x0, 0, NO_PAD_CTRL) | 245 | #define MX51_PAD_DISPB2_SER_CLK__GPIO_3_7 IOMUX_PAD(0x6C4, 0x2C4, 4, 0x0, 0, NO_PAD_CTRL) |
244 | #define MX51_PAD_DISP1_DAT4__DISP1_DAT4 IOMUX_PAD(0x6DC, 0x2DC, 0, 0x0, 0, NO_PAD_CTRL) | 246 | #define MX51_PAD_DISPB2_SER_RS__GPIO_3_8 IOMUX_PAD(0x6C8, 0x2C8, 4, 0x0, 0, NO_PAD_CTRL) |
245 | #define MX51_PAD_DISP1_DAT5__DISP1_DAT5 IOMUX_PAD(0x6E0, 0x2E0, 0, 0x0, 0, NO_PAD_CTRL) | 247 | #define MX51_PAD_DISP1_DAT0__DISP1_DAT0 IOMUX_PAD(0x6CC, 0x2CC, 0, 0x0, 0, NO_PAD_CTRL) |
246 | #define MX51_PAD_DISP1_DAT6__DISP1_DAT6 IOMUX_PAD(0x6E4, 0x2E4, 0, 0x0, 0, NO_PAD_CTRL) | 248 | #define MX51_PAD_DISP1_DAT1__DISP1_DAT1 IOMUX_PAD(0x6D0, 0x2D0, 0, 0x0, 0, NO_PAD_CTRL) |
247 | #define MX51_PAD_DISP1_DAT7__DISP1_DAT7 IOMUX_PAD(0x6E8, 0x2E8, 0, 0x0, 0, NO_PAD_CTRL) | 249 | #define MX51_PAD_DISP1_DAT2__DISP1_DAT2 IOMUX_PAD(0x6D4, 0x2D4, 0, 0x0, 0, NO_PAD_CTRL) |
248 | #define MX51_PAD_DISP1_DAT8__DISP1_DAT8 IOMUX_PAD(0x6EC, 0x2EC, 0, 0x0, 0, NO_PAD_CTRL) | 250 | #define MX51_PAD_DISP1_DAT3__DISP1_DAT3 IOMUX_PAD(0x6D8, 0x2D8, 0, 0x0, 0, NO_PAD_CTRL) |
249 | #define MX51_PAD_DISP1_DAT9__DISP1_DAT9 IOMUX_PAD(0x6F0, 0x2F0, 0, 0x0, 0, NO_PAD_CTRL) | 251 | #define MX51_PAD_DISP1_DAT4__DISP1_DAT4 IOMUX_PAD(0x6DC, 0x2DC, 0, 0x0, 0, NO_PAD_CTRL) |
250 | #define MX51_PAD_DISP1_DAT10__DISP1_DAT10 IOMUX_PAD(0x6F4, 0x2F4, 0, 0x0, 0, NO_PAD_CTRL) | 252 | #define MX51_PAD_DISP1_DAT5__DISP1_DAT5 IOMUX_PAD(0x6E0, 0x2E0, 0, 0x0, 0, NO_PAD_CTRL) |
251 | #define MX51_PAD_DISP1_DAT11__DISP1_DAT11 IOMUX_PAD(0x6F8, 0x2F8, 0, 0x0, 0, NO_PAD_CTRL) | 253 | #define MX51_PAD_DISP1_DAT6__DISP1_DAT6 IOMUX_PAD(0x6E4, 0x2E4, 0, 0x0, 0, NO_PAD_CTRL) |
252 | #define MX51_PAD_DISP1_DAT12__DISP1_DAT12 IOMUX_PAD(0x6FC, 0x2FC, 0, 0x0, 0, NO_PAD_CTRL) | 254 | #define MX51_PAD_DISP1_DAT7__DISP1_DAT7 IOMUX_PAD(0x6E8, 0x2E8, 0, 0x0, 0, NO_PAD_CTRL) |
253 | #define MX51_PAD_DISP1_DAT13__DISP1_DAT13 IOMUX_PAD(0x700, 0x300, 0, 0x0, 0, NO_PAD_CTRL) | 255 | #define MX51_PAD_DISP1_DAT8__DISP1_DAT8 IOMUX_PAD(0x6EC, 0x2EC, 0, 0x0, 0, NO_PAD_CTRL) |
254 | #define MX51_PAD_DISP1_DAT14__DISP1_DAT14 IOMUX_PAD(0x704, 0x304, 0, 0x0, 0, NO_PAD_CTRL) | 256 | #define MX51_PAD_DISP1_DAT9__DISP1_DAT9 IOMUX_PAD(0x6F0, 0x2F0, 0, 0x0, 0, NO_PAD_CTRL) |
255 | #define MX51_PAD_DISP1_DAT15__DISP1_DAT15 IOMUX_PAD(0x708, 0x308, 0, 0x0, 0, NO_PAD_CTRL) | 257 | #define MX51_PAD_DISP1_DAT10__DISP1_DAT10 IOMUX_PAD(0x6F4, 0x2F4, 0, 0x0, 0, NO_PAD_CTRL) |
256 | #define MX51_PAD_DISP1_DAT16__DISP1_DAT16 IOMUX_PAD(0x70C, 0x30C, 0, 0x0, 0, NO_PAD_CTRL) | 258 | #define MX51_PAD_DISP1_DAT11__DISP1_DAT11 IOMUX_PAD(0x6F8, 0x2F8, 0, 0x0, 0, NO_PAD_CTRL) |
257 | #define MX51_PAD_DISP1_DAT17__DISP1_DAT17 IOMUX_PAD(0x710, 0x310, 0, 0x0, 0, NO_PAD_CTRL) | 259 | #define MX51_PAD_DISP1_DAT12__DISP1_DAT12 IOMUX_PAD(0x6FC, 0x2FC, 0, 0x0, 0, NO_PAD_CTRL) |
258 | #define MX51_PAD_DISP1_DAT18__DISP1_DAT18 IOMUX_PAD(0x714, 0x314, 0, 0x0, 0, NO_PAD_CTRL) | 260 | #define MX51_PAD_DISP1_DAT13__DISP1_DAT13 IOMUX_PAD(0x700, 0x300, 0, 0x0, 0, NO_PAD_CTRL) |
259 | #define MX51_PAD_DISP1_DAT19__DISP1_DAT19 IOMUX_PAD(0x718, 0x318, 0, 0x0, 0, NO_PAD_CTRL) | 261 | #define MX51_PAD_DISP1_DAT14__DISP1_DAT14 IOMUX_PAD(0x704, 0x304, 0, 0x0, 0, NO_PAD_CTRL) |
260 | #define MX51_PAD_DISP1_DAT20__DISP1_DAT20 IOMUX_PAD(0x71C, 0x31C, 0, 0x0, 0, NO_PAD_CTRL) | 262 | #define MX51_PAD_DISP1_DAT15__DISP1_DAT15 IOMUX_PAD(0x708, 0x308, 0, 0x0, 0, NO_PAD_CTRL) |
261 | #define MX51_PAD_DISP1_DAT21__DISP1_DAT21 IOMUX_PAD(0x720, 0x320, 0, 0x0, 0, NO_PAD_CTRL) | 263 | #define MX51_PAD_DISP1_DAT16__DISP1_DAT16 IOMUX_PAD(0x70C, 0x30C, 0, 0x0, 0, NO_PAD_CTRL) |
262 | #define MX51_PAD_DISP1_DAT22__DISP1_DAT22 IOMUX_PAD(0x724, 0x324, 0, 0x0, 0, NO_PAD_CTRL) | 264 | #define MX51_PAD_DISP1_DAT17__DISP1_DAT17 IOMUX_PAD(0x710, 0x310, 0, 0x0, 0, NO_PAD_CTRL) |
263 | #define MX51_PAD_DISP1_DAT23__DISP1_DAT23 IOMUX_PAD(0x728, 0x328, 0, 0x0, 0, NO_PAD_CTRL) | 265 | #define MX51_PAD_DISP1_DAT18__DISP1_DAT18 IOMUX_PAD(0x714, 0x314, 0, 0x0, 0, NO_PAD_CTRL) |
264 | #define MX51_PAD_DI1_PIN3__DI1_PIN3 IOMUX_PAD(0x72C, 0x32C, 0, 0x0, 0, NO_PAD_CTRL) | 266 | #define MX51_PAD_DISP1_DAT19__DISP1_DAT19 IOMUX_PAD(0x718, 0x318, 0, 0x0, 0, NO_PAD_CTRL) |
265 | #define MX51_PAD_DI1_PIN2__DI1_PIN2 IOMUX_PAD(0x734, 0x330, 0, 0x0, 0, NO_PAD_CTRL) | 267 | #define MX51_PAD_DISP1_DAT20__DISP1_DAT20 IOMUX_PAD(0x71C, 0x31C, 0, 0x0, 0, NO_PAD_CTRL) |
266 | #define MX51_PAD_DI_GP1__DI_GP1 IOMUX_PAD(0x73C, 0x334, 0, 0x0, 0, NO_PAD_CTRL) | 268 | #define MX51_PAD_DISP1_DAT21__DISP1_DAT21 IOMUX_PAD(0x720, 0x320, 0, 0x0, 0, NO_PAD_CTRL) |
267 | #define MX51_PAD_DI_GP2__DI_GP2 IOMUX_PAD(0x740, 0x338, 0, 0x0, 0, NO_PAD_CTRL) | 269 | #define MX51_PAD_DISP1_DAT22__DISP1_DAT22 IOMUX_PAD(0x724, 0x324, 0, 0x0, 0, NO_PAD_CTRL) |
268 | #define MX51_PAD_DI_GP3__DI_GP3 IOMUX_PAD(0x744, 0x33C, 0, 0x0, 0, NO_PAD_CTRL) | 270 | #define MX51_PAD_DISP1_DAT23__DISP1_DAT23 IOMUX_PAD(0x728, 0x328, 0, 0x0, 0, NO_PAD_CTRL) |
269 | #define MX51_PAD_DI2_PIN4__DI2_PIN4 IOMUX_PAD(0x748, 0x340, 0, 0x0, 0, NO_PAD_CTRL) | 271 | #define MX51_PAD_DI1_PIN3__DI1_PIN3 IOMUX_PAD(0x72C, 0x32C, 0, 0x0, 0, NO_PAD_CTRL) |
270 | #define MX51_PAD_DI2_PIN2__DI2_PIN2 IOMUX_PAD(0x74C, 0x344, 0, 0x0, 0, NO_PAD_CTRL) | 272 | #define MX51_PAD_DI1_PIN2__DI1_PIN2 IOMUX_PAD(0x734, 0x330, 0, 0x0, 0, NO_PAD_CTRL) |
271 | #define MX51_PAD_DI2_PIN3__DI2_PIN3 IOMUX_PAD(0x750, 0x348, 0, 0x0, 0, NO_PAD_CTRL) | 273 | #define MX51_PAD_DI_GP1__DI_GP1 IOMUX_PAD(0x73C, 0x334, 0, 0x0, 0, NO_PAD_CTRL) |
272 | #define MX51_PAD_DI2_DISP_CLK__DI2_DISP_CLK IOMUX_PAD(0x754, 0x34C, 0, 0x0, 0, NO_PAD_CTRL) | 274 | #define MX51_PAD_DI_GP2__DI_GP2 IOMUX_PAD(0x740, 0x338, 0, 0x0, 0, NO_PAD_CTRL) |
273 | #define MX51_PAD_DI_GP4__DI_GP4 IOMUX_PAD(0x758, 0x350, 0, 0x0, 0, NO_PAD_CTRL) | 275 | #define MX51_PAD_DI_GP3__DI_GP3 IOMUX_PAD(0x744, 0x33C, 0, 0x0, 0, NO_PAD_CTRL) |
274 | #define MX51_PAD_DISP2_DAT0__DISP2_DAT0 IOMUX_PAD(0x75C, 0x354, 0, 0x0, 0, NO_PAD_CTRL) | 276 | #define MX51_PAD_DI2_PIN4__DI2_PIN4 IOMUX_PAD(0x748, 0x340, 0, 0x0, 0, NO_PAD_CTRL) |
275 | #define MX51_PAD_DISP2_DAT1__DISP2_DAT1 IOMUX_PAD(0x760, 0x358, 0, 0x0, 0, NO_PAD_CTRL) | 277 | #define MX51_PAD_DI2_PIN2__DI2_PIN2 IOMUX_PAD(0x74C, 0x344, 0, 0x0, 0, NO_PAD_CTRL) |
276 | #define MX51_PAD_DISP2_DAT2__DISP2_DAT2 IOMUX_PAD(0x764, 0x35C, 0, 0x0, 0, NO_PAD_CTRL) | 278 | #define MX51_PAD_DI2_PIN3__DI2_PIN3 IOMUX_PAD(0x750, 0x348, 0, 0x0, 0, NO_PAD_CTRL) |
277 | #define MX51_PAD_DISP2_DAT3__DISP2_DAT3 IOMUX_PAD(0x768, 0x360, 0, 0x0, 0, NO_PAD_CTRL) | 279 | #define MX51_PAD_DI2_DISP_CLK__DI2_DISP_CLK IOMUX_PAD(0x754, 0x34C, 0, 0x0, 0, NO_PAD_CTRL) |
278 | #define MX51_PAD_DISP2_DAT4__DISP2_DAT4 IOMUX_PAD(0x76C, 0x364, 0, 0x0, 0, NO_PAD_CTRL) | 280 | #define MX51_PAD_DI_GP4__DI_GP4 IOMUX_PAD(0x758, 0x350, 0, 0x0, 0, NO_PAD_CTRL) |
279 | #define MX51_PAD_DISP2_DAT5__DISP2_DAT5 IOMUX_PAD(0x770, 0x368, 0, 0x0, 0, NO_PAD_CTRL) | 281 | #define MX51_PAD_DISP2_DAT0__DISP2_DAT0 IOMUX_PAD(0x75C, 0x354, 0, 0x0, 0, NO_PAD_CTRL) |
280 | #define MX51_PAD_GPIO_1_19__DISP2_DAT6 IOMUX_PAD(0x774, 0x36C, 5, 0x0, 0, NO_PAD_CTRL) | 282 | #define MX51_PAD_DISP2_DAT1__DISP2_DAT1 IOMUX_PAD(0x760, 0x358, 0, 0x0, 0, NO_PAD_CTRL) |
281 | #define MX51_PAD_GPIO_1_29__DISP2_DAT7 IOMUX_PAD(0x778, 0x370, 5, 0x0, 0, NO_PAD_CTRL) | 283 | #define MX51_PAD_DISP2_DAT2__DISP2_DAT2 IOMUX_PAD(0x764, 0x35C, 0, 0x0, 0, NO_PAD_CTRL) |
282 | #define MX51_PAD_GPIO_1_30__DISP2_DAT8 IOMUX_PAD(0x77C, 0x374, 5, 0x0, 0, NO_PAD_CTRL) | 284 | #define MX51_PAD_DISP2_DAT3__DISP2_DAT3 IOMUX_PAD(0x768, 0x360, 0, 0x0, 0, NO_PAD_CTRL) |
283 | #define MX51_PAD_GPIO_1_31__DISP2_DAT9 IOMUX_PAD(0x780, 0x378, 5, 0x0, 0, NO_PAD_CTRL) | 285 | #define MX51_PAD_DISP2_DAT4__DISP2_DAT4 IOMUX_PAD(0x76C, 0x364, 0, 0x0, 0, NO_PAD_CTRL) |
284 | #define MX51_PAD_DISP2_DAT10__DISP2_DAT10 IOMUX_PAD(0x784, 0x37C, 0, 0x0, 0, NO_PAD_CTRL) | 286 | #define MX51_PAD_DISP2_DAT5__DISP2_DAT5 IOMUX_PAD(0x770, 0x368, 0, 0x0, 0, NO_PAD_CTRL) |
285 | #define MX51_PAD_DISP2_DAT11__DISP2_DAT11 IOMUX_PAD(0x788, 0x380, 0, 0x0, 0, NO_PAD_CTRL) | 287 | #define MX51_PAD_DISP2_DAT6__GPIO_1_19 IOMUX_PAD(0x774, 0x36C, 5, 0x0, 0, NO_PAD_CTRL) |
286 | #define MX51_PAD_DISP2_DAT12__DISP2_DAT12 IOMUX_PAD(0x78C, 0x384, 0, 0x0, 0, NO_PAD_CTRL) | 288 | #define MX51_PAD_DISP2_DAT7__GPIO_1_29 IOMUX_PAD(0x778, 0x370, 5, 0x0, 0, NO_PAD_CTRL) |
287 | #define MX51_PAD_DISP2_DAT13__DISP2_DAT13 IOMUX_PAD(0x790, 0x388, 0, 0x0, 0, NO_PAD_CTRL) | 289 | #define MX51_PAD_DISP2_DAT8__GPIO_1_30 IOMUX_PAD(0x77C, 0x374, 5, 0x0, 0, NO_PAD_CTRL) |
288 | #define MX51_PAD_DISP2_DAT14__DISP2_DAT14 IOMUX_PAD(0x794, 0x38C, 0, 0x0, 0, NO_PAD_CTRL) | 290 | #define MX51_PAD_DISP2_DAT9__GPIO_1_31 IOMUX_PAD(0x780, 0x378, 5, 0x0, 0, NO_PAD_CTRL) |
289 | #define MX51_PAD_DISP2_DAT15__DISP2_DAT15 IOMUX_PAD(0x798, 0x390, 0, 0x0, 0, NO_PAD_CTRL) | 291 | #define MX51_PAD_DISP2_DAT10__DISP2_DAT10 IOMUX_PAD(0x784, 0x37C, 0, 0x0, 0, NO_PAD_CTRL) |
290 | #define MX51_PAD_SD1_CMD__SD1_CMD IOMUX_PAD(0x79C, 0x394, 0, 0x0, 0, NO_PAD_CTRL) | 292 | #define MX51_PAD_DISP2_DAT11__DISP2_DAT11 IOMUX_PAD(0x788, 0x380, 0, 0x0, 0, NO_PAD_CTRL) |
291 | #define MX51_PAD_SD1_CLK__SD1_CLK IOMUX_PAD(0x7A0, 0x398, 0, 0x0, 0, NO_PAD_CTRL) | 293 | #define MX51_PAD_DISP2_DAT12__DISP2_DAT12 IOMUX_PAD(0x78C, 0x384, 0, 0x0, 0, NO_PAD_CTRL) |
292 | #define MX51_PAD_SD1_DATA0__SD1_DATA0 IOMUX_PAD(0x7A4, 0x39C, 0, 0x0, 0, NO_PAD_CTRL) | 294 | #define MX51_PAD_DISP2_DAT13__DISP2_DAT13 IOMUX_PAD(0x790, 0x388, 0, 0x0, 0, NO_PAD_CTRL) |
293 | #define MX51_PAD_SD1_DATA1__SD1_DATA1 IOMUX_PAD(0x7A8, 0x3A0, 0, 0x0, 0, NO_PAD_CTRL) | 295 | #define MX51_PAD_DISP2_DAT14__DISP2_DAT14 IOMUX_PAD(0x794, 0x38C, 0, 0x0, 0, NO_PAD_CTRL) |
294 | #define MX51_PAD_SD1_DATA2__SD1_DATA2 IOMUX_PAD(0x7AC, 0x3A4, 0, 0x0, 0, NO_PAD_CTRL) | 296 | #define MX51_PAD_DISP2_DAT15__DISP2_DAT15 IOMUX_PAD(0x798, 0x390, 0, 0x0, 0, NO_PAD_CTRL) |
295 | #define MX51_PAD_SD1_DATA3__SD1_DATA3 IOMUX_PAD(0x7B0, 0x3A8, 0, 0x0, 0, NO_PAD_CTRL) | 297 | #define MX51_PAD_SD1_CMD__SD1_CMD IOMUX_PAD(0x79C, 0x394, 0, 0x0, 0, NO_PAD_CTRL) |
296 | #define MX51_PAD_GPIO_1_0__GPIO1_0 IOMUX_PAD(0x7B4, 0x3AC, 1, 0x0, 0, NO_PAD_CTRL) | 298 | #define MX51_PAD_SD1_CLK__SD1_CLK IOMUX_PAD(0x7A0, 0x398, 0, 0x0, 0, NO_PAD_CTRL) |
297 | #define MX51_PAD_GPIO_1_1__GPIO1_1 IOMUX_PAD(0x7B8, 0x3B0, 1, 0x0, 0, NO_PAD_CTRL) | 299 | #define MX51_PAD_SD1_DATA0__SD1_DATA0 IOMUX_PAD(0x7A4, 0x39C, 0, 0x0, 0, NO_PAD_CTRL) |
298 | #define MX51_PAD_SD2_CMD__SD2_CMD IOMUX_PAD(0x7BC, 0x3B4, 0, 0x0, 0, NO_PAD_CTRL) | 300 | #define MX51_PAD_SD1_DATA1__SD1_DATA1 IOMUX_PAD(0x7A8, 0x3A0, 0, 0x0, 0, NO_PAD_CTRL) |
299 | #define MX51_PAD_SD2_CLK__SD2_CLK IOMUX_PAD(0x7C0, 0x3B8, 0, 0x0, 0, NO_PAD_CTRL) | 301 | #define MX51_PAD_SD1_DATA2__SD1_DATA2 IOMUX_PAD(0x7AC, 0x3A4, 0, 0x0, 0, NO_PAD_CTRL) |
300 | #define MX51_PAD_SD2_DATA0__SD2_DATA0 IOMUX_PAD(0x7C4, 0x3BC, 0, 0x0, 0, NO_PAD_CTRL) | 302 | #define MX51_PAD_SD1_DATA3__SD1_DATA3 IOMUX_PAD(0x7B0, 0x3A8, 0, 0x0, 0, NO_PAD_CTRL) |
301 | #define MX51_PAD_SD2_DATA1__SD2_DATA1 IOMUX_PAD(0x7C8, 0x3C0, 0, 0x0, 0, NO_PAD_CTRL) | 303 | #define MX51_PAD_GPIO_1_0__GPIO_1_0 IOMUX_PAD(0x7B4, 0x3AC, 1, 0x0, 0, NO_PAD_CTRL) |
302 | #define MX51_PAD_SD2_DATA2__SD2_DATA2 IOMUX_PAD(0x7CC, 0x3C4, 0, 0x0, 0, NO_PAD_CTRL) | 304 | #define MX51_PAD_GPIO_1_1__GPIO_1_1 IOMUX_PAD(0x7B8, 0x3B0, 1, 0x0, 0, NO_PAD_CTRL) |
303 | #define MX51_PAD_SD2_DATA3__SD2_DATA3 IOMUX_PAD(0x7D0, 0x3C8, 0, 0x0, 0, NO_PAD_CTRL) | 305 | #define MX51_PAD_SD2_CMD__SD2_CMD IOMUX_PAD(0x7BC, 0x3B4, 0, 0x0, 0, NO_PAD_CTRL) |
304 | #define MX51_PAD_GPIO_1_2__GPIO1_2 IOMUX_PAD(0x7D4, 0x3CC, 0, 0x0, 0, NO_PAD_CTRL) | 306 | #define MX51_PAD_SD2_CLK__SD2_CLK IOMUX_PAD(0x7C0, 0x3B8, 0, 0x0, 0, NO_PAD_CTRL) |
305 | #define MX51_PAD_GPIO_1_3__GPIO1_3 IOMUX_PAD(0x7D8, 0x3D0, 0, 0x0, 0, NO_PAD_CTRL) | 307 | #define MX51_PAD_SD2_DATA0__SD2_DATA0 IOMUX_PAD(0x7C4, 0x3BC, 0, 0x0, 0, NO_PAD_CTRL) |
306 | #define MX51_PAD_PMIC_INT_REQ__PMIC_INT_REQ IOMUX_PAD(0x7FC, 0x3D4, 0, 0x0, 0, NO_PAD_CTRL) | 308 | #define MX51_PAD_SD2_DATA1__SD2_DATA1 IOMUX_PAD(0x7C8, 0x3C0, 0, 0x0, 0, NO_PAD_CTRL) |
307 | #define MX51_PAD_GPIO_1_4__GPIO1_4 IOMUX_PAD(0x804, 0x3D8, 0, 0x0, 0, NO_PAD_CTRL) | 309 | #define MX51_PAD_SD2_DATA2__SD2_DATA2 IOMUX_PAD(0x7CC, 0x3C4, 0, 0x0, 0, NO_PAD_CTRL) |
308 | #define MX51_PAD_GPIO_1_5__GPIO1_5 IOMUX_PAD(0x808, 0x3DC, 0, 0x0, 0, NO_PAD_CTRL) | 310 | #define MX51_PAD_SD2_DATA3__SD2_DATA3 IOMUX_PAD(0x7D0, 0x3C8, 0, 0x0, 0, NO_PAD_CTRL) |
309 | #define MX51_PAD_GPIO_1_6__GPIO1_6 IOMUX_PAD(0x80C, 0x3E0, 0, 0x0, 0, NO_PAD_CTRL) | 311 | #define MX51_PAD_GPIO_1_2__GPIO_1_2 IOMUX_PAD(0x7D4, 0x3CC, 0, 0x0, 0, NO_PAD_CTRL) |
310 | #define MX51_PAD_GPIO_1_7__GPIO1_7 IOMUX_PAD(0x810, 0x3E4, 0, 0x0, 0, MX51_GPIO_PAD_CTRL) | 312 | #define MX51_PAD_GPIO_1_2__I2C2_SCL IOMUX_PAD(0x7D4, 0x3CC, (2 | IOMUX_CONFIG_SION), \ |
311 | #define MX51_PAD_GPIO_1_8__GPIO1_8 IOMUX_PAD(0x814, 0x3E8, 0, 0x0, 1, \ | 313 | 0x9b8, 3, MX51_I2C_PAD_CTRL) |
312 | (PAD_CTL_SRE_SLOW | PAD_CTL_DSE_MED | PAD_CTL_PUS_100K_UP | PAD_CTL_HYS)) | 314 | #define MX51_PAD_GPIO_1_3__GPIO_1_3 IOMUX_PAD(0x7D8, 0x3D0, 0, 0x0, 0, NO_PAD_CTRL) |
313 | #define MX51_PAD_GPIO_1_9__GPIO1_9 IOMUX_PAD(0x818, 0x3EC, 0, 0x0, 0, NO_PAD_CTRL) | 315 | #define MX51_PAD_GPIO_1_3__I2C2_SDA IOMUX_PAD(0x7D8, 0x3D0, (2 | IOMUX_CONFIG_SION), \ |
314 | 316 | 0x9bc, 3, MX51_I2C_PAD_CTRL) | |
315 | /* EIM */ | 317 | #define MX51_PAD_PMIC_INT_REQ__PMIC_INT_REQ IOMUX_PAD(0x7FC, 0x3D4, 0, 0x0, 0, NO_PAD_CTRL) |
316 | #define MX51_PAD_EIM_DA0__EIM_DA0 IOMUX_PAD(0x7a8, 0x01c, 0, 0x0, 0, NO_PAD_CTRL) | 318 | #define MX51_PAD_GPIO_1_4__GPIO_1_4 IOMUX_PAD(0x804, 0x3D8, 0, 0x0, 0, NO_PAD_CTRL) |
317 | #define MX51_PAD_EIM_DA1__EIM_DA1 IOMUX_PAD(0x7a8, 0x020, 0, 0x0, 0, NO_PAD_CTRL) | 319 | #define MX51_PAD_GPIO_1_5__GPIO_1_5 IOMUX_PAD(0x808, 0x3DC, 0, 0x0, 0, NO_PAD_CTRL) |
318 | #define MX51_PAD_EIM_DA2__EIM_DA2 IOMUX_PAD(0x7a8, 0x024, 0, 0x0, 0, NO_PAD_CTRL) | 320 | #define MX51_PAD_GPIO_1_6__GPIO_1_6 IOMUX_PAD(0x80C, 0x3E0, 0, 0x0, 0, MX51_GPIO_PAD_CTRL) |
319 | #define MX51_PAD_EIM_DA3__EIM_DA3 IOMUX_PAD(0x7a8, 0x028, 0, 0x0, 0, NO_PAD_CTRL) | 321 | #define MX51_PAD_GPIO_1_7__GPIO_1_7 IOMUX_PAD(0x810, 0x3E4, 0, 0x0, 0, MX51_GPIO_PAD_CTRL) |
320 | #define MX51_PAD_EIM_DA4__EIM_DA4 IOMUX_PAD(0x7ac, 0x02c, 0, 0x0, 0, NO_PAD_CTRL) | 322 | #define MX51_PAD_GPIO_1_8__GPIO_1_8 IOMUX_PAD(0x814, 0x3E8, 0, 0x0, 1, MX51_GPIO_PAD_CTRL) |
321 | #define MX51_PAD_EIM_DA5__EIM_DA5 IOMUX_PAD(0x7ac, 0x030, 0, 0x0, 0, NO_PAD_CTRL) | 323 | #define MX51_PAD_GPIO_1_9__GPIO_1_9 IOMUX_PAD(0x818, 0x3EC, 0, 0x0, 0, NO_PAD_CTRL) |
322 | #define MX51_PAD_EIM_DA6__EIM_DA6 IOMUX_PAD(0x7ac, 0x034, 0, 0x0, 0, NO_PAD_CTRL) | ||
323 | #define MX51_PAD_EIM_DA7__EIM_DA7 IOMUX_PAD(0x7ac, 0x038, 0, 0x0, 0, NO_PAD_CTRL) | ||
324 | |||
325 | #define MX51_PAD_EIM_DA8__EIM_DA8 IOMUX_PAD(0x7b0, 0x03c, 0, 0x0, 0, NO_PAD_CTRL) | ||
326 | #define MX51_PAD_EIM_DA9__EIM_DA9 IOMUX_PAD(0x7b0, 0x040, 0, 0x0, 0, NO_PAD_CTRL) | ||
327 | #define MX51_PAD_EIM_DA10__EIM_DA10 IOMUX_PAD(0x7b0, 0x044, 0, 0x0, 0, NO_PAD_CTRL) | ||
328 | #define MX51_PAD_EIM_DA11__EIM_DA11 IOMUX_PAD(0x7b0, 0x048, 0, 0x0, 0, NO_PAD_CTRL) | ||
329 | #define MX51_PAD_EIM_DA12__EIM_DA12 IOMUX_PAD(0x7bc, 0x04c, 0, 0x0, 0, NO_PAD_CTRL) | ||
330 | #define MX51_PAD_EIM_DA13__EIM_DA13 IOMUX_PAD(0x7bc, 0x050, 0, 0x0, 0, NO_PAD_CTRL) | ||
331 | #define MX51_PAD_EIM_DA14__EIM_DA14 IOMUX_PAD(0x7bc, 0x054, 0, 0x0, 0, NO_PAD_CTRL) | ||
332 | #define MX51_PAD_EIM_DA15__EIM_DA15 IOMUX_PAD(0x7bc, 0x058, 0, 0x0, 0, NO_PAD_CTRL) | ||
333 | 324 | ||
334 | #endif /* __MACH_IOMUX_MX51_H__ */ | 325 | #endif /* __MACH_IOMUX_MX51_H__ */ |
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mxc91231.h b/arch/arm/plat-mxc/include/mach/iomux-mxc91231.h index 3887f3fe29d4..15d59510f597 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mxc91231.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mxc91231.h | |||
@@ -12,10 +12,6 @@ | |||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | 15 | */ |
20 | 16 | ||
21 | #ifndef __MACH_IOMUX_MXC91231_H__ | 17 | #ifndef __MACH_IOMUX_MXC91231_H__ |
diff --git a/arch/arm/plat-mxc/include/mach/iomux-v3.h b/arch/arm/plat-mxc/include/mach/iomux-v3.h index f2f73d31d5ba..0880a4a1aed1 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-v3.h +++ b/arch/arm/plat-mxc/include/mach/iomux-v3.h | |||
@@ -89,6 +89,21 @@ struct pad_desc { | |||
89 | #define PAD_CTL_SRE_FAST (1 << 0) | 89 | #define PAD_CTL_SRE_FAST (1 << 0) |
90 | #define PAD_CTL_SRE_SLOW (0 << 0) | 90 | #define PAD_CTL_SRE_SLOW (0 << 0) |
91 | 91 | ||
92 | |||
93 | #define MX51_NUM_GPIO_PORT 4 | ||
94 | |||
95 | #define GPIO_PIN_MASK 0x1f | ||
96 | |||
97 | #define GPIO_PORT_SHIFT 5 | ||
98 | #define GPIO_PORT_MASK (0x7 << GPIO_PORT_SHIFT) | ||
99 | |||
100 | #define GPIO_PORTA (0 << GPIO_PORT_SHIFT) | ||
101 | #define GPIO_PORTB (1 << GPIO_PORT_SHIFT) | ||
102 | #define GPIO_PORTC (2 << GPIO_PORT_SHIFT) | ||
103 | #define GPIO_PORTD (3 << GPIO_PORT_SHIFT) | ||
104 | #define GPIO_PORTE (4 << GPIO_PORT_SHIFT) | ||
105 | #define GPIO_PORTF (5 << GPIO_PORT_SHIFT) | ||
106 | |||
92 | /* | 107 | /* |
93 | * setups a single pad in the iomuxer | 108 | * setups a single pad in the iomuxer |
94 | */ | 109 | */ |
diff --git a/arch/arm/plat-mxc/include/mach/memory.h b/arch/arm/plat-mxc/include/mach/memory.h index c4b40c35a6a1..564ec9dbc93d 100644 --- a/arch/arm/plat-mxc/include/mach/memory.h +++ b/arch/arm/plat-mxc/include/mach/memory.h | |||
@@ -44,12 +44,12 @@ | |||
44 | */ | 44 | */ |
45 | #define CONSISTENT_DMA_SIZE SZ_8M | 45 | #define CONSISTENT_DMA_SIZE SZ_8M |
46 | 46 | ||
47 | #elif defined(CONFIG_MX1_VIDEO) | 47 | #elif defined(CONFIG_MX1_VIDEO) || defined(CONFIG_VIDEO_MX2_HOSTSUPPORT) |
48 | /* | 48 | /* |
49 | * Increase size of DMA-consistent memory region. | 49 | * Increase size of DMA-consistent memory region. |
50 | * This is required for i.MX camera driver to capture at least four VGA frames. | 50 | * This is required for i.MX camera driver to capture at least four VGA frames. |
51 | */ | 51 | */ |
52 | #define CONSISTENT_DMA_SIZE SZ_4M | 52 | #define CONSISTENT_DMA_SIZE SZ_4M |
53 | #endif /* CONFIG_MX1_VIDEO */ | 53 | #endif /* CONFIG_MX1_VIDEO || CONFIG_VIDEO_MX2_HOSTSUPPORT */ |
54 | 54 | ||
55 | #endif /* __ASM_ARCH_MXC_MEMORY_H__ */ | 55 | #endif /* __ASM_ARCH_MXC_MEMORY_H__ */ |
diff --git a/arch/arm/plat-mxc/include/mach/mmc.h b/arch/arm/plat-mxc/include/mach/mmc.h index de2128dada5c..29115f405af9 100644 --- a/arch/arm/plat-mxc/include/mach/mmc.h +++ b/arch/arm/plat-mxc/include/mach/mmc.h | |||
@@ -31,6 +31,9 @@ struct imxmmc_platform_data { | |||
31 | 31 | ||
32 | /* adjust slot voltage */ | 32 | /* adjust slot voltage */ |
33 | void (*setpower)(struct device *, unsigned int vdd); | 33 | void (*setpower)(struct device *, unsigned int vdd); |
34 | |||
35 | /* enable card detect using DAT3 */ | ||
36 | int dat3_card_detect; | ||
34 | }; | 37 | }; |
35 | 38 | ||
36 | #endif | 39 | #endif |
diff --git a/arch/arm/plat-mxc/include/mach/mx1.h b/arch/arm/plat-mxc/include/mach/mx1.h index 5eba7e6785de..641b24618239 100644 --- a/arch/arm/plat-mxc/include/mach/mx1.h +++ b/arch/arm/plat-mxc/include/mach/mx1.h | |||
@@ -91,24 +91,24 @@ | |||
91 | #define MX1_SIM_DATA_INT 16 | 91 | #define MX1_SIM_DATA_INT 16 |
92 | #define MX1_RTC_INT 17 | 92 | #define MX1_RTC_INT 17 |
93 | #define MX1_RTC_SAMINT 18 | 93 | #define MX1_RTC_SAMINT 18 |
94 | #define MX1_UART2_MINT_PFERR 19 | 94 | #define MX1_INT_UART2PFERR 19 |
95 | #define MX1_UART2_MINT_RTS 20 | 95 | #define MX1_INT_UART2RTS 20 |
96 | #define MX1_UART2_MINT_DTR 21 | 96 | #define MX1_INT_UART2DTR 21 |
97 | #define MX1_UART2_MINT_UARTC 22 | 97 | #define MX1_INT_UART2UARTC 22 |
98 | #define MX1_UART2_MINT_TX 23 | 98 | #define MX1_INT_UART2TX 23 |
99 | #define MX1_UART2_MINT_RX 24 | 99 | #define MX1_INT_UART2RX 24 |
100 | #define MX1_UART1_MINT_PFERR 25 | 100 | #define MX1_INT_UART1PFERR 25 |
101 | #define MX1_UART1_MINT_RTS 26 | 101 | #define MX1_INT_UART1RTS 26 |
102 | #define MX1_UART1_MINT_DTR 27 | 102 | #define MX1_INT_UART1DTR 27 |
103 | #define MX1_UART1_MINT_UARTC 28 | 103 | #define MX1_INT_UART1UARTC 28 |
104 | #define MX1_UART1_MINT_TX 29 | 104 | #define MX1_INT_UART1TX 29 |
105 | #define MX1_UART1_MINT_RX 30 | 105 | #define MX1_INT_UART1RX 30 |
106 | #define MX1_VOICE_DAC_INT 31 | 106 | #define MX1_VOICE_DAC_INT 31 |
107 | #define MX1_VOICE_ADC_INT 32 | 107 | #define MX1_VOICE_ADC_INT 32 |
108 | #define MX1_PEN_DATA_INT 33 | 108 | #define MX1_PEN_DATA_INT 33 |
109 | #define MX1_PWM_INT 34 | 109 | #define MX1_PWM_INT 34 |
110 | #define MX1_SDHC_INT 35 | 110 | #define MX1_SDHC_INT 35 |
111 | #define MX1_I2C_INT 39 | 111 | #define MX1_INT_I2C 39 |
112 | #define MX1_CSPI_INT 41 | 112 | #define MX1_CSPI_INT 41 |
113 | #define MX1_SSI_TX_INT 42 | 113 | #define MX1_SSI_TX_INT 42 |
114 | #define MX1_SSI_TX_ERR_INT 43 | 114 | #define MX1_SSI_TX_ERR_INT 43 |
@@ -245,7 +245,7 @@ | |||
245 | #define PEN_DATA_INT MX1_PEN_DATA_INT | 245 | #define PEN_DATA_INT MX1_PEN_DATA_INT |
246 | #define PWM_INT MX1_PWM_INT | 246 | #define PWM_INT MX1_PWM_INT |
247 | #define SDHC_INT MX1_SDHC_INT | 247 | #define SDHC_INT MX1_SDHC_INT |
248 | #define I2C_INT MX1_I2C_INT | 248 | #define I2C_INT MX1_INT_I2C |
249 | #define CSPI_INT MX1_CSPI_INT | 249 | #define CSPI_INT MX1_CSPI_INT |
250 | #define SSI_TX_INT MX1_SSI_TX_INT | 250 | #define SSI_TX_INT MX1_SSI_TX_INT |
251 | #define SSI_TX_ERR_INT MX1_SSI_TX_ERR_INT | 251 | #define SSI_TX_ERR_INT MX1_SSI_TX_ERR_INT |
diff --git a/arch/arm/plat-mxc/include/mach/mx25.h b/arch/arm/plat-mxc/include/mach/mx25.h index 4eb6e334bda5..4a6f800990f8 100644 --- a/arch/arm/plat-mxc/include/mach/mx25.h +++ b/arch/arm/plat-mxc/include/mach/mx25.h | |||
@@ -11,6 +11,12 @@ | |||
11 | #define MX25_AVIC_BASE_ADDR_VIRT 0xfc400000 | 11 | #define MX25_AVIC_BASE_ADDR_VIRT 0xfc400000 |
12 | #define MX25_AVIC_SIZE SZ_1M | 12 | #define MX25_AVIC_SIZE SZ_1M |
13 | 13 | ||
14 | #define MX25_I2C1_BASE_ADDR (MX25_AIPS1_BASE_ADDR + 0x80000) | ||
15 | #define MX25_I2C3_BASE_ADDR (MX25_AIPS1_BASE_ADDR + 0x84000) | ||
16 | #define MX25_CAN1_BASE_ADDR (MX25_AIPS1_BASE_ADDR + 0x88000) | ||
17 | #define MX25_CAN2_BASE_ADDR (MX25_AIPS1_BASE_ADDR + 0x8c000) | ||
18 | #define MX25_I2C2_BASE_ADDR (MX25_AIPS1_BASE_ADDR + 0x98000) | ||
19 | #define MX25_CSPI1_BASE_ADDR (MX25_AIPS1_BASE_ADDR + 0xa4000) | ||
14 | #define MX25_IOMUXC_BASE_ADDR (MX25_AIPS1_BASE_ADDR + 0xac000) | 20 | #define MX25_IOMUXC_BASE_ADDR (MX25_AIPS1_BASE_ADDR + 0xac000) |
15 | 21 | ||
16 | #define MX25_CRM_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0x80000) | 22 | #define MX25_CRM_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0x80000) |
@@ -27,22 +33,48 @@ | |||
27 | IMX_IO_ADDRESS(x, MX25_AIPS2) ?: \ | 33 | IMX_IO_ADDRESS(x, MX25_AIPS2) ?: \ |
28 | IMX_IO_ADDRESS(x, MX25_AVIC)) | 34 | IMX_IO_ADDRESS(x, MX25_AVIC)) |
29 | 35 | ||
36 | #define MX25_AIPS1_IO_ADDRESS(x) \ | ||
37 | (((x) - MX25_AIPS1_BASE_ADDR) + MX25_AIPS1_BASE_ADDR_VIRT) | ||
38 | |||
30 | #define MX25_UART1_BASE_ADDR 0x43f90000 | 39 | #define MX25_UART1_BASE_ADDR 0x43f90000 |
31 | #define MX25_UART2_BASE_ADDR 0x43f94000 | 40 | #define MX25_UART2_BASE_ADDR 0x43f94000 |
41 | #define MX25_AUDMUX_BASE_ADDR 0x43fb0000 | ||
42 | #define MX25_UART3_BASE_ADDR 0x5000c000 | ||
43 | #define MX25_UART4_BASE_ADDR 0x50008000 | ||
44 | #define MX25_UART5_BASE_ADDR 0x5002c000 | ||
32 | 45 | ||
46 | #define MX25_CSPI3_BASE_ADDR 0x50004000 | ||
47 | #define MX25_CSPI2_BASE_ADDR 0x50010000 | ||
33 | #define MX25_FEC_BASE_ADDR 0x50038000 | 48 | #define MX25_FEC_BASE_ADDR 0x50038000 |
49 | #define MX25_SSI2_BASE_ADDR 0x50014000 | ||
50 | #define MX25_SSI1_BASE_ADDR 0x50034000 | ||
34 | #define MX25_NFC_BASE_ADDR 0xbb000000 | 51 | #define MX25_NFC_BASE_ADDR 0xbb000000 |
35 | #define MX25_DRYICE_BASE_ADDR 0x53ffc000 | 52 | #define MX25_DRYICE_BASE_ADDR 0x53ffc000 |
36 | #define MX25_LCDC_BASE_ADDR 0x53fbc000 | 53 | #define MX25_LCDC_BASE_ADDR 0x53fbc000 |
54 | #define MX25_KPP_BASE_ADDR 0x43fa8000 | ||
55 | #define MX25_OTG_BASE_ADDR 0x53ff4000 | ||
56 | #define MX25_CSI_BASE_ADDR 0x53ff8000 | ||
37 | 57 | ||
38 | #define MX25_INT_DRYICE 25 | 58 | #define MX25_INT_CSPI3 0 |
39 | #define MX25_INT_FEC 57 | 59 | #define MX25_INT_I2C1 3 |
40 | #define MX25_INT_NANDFC 33 | 60 | #define MX25_INT_I2C2 4 |
41 | #define MX25_INT_LCDC 39 | 61 | #define MX25_INT_UART4 5 |
42 | 62 | #define MX25_INT_I2C3 10 | |
43 | #if defined(IMX_NEEDS_DEPRECATED_SYMBOLS) | 63 | #define MX25_INT_SSI2 11 |
44 | #define UART1_BASE_ADDR MX25_UART1_BASE_ADDR | 64 | #define MX25_INT_SSI1 12 |
45 | #define UART2_BASE_ADDR MX25_UART2_BASE_ADDR | 65 | #define MX25_INT_CSPI2 13 |
46 | #endif | 66 | #define MX25_INT_CSPI1 14 |
67 | #define MX25_INT_CSI 17 | ||
68 | #define MX25_INT_UART3 18 | ||
69 | #define MX25_INT_KPP 24 | ||
70 | #define MX25_INT_DRYICE 25 | ||
71 | #define MX25_INT_UART2 32 | ||
72 | #define MX25_INT_NANDFC 33 | ||
73 | #define MX25_INT_LCDC 39 | ||
74 | #define MX25_INT_UART5 40 | ||
75 | #define MX25_INT_CAN1 43 | ||
76 | #define MX25_INT_CAN2 44 | ||
77 | #define MX25_INT_UART1 45 | ||
78 | #define MX25_INT_FEC 57 | ||
47 | 79 | ||
48 | #endif /* ifndef __MACH_MX25_H__ */ | 80 | #endif /* ifndef __MACH_MX25_H__ */ |
diff --git a/arch/arm/plat-mxc/include/mach/mx27.h b/arch/arm/plat-mxc/include/mach/mx27.h index bae9cd75beee..a8ab2e02a8ca 100644 --- a/arch/arm/plat-mxc/include/mach/mx27.h +++ b/arch/arm/plat-mxc/include/mach/mx27.h | |||
@@ -48,7 +48,7 @@ | |||
48 | #define MX27_CSPI2_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x0f000) | 48 | #define MX27_CSPI2_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x0f000) |
49 | #define MX27_SSI1_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x10000) | 49 | #define MX27_SSI1_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x10000) |
50 | #define MX27_SSI2_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x11000) | 50 | #define MX27_SSI2_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x11000) |
51 | #define MX27_I2C_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x12000) | 51 | #define MX27_I2C1_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x12000) |
52 | #define MX27_SDHC1_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x13000) | 52 | #define MX27_SDHC1_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x13000) |
53 | #define MX27_SDHC2_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x14000) | 53 | #define MX27_SDHC2_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x14000) |
54 | #define MX27_GPIO_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x15000) | 54 | #define MX27_GPIO_BASE_ADDR (MX27_AIPI_BASE_ADDR + 0x15000) |
@@ -150,7 +150,7 @@ static inline void mx27_setup_weimcs(size_t cs, | |||
150 | #define MX27_INT_SDHC3 9 | 150 | #define MX27_INT_SDHC3 9 |
151 | #define MX27_INT_SDHC2 10 | 151 | #define MX27_INT_SDHC2 10 |
152 | #define MX27_INT_SDHC1 11 | 152 | #define MX27_INT_SDHC1 11 |
153 | #define MX27_INT_I2C 12 | 153 | #define MX27_INT_I2C1 12 |
154 | #define MX27_INT_SSI2 13 | 154 | #define MX27_INT_SSI2 13 |
155 | #define MX27_INT_SSI1 14 | 155 | #define MX27_INT_SSI1 14 |
156 | #define MX27_INT_CSPI2 15 | 156 | #define MX27_INT_CSPI2 15 |
diff --git a/arch/arm/plat-mxc/include/mach/mx2_cam.h b/arch/arm/plat-mxc/include/mach/mx2_cam.h new file mode 100644 index 000000000000..3c080a32dbf5 --- /dev/null +++ b/arch/arm/plat-mxc/include/mach/mx2_cam.h | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * mx2-cam.h - i.MX27/i.MX25 camera driver header file | ||
3 | * | ||
4 | * Copyright (C) 2003, Intel Corporation | ||
5 | * Copyright (C) 2008, Sascha Hauer <s.hauer@pengutronix.de> | ||
6 | * Copyright (C) 2010, Baruch Siach <baruch@tkos.co.il> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
21 | */ | ||
22 | |||
23 | #ifndef __MACH_MX2_CAM_H_ | ||
24 | #define __MACH_MX2_CAM_H_ | ||
25 | |||
26 | #define MX2_CAMERA_SWAP16 (1 << 0) | ||
27 | #define MX2_CAMERA_EXT_VSYNC (1 << 1) | ||
28 | #define MX2_CAMERA_CCIR (1 << 2) | ||
29 | #define MX2_CAMERA_CCIR_INTERLACE (1 << 3) | ||
30 | #define MX2_CAMERA_HSYNC_HIGH (1 << 4) | ||
31 | #define MX2_CAMERA_GATED_CLOCK (1 << 5) | ||
32 | #define MX2_CAMERA_INV_DATA (1 << 6) | ||
33 | #define MX2_CAMERA_PCLK_SAMPLE_RISING (1 << 7) | ||
34 | #define MX2_CAMERA_PACK_DIR_MSB (1 << 8) | ||
35 | |||
36 | /** | ||
37 | * struct mx2_camera_platform_data - optional platform data for mx2_camera | ||
38 | * @flags: any combination of MX2_CAMERA_* | ||
39 | * @clk: clock rate of the csi block / 2 | ||
40 | */ | ||
41 | struct mx2_camera_platform_data { | ||
42 | unsigned long flags; | ||
43 | unsigned long clk; | ||
44 | }; | ||
45 | |||
46 | #endif /* __MACH_MX2_CAM_H_ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/mx31.h b/arch/arm/plat-mxc/include/mach/mx31.h index fb90e119c2b5..afee3ab9d62e 100644 --- a/arch/arm/plat-mxc/include/mach/mx31.h +++ b/arch/arm/plat-mxc/include/mach/mx31.h | |||
@@ -23,7 +23,7 @@ | |||
23 | #define MX31_ETB_SLOT4_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x10000) | 23 | #define MX31_ETB_SLOT4_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x10000) |
24 | #define MX31_ETB_SLOT5_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x14000) | 24 | #define MX31_ETB_SLOT5_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x14000) |
25 | #define MX31_ECT_CTIO_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x18000) | 25 | #define MX31_ECT_CTIO_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x18000) |
26 | #define MX31_I2C_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x80000) | 26 | #define MX31_I2C1_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x80000) |
27 | #define MX31_I2C3_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x84000) | 27 | #define MX31_I2C3_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x84000) |
28 | #define MX31_OTG_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x88000) | 28 | #define MX31_OTG_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x88000) |
29 | #define MX31_ATA_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x8c000) | 29 | #define MX31_ATA_BASE_ADDR (MX31_AIPS1_BASE_ADDR + 0x8c000) |
@@ -145,7 +145,7 @@ static inline void mx31_setup_weimcs(size_t cs, | |||
145 | #define MX31_INT_FIRI 7 | 145 | #define MX31_INT_FIRI 7 |
146 | #define MX31_INT_MMC_SDHC2 8 | 146 | #define MX31_INT_MMC_SDHC2 8 |
147 | #define MX31_INT_MMC_SDHC1 9 | 147 | #define MX31_INT_MMC_SDHC1 9 |
148 | #define MX31_INT_I2C 10 | 148 | #define MX31_INT_I2C1 10 |
149 | #define MX31_INT_SSI2 11 | 149 | #define MX31_INT_SSI2 11 |
150 | #define MX31_INT_SSI1 12 | 150 | #define MX31_INT_SSI1 12 |
151 | #define MX31_INT_CSPI2 13 | 151 | #define MX31_INT_CSPI2 13 |
diff --git a/arch/arm/plat-mxc/include/mach/mx35.h b/arch/arm/plat-mxc/include/mach/mx35.h index 526a55842ae5..af3038c12e39 100644 --- a/arch/arm/plat-mxc/include/mach/mx35.h +++ b/arch/arm/plat-mxc/include/mach/mx35.h | |||
@@ -18,7 +18,7 @@ | |||
18 | #define MX35_ETB_SLOT4_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0x10000) | 18 | #define MX35_ETB_SLOT4_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0x10000) |
19 | #define MX35_ETB_SLOT5_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0x14000) | 19 | #define MX35_ETB_SLOT5_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0x14000) |
20 | #define MX35_ECT_CTIO_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0x18000) | 20 | #define MX35_ECT_CTIO_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0x18000) |
21 | #define MX35_I2C_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0x80000) | 21 | #define MX35_I2C1_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0x80000) |
22 | #define MX35_I2C3_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0x84000) | 22 | #define MX35_I2C3_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0x84000) |
23 | #define MX35_UART1_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0x90000) | 23 | #define MX35_UART1_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0x90000) |
24 | #define MX35_UART2_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0x94000) | 24 | #define MX35_UART2_BASE_ADDR (MX35_AIPS1_BASE_ADDR + 0x94000) |
@@ -60,6 +60,8 @@ | |||
60 | #define MX35_RTC_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xd8000) | 60 | #define MX35_RTC_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xd8000) |
61 | #define MX35_WDOG_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xdc000) | 61 | #define MX35_WDOG_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xdc000) |
62 | #define MX35_PWM_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xe0000) | 62 | #define MX35_PWM_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xe0000) |
63 | #define MX35_CAN1_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xe4000) | ||
64 | #define MX35_CAN2_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xe8000) | ||
63 | #define MX35_RTIC_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xec000) | 65 | #define MX35_RTIC_BASE_ADDR (MX35_AIPS2_BASE_ADDR + 0xec000) |
64 | #define MX35_OTG_BASE_ADDR 0x53ff4000 | 66 | #define MX35_OTG_BASE_ADDR 0x53ff4000 |
65 | 67 | ||
@@ -123,7 +125,7 @@ | |||
123 | #define MX35_INT_MMC_SDHC1 7 | 125 | #define MX35_INT_MMC_SDHC1 7 |
124 | #define MX35_INT_MMC_SDHC2 8 | 126 | #define MX35_INT_MMC_SDHC2 8 |
125 | #define MX35_INT_MMC_SDHC3 9 | 127 | #define MX35_INT_MMC_SDHC3 9 |
126 | #define MX35_INT_I2C 10 | 128 | #define MX35_INT_I2C1 10 |
127 | #define MX35_INT_SSI1 11 | 129 | #define MX35_INT_SSI1 11 |
128 | #define MX35_INT_SSI2 12 | 130 | #define MX35_INT_SSI2 12 |
129 | #define MX35_INT_CSPI2 13 | 131 | #define MX35_INT_CSPI2 13 |
diff --git a/arch/arm/plat-mxc/include/mach/mx3_camera.h b/arch/arm/plat-mxc/include/mach/mx3_camera.h index 36d7ff27b5e2..f226ee3777e1 100644 --- a/arch/arm/plat-mxc/include/mach/mx3_camera.h +++ b/arch/arm/plat-mxc/include/mach/mx3_camera.h | |||
@@ -12,10 +12,6 @@ | |||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
19 | */ | 15 | */ |
20 | 16 | ||
21 | #ifndef _MX3_CAMERA_H_ | 17 | #ifndef _MX3_CAMERA_H_ |
diff --git a/arch/arm/plat-mxc/include/mach/mxc91231.h b/arch/arm/plat-mxc/include/mach/mxc91231.h index 5182b986b785..0ca3101ebf36 100644 --- a/arch/arm/plat-mxc/include/mach/mxc91231.h +++ b/arch/arm/plat-mxc/include/mach/mxc91231.h | |||
@@ -13,10 +13,6 @@ | |||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * GNU General Public License for more details. | 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 | */ | 16 | */ |
21 | #ifndef __MACH_MXC91231_H__ | 17 | #ifndef __MACH_MXC91231_H__ |
22 | #define __MACH_MXC91231_H__ | 18 | #define __MACH_MXC91231_H__ |
diff --git a/arch/arm/plat-mxc/include/mach/mxc_nand.h b/arch/arm/plat-mxc/include/mach/mxc_nand.h index 5d2d21d414e0..04c0d060d814 100644 --- a/arch/arm/plat-mxc/include/mach/mxc_nand.h +++ b/arch/arm/plat-mxc/include/mach/mxc_nand.h | |||
@@ -20,9 +20,13 @@ | |||
20 | #ifndef __ASM_ARCH_NAND_H | 20 | #ifndef __ASM_ARCH_NAND_H |
21 | #define __ASM_ARCH_NAND_H | 21 | #define __ASM_ARCH_NAND_H |
22 | 22 | ||
23 | #include <linux/mtd/partitions.h> | ||
24 | |||
23 | struct mxc_nand_platform_data { | 25 | struct mxc_nand_platform_data { |
24 | int width; /* data bus width in bytes */ | 26 | unsigned int width; /* data bus width in bytes */ |
25 | int hw_ecc:1; /* 0 if supress hardware ECC */ | 27 | unsigned int hw_ecc:1; /* 0 if supress hardware ECC */ |
26 | int flash_bbt:1; /* set to 1 to use a flash based bbt */ | 28 | unsigned int flash_bbt:1; /* set to 1 to use a flash based bbt */ |
29 | struct mtd_partition *parts; /* partition table */ | ||
30 | int nr_parts; /* size of parts */ | ||
27 | }; | 31 | }; |
28 | #endif /* __ASM_ARCH_NAND_H */ | 32 | #endif /* __ASM_ARCH_NAND_H */ |
diff --git a/arch/arm/plat-mxc/include/mach/system.h b/arch/arm/plat-mxc/include/mach/system.h index ef00199568de..4acd1143a9bd 100644 --- a/arch/arm/plat-mxc/include/mach/system.h +++ b/arch/arm/plat-mxc/include/mach/system.h | |||
@@ -12,10 +12,6 @@ | |||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | 15 | */ |
20 | 16 | ||
21 | #ifndef __ASM_ARCH_MXC_SYSTEM_H__ | 17 | #ifndef __ASM_ARCH_MXC_SYSTEM_H__ |
diff --git a/arch/arm/plat-mxc/include/mach/timex.h b/arch/arm/plat-mxc/include/mach/timex.h index 024416ed11cd..2d9624697cc9 100644 --- a/arch/arm/plat-mxc/include/mach/timex.h +++ b/arch/arm/plat-mxc/include/mach/timex.h | |||
@@ -11,10 +11,6 @@ | |||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | * GNU General Public License for more details. | 13 | * GNU General Public License for more details. |
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | 14 | */ |
19 | 15 | ||
20 | #ifndef __ASM_ARCH_MXC_TIMEX_H__ | 16 | #ifndef __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 b6d3d0fddc48..d9bd37e4667a 100644 --- a/arch/arm/plat-mxc/include/mach/uncompress.h +++ b/arch/arm/plat-mxc/include/mach/uncompress.h | |||
@@ -13,10 +13,6 @@ | |||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * GNU General Public License for more details. | 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 | */ | 16 | */ |
21 | #ifndef __ASM_ARCH_MXC_UNCOMPRESS_H__ | 17 | #ifndef __ASM_ARCH_MXC_UNCOMPRESS_H__ |
22 | #define __ASM_ARCH_MXC_UNCOMPRESS_H__ | 18 | #define __ASM_ARCH_MXC_UNCOMPRESS_H__ |
diff --git a/arch/arm/plat-mxc/include/mach/vmalloc.h b/arch/arm/plat-mxc/include/mach/vmalloc.h index 44243a278434..ef6379c474be 100644 --- a/arch/arm/plat-mxc/include/mach/vmalloc.h +++ b/arch/arm/plat-mxc/include/mach/vmalloc.h | |||
@@ -11,10 +11,6 @@ | |||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | * GNU General Public License for more details. | 13 | * GNU General Public License for more details. |
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | 14 | */ |
19 | 15 | ||
20 | #ifndef __ASM_ARCH_MXC_VMALLOC_H__ | 16 | #ifndef __ASM_ARCH_MXC_VMALLOC_H__ |
diff --git a/arch/arm/plat-mxc/irq.c b/arch/arm/plat-mxc/irq.c index 778ddfe57d89..7331f2ace5fe 100644 --- a/arch/arm/plat-mxc/irq.c +++ b/arch/arm/plat-mxc/irq.c | |||
@@ -142,9 +142,6 @@ void __init mxc_init_irq(void __iomem *irqbase) | |||
142 | for (i = 0; i < 8; i++) | 142 | for (i = 0; i < 8; i++) |
143 | __raw_writel(0, avic_base + AVIC_NIPRIORITY(i)); | 143 | __raw_writel(0, avic_base + AVIC_NIPRIORITY(i)); |
144 | 144 | ||
145 | /* init architectures chained interrupt handler */ | ||
146 | mxc_register_gpios(); | ||
147 | |||
148 | #ifdef CONFIG_FIQ | 145 | #ifdef CONFIG_FIQ |
149 | /* Initialize FIQ */ | 146 | /* Initialize FIQ */ |
150 | init_FIQ(); | 147 | init_FIQ(); |
diff --git a/arch/arm/plat-mxc/system.c b/arch/arm/plat-mxc/system.c index 97f42799fa58..925bce4607e7 100644 --- a/arch/arm/plat-mxc/system.c +++ b/arch/arm/plat-mxc/system.c | |||
@@ -14,10 +14,6 @@ | |||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | * GNU General Public License for more details. | 16 | * GNU General Public License for more details. |
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | */ | 17 | */ |
22 | 18 | ||
23 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
diff --git a/arch/arm/plat-mxc/tzic.c b/arch/arm/plat-mxc/tzic.c index 9b86d2a60d43..b3da9aad4295 100644 --- a/arch/arm/plat-mxc/tzic.c +++ b/arch/arm/plat-mxc/tzic.c | |||
@@ -145,8 +145,6 @@ void __init tzic_init_irq(void __iomem *irqbase) | |||
145 | set_irq_handler(i, handle_level_irq); | 145 | set_irq_handler(i, handle_level_irq); |
146 | set_irq_flags(i, IRQF_VALID); | 146 | set_irq_flags(i, IRQF_VALID); |
147 | } | 147 | } |
148 | mxc_register_gpios(); | ||
149 | |||
150 | pr_info("TrustZone Interrupt Controller (TZIC) initialized\n"); | 148 | pr_info("TrustZone Interrupt Controller (TZIC) initialized\n"); |
151 | } | 149 | } |
152 | 150 | ||