diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-06-08 14:26:28 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-06-08 14:26:28 -0400 |
commit | 2d8d24935d372175786ebefa8a2de8680831b67f (patch) | |
tree | 9969683b85f94b59e58bdc1a42e543be62029cb1 /arch/arm/mach-mx3 | |
parent | c0683039207226afcffbe0fbf6a1caaee77a37b0 (diff) | |
parent | a0895162fbc1a4168c8cf29e1eb1bbc8c260a80a (diff) |
Merge branch 'mxc-master' of git://git.pengutronix.de/git/imx/linux-2.6 into devel
Diffstat (limited to 'arch/arm/mach-mx3')
-rw-r--r-- | arch/arm/mach-mx3/Kconfig | 21 | ||||
-rw-r--r-- | arch/arm/mach-mx3/Makefile | 3 | ||||
-rw-r--r-- | arch/arm/mach-mx3/armadillo5x0.c | 295 | ||||
-rw-r--r-- | arch/arm/mach-mx3/clock.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-mx3/devices.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mx31lilly-db.c | 216 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mx31lilly.c | 155 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mx31pdk.c | 38 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mx35pdk.c | 104 |
9 files changed, 841 insertions, 2 deletions
diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig index 229fb3e71fa1..17a21a291e2f 100644 --- a/arch/arm/mach-mx3/Kconfig +++ b/arch/arm/mach-mx3/Kconfig | |||
@@ -57,6 +57,13 @@ config MACH_MX31MOBOARD | |||
57 | Include support for mx31moboard platform. This includes specific | 57 | Include support for mx31moboard platform. This includes specific |
58 | configurations for the board and its peripherals. | 58 | configurations for the board and its peripherals. |
59 | 59 | ||
60 | config MACH_MX31LILLY | ||
61 | bool "Support MX31 LILLY-1131 platforms (INCO startec)" | ||
62 | select ARCH_MX31 | ||
63 | help | ||
64 | Include support for mx31 based LILLY1131 modules. This includes | ||
65 | specific configurations for the board and its peripherals. | ||
66 | |||
60 | config MACH_QONG | 67 | config MACH_QONG |
61 | bool "Support Dave/DENX QongEVB-LITE platform" | 68 | bool "Support Dave/DENX QongEVB-LITE platform" |
62 | select ARCH_MX31 | 69 | select ARCH_MX31 |
@@ -71,4 +78,18 @@ config MACH_PCM043 | |||
71 | Include support for Phytec pcm043 platform. This includes | 78 | Include support for Phytec pcm043 platform. This includes |
72 | specific configurations for the board and its peripherals. | 79 | specific configurations for the board and its peripherals. |
73 | 80 | ||
81 | config MACH_ARMADILLO5X0 | ||
82 | bool "Support Atmark Armadillo-500 Development Base Board" | ||
83 | select ARCH_MX31 | ||
84 | help | ||
85 | Include support for Atmark Armadillo-500 platform. This includes | ||
86 | specific configurations for the board and its peripherals. | ||
87 | |||
88 | config MACH_MX35_3DS | ||
89 | bool "Support MX35PDK platform" | ||
90 | select ARCH_MX35 | ||
91 | default n | ||
92 | help | ||
93 | Include support for MX35PDK platform. This includes specific | ||
94 | configurations for the board and its peripherals. | ||
74 | endif | 95 | endif |
diff --git a/arch/arm/mach-mx3/Makefile b/arch/arm/mach-mx3/Makefile index cd6547b61b1e..0322696bd11a 100644 --- a/arch/arm/mach-mx3/Makefile +++ b/arch/arm/mach-mx3/Makefile | |||
@@ -8,6 +8,7 @@ obj-y := mm.o devices.o | |||
8 | obj-$(CONFIG_ARCH_MX31) += clock.o iomux.o | 8 | obj-$(CONFIG_ARCH_MX31) += clock.o iomux.o |
9 | obj-$(CONFIG_ARCH_MX35) += clock-imx35.o | 9 | obj-$(CONFIG_ARCH_MX35) += clock-imx35.o |
10 | obj-$(CONFIG_MACH_MX31ADS) += mx31ads.o | 10 | obj-$(CONFIG_MACH_MX31ADS) += mx31ads.o |
11 | obj-$(CONFIG_MACH_MX31LILLY) += mx31lilly.o mx31lilly-db.o | ||
11 | obj-$(CONFIG_MACH_MX31LITE) += mx31lite.o | 12 | obj-$(CONFIG_MACH_MX31LITE) += mx31lite.o |
12 | obj-$(CONFIG_MACH_PCM037) += pcm037.o | 13 | obj-$(CONFIG_MACH_PCM037) += pcm037.o |
13 | obj-$(CONFIG_MACH_MX31_3DS) += mx31pdk.o | 14 | obj-$(CONFIG_MACH_MX31_3DS) += mx31pdk.o |
@@ -15,3 +16,5 @@ obj-$(CONFIG_MACH_MX31MOBOARD) += mx31moboard.o mx31moboard-devboard.o \ | |||
15 | mx31moboard-marxbot.o | 16 | mx31moboard-marxbot.o |
16 | obj-$(CONFIG_MACH_QONG) += qong.o | 17 | obj-$(CONFIG_MACH_QONG) += qong.o |
17 | obj-$(CONFIG_MACH_PCM043) += pcm043.o | 18 | obj-$(CONFIG_MACH_PCM043) += pcm043.o |
19 | obj-$(CONFIG_MACH_ARMADILLO5X0) += armadillo5x0.o | ||
20 | obj-$(CONFIG_MACH_MX35_3DS) += mx35pdk.o | ||
diff --git a/arch/arm/mach-mx3/armadillo5x0.c b/arch/arm/mach-mx3/armadillo5x0.c new file mode 100644 index 000000000000..541181090b37 --- /dev/null +++ b/arch/arm/mach-mx3/armadillo5x0.c | |||
@@ -0,0 +1,295 @@ | |||
1 | /* | ||
2 | * armadillo5x0.c | ||
3 | * | ||
4 | * Copyright 2009 Alberto Panizzo <maramaopercheseimorto@gmail.com> | ||
5 | * updates in http://alberdroid.blogspot.com/ | ||
6 | * | ||
7 | * Based on Atmark Techno, Inc. armadillo 500 BSP 2008 | ||
8 | * Based on mx31ads.c and pcm037.c Great Work! | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, | ||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
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., 51 Franklin Street, Fifth Floor, Boston, | ||
23 | * MA 02110-1301, USA. | ||
24 | */ | ||
25 | |||
26 | #include <linux/types.h> | ||
27 | #include <linux/init.h> | ||
28 | #include <linux/clk.h> | ||
29 | #include <linux/platform_device.h> | ||
30 | #include <linux/gpio.h> | ||
31 | #include <linux/smsc911x.h> | ||
32 | #include <linux/interrupt.h> | ||
33 | #include <linux/irq.h> | ||
34 | |||
35 | #include <mach/hardware.h> | ||
36 | #include <asm/mach-types.h> | ||
37 | #include <asm/mach/arch.h> | ||
38 | #include <asm/mach/time.h> | ||
39 | #include <asm/memory.h> | ||
40 | #include <asm/mach/map.h> | ||
41 | |||
42 | #include <mach/common.h> | ||
43 | #include <mach/imx-uart.h> | ||
44 | #include <mach/iomux-mx3.h> | ||
45 | #include <mach/board-armadillo5x0.h> | ||
46 | #include <mach/mmc.h> | ||
47 | #include <mach/ipu.h> | ||
48 | #include <mach/mx3fb.h> | ||
49 | |||
50 | #include "devices.h" | ||
51 | |||
52 | static int armadillo5x0_pins[] = { | ||
53 | /* UART1 */ | ||
54 | MX31_PIN_CTS1__CTS1, | ||
55 | MX31_PIN_RTS1__RTS1, | ||
56 | MX31_PIN_TXD1__TXD1, | ||
57 | MX31_PIN_RXD1__RXD1, | ||
58 | /* UART2 */ | ||
59 | MX31_PIN_CTS2__CTS2, | ||
60 | MX31_PIN_RTS2__RTS2, | ||
61 | MX31_PIN_TXD2__TXD2, | ||
62 | MX31_PIN_RXD2__RXD2, | ||
63 | /* LAN9118_IRQ */ | ||
64 | IOMUX_MODE(MX31_PIN_GPIO1_0, IOMUX_CONFIG_GPIO), | ||
65 | /* SDHC1 */ | ||
66 | MX31_PIN_SD1_DATA3__SD1_DATA3, | ||
67 | MX31_PIN_SD1_DATA2__SD1_DATA2, | ||
68 | MX31_PIN_SD1_DATA1__SD1_DATA1, | ||
69 | MX31_PIN_SD1_DATA0__SD1_DATA0, | ||
70 | MX31_PIN_SD1_CLK__SD1_CLK, | ||
71 | MX31_PIN_SD1_CMD__SD1_CMD, | ||
72 | /* Framebuffer */ | ||
73 | MX31_PIN_LD0__LD0, | ||
74 | MX31_PIN_LD1__LD1, | ||
75 | MX31_PIN_LD2__LD2, | ||
76 | MX31_PIN_LD3__LD3, | ||
77 | MX31_PIN_LD4__LD4, | ||
78 | MX31_PIN_LD5__LD5, | ||
79 | MX31_PIN_LD6__LD6, | ||
80 | MX31_PIN_LD7__LD7, | ||
81 | MX31_PIN_LD8__LD8, | ||
82 | MX31_PIN_LD9__LD9, | ||
83 | MX31_PIN_LD10__LD10, | ||
84 | MX31_PIN_LD11__LD11, | ||
85 | MX31_PIN_LD12__LD12, | ||
86 | MX31_PIN_LD13__LD13, | ||
87 | MX31_PIN_LD14__LD14, | ||
88 | MX31_PIN_LD15__LD15, | ||
89 | MX31_PIN_LD16__LD16, | ||
90 | MX31_PIN_LD17__LD17, | ||
91 | MX31_PIN_VSYNC3__VSYNC3, | ||
92 | MX31_PIN_HSYNC__HSYNC, | ||
93 | MX31_PIN_FPSHIFT__FPSHIFT, | ||
94 | MX31_PIN_DRDY0__DRDY0, | ||
95 | IOMUX_MODE(MX31_PIN_LCS1, IOMUX_CONFIG_GPIO), /*ADV7125_PSAVE*/ | ||
96 | |||
97 | }; | ||
98 | |||
99 | /* | ||
100 | * FB support | ||
101 | */ | ||
102 | static const struct fb_videomode fb_modedb[] = { | ||
103 | { /* 640x480 @ 60 Hz */ | ||
104 | .name = "CRT-VGA", | ||
105 | .refresh = 60, | ||
106 | .xres = 640, | ||
107 | .yres = 480, | ||
108 | .pixclock = 39721, | ||
109 | .left_margin = 35, | ||
110 | .right_margin = 115, | ||
111 | .upper_margin = 43, | ||
112 | .lower_margin = 1, | ||
113 | .hsync_len = 10, | ||
114 | .vsync_len = 1, | ||
115 | .sync = FB_SYNC_OE_ACT_HIGH, | ||
116 | .vmode = FB_VMODE_NONINTERLACED, | ||
117 | .flag = 0, | ||
118 | }, {/* 800x600 @ 56 Hz */ | ||
119 | .name = "CRT-SVGA", | ||
120 | .refresh = 56, | ||
121 | .xres = 800, | ||
122 | .yres = 600, | ||
123 | .pixclock = 30000, | ||
124 | .left_margin = 30, | ||
125 | .right_margin = 108, | ||
126 | .upper_margin = 13, | ||
127 | .lower_margin = 10, | ||
128 | .hsync_len = 10, | ||
129 | .vsync_len = 1, | ||
130 | .sync = FB_SYNC_OE_ACT_HIGH | FB_SYNC_HOR_HIGH_ACT | | ||
131 | FB_SYNC_VERT_HIGH_ACT, | ||
132 | .vmode = FB_VMODE_NONINTERLACED, | ||
133 | .flag = 0, | ||
134 | }, | ||
135 | }; | ||
136 | |||
137 | static struct ipu_platform_data mx3_ipu_data = { | ||
138 | .irq_base = MXC_IPU_IRQ_START, | ||
139 | }; | ||
140 | |||
141 | static struct mx3fb_platform_data mx3fb_pdata = { | ||
142 | .dma_dev = &mx3_ipu.dev, | ||
143 | .name = "CRT-VGA", | ||
144 | .mode = fb_modedb, | ||
145 | .num_modes = ARRAY_SIZE(fb_modedb), | ||
146 | }; | ||
147 | |||
148 | /* | ||
149 | * SDHC 1 | ||
150 | * MMC support | ||
151 | */ | ||
152 | static int armadillo5x0_sdhc1_get_ro(struct device *dev) | ||
153 | { | ||
154 | return gpio_get_value(IOMUX_TO_GPIO(MX31_PIN_ATA_RESET_B)); | ||
155 | } | ||
156 | |||
157 | static int armadillo5x0_sdhc1_init(struct device *dev, | ||
158 | irq_handler_t detect_irq, void *data) | ||
159 | { | ||
160 | int ret; | ||
161 | int gpio_det, gpio_wp; | ||
162 | |||
163 | gpio_det = IOMUX_TO_GPIO(MX31_PIN_ATA_DMACK); | ||
164 | gpio_wp = IOMUX_TO_GPIO(MX31_PIN_ATA_RESET_B); | ||
165 | |||
166 | ret = gpio_request(gpio_det, "sdhc-card-detect"); | ||
167 | if (ret) | ||
168 | return ret; | ||
169 | |||
170 | gpio_direction_input(gpio_det); | ||
171 | |||
172 | ret = gpio_request(gpio_wp, "sdhc-write-protect"); | ||
173 | if (ret) | ||
174 | goto err_gpio_free; | ||
175 | |||
176 | gpio_direction_input(gpio_wp); | ||
177 | |||
178 | /* When supported the trigger type have to be BOTH */ | ||
179 | ret = request_irq(IOMUX_TO_IRQ(MX31_PIN_ATA_DMACK), detect_irq, | ||
180 | IRQF_DISABLED | IRQF_TRIGGER_FALLING, | ||
181 | "sdhc-detect", data); | ||
182 | |||
183 | if (ret) | ||
184 | goto err_gpio_free_2; | ||
185 | |||
186 | return 0; | ||
187 | |||
188 | err_gpio_free_2: | ||
189 | gpio_free(gpio_wp); | ||
190 | |||
191 | err_gpio_free: | ||
192 | gpio_free(gpio_det); | ||
193 | |||
194 | return ret; | ||
195 | |||
196 | } | ||
197 | |||
198 | static void armadillo5x0_sdhc1_exit(struct device *dev, void *data) | ||
199 | { | ||
200 | free_irq(IOMUX_TO_IRQ(MX31_PIN_ATA_DMACK), data); | ||
201 | gpio_free(IOMUX_TO_GPIO(MX31_PIN_ATA_DMACK)); | ||
202 | gpio_free(IOMUX_TO_GPIO(MX31_PIN_ATA_RESET_B)); | ||
203 | } | ||
204 | |||
205 | static struct imxmmc_platform_data sdhc_pdata = { | ||
206 | .get_ro = armadillo5x0_sdhc1_get_ro, | ||
207 | .init = armadillo5x0_sdhc1_init, | ||
208 | .exit = armadillo5x0_sdhc1_exit, | ||
209 | }; | ||
210 | |||
211 | /* | ||
212 | * SMSC 9118 | ||
213 | * Network support | ||
214 | */ | ||
215 | static struct resource armadillo5x0_smc911x_resources[] = { | ||
216 | { | ||
217 | .start = CS3_BASE_ADDR, | ||
218 | .end = CS3_BASE_ADDR + SZ_32M - 1, | ||
219 | .flags = IORESOURCE_MEM, | ||
220 | }, { | ||
221 | .start = IOMUX_TO_IRQ(MX31_PIN_GPIO1_0), | ||
222 | .end = IOMUX_TO_IRQ(MX31_PIN_GPIO1_0), | ||
223 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, | ||
224 | }, | ||
225 | }; | ||
226 | |||
227 | static struct smsc911x_platform_config smsc911x_info = { | ||
228 | .flags = SMSC911X_USE_32BIT, | ||
229 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | ||
230 | .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, | ||
231 | }; | ||
232 | |||
233 | static struct platform_device armadillo5x0_smc911x_device = { | ||
234 | .name = "smsc911x", | ||
235 | .id = -1, | ||
236 | .num_resources = ARRAY_SIZE(armadillo5x0_smc911x_resources), | ||
237 | .resource = armadillo5x0_smc911x_resources, | ||
238 | .dev = { | ||
239 | .platform_data = &smsc911x_info, | ||
240 | }, | ||
241 | }; | ||
242 | |||
243 | /* UART device data */ | ||
244 | static struct imxuart_platform_data uart_pdata = { | ||
245 | .flags = IMXUART_HAVE_RTSCTS, | ||
246 | }; | ||
247 | |||
248 | static struct platform_device *devices[] __initdata = { | ||
249 | &armadillo5x0_smc911x_device, | ||
250 | }; | ||
251 | |||
252 | /* | ||
253 | * Perform board specific initializations | ||
254 | */ | ||
255 | static void __init armadillo5x0_init(void) | ||
256 | { | ||
257 | mxc_iomux_setup_multiple_pins(armadillo5x0_pins, | ||
258 | ARRAY_SIZE(armadillo5x0_pins), "armadillo5x0"); | ||
259 | |||
260 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
261 | |||
262 | /* Register UART */ | ||
263 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | ||
264 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | ||
265 | |||
266 | /* SMSC9118 IRQ pin */ | ||
267 | gpio_direction_input(MX31_PIN_GPIO1_0); | ||
268 | |||
269 | /* Register SDHC */ | ||
270 | mxc_register_device(&mxcsdhc_device0, &sdhc_pdata); | ||
271 | |||
272 | /* Register FB */ | ||
273 | mxc_register_device(&mx3_ipu, &mx3_ipu_data); | ||
274 | mxc_register_device(&mx3_fb, &mx3fb_pdata); | ||
275 | } | ||
276 | |||
277 | static void __init armadillo5x0_timer_init(void) | ||
278 | { | ||
279 | mx31_clocks_init(26000000); | ||
280 | } | ||
281 | |||
282 | static struct sys_timer armadillo5x0_timer = { | ||
283 | .init = armadillo5x0_timer_init, | ||
284 | }; | ||
285 | |||
286 | MACHINE_START(ARMADILLO5X0, "Armadillo-500") | ||
287 | /* Maintainer: Alberto Panizzo */ | ||
288 | .phys_io = AIPS1_BASE_ADDR, | ||
289 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | ||
290 | .boot_params = PHYS_OFFSET + 0x00000100, | ||
291 | .map_io = mx31_map_io, | ||
292 | .init_irq = mxc_init_irq, | ||
293 | .timer = &armadillo5x0_timer, | ||
294 | .init_machine = armadillo5x0_init, | ||
295 | MACHINE_END | ||
diff --git a/arch/arm/mach-mx3/clock.c b/arch/arm/mach-mx3/clock.c index 28bd11dc89b8..217d114b177a 100644 --- a/arch/arm/mach-mx3/clock.c +++ b/arch/arm/mach-mx3/clock.c | |||
@@ -483,7 +483,7 @@ DEFINE_CLOCK(i2c3_clk, 2, MXC_CCM_CGR0, 30, NULL, NULL, &perclk_clk); | |||
483 | DEFINE_CLOCK(mpeg4_clk, 0, MXC_CCM_CGR1, 0, NULL, NULL, &ahb_clk); | 483 | DEFINE_CLOCK(mpeg4_clk, 0, MXC_CCM_CGR1, 0, NULL, NULL, &ahb_clk); |
484 | DEFINE_CLOCK(mstick1_clk, 0, MXC_CCM_CGR1, 2, mstick1_get_rate, NULL, &usb_pll_clk); | 484 | DEFINE_CLOCK(mstick1_clk, 0, MXC_CCM_CGR1, 2, mstick1_get_rate, NULL, &usb_pll_clk); |
485 | DEFINE_CLOCK(mstick2_clk, 1, MXC_CCM_CGR1, 4, mstick2_get_rate, NULL, &usb_pll_clk); | 485 | DEFINE_CLOCK(mstick2_clk, 1, MXC_CCM_CGR1, 4, mstick2_get_rate, NULL, &usb_pll_clk); |
486 | DEFINE_CLOCK1(csi_clk, 0, MXC_CCM_CGR1, 6, csi, NULL, &ahb_clk); | 486 | DEFINE_CLOCK1(csi_clk, 0, MXC_CCM_CGR1, 6, csi, NULL, &serial_pll_clk); |
487 | DEFINE_CLOCK(rtc_clk, 0, MXC_CCM_CGR1, 8, NULL, NULL, &ipg_clk); | 487 | DEFINE_CLOCK(rtc_clk, 0, MXC_CCM_CGR1, 8, NULL, NULL, &ipg_clk); |
488 | DEFINE_CLOCK(wdog_clk, 0, MXC_CCM_CGR1, 10, NULL, NULL, &ipg_clk); | 488 | DEFINE_CLOCK(wdog_clk, 0, MXC_CCM_CGR1, 10, NULL, NULL, &ipg_clk); |
489 | DEFINE_CLOCK(pwm_clk, 0, MXC_CCM_CGR1, 12, NULL, NULL, &perclk_clk); | 489 | DEFINE_CLOCK(pwm_clk, 0, MXC_CCM_CGR1, 12, NULL, NULL, &perclk_clk); |
@@ -571,6 +571,13 @@ int __init mx31_clocks_init(unsigned long fref) | |||
571 | for (i = 0; i < ARRAY_SIZE(lookups); i++) | 571 | for (i = 0; i < ARRAY_SIZE(lookups); i++) |
572 | clkdev_add(&lookups[i]); | 572 | clkdev_add(&lookups[i]); |
573 | 573 | ||
574 | /* change the csi_clk parent if necessary */ | ||
575 | reg = __raw_readl(MXC_CCM_CCMR); | ||
576 | if (!(reg & MXC_CCM_CCMR_CSCS)) | ||
577 | if (clk_set_parent(&csi_clk, &usb_pll_clk)) | ||
578 | pr_err("%s: error changing csi_clk parent\n", __func__); | ||
579 | |||
580 | |||
574 | /* Turn off all possible clocks */ | 581 | /* Turn off all possible clocks */ |
575 | __raw_writel((3 << 4), MXC_CCM_CGR0); | 582 | __raw_writel((3 << 4), MXC_CCM_CGR0); |
576 | __raw_writel(0, MXC_CCM_CGR1); | 583 | __raw_writel(0, MXC_CCM_CGR1); |
diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h index 475410ada60a..ffd494ddd4ac 100644 --- a/arch/arm/mach-mx3/devices.h +++ b/arch/arm/mach-mx3/devices.h | |||
@@ -16,3 +16,5 @@ extern struct platform_device mxc_fec_device; | |||
16 | extern struct platform_device mxcsdhc_device0; | 16 | extern struct platform_device mxcsdhc_device0; |
17 | extern struct platform_device mxcsdhc_device1; | 17 | extern struct platform_device mxcsdhc_device1; |
18 | extern struct platform_device mxc_otg_udc_device; | 18 | extern struct platform_device mxc_otg_udc_device; |
19 | extern struct platform_device mxc_rnga_device; | ||
20 | |||
diff --git a/arch/arm/mach-mx3/mx31lilly-db.c b/arch/arm/mach-mx3/mx31lilly-db.c new file mode 100644 index 000000000000..3b3a78f49c23 --- /dev/null +++ b/arch/arm/mach-mx3/mx31lilly-db.c | |||
@@ -0,0 +1,216 @@ | |||
1 | /* | ||
2 | * LILLY-1131 development board support | ||
3 | * | ||
4 | * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de> | ||
5 | * | ||
6 | * based on code for other MX31 boards, | ||
7 | * | ||
8 | * Copyright 2005-2007 Freescale Semiconductor | ||
9 | * Copyright (c) 2009 Alberto Panizzo <maramaopercheseimorto@gmail.com> | ||
10 | * Copyright (C) 2009 Valentin Longchamp, EPFL Mobots group | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU General Public License as published by | ||
14 | * the Free Software Foundation; either version 2 of the License, or | ||
15 | * (at your option) any later version. | ||
16 | * | ||
17 | * This program is distributed in the hope that it will be useful, | ||
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
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 | */ | ||
26 | |||
27 | #include <linux/kernel.h> | ||
28 | #include <linux/types.h> | ||
29 | #include <linux/init.h> | ||
30 | #include <linux/gpio.h> | ||
31 | #include <linux/platform_device.h> | ||
32 | |||
33 | #include <asm/mach-types.h> | ||
34 | #include <asm/mach/arch.h> | ||
35 | #include <asm/mach/map.h> | ||
36 | |||
37 | #include <mach/hardware.h> | ||
38 | #include <mach/common.h> | ||
39 | #include <mach/imx-uart.h> | ||
40 | #include <mach/iomux-mx3.h> | ||
41 | #include <mach/board-mx31lilly.h> | ||
42 | #include <mach/mmc.h> | ||
43 | #include <mach/mx3fb.h> | ||
44 | #include <mach/ipu.h> | ||
45 | |||
46 | #include "devices.h" | ||
47 | |||
48 | /* | ||
49 | * This file contains board-specific initialization routines for the | ||
50 | * LILLY-1131 development board. If you design an own baseboard for the | ||
51 | * module, use this file as base for support code. | ||
52 | */ | ||
53 | |||
54 | static unsigned int lilly_db_board_pins[] __initdata = { | ||
55 | MX31_PIN_CTS1__CTS1, | ||
56 | MX31_PIN_RTS1__RTS1, | ||
57 | MX31_PIN_TXD1__TXD1, | ||
58 | MX31_PIN_RXD1__RXD1, | ||
59 | MX31_PIN_CTS2__CTS2, | ||
60 | MX31_PIN_RTS2__RTS2, | ||
61 | MX31_PIN_TXD2__TXD2, | ||
62 | MX31_PIN_RXD2__RXD2, | ||
63 | MX31_PIN_CSPI3_MOSI__RXD3, | ||
64 | MX31_PIN_CSPI3_MISO__TXD3, | ||
65 | MX31_PIN_CSPI3_SCLK__RTS3, | ||
66 | MX31_PIN_CSPI3_SPI_RDY__CTS3, | ||
67 | MX31_PIN_SD1_DATA3__SD1_DATA3, | ||
68 | MX31_PIN_SD1_DATA2__SD1_DATA2, | ||
69 | MX31_PIN_SD1_DATA1__SD1_DATA1, | ||
70 | MX31_PIN_SD1_DATA0__SD1_DATA0, | ||
71 | MX31_PIN_SD1_CLK__SD1_CLK, | ||
72 | MX31_PIN_SD1_CMD__SD1_CMD, | ||
73 | MX31_PIN_LD0__LD0, | ||
74 | MX31_PIN_LD1__LD1, | ||
75 | MX31_PIN_LD2__LD2, | ||
76 | MX31_PIN_LD3__LD3, | ||
77 | MX31_PIN_LD4__LD4, | ||
78 | MX31_PIN_LD5__LD5, | ||
79 | MX31_PIN_LD6__LD6, | ||
80 | MX31_PIN_LD7__LD7, | ||
81 | MX31_PIN_LD8__LD8, | ||
82 | MX31_PIN_LD9__LD9, | ||
83 | MX31_PIN_LD10__LD10, | ||
84 | MX31_PIN_LD11__LD11, | ||
85 | MX31_PIN_LD12__LD12, | ||
86 | MX31_PIN_LD13__LD13, | ||
87 | MX31_PIN_LD14__LD14, | ||
88 | MX31_PIN_LD15__LD15, | ||
89 | MX31_PIN_LD16__LD16, | ||
90 | MX31_PIN_LD17__LD17, | ||
91 | MX31_PIN_VSYNC3__VSYNC3, | ||
92 | MX31_PIN_HSYNC__HSYNC, | ||
93 | MX31_PIN_FPSHIFT__FPSHIFT, | ||
94 | MX31_PIN_DRDY0__DRDY0, | ||
95 | MX31_PIN_CONTRAST__CONTRAST, | ||
96 | }; | ||
97 | |||
98 | /* UART */ | ||
99 | static struct imxuart_platform_data uart_pdata __initdata = { | ||
100 | .flags = IMXUART_HAVE_RTSCTS, | ||
101 | }; | ||
102 | |||
103 | /* MMC support */ | ||
104 | |||
105 | static int mxc_mmc1_get_ro(struct device *dev) | ||
106 | { | ||
107 | return gpio_get_value(IOMUX_TO_GPIO(MX31_PIN_LCS0)); | ||
108 | } | ||
109 | |||
110 | static int gpio_det, gpio_wp; | ||
111 | |||
112 | static int mxc_mmc1_init(struct device *dev, | ||
113 | irq_handler_t detect_irq, void *data) | ||
114 | { | ||
115 | int ret; | ||
116 | |||
117 | gpio_det = IOMUX_TO_GPIO(MX31_PIN_GPIO1_1); | ||
118 | gpio_wp = IOMUX_TO_GPIO(MX31_PIN_LCS0); | ||
119 | |||
120 | ret = gpio_request(gpio_det, "MMC detect"); | ||
121 | if (ret) | ||
122 | return ret; | ||
123 | |||
124 | ret = gpio_request(gpio_wp, "MMC w/p"); | ||
125 | if (ret) | ||
126 | goto exit_free_det; | ||
127 | |||
128 | gpio_direction_input(gpio_det); | ||
129 | gpio_direction_input(gpio_wp); | ||
130 | |||
131 | ret = request_irq(IOMUX_TO_IRQ(MX31_PIN_GPIO1_1), detect_irq, | ||
132 | IRQF_DISABLED | IRQF_TRIGGER_FALLING, | ||
133 | "MMC detect", data); | ||
134 | if (ret) | ||
135 | goto exit_free_wp; | ||
136 | |||
137 | return 0; | ||
138 | |||
139 | exit_free_wp: | ||
140 | gpio_free(gpio_wp); | ||
141 | |||
142 | exit_free_det: | ||
143 | gpio_free(gpio_det); | ||
144 | |||
145 | return ret; | ||
146 | } | ||
147 | |||
148 | static void mxc_mmc1_exit(struct device *dev, void *data) | ||
149 | { | ||
150 | gpio_free(gpio_det); | ||
151 | gpio_free(gpio_wp); | ||
152 | free_irq(IOMUX_TO_IRQ(MX31_PIN_GPIO1_1), data); | ||
153 | } | ||
154 | |||
155 | static struct imxmmc_platform_data mmc_pdata = { | ||
156 | .get_ro = mxc_mmc1_get_ro, | ||
157 | .init = mxc_mmc1_init, | ||
158 | .exit = mxc_mmc1_exit, | ||
159 | }; | ||
160 | |||
161 | /* Framebuffer support */ | ||
162 | static struct ipu_platform_data ipu_data __initdata = { | ||
163 | .irq_base = MXC_IPU_IRQ_START, | ||
164 | }; | ||
165 | |||
166 | static const struct fb_videomode fb_modedb = { | ||
167 | /* 640x480 TFT panel (IPS-056T) */ | ||
168 | .name = "CRT-VGA", | ||
169 | .refresh = 64, | ||
170 | .xres = 640, | ||
171 | .yres = 480, | ||
172 | .pixclock = 30000, | ||
173 | .left_margin = 200, | ||
174 | .right_margin = 2, | ||
175 | .upper_margin = 2, | ||
176 | .lower_margin = 2, | ||
177 | .hsync_len = 3, | ||
178 | .vsync_len = 1, | ||
179 | .sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_OE_ACT_HIGH, | ||
180 | .vmode = FB_VMODE_NONINTERLACED, | ||
181 | .flag = 0, | ||
182 | }; | ||
183 | |||
184 | static struct mx3fb_platform_data fb_pdata __initdata = { | ||
185 | .dma_dev = &mx3_ipu.dev, | ||
186 | .name = "CRT-VGA", | ||
187 | .mode = &fb_modedb, | ||
188 | .num_modes = 1, | ||
189 | }; | ||
190 | |||
191 | #define LCD_VCC_EN_GPIO (7) | ||
192 | |||
193 | static void __init mx31lilly_init_fb(void) | ||
194 | { | ||
195 | if (gpio_request(LCD_VCC_EN_GPIO, "LCD enable") != 0) { | ||
196 | printk(KERN_WARNING "unable to request LCD_VCC_EN pin.\n"); | ||
197 | return; | ||
198 | } | ||
199 | |||
200 | mxc_register_device(&mx3_ipu, &ipu_data); | ||
201 | mxc_register_device(&mx3_fb, &fb_pdata); | ||
202 | gpio_direction_output(LCD_VCC_EN_GPIO, 1); | ||
203 | } | ||
204 | |||
205 | void __init mx31lilly_db_init(void) | ||
206 | { | ||
207 | mxc_iomux_setup_multiple_pins(lilly_db_board_pins, | ||
208 | ARRAY_SIZE(lilly_db_board_pins), | ||
209 | "development board pins"); | ||
210 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | ||
211 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | ||
212 | mxc_register_device(&mxc_uart_device2, &uart_pdata); | ||
213 | mxc_register_device(&mxcsdhc_device0, &mmc_pdata); | ||
214 | mx31lilly_init_fb(); | ||
215 | } | ||
216 | |||
diff --git a/arch/arm/mach-mx3/mx31lilly.c b/arch/arm/mach-mx3/mx31lilly.c new file mode 100644 index 000000000000..6ab2f163cb95 --- /dev/null +++ b/arch/arm/mach-mx3/mx31lilly.c | |||
@@ -0,0 +1,155 @@ | |||
1 | /* | ||
2 | * LILLY-1131 module support | ||
3 | * | ||
4 | * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de> | ||
5 | * | ||
6 | * based on code for other MX31 boards, | ||
7 | * | ||
8 | * Copyright 2005-2007 Freescale Semiconductor | ||
9 | * Copyright (c) 2009 Alberto Panizzo <maramaopercheseimorto@gmail.com> | ||
10 | * Copyright (C) 2009 Valentin Longchamp, EPFL Mobots group | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU General Public License as published by | ||
14 | * the Free Software Foundation; either version 2 of the License, or | ||
15 | * (at your option) any later version. | ||
16 | * | ||
17 | * This program is distributed in the hope that it will be useful, | ||
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
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 | */ | ||
26 | |||
27 | #include <linux/types.h> | ||
28 | #include <linux/init.h> | ||
29 | #include <linux/clk.h> | ||
30 | #include <linux/platform_device.h> | ||
31 | #include <linux/interrupt.h> | ||
32 | #include <linux/smsc911x.h> | ||
33 | #include <linux/mtd/physmap.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/hardware.h> | ||
41 | #include <mach/common.h> | ||
42 | #include <mach/iomux-mx3.h> | ||
43 | #include <mach/board-mx31lilly.h> | ||
44 | |||
45 | #include "devices.h" | ||
46 | |||
47 | /* | ||
48 | * This file contains module-specific initialization routines for LILLY-1131. | ||
49 | * Initialization of peripherals found on the baseboard is implemented in the | ||
50 | * appropriate baseboard support code. | ||
51 | */ | ||
52 | |||
53 | /* SMSC ethernet support */ | ||
54 | |||
55 | static struct resource smsc91x_resources[] = { | ||
56 | { | ||
57 | .start = CS4_BASE_ADDR, | ||
58 | .end = CS4_BASE_ADDR + 0xffff, | ||
59 | .flags = IORESOURCE_MEM, | ||
60 | }, | ||
61 | { | ||
62 | .start = IOMUX_TO_IRQ(MX31_PIN_GPIO1_0), | ||
63 | .end = IOMUX_TO_IRQ(MX31_PIN_GPIO1_0), | ||
64 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_FALLING, | ||
65 | } | ||
66 | }; | ||
67 | |||
68 | static struct smsc911x_platform_config smsc911x_config = { | ||
69 | .phy_interface = PHY_INTERFACE_MODE_MII, | ||
70 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | ||
71 | .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, | ||
72 | .flags = SMSC911X_USE_32BIT | | ||
73 | SMSC911X_SAVE_MAC_ADDRESS | | ||
74 | SMSC911X_FORCE_INTERNAL_PHY, | ||
75 | }; | ||
76 | |||
77 | static struct platform_device smsc91x_device = { | ||
78 | .name = "smsc911x", | ||
79 | .id = -1, | ||
80 | .num_resources = ARRAY_SIZE(smsc91x_resources), | ||
81 | .resource = smsc91x_resources, | ||
82 | .dev = { | ||
83 | .platform_data = &smsc911x_config, | ||
84 | } | ||
85 | }; | ||
86 | |||
87 | /* NOR flash */ | ||
88 | static struct physmap_flash_data nor_flash_data = { | ||
89 | .width = 2, | ||
90 | }; | ||
91 | |||
92 | static struct resource nor_flash_resource = { | ||
93 | .start = 0xa0000000, | ||
94 | .end = 0xa1ffffff, | ||
95 | .flags = IORESOURCE_MEM, | ||
96 | }; | ||
97 | |||
98 | static struct platform_device physmap_flash_device = { | ||
99 | .name = "physmap-flash", | ||
100 | .id = 0, | ||
101 | .dev = { | ||
102 | .platform_data = &nor_flash_data, | ||
103 | }, | ||
104 | .resource = &nor_flash_resource, | ||
105 | .num_resources = 1, | ||
106 | }; | ||
107 | |||
108 | static struct platform_device *devices[] __initdata = { | ||
109 | &smsc91x_device, | ||
110 | &physmap_flash_device, | ||
111 | &mxc_i2c_device1, | ||
112 | }; | ||
113 | |||
114 | static int mx31lilly_baseboard; | ||
115 | core_param(mx31lilly_baseboard, mx31lilly_baseboard, int, 0444); | ||
116 | |||
117 | static void __init mx31lilly_board_init(void) | ||
118 | { | ||
119 | switch (mx31lilly_baseboard) { | ||
120 | case MX31LILLY_NOBOARD: | ||
121 | break; | ||
122 | case MX31LILLY_DB: | ||
123 | mx31lilly_db_init(); | ||
124 | break; | ||
125 | default: | ||
126 | printk(KERN_ERR "Illegal mx31lilly_baseboard type %d\n", | ||
127 | mx31lilly_baseboard); | ||
128 | } | ||
129 | |||
130 | mxc_iomux_alloc_pin(MX31_PIN_CS4__CS4, "Ethernet CS"); | ||
131 | mxc_iomux_alloc_pin(MX31_PIN_CSPI2_MOSI__SCL, "I2C SCL"); | ||
132 | mxc_iomux_alloc_pin(MX31_PIN_CSPI2_MISO__SDA, "I2C SDA"); | ||
133 | |||
134 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
135 | } | ||
136 | |||
137 | static void __init mx31lilly_timer_init(void) | ||
138 | { | ||
139 | mx31_clocks_init(26000000); | ||
140 | } | ||
141 | |||
142 | static struct sys_timer mx31lilly_timer = { | ||
143 | .init = mx31lilly_timer_init, | ||
144 | }; | ||
145 | |||
146 | MACHINE_START(LILLY1131, "INCO startec LILLY-1131") | ||
147 | .phys_io = AIPS1_BASE_ADDR, | ||
148 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | ||
149 | .boot_params = PHYS_OFFSET + 0x100, | ||
150 | .map_io = mx31_map_io, | ||
151 | .init_irq = mxc_init_irq, | ||
152 | .init_machine = mx31lilly_board_init, | ||
153 | .timer = &mx31lilly_timer, | ||
154 | MACHINE_END | ||
155 | |||
diff --git a/arch/arm/mach-mx3/mx31pdk.c b/arch/arm/mach-mx3/mx31pdk.c index 32599e507534..c19838d2e369 100644 --- a/arch/arm/mach-mx3/mx31pdk.c +++ b/arch/arm/mach-mx3/mx31pdk.c | |||
@@ -21,6 +21,8 @@ | |||
21 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
22 | #include <linux/irq.h> | 22 | #include <linux/irq.h> |
23 | #include <linux/gpio.h> | 23 | #include <linux/gpio.h> |
24 | #include <linux/smsc911x.h> | ||
25 | #include <linux/platform_device.h> | ||
24 | 26 | ||
25 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
26 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
@@ -56,6 +58,39 @@ static struct imxuart_platform_data uart_pdata = { | |||
56 | }; | 58 | }; |
57 | 59 | ||
58 | /* | 60 | /* |
61 | * Support for the SMSC9217 on the Debug board. | ||
62 | */ | ||
63 | |||
64 | static struct smsc911x_platform_config smsc911x_config = { | ||
65 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | ||
66 | .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, | ||
67 | .flags = SMSC911X_USE_16BIT | SMSC911X_FORCE_INTERNAL_PHY, | ||
68 | .phy_interface = PHY_INTERFACE_MODE_MII, | ||
69 | }; | ||
70 | |||
71 | static struct resource smsc911x_resources[] = { | ||
72 | { | ||
73 | .start = LAN9217_BASE_ADDR, | ||
74 | .end = LAN9217_BASE_ADDR + 0xff, | ||
75 | .flags = IORESOURCE_MEM, | ||
76 | }, { | ||
77 | .start = EXPIO_INT_ENET, | ||
78 | .end = EXPIO_INT_ENET, | ||
79 | .flags = IORESOURCE_IRQ, | ||
80 | }, | ||
81 | }; | ||
82 | |||
83 | static struct platform_device smsc911x_device = { | ||
84 | .name = "smsc911x", | ||
85 | .id = -1, | ||
86 | .num_resources = ARRAY_SIZE(smsc911x_resources), | ||
87 | .resource = smsc911x_resources, | ||
88 | .dev = { | ||
89 | .platform_data = &smsc911x_config, | ||
90 | }, | ||
91 | }; | ||
92 | |||
93 | /* | ||
59 | * Routines for the CPLD on the debug board. It contains a CPLD handling | 94 | * Routines for the CPLD on the debug board. It contains a CPLD handling |
60 | * LEDs, switches, interrupts for Ethernet. | 95 | * LEDs, switches, interrupts for Ethernet. |
61 | */ | 96 | */ |
@@ -207,7 +242,8 @@ static void __init mxc_board_init(void) | |||
207 | 242 | ||
208 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 243 | mxc_register_device(&mxc_uart_device0, &uart_pdata); |
209 | 244 | ||
210 | mx31pdk_init_expio(); | 245 | if (!mx31pdk_init_expio()) |
246 | platform_device_register(&smsc911x_device); | ||
211 | } | 247 | } |
212 | 248 | ||
213 | static void __init mx31pdk_timer_init(void) | 249 | static void __init mx31pdk_timer_init(void) |
diff --git a/arch/arm/mach-mx3/mx35pdk.c b/arch/arm/mach-mx3/mx35pdk.c new file mode 100644 index 000000000000..6d15374414b9 --- /dev/null +++ b/arch/arm/mach-mx3/mx35pdk.c | |||
@@ -0,0 +1,104 @@ | |||
1 | /* | ||
2 | * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
4 | * Author: Fabio Estevam <fabio.estevam@freescale.com> | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | #include <linux/types.h> | ||
22 | #include <linux/init.h> | ||
23 | #include <linux/platform_device.h> | ||
24 | #include <linux/memory.h> | ||
25 | #include <linux/gpio.h> | ||
26 | |||
27 | #include <asm/mach-types.h> | ||
28 | #include <asm/mach/arch.h> | ||
29 | #include <asm/mach/time.h> | ||
30 | #include <asm/mach/map.h> | ||
31 | |||
32 | #include <mach/hardware.h> | ||
33 | #include <mach/common.h> | ||
34 | #include <mach/imx-uart.h> | ||
35 | #include <mach/iomux-mx35.h> | ||
36 | |||
37 | #include "devices.h" | ||
38 | |||
39 | static struct imxuart_platform_data uart_pdata = { | ||
40 | .flags = IMXUART_HAVE_RTSCTS, | ||
41 | }; | ||
42 | |||
43 | static struct platform_device *devices[] __initdata = { | ||
44 | &mxc_fec_device, | ||
45 | }; | ||
46 | |||
47 | static struct pad_desc mx35pdk_pads[] = { | ||
48 | /* UART1 */ | ||
49 | MX35_PAD_CTS1__UART1_CTS, | ||
50 | MX35_PAD_RTS1__UART1_RTS, | ||
51 | MX35_PAD_TXD1__UART1_TXD_MUX, | ||
52 | MX35_PAD_RXD1__UART1_RXD_MUX, | ||
53 | /* FEC */ | ||
54 | MX35_PAD_FEC_TX_CLK__FEC_TX_CLK, | ||
55 | MX35_PAD_FEC_RX_CLK__FEC_RX_CLK, | ||
56 | MX35_PAD_FEC_RX_DV__FEC_RX_DV, | ||
57 | MX35_PAD_FEC_COL__FEC_COL, | ||
58 | MX35_PAD_FEC_RDATA0__FEC_RDATA_0, | ||
59 | MX35_PAD_FEC_TDATA0__FEC_TDATA_0, | ||
60 | MX35_PAD_FEC_TX_EN__FEC_TX_EN, | ||
61 | MX35_PAD_FEC_MDC__FEC_MDC, | ||
62 | MX35_PAD_FEC_MDIO__FEC_MDIO, | ||
63 | MX35_PAD_FEC_TX_ERR__FEC_TX_ERR, | ||
64 | MX35_PAD_FEC_RX_ERR__FEC_RX_ERR, | ||
65 | MX35_PAD_FEC_CRS__FEC_CRS, | ||
66 | MX35_PAD_FEC_RDATA1__FEC_RDATA_1, | ||
67 | MX35_PAD_FEC_TDATA1__FEC_TDATA_1, | ||
68 | MX35_PAD_FEC_RDATA2__FEC_RDATA_2, | ||
69 | MX35_PAD_FEC_TDATA2__FEC_TDATA_2, | ||
70 | MX35_PAD_FEC_RDATA3__FEC_RDATA_3, | ||
71 | MX35_PAD_FEC_TDATA3__FEC_TDATA_3, | ||
72 | }; | ||
73 | |||
74 | /* | ||
75 | * Board specific initialization. | ||
76 | */ | ||
77 | static void __init mxc_board_init(void) | ||
78 | { | ||
79 | mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads)); | ||
80 | |||
81 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
82 | |||
83 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | ||
84 | } | ||
85 | |||
86 | static void __init mx35pdk_timer_init(void) | ||
87 | { | ||
88 | mx35_clocks_init(); | ||
89 | } | ||
90 | |||
91 | struct sys_timer mx35pdk_timer = { | ||
92 | .init = mx35pdk_timer_init, | ||
93 | }; | ||
94 | |||
95 | MACHINE_START(MX35_3DS, "Freescale MX35PDK") | ||
96 | /* Maintainer: Freescale Semiconductor, Inc */ | ||
97 | .phys_io = AIPS1_BASE_ADDR, | ||
98 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | ||
99 | .boot_params = PHYS_OFFSET + 0x100, | ||
100 | .map_io = mx35_map_io, | ||
101 | .init_irq = mxc_init_irq, | ||
102 | .init_machine = mxc_board_init, | ||
103 | .timer = &mx35pdk_timer, | ||
104 | MACHINE_END | ||