diff options
Diffstat (limited to 'arch/arm/mach-mx25')
-rw-r--r-- | arch/arm/mach-mx25/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-mx25/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-mx25/clock.c | 77 | ||||
-rw-r--r-- | arch/arm/mach-mx25/devices.c | 81 | ||||
-rw-r--r-- | arch/arm/mach-mx25/devices.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-mx25/mach-mx25pdk.c | 174 | ||||
-rw-r--r-- | arch/arm/mach-mx25/mx25pdk.c | 69 |
7 files changed, 313 insertions, 95 deletions
diff --git a/arch/arm/mach-mx25/Kconfig b/arch/arm/mach-mx25/Kconfig index cc28f56eae80..54d217314ee9 100644 --- a/arch/arm/mach-mx25/Kconfig +++ b/arch/arm/mach-mx25/Kconfig | |||
@@ -3,7 +3,6 @@ if ARCH_MX25 | |||
3 | comment "MX25 platforms:" | 3 | comment "MX25 platforms:" |
4 | 4 | ||
5 | config MACH_MX25_3DS | 5 | config MACH_MX25_3DS |
6 | select ARCH_MXC_IOMUX_V3 | ||
7 | bool "Support MX25PDK (3DS) Platform" | 6 | bool "Support MX25PDK (3DS) Platform" |
8 | 7 | ||
9 | endif | 8 | endif |
diff --git a/arch/arm/mach-mx25/Makefile b/arch/arm/mach-mx25/Makefile index fe23836a9f3d..10cebc5ced8c 100644 --- a/arch/arm/mach-mx25/Makefile +++ b/arch/arm/mach-mx25/Makefile | |||
@@ -1,3 +1,3 @@ | |||
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) += mx25pdk.o | 3 | obj-$(CONFIG_MACH_MX25_3DS) += mach-mx25pdk.o |
diff --git a/arch/arm/mach-mx25/clock.c b/arch/arm/mach-mx25/clock.c index ef26951a5275..155014993b13 100644 --- a/arch/arm/mach-mx25/clock.c +++ b/arch/arm/mach-mx25/clock.c | |||
@@ -119,6 +119,16 @@ static unsigned long get_rate_nfc(struct clk *clk) | |||
119 | return get_rate_per(8); | 119 | return get_rate_per(8); |
120 | } | 120 | } |
121 | 121 | ||
122 | static unsigned long get_rate_gpt(struct clk *clk) | ||
123 | { | ||
124 | return get_rate_per(5); | ||
125 | } | ||
126 | |||
127 | static unsigned long get_rate_lcdc(struct clk *clk) | ||
128 | { | ||
129 | return get_rate_per(7); | ||
130 | } | ||
131 | |||
122 | static unsigned long get_rate_otg(struct clk *clk) | 132 | static unsigned long get_rate_otg(struct clk *clk) |
123 | { | 133 | { |
124 | return 48000000; /* FIXME */ | 134 | return 48000000; /* FIXME */ |
@@ -144,7 +154,7 @@ static void clk_cgcr_disable(struct clk *clk) | |||
144 | __raw_writel(reg, clk->enable_reg); | 154 | __raw_writel(reg, clk->enable_reg); |
145 | } | 155 | } |
146 | 156 | ||
147 | #define DEFINE_CLOCK(name, i, er, es, gr, sr) \ | 157 | #define DEFINE_CLOCK(name, i, er, es, gr, sr, s) \ |
148 | static struct clk name = { \ | 158 | static struct clk name = { \ |
149 | .id = i, \ | 159 | .id = i, \ |
150 | .enable_reg = CRM_BASE + er, \ | 160 | .enable_reg = CRM_BASE + er, \ |
@@ -153,26 +163,34 @@ static void clk_cgcr_disable(struct clk *clk) | |||
153 | .set_rate = sr, \ | 163 | .set_rate = sr, \ |
154 | .enable = clk_cgcr_enable, \ | 164 | .enable = clk_cgcr_enable, \ |
155 | .disable = clk_cgcr_disable, \ | 165 | .disable = clk_cgcr_disable, \ |
166 | .secondary = s, \ | ||
156 | } | 167 | } |
157 | 168 | ||
158 | DEFINE_CLOCK(gpt_clk, 0, CCM_CGCR0, 5, get_rate_ipg, NULL); | 169 | DEFINE_CLOCK(gpt_clk, 0, CCM_CGCR0, 5, get_rate_gpt, NULL, NULL); |
159 | DEFINE_CLOCK(cspi1_clk, 0, CCM_CGCR1, 5, get_rate_ipg, NULL); | 170 | DEFINE_CLOCK(uart_per_clk, 0, CCM_CGCR0, 15, get_rate_uart, NULL, NULL); |
160 | DEFINE_CLOCK(cspi2_clk, 0, CCM_CGCR1, 6, get_rate_ipg, NULL); | 171 | DEFINE_CLOCK(cspi1_clk, 0, CCM_CGCR1, 5, get_rate_ipg, NULL, NULL); |
161 | DEFINE_CLOCK(cspi3_clk, 0, CCM_CGCR1, 7, get_rate_ipg, NULL); | 172 | DEFINE_CLOCK(cspi2_clk, 0, CCM_CGCR1, 6, get_rate_ipg, NULL, NULL); |
162 | DEFINE_CLOCK(uart1_clk, 0, CCM_CGCR2, 14, get_rate_uart, NULL); | 173 | DEFINE_CLOCK(cspi3_clk, 0, CCM_CGCR1, 7, get_rate_ipg, NULL, NULL); |
163 | DEFINE_CLOCK(uart2_clk, 0, CCM_CGCR2, 15, get_rate_uart, NULL); | 174 | DEFINE_CLOCK(fec_ahb_clk, 0, CCM_CGCR0, 23, NULL, NULL, NULL); |
164 | DEFINE_CLOCK(uart3_clk, 0, CCM_CGCR2, 16, get_rate_uart, NULL); | 175 | DEFINE_CLOCK(lcdc_ahb_clk, 0, CCM_CGCR0, 24, NULL, NULL, NULL); |
165 | DEFINE_CLOCK(uart4_clk, 0, CCM_CGCR2, 17, get_rate_uart, NULL); | 176 | DEFINE_CLOCK(lcdc_per_clk, 0, CCM_CGCR0, 7, NULL, NULL, &lcdc_ahb_clk); |
166 | DEFINE_CLOCK(uart5_clk, 0, CCM_CGCR2, 18, get_rate_uart, NULL); | 177 | DEFINE_CLOCK(uart1_clk, 0, CCM_CGCR2, 14, get_rate_uart, NULL, &uart_per_clk); |
167 | DEFINE_CLOCK(nfc_clk, 0, CCM_CGCR0, 8, get_rate_nfc, NULL); | 178 | DEFINE_CLOCK(uart2_clk, 0, CCM_CGCR2, 15, get_rate_uart, NULL, &uart_per_clk); |
168 | DEFINE_CLOCK(usbotg_clk, 0, CCM_CGCR0, 28, get_rate_otg, NULL); | 179 | DEFINE_CLOCK(uart3_clk, 0, CCM_CGCR2, 16, get_rate_uart, NULL, &uart_per_clk); |
169 | DEFINE_CLOCK(pwm1_clk, 0, CCM_CGCR1, 31, get_rate_ipg, NULL); | 180 | DEFINE_CLOCK(uart4_clk, 0, CCM_CGCR2, 17, get_rate_uart, NULL, &uart_per_clk); |
170 | DEFINE_CLOCK(pwm2_clk, 0, CCM_CGCR2, 0, get_rate_ipg, NULL); | 181 | DEFINE_CLOCK(uart5_clk, 0, CCM_CGCR2, 18, get_rate_uart, NULL, &uart_per_clk); |
171 | DEFINE_CLOCK(pwm3_clk, 0, CCM_CGCR2, 1, get_rate_ipg, NULL); | 182 | DEFINE_CLOCK(nfc_clk, 0, CCM_CGCR0, 8, get_rate_nfc, NULL, NULL); |
172 | DEFINE_CLOCK(pwm4_clk, 0, CCM_CGCR2, 2, get_rate_ipg, NULL); | 183 | DEFINE_CLOCK(usbotg_clk, 0, CCM_CGCR0, 28, get_rate_otg, NULL, NULL); |
173 | DEFINE_CLOCK(kpp_clk, 0, CCM_CGCR1, 28, get_rate_ipg, NULL); | 184 | DEFINE_CLOCK(pwm1_clk, 0, CCM_CGCR1, 31, get_rate_ipg, NULL, NULL); |
174 | DEFINE_CLOCK(tsc_clk, 0, CCM_CGCR2, 13, get_rate_ipg, NULL); | 185 | DEFINE_CLOCK(pwm2_clk, 0, CCM_CGCR2, 0, get_rate_ipg, NULL, NULL); |
175 | DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL); | 186 | DEFINE_CLOCK(pwm3_clk, 0, CCM_CGCR2, 1, get_rate_ipg, NULL, NULL); |
187 | DEFINE_CLOCK(pwm4_clk, 0, CCM_CGCR2, 2, get_rate_ipg, NULL, NULL); | ||
188 | DEFINE_CLOCK(kpp_clk, 0, CCM_CGCR1, 28, get_rate_ipg, NULL, NULL); | ||
189 | DEFINE_CLOCK(tsc_clk, 0, CCM_CGCR2, 13, get_rate_ipg, NULL, NULL); | ||
190 | 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); | ||
192 | 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); | ||
176 | 194 | ||
177 | #define _REGISTER_CLOCK(d, n, c) \ | 195 | #define _REGISTER_CLOCK(d, n, c) \ |
178 | { \ | 196 | { \ |
@@ -204,14 +222,25 @@ static struct clk_lookup lookups[] = { | |||
204 | _REGISTER_CLOCK("imx-i2c.0", NULL, i2c_clk) | 222 | _REGISTER_CLOCK("imx-i2c.0", NULL, i2c_clk) |
205 | _REGISTER_CLOCK("imx-i2c.1", NULL, i2c_clk) | 223 | _REGISTER_CLOCK("imx-i2c.1", NULL, i2c_clk) |
206 | _REGISTER_CLOCK("imx-i2c.2", NULL, i2c_clk) | 224 | _REGISTER_CLOCK("imx-i2c.2", NULL, i2c_clk) |
225 | _REGISTER_CLOCK("fec.0", NULL, fec_clk) | ||
226 | _REGISTER_CLOCK("imxdi_rtc.0", NULL, dryice_clk) | ||
227 | _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) | ||
207 | }; | 228 | }; |
208 | 229 | ||
209 | int __init mx25_clocks_init(unsigned long fref) | 230 | int __init mx25_clocks_init(void) |
210 | { | 231 | { |
211 | int i; | 232 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); |
212 | 233 | ||
213 | for (i = 0; i < ARRAY_SIZE(lookups); i++) | 234 | /* Turn off all clocks except the ones we need to survive, namely: |
214 | clkdev_add(&lookups[i]); | 235 | * EMI, GPIO1-3 (CCM_CGCR1[18:16]), GPT1, IOMUXC (CCM_CGCR1[27]), IIM, |
236 | * SCC | ||
237 | */ | ||
238 | __raw_writel((1 << 19), CRM_BASE + CCM_CGCR0); | ||
239 | __raw_writel((0xf << 16) | (3 << 26), CRM_BASE + CCM_CGCR1); | ||
240 | __raw_writel((1 << 5), CRM_BASE + CCM_CGCR2); | ||
241 | |||
242 | /* Clock source for lcdc is upll */ | ||
243 | __raw_writel(__raw_readl(CRM_BASE+0x64) | (1 << 7), CRM_BASE + 0x64); | ||
215 | 244 | ||
216 | mxc_timer_init(&gpt_clk, MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), 54); | 245 | mxc_timer_init(&gpt_clk, MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), 54); |
217 | 246 | ||
diff --git a/arch/arm/mach-mx25/devices.c b/arch/arm/mach-mx25/devices.c index 63511de3a559..3f4b8a0b5fac 100644 --- a/arch/arm/mach-mx25/devices.c +++ b/arch/arm/mach-mx25/devices.c | |||
@@ -419,3 +419,84 @@ int __init mxc_register_gpios(void) | |||
419 | return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); | 419 | return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); |
420 | } | 420 | } |
421 | 421 | ||
422 | static struct resource mx25_fec_resources[] = { | ||
423 | { | ||
424 | .start = MX25_FEC_BASE_ADDR, | ||
425 | .end = MX25_FEC_BASE_ADDR + 0xfff, | ||
426 | .flags = IORESOURCE_MEM, | ||
427 | }, | ||
428 | { | ||
429 | .start = MX25_INT_FEC, | ||
430 | .end = MX25_INT_FEC, | ||
431 | .flags = IORESOURCE_IRQ, | ||
432 | }, | ||
433 | }; | ||
434 | |||
435 | struct platform_device mx25_fec_device = { | ||
436 | .name = "fec", | ||
437 | .id = 0, | ||
438 | .num_resources = ARRAY_SIZE(mx25_fec_resources), | ||
439 | .resource = mx25_fec_resources, | ||
440 | }; | ||
441 | |||
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[] = { | ||
463 | { | ||
464 | .start = MX25_DRYICE_BASE_ADDR, | ||
465 | .end = MX25_DRYICE_BASE_ADDR + 0x40, | ||
466 | .flags = IORESOURCE_MEM, | ||
467 | }, | ||
468 | { | ||
469 | .start = MX25_INT_DRYICE, | ||
470 | .flags = IORESOURCE_IRQ | ||
471 | }, | ||
472 | }; | ||
473 | |||
474 | struct platform_device mx25_rtc_device = { | ||
475 | .name = "imxdi_rtc", | ||
476 | .id = 0, | ||
477 | .num_resources = ARRAY_SIZE(mx25_rtc_resources), | ||
478 | .resource = mx25_rtc_resources, | ||
479 | }; | ||
480 | |||
481 | static struct resource mx25_fb_resources[] = { | ||
482 | { | ||
483 | .start = MX25_LCDC_BASE_ADDR, | ||
484 | .end = MX25_LCDC_BASE_ADDR + 0xfff, | ||
485 | .flags = IORESOURCE_MEM, | ||
486 | }, | ||
487 | { | ||
488 | .start = MX25_INT_LCDC, | ||
489 | .end = MX25_INT_LCDC, | ||
490 | .flags = IORESOURCE_IRQ, | ||
491 | }, | ||
492 | }; | ||
493 | |||
494 | struct platform_device mx25_fb_device = { | ||
495 | .name = "imx-fb", | ||
496 | .id = 0, | ||
497 | .resource = mx25_fb_resources, | ||
498 | .num_resources = ARRAY_SIZE(mx25_fb_resources), | ||
499 | .dev = { | ||
500 | .coherent_dma_mask = 0xFFFFFFFF, | ||
501 | }, | ||
502 | }; | ||
diff --git a/arch/arm/mach-mx25/devices.h b/arch/arm/mach-mx25/devices.h index fe6bf88ad1dd..39560e13bc0d 100644 --- a/arch/arm/mach-mx25/devices.h +++ b/arch/arm/mach-mx25/devices.h | |||
@@ -17,3 +17,7 @@ extern struct platform_device mxc_keypad_device; | |||
17 | extern struct platform_device mxc_i2c_device0; | 17 | extern struct platform_device mxc_i2c_device0; |
18 | extern struct platform_device mxc_i2c_device1; | 18 | extern struct platform_device mxc_i2c_device1; |
19 | extern struct platform_device mxc_i2c_device2; | 19 | extern struct platform_device mxc_i2c_device2; |
20 | extern struct platform_device mx25_fec_device; | ||
21 | extern struct platform_device mxc_nand_device; | ||
22 | extern struct platform_device mx25_rtc_device; | ||
23 | extern struct platform_device mx25_fb_device; | ||
diff --git a/arch/arm/mach-mx25/mach-mx25pdk.c b/arch/arm/mach-mx25/mach-mx25pdk.c new file mode 100644 index 000000000000..83d74109e7d8 --- /dev/null +++ b/arch/arm/mach-mx25/mach-mx25pdk.c | |||
@@ -0,0 +1,174 @@ | |||
1 | /* | ||
2 | * Copyright 2009 Sascha Hauer, <kernel@pengutronix.de> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version 2 | ||
7 | * of the License, or (at your option) any later version. | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program; if not, write to the Free Software | ||
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
16 | * Boston, MA 02110-1301, USA. | ||
17 | */ | ||
18 | |||
19 | #include <linux/types.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/delay.h> | ||
22 | #include <linux/clk.h> | ||
23 | #include <linux/irq.h> | ||
24 | #include <linux/gpio.h> | ||
25 | #include <linux/fec.h> | ||
26 | #include <linux/platform_device.h> | ||
27 | |||
28 | #include <mach/hardware.h> | ||
29 | #include <asm/mach-types.h> | ||
30 | #include <asm/mach/arch.h> | ||
31 | #include <asm/mach/time.h> | ||
32 | #include <asm/memory.h> | ||
33 | #include <asm/mach/map.h> | ||
34 | #include <mach/common.h> | ||
35 | #include <mach/imx-uart.h> | ||
36 | #include <mach/mx25.h> | ||
37 | #include <mach/mxc_nand.h> | ||
38 | #include <mach/imxfb.h> | ||
39 | #include "devices.h" | ||
40 | #include <mach/iomux-mx25.h> | ||
41 | |||
42 | static struct imxuart_platform_data uart_pdata = { | ||
43 | .flags = IMXUART_HAVE_RTSCTS, | ||
44 | }; | ||
45 | |||
46 | static struct pad_desc mx25pdk_pads[] = { | ||
47 | MX25_PAD_FEC_MDC__FEC_MDC, | ||
48 | MX25_PAD_FEC_MDIO__FEC_MDIO, | ||
49 | MX25_PAD_FEC_TDATA0__FEC_TDATA0, | ||
50 | MX25_PAD_FEC_TDATA1__FEC_TDATA1, | ||
51 | MX25_PAD_FEC_TX_EN__FEC_TX_EN, | ||
52 | MX25_PAD_FEC_RDATA0__FEC_RDATA0, | ||
53 | MX25_PAD_FEC_RDATA1__FEC_RDATA1, | ||
54 | MX25_PAD_FEC_RX_DV__FEC_RX_DV, | ||
55 | MX25_PAD_FEC_TX_CLK__FEC_TX_CLK, | ||
56 | MX25_PAD_A17__GPIO_2_3, /* FEC_EN, GPIO 35 */ | ||
57 | MX25_PAD_D12__GPIO_4_8, /* FEC_RESET_B, GPIO 104 */ | ||
58 | |||
59 | /* LCD */ | ||
60 | MX25_PAD_LD0__LD0, | ||
61 | MX25_PAD_LD1__LD1, | ||
62 | MX25_PAD_LD2__LD2, | ||
63 | MX25_PAD_LD3__LD3, | ||
64 | MX25_PAD_LD4__LD4, | ||
65 | MX25_PAD_LD5__LD5, | ||
66 | MX25_PAD_LD6__LD6, | ||
67 | MX25_PAD_LD7__LD7, | ||
68 | MX25_PAD_LD8__LD8, | ||
69 | MX25_PAD_LD9__LD9, | ||
70 | MX25_PAD_LD10__LD10, | ||
71 | MX25_PAD_LD11__LD11, | ||
72 | MX25_PAD_LD12__LD12, | ||
73 | MX25_PAD_LD13__LD13, | ||
74 | MX25_PAD_LD14__LD14, | ||
75 | MX25_PAD_LD15__LD15, | ||
76 | MX25_PAD_GPIO_E__LD16, | ||
77 | MX25_PAD_GPIO_F__LD17, | ||
78 | MX25_PAD_HSYNC__HSYNC, | ||
79 | MX25_PAD_VSYNC__VSYNC, | ||
80 | MX25_PAD_LSCLK__LSCLK, | ||
81 | MX25_PAD_OE_ACD__OE_ACD, | ||
82 | MX25_PAD_CONTRAST__CONTRAST, | ||
83 | }; | ||
84 | |||
85 | static struct fec_platform_data mx25_fec_pdata = { | ||
86 | .phy = PHY_INTERFACE_MODE_RMII, | ||
87 | }; | ||
88 | |||
89 | #define FEC_ENABLE_GPIO 35 | ||
90 | #define FEC_RESET_B_GPIO 104 | ||
91 | |||
92 | static void __init mx25pdk_fec_reset(void) | ||
93 | { | ||
94 | gpio_request(FEC_ENABLE_GPIO, "FEC PHY enable"); | ||
95 | gpio_request(FEC_RESET_B_GPIO, "FEC PHY reset"); | ||
96 | |||
97 | gpio_direction_output(FEC_ENABLE_GPIO, 0); /* drop PHY power */ | ||
98 | gpio_direction_output(FEC_RESET_B_GPIO, 0); /* assert reset */ | ||
99 | udelay(2); | ||
100 | |||
101 | /* turn on PHY power and lift reset */ | ||
102 | gpio_set_value(FEC_ENABLE_GPIO, 1); | ||
103 | gpio_set_value(FEC_RESET_B_GPIO, 1); | ||
104 | } | ||
105 | |||
106 | static struct mxc_nand_platform_data mx25pdk_nand_board_info = { | ||
107 | .width = 1, | ||
108 | .hw_ecc = 1, | ||
109 | .flash_bbt = 1, | ||
110 | }; | ||
111 | |||
112 | static struct imx_fb_videomode mx25pdk_modes[] = { | ||
113 | { | ||
114 | .mode = { | ||
115 | .name = "CRT-VGA", | ||
116 | .refresh = 60, | ||
117 | .xres = 640, | ||
118 | .yres = 480, | ||
119 | .pixclock = 39683, | ||
120 | .left_margin = 45, | ||
121 | .right_margin = 114, | ||
122 | .upper_margin = 33, | ||
123 | .lower_margin = 11, | ||
124 | .hsync_len = 1, | ||
125 | .vsync_len = 1, | ||
126 | }, | ||
127 | .bpp = 16, | ||
128 | .pcr = 0xFA208B80, | ||
129 | }, | ||
130 | }; | ||
131 | |||
132 | static struct imx_fb_platform_data mx25pdk_fb_pdata = { | ||
133 | .mode = mx25pdk_modes, | ||
134 | .num_modes = ARRAY_SIZE(mx25pdk_modes), | ||
135 | .pwmr = 0x00A903FF, | ||
136 | .lscr1 = 0x00120300, | ||
137 | .dmacr = 0x00020010, | ||
138 | }; | ||
139 | |||
140 | static void __init mx25pdk_init(void) | ||
141 | { | ||
142 | mxc_iomux_v3_setup_multiple_pads(mx25pdk_pads, | ||
143 | ARRAY_SIZE(mx25pdk_pads)); | ||
144 | |||
145 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | ||
146 | mxc_register_device(&mxc_usbh2, NULL); | ||
147 | mxc_register_device(&mxc_nand_device, &mx25pdk_nand_board_info); | ||
148 | mxc_register_device(&mx25_rtc_device, NULL); | ||
149 | mxc_register_device(&mx25_fb_device, &mx25pdk_fb_pdata); | ||
150 | |||
151 | mx25pdk_fec_reset(); | ||
152 | mxc_register_device(&mx25_fec_device, &mx25_fec_pdata); | ||
153 | } | ||
154 | |||
155 | static void __init mx25pdk_timer_init(void) | ||
156 | { | ||
157 | mx25_clocks_init(); | ||
158 | } | ||
159 | |||
160 | static struct sys_timer mx25pdk_timer = { | ||
161 | .init = mx25pdk_timer_init, | ||
162 | }; | ||
163 | |||
164 | MACHINE_START(MX25_3DS, "Freescale MX25PDK (3DS)") | ||
165 | /* Maintainer: Freescale Semiconductor, Inc. */ | ||
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 = mx25pdk_init, | ||
172 | .timer = &mx25pdk_timer, | ||
173 | MACHINE_END | ||
174 | |||
diff --git a/arch/arm/mach-mx25/mx25pdk.c b/arch/arm/mach-mx25/mx25pdk.c deleted file mode 100644 index d23ae571c03f..000000000000 --- a/arch/arm/mach-mx25/mx25pdk.c +++ /dev/null | |||
@@ -1,69 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2009 Sascha Hauer, <kernel@pengutronix.de> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version 2 | ||
7 | * of the License, or (at your option) any later version. | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program; if not, write to the Free Software | ||
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
16 | * Boston, MA 02110-1301, USA. | ||
17 | */ | ||
18 | |||
19 | #include <linux/types.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/clk.h> | ||
22 | #include <linux/irq.h> | ||
23 | #include <linux/gpio.h> | ||
24 | #include <linux/smsc911x.h> | ||
25 | #include <linux/platform_device.h> | ||
26 | |||
27 | #include <mach/hardware.h> | ||
28 | #include <asm/mach-types.h> | ||
29 | #include <asm/mach/arch.h> | ||
30 | #include <asm/mach/time.h> | ||
31 | #include <asm/memory.h> | ||
32 | #include <asm/mach/map.h> | ||
33 | #include <mach/common.h> | ||
34 | #include <mach/imx-uart.h> | ||
35 | #include <mach/mx25.h> | ||
36 | #include <mach/mxc_nand.h> | ||
37 | #include "devices.h" | ||
38 | #include <mach/iomux-v3.h> | ||
39 | |||
40 | static struct imxuart_platform_data uart_pdata = { | ||
41 | .flags = IMXUART_HAVE_RTSCTS, | ||
42 | }; | ||
43 | |||
44 | static void __init mx25pdk_init(void) | ||
45 | { | ||
46 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | ||
47 | mxc_register_device(&mxc_usbh2, NULL); | ||
48 | } | ||
49 | |||
50 | static void __init mx25pdk_timer_init(void) | ||
51 | { | ||
52 | mx25_clocks_init(26000000); | ||
53 | } | ||
54 | |||
55 | static struct sys_timer mx25pdk_timer = { | ||
56 | .init = mx25pdk_timer_init, | ||
57 | }; | ||
58 | |||
59 | MACHINE_START(MX25_3DS, "Freescale MX25PDK (3DS)") | ||
60 | /* Maintainer: Freescale Semiconductor, Inc. */ | ||
61 | .phys_io = MX25_AIPS1_BASE_ADDR, | ||
62 | .io_pg_offst = ((MX25_AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | ||
63 | .boot_params = PHYS_OFFSET + 0x100, | ||
64 | .map_io = mx25_map_io, | ||
65 | .init_irq = mx25_init_irq, | ||
66 | .init_machine = mx25pdk_init, | ||
67 | .timer = &mx25pdk_timer, | ||
68 | MACHINE_END | ||
69 | |||