diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-11-11 12:06:17 -0500 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-11-19 15:53:49 -0500 |
commit | e48ab1c16ff2af83e6a2a1228504710a5d339d08 (patch) | |
tree | 6f8b911583ecb48ca18a2c724bb99d3d9ab10815 /arch/arm/mach-mx25/mach-cpuimx25.c | |
parent | 2a8bd56a382ec0e24249b1adaca4f38bd529e825 (diff) |
ARM: imx: move mx25 support to mach-imx
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx25/mach-cpuimx25.c')
-rw-r--r-- | arch/arm/mach-mx25/mach-cpuimx25.c | 161 |
1 files changed, 0 insertions, 161 deletions
diff --git a/arch/arm/mach-mx25/mach-cpuimx25.c b/arch/arm/mach-mx25/mach-cpuimx25.c deleted file mode 100644 index 67a7d55ad191..000000000000 --- a/arch/arm/mach-mx25/mach-cpuimx25.c +++ /dev/null | |||
@@ -1,161 +0,0 @@ | |||
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/platform_device.h> | ||
27 | #include <linux/usb/otg.h> | ||
28 | #include <linux/usb/ulpi.h> | ||
29 | |||
30 | #include <mach/eukrea-baseboards.h> | ||
31 | #include <mach/hardware.h> | ||
32 | #include <asm/mach-types.h> | ||
33 | #include <asm/mach/arch.h> | ||
34 | #include <asm/mach/time.h> | ||
35 | #include <asm/memory.h> | ||
36 | #include <asm/mach/map.h> | ||
37 | #include <mach/common.h> | ||
38 | #include <mach/mx25.h> | ||
39 | #include <mach/mxc_nand.h> | ||
40 | #include <mach/imxfb.h> | ||
41 | #include <mach/iomux-mx25.h> | ||
42 | |||
43 | #include "devices-imx25.h" | ||
44 | |||
45 | static const struct imxuart_platform_data uart_pdata __initconst = { | ||
46 | .flags = IMXUART_HAVE_RTSCTS, | ||
47 | }; | ||
48 | |||
49 | static struct pad_desc eukrea_cpuimx25_pads[] = { | ||
50 | /* FEC - RMII */ | ||
51 | MX25_PAD_FEC_MDC__FEC_MDC, | ||
52 | MX25_PAD_FEC_MDIO__FEC_MDIO, | ||
53 | MX25_PAD_FEC_TDATA0__FEC_TDATA0, | ||
54 | MX25_PAD_FEC_TDATA1__FEC_TDATA1, | ||
55 | MX25_PAD_FEC_TX_EN__FEC_TX_EN, | ||
56 | MX25_PAD_FEC_RDATA0__FEC_RDATA0, | ||
57 | MX25_PAD_FEC_RDATA1__FEC_RDATA1, | ||
58 | MX25_PAD_FEC_RX_DV__FEC_RX_DV, | ||
59 | MX25_PAD_FEC_TX_CLK__FEC_TX_CLK, | ||
60 | /* I2C1 */ | ||
61 | MX25_PAD_I2C1_CLK__I2C1_CLK, | ||
62 | MX25_PAD_I2C1_DAT__I2C1_DAT, | ||
63 | }; | ||
64 | |||
65 | static const struct fec_platform_data mx25_fec_pdata __initconst = { | ||
66 | .phy = PHY_INTERFACE_MODE_RMII, | ||
67 | }; | ||
68 | |||
69 | static const struct mxc_nand_platform_data | ||
70 | eukrea_cpuimx25_nand_board_info __initconst = { | ||
71 | .width = 1, | ||
72 | .hw_ecc = 1, | ||
73 | .flash_bbt = 1, | ||
74 | }; | ||
75 | |||
76 | static const struct imxi2c_platform_data | ||
77 | eukrea_cpuimx25_i2c0_data __initconst = { | ||
78 | .bitrate = 100000, | ||
79 | }; | ||
80 | |||
81 | static struct i2c_board_info eukrea_cpuimx25_i2c_devices[] = { | ||
82 | { | ||
83 | I2C_BOARD_INFO("pcf8563", 0x51), | ||
84 | }, | ||
85 | }; | ||
86 | |||
87 | static const struct mxc_usbh_platform_data otg_pdata __initconst = { | ||
88 | .portsc = MXC_EHCI_MODE_UTMI, | ||
89 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, | ||
90 | }; | ||
91 | |||
92 | static const struct mxc_usbh_platform_data usbh2_pdata __initconst = { | ||
93 | .portsc = MXC_EHCI_MODE_SERIAL, | ||
94 | .flags = MXC_EHCI_INTERFACE_SINGLE_UNI | MXC_EHCI_INTERNAL_PHY | | ||
95 | MXC_EHCI_IPPUE_DOWN, | ||
96 | }; | ||
97 | |||
98 | static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { | ||
99 | .operating_mode = FSL_USB2_DR_DEVICE, | ||
100 | .phy_mode = FSL_USB2_PHY_UTMI, | ||
101 | }; | ||
102 | |||
103 | static int otg_mode_host; | ||
104 | |||
105 | static int __init eukrea_cpuimx25_otg_mode(char *options) | ||
106 | { | ||
107 | if (!strcmp(options, "host")) | ||
108 | otg_mode_host = 1; | ||
109 | else if (!strcmp(options, "device")) | ||
110 | otg_mode_host = 0; | ||
111 | else | ||
112 | pr_info("otg_mode neither \"host\" nor \"device\". " | ||
113 | "Defaulting to device\n"); | ||
114 | return 0; | ||
115 | } | ||
116 | __setup("otg_mode=", eukrea_cpuimx25_otg_mode); | ||
117 | |||
118 | static void __init eukrea_cpuimx25_init(void) | ||
119 | { | ||
120 | if (mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx25_pads, | ||
121 | ARRAY_SIZE(eukrea_cpuimx25_pads))) | ||
122 | printk(KERN_ERR "error setting cpuimx25 pads !\n"); | ||
123 | |||
124 | imx25_add_imx_uart0(&uart_pdata); | ||
125 | imx25_add_mxc_nand(&eukrea_cpuimx25_nand_board_info); | ||
126 | imx25_add_imxdi_rtc(NULL); | ||
127 | imx25_add_fec(&mx25_fec_pdata); | ||
128 | |||
129 | i2c_register_board_info(0, eukrea_cpuimx25_i2c_devices, | ||
130 | ARRAY_SIZE(eukrea_cpuimx25_i2c_devices)); | ||
131 | imx25_add_imx_i2c0(&eukrea_cpuimx25_i2c0_data); | ||
132 | |||
133 | if (otg_mode_host) | ||
134 | imx25_add_mxc_ehci_otg(&otg_pdata); | ||
135 | else | ||
136 | imx25_add_fsl_usb2_udc(&otg_device_pdata); | ||
137 | |||
138 | imx25_add_mxc_ehci_hs(&usbh2_pdata); | ||
139 | |||
140 | #ifdef CONFIG_MACH_EUKREA_MBIMXSD25_BASEBOARD | ||
141 | eukrea_mbimxsd25_baseboard_init(); | ||
142 | #endif | ||
143 | } | ||
144 | |||
145 | static void __init eukrea_cpuimx25_timer_init(void) | ||
146 | { | ||
147 | mx25_clocks_init(); | ||
148 | } | ||
149 | |||
150 | static struct sys_timer eukrea_cpuimx25_timer = { | ||
151 | .init = eukrea_cpuimx25_timer_init, | ||
152 | }; | ||
153 | |||
154 | MACHINE_START(EUKREA_CPUIMX25, "Eukrea CPUIMX25") | ||
155 | /* Maintainer: Eukrea Electromatique */ | ||
156 | .boot_params = MX25_PHYS_OFFSET + 0x100, | ||
157 | .map_io = mx25_map_io, | ||
158 | .init_irq = mx25_init_irq, | ||
159 | .init_machine = eukrea_cpuimx25_init, | ||
160 | .timer = &eukrea_cpuimx25_timer, | ||
161 | MACHINE_END | ||