Yong Shen | 3b18c34 | 2011-01-12 17:14:47 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 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 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 along |
| 17 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 19 | */ |
| 20 | |
| 21 | #include <linux/init.h> |
| 22 | #include <linux/clk.h> |
Yong Shen | 3b18c34 | 2011-01-12 17:14:47 +0800 | [diff] [blame] | 23 | #include <linux/delay.h> |
| 24 | #include <linux/gpio.h> |
Fabio Estevam | 2f81b4d | 2011-08-24 17:31:35 -0300 | [diff] [blame] | 25 | #include <linux/i2c.h> |
Yong Shen | 3b18c34 | 2011-01-12 17:14:47 +0800 | [diff] [blame] | 26 | |
| 27 | #include <mach/common.h> |
| 28 | #include <mach/hardware.h> |
Yong Shen | 3b18c34 | 2011-01-12 17:14:47 +0800 | [diff] [blame] | 29 | #include <mach/iomux-mx53.h> |
| 30 | |
| 31 | #include <asm/mach-types.h> |
| 32 | #include <asm/mach/arch.h> |
| 33 | #include <asm/mach/time.h> |
| 34 | |
| 35 | #include "crm_regs.h" |
| 36 | #include "devices-imx53.h" |
| 37 | |
Frank Li | 14fb20c | 2011-03-15 17:04:10 +0800 | [diff] [blame] | 38 | #define MX53_LOCO_POWER IMX_GPIO_NR(1, 8) |
| 39 | #define MX53_LOCO_UI1 IMX_GPIO_NR(2, 14) |
| 40 | #define MX53_LOCO_UI2 IMX_GPIO_NR(2, 15) |
Yong Shen | 3b18c34 | 2011-01-12 17:14:47 +0800 | [diff] [blame] | 41 | #define LOCO_FEC_PHY_RST IMX_GPIO_NR(7, 6) |
Fabio Estevam | 5dc3394 | 2011-05-28 11:51:32 -0300 | [diff] [blame] | 42 | #define LOCO_LED IMX_GPIO_NR(7, 7) |
Andre Silva | 1a63693 | 2011-06-10 13:15:19 -0300 | [diff] [blame] | 43 | #define LOCO_SD3_CD IMX_GPIO_NR(3, 11) |
| 44 | #define LOCO_SD3_WP IMX_GPIO_NR(3, 12) |
| 45 | #define LOCO_SD1_CD IMX_GPIO_NR(3, 13) |
Fabio Estevam | 2f81b4d | 2011-08-24 17:31:35 -0300 | [diff] [blame] | 46 | #define LOCO_ACCEL_EN IMX_GPIO_NR(6, 14) |
Yong Shen | 3b18c34 | 2011-01-12 17:14:47 +0800 | [diff] [blame] | 47 | |
| 48 | static iomux_v3_cfg_t mx53_loco_pads[] = { |
Richard Zhao | 6388b96 | 2011-02-18 12:36:14 +0800 | [diff] [blame] | 49 | /* FEC */ |
| 50 | MX53_PAD_FEC_MDC__FEC_MDC, |
| 51 | MX53_PAD_FEC_MDIO__FEC_MDIO, |
| 52 | MX53_PAD_FEC_REF_CLK__FEC_TX_CLK, |
| 53 | MX53_PAD_FEC_RX_ER__FEC_RX_ER, |
| 54 | MX53_PAD_FEC_CRS_DV__FEC_RX_DV, |
| 55 | MX53_PAD_FEC_RXD1__FEC_RDATA_1, |
| 56 | MX53_PAD_FEC_RXD0__FEC_RDATA_0, |
| 57 | MX53_PAD_FEC_TX_EN__FEC_TX_EN, |
| 58 | MX53_PAD_FEC_TXD1__FEC_TDATA_1, |
| 59 | MX53_PAD_FEC_TXD0__FEC_TDATA_0, |
| 60 | /* FEC_nRST */ |
| 61 | MX53_PAD_PATA_DA_0__GPIO7_6, |
| 62 | /* FEC_nINT */ |
| 63 | MX53_PAD_PATA_DATA4__GPIO2_4, |
| 64 | /* AUDMUX5 */ |
| 65 | MX53_PAD_KEY_COL0__AUDMUX_AUD5_TXC, |
| 66 | MX53_PAD_KEY_ROW0__AUDMUX_AUD5_TXD, |
| 67 | MX53_PAD_KEY_COL1__AUDMUX_AUD5_TXFS, |
| 68 | MX53_PAD_KEY_ROW1__AUDMUX_AUD5_RXD, |
Fabio Estevam | 2f81b4d | 2011-08-24 17:31:35 -0300 | [diff] [blame] | 69 | /* I2C1 */ |
| 70 | MX53_PAD_CSI0_DAT8__I2C1_SDA, |
| 71 | MX53_PAD_CSI0_DAT9__I2C1_SCL, |
| 72 | MX53_PAD_NANDF_CS1__GPIO6_14, /* Accelerometer Enable */ |
Richard Zhao | 6388b96 | 2011-02-18 12:36:14 +0800 | [diff] [blame] | 73 | /* I2C2 */ |
| 74 | MX53_PAD_KEY_COL3__I2C2_SCL, |
| 75 | MX53_PAD_KEY_ROW3__I2C2_SDA, |
| 76 | /* SD1 */ |
| 77 | MX53_PAD_SD1_CMD__ESDHC1_CMD, |
| 78 | MX53_PAD_SD1_CLK__ESDHC1_CLK, |
| 79 | MX53_PAD_SD1_DATA0__ESDHC1_DAT0, |
| 80 | MX53_PAD_SD1_DATA1__ESDHC1_DAT1, |
| 81 | MX53_PAD_SD1_DATA2__ESDHC1_DAT2, |
| 82 | MX53_PAD_SD1_DATA3__ESDHC1_DAT3, |
Andre Silva | 1a63693 | 2011-06-10 13:15:19 -0300 | [diff] [blame] | 83 | /* SD1_CD */ |
| 84 | MX53_PAD_EIM_DA13__GPIO3_13, |
Richard Zhao | 6388b96 | 2011-02-18 12:36:14 +0800 | [diff] [blame] | 85 | /* SD3 */ |
| 86 | MX53_PAD_PATA_DATA8__ESDHC3_DAT0, |
| 87 | MX53_PAD_PATA_DATA9__ESDHC3_DAT1, |
| 88 | MX53_PAD_PATA_DATA10__ESDHC3_DAT2, |
| 89 | MX53_PAD_PATA_DATA11__ESDHC3_DAT3, |
| 90 | MX53_PAD_PATA_DATA0__ESDHC3_DAT4, |
| 91 | MX53_PAD_PATA_DATA1__ESDHC3_DAT5, |
| 92 | MX53_PAD_PATA_DATA2__ESDHC3_DAT6, |
| 93 | MX53_PAD_PATA_DATA3__ESDHC3_DAT7, |
| 94 | MX53_PAD_PATA_IORDY__ESDHC3_CLK, |
| 95 | MX53_PAD_PATA_RESET_B__ESDHC3_CMD, |
| 96 | /* SD3_CD */ |
| 97 | MX53_PAD_EIM_DA11__GPIO3_11, |
| 98 | /* SD3_WP */ |
| 99 | MX53_PAD_EIM_DA12__GPIO3_12, |
| 100 | /* VGA */ |
| 101 | MX53_PAD_EIM_OE__IPU_DI1_PIN7, |
| 102 | MX53_PAD_EIM_RW__IPU_DI1_PIN8, |
| 103 | /* DISPLB */ |
| 104 | MX53_PAD_EIM_D20__IPU_SER_DISP0_CS, |
| 105 | MX53_PAD_EIM_D21__IPU_DISPB0_SER_CLK, |
| 106 | MX53_PAD_EIM_D22__IPU_DISPB0_SER_DIN, |
| 107 | MX53_PAD_EIM_D23__IPU_DI0_D0_CS, |
| 108 | /* DISP0_POWER_EN */ |
| 109 | MX53_PAD_EIM_D24__GPIO3_24, |
| 110 | /* DISP0 DET INT */ |
| 111 | MX53_PAD_EIM_D31__GPIO3_31, |
| 112 | /* LVDS */ |
| 113 | MX53_PAD_LVDS0_TX3_P__LDB_LVDS0_TX3, |
| 114 | MX53_PAD_LVDS0_CLK_P__LDB_LVDS0_CLK, |
| 115 | MX53_PAD_LVDS0_TX2_P__LDB_LVDS0_TX2, |
| 116 | MX53_PAD_LVDS0_TX1_P__LDB_LVDS0_TX1, |
| 117 | MX53_PAD_LVDS0_TX0_P__LDB_LVDS0_TX0, |
| 118 | MX53_PAD_LVDS1_TX3_P__LDB_LVDS1_TX3, |
| 119 | MX53_PAD_LVDS1_TX2_P__LDB_LVDS1_TX2, |
| 120 | MX53_PAD_LVDS1_CLK_P__LDB_LVDS1_CLK, |
| 121 | MX53_PAD_LVDS1_TX1_P__LDB_LVDS1_TX1, |
| 122 | MX53_PAD_LVDS1_TX0_P__LDB_LVDS1_TX0, |
| 123 | /* I2C1 */ |
| 124 | MX53_PAD_CSI0_DAT8__I2C1_SDA, |
| 125 | MX53_PAD_CSI0_DAT9__I2C1_SCL, |
| 126 | /* UART1 */ |
Fabio Estevam | 67f2a87 | 2011-01-25 13:08:33 -0200 | [diff] [blame] | 127 | MX53_PAD_CSI0_DAT10__UART1_TXD_MUX, |
| 128 | MX53_PAD_CSI0_DAT11__UART1_RXD_MUX, |
Richard Zhao | 6388b96 | 2011-02-18 12:36:14 +0800 | [diff] [blame] | 129 | /* CSI0 */ |
| 130 | MX53_PAD_CSI0_DAT12__IPU_CSI0_D_12, |
| 131 | MX53_PAD_CSI0_DAT13__IPU_CSI0_D_13, |
| 132 | MX53_PAD_CSI0_DAT14__IPU_CSI0_D_14, |
| 133 | MX53_PAD_CSI0_DAT15__IPU_CSI0_D_15, |
| 134 | MX53_PAD_CSI0_DAT16__IPU_CSI0_D_16, |
| 135 | MX53_PAD_CSI0_DAT17__IPU_CSI0_D_17, |
| 136 | MX53_PAD_CSI0_DAT18__IPU_CSI0_D_18, |
| 137 | MX53_PAD_CSI0_DAT19__IPU_CSI0_D_19, |
| 138 | MX53_PAD_CSI0_VSYNC__IPU_CSI0_VSYNC, |
| 139 | MX53_PAD_CSI0_MCLK__IPU_CSI0_HSYNC, |
| 140 | MX53_PAD_CSI0_PIXCLK__IPU_CSI0_PIXCLK, |
| 141 | /* DISPLAY */ |
| 142 | MX53_PAD_DI0_DISP_CLK__IPU_DI0_DISP_CLK, |
| 143 | MX53_PAD_DI0_PIN15__IPU_DI0_PIN15, |
| 144 | MX53_PAD_DI0_PIN2__IPU_DI0_PIN2, |
| 145 | MX53_PAD_DI0_PIN3__IPU_DI0_PIN3, |
| 146 | MX53_PAD_DISP0_DAT0__IPU_DISP0_DAT_0, |
| 147 | MX53_PAD_DISP0_DAT1__IPU_DISP0_DAT_1, |
| 148 | MX53_PAD_DISP0_DAT2__IPU_DISP0_DAT_2, |
| 149 | MX53_PAD_DISP0_DAT3__IPU_DISP0_DAT_3, |
| 150 | MX53_PAD_DISP0_DAT4__IPU_DISP0_DAT_4, |
| 151 | MX53_PAD_DISP0_DAT5__IPU_DISP0_DAT_5, |
| 152 | MX53_PAD_DISP0_DAT6__IPU_DISP0_DAT_6, |
| 153 | MX53_PAD_DISP0_DAT7__IPU_DISP0_DAT_7, |
| 154 | MX53_PAD_DISP0_DAT8__IPU_DISP0_DAT_8, |
| 155 | MX53_PAD_DISP0_DAT9__IPU_DISP0_DAT_9, |
| 156 | MX53_PAD_DISP0_DAT10__IPU_DISP0_DAT_10, |
| 157 | MX53_PAD_DISP0_DAT11__IPU_DISP0_DAT_11, |
| 158 | MX53_PAD_DISP0_DAT12__IPU_DISP0_DAT_12, |
| 159 | MX53_PAD_DISP0_DAT13__IPU_DISP0_DAT_13, |
| 160 | MX53_PAD_DISP0_DAT14__IPU_DISP0_DAT_14, |
| 161 | MX53_PAD_DISP0_DAT15__IPU_DISP0_DAT_15, |
| 162 | MX53_PAD_DISP0_DAT16__IPU_DISP0_DAT_16, |
| 163 | MX53_PAD_DISP0_DAT17__IPU_DISP0_DAT_17, |
| 164 | MX53_PAD_DISP0_DAT18__IPU_DISP0_DAT_18, |
| 165 | MX53_PAD_DISP0_DAT19__IPU_DISP0_DAT_19, |
| 166 | MX53_PAD_DISP0_DAT20__IPU_DISP0_DAT_20, |
| 167 | MX53_PAD_DISP0_DAT21__IPU_DISP0_DAT_21, |
| 168 | MX53_PAD_DISP0_DAT22__IPU_DISP0_DAT_22, |
| 169 | MX53_PAD_DISP0_DAT23__IPU_DISP0_DAT_23, |
| 170 | /* Audio CLK*/ |
| 171 | MX53_PAD_GPIO_0__CCM_SSI_EXT1_CLK, |
| 172 | /* PWM */ |
| 173 | MX53_PAD_GPIO_1__PWM2_PWMO, |
| 174 | /* SPDIF */ |
| 175 | MX53_PAD_GPIO_7__SPDIF_PLOCK, |
| 176 | MX53_PAD_GPIO_17__SPDIF_OUT1, |
| 177 | /* GPIO */ |
Fabio Estevam | 5dc3394 | 2011-05-28 11:51:32 -0300 | [diff] [blame] | 178 | MX53_PAD_PATA_DA_1__GPIO7_7, /* LED */ |
Richard Zhao | 6388b96 | 2011-02-18 12:36:14 +0800 | [diff] [blame] | 179 | MX53_PAD_PATA_DA_2__GPIO7_8, |
| 180 | MX53_PAD_PATA_DATA5__GPIO2_5, |
| 181 | MX53_PAD_PATA_DATA6__GPIO2_6, |
| 182 | MX53_PAD_PATA_DATA14__GPIO2_14, |
| 183 | MX53_PAD_PATA_DATA15__GPIO2_15, |
| 184 | MX53_PAD_PATA_INTRQ__GPIO7_2, |
| 185 | MX53_PAD_EIM_WAIT__GPIO5_0, |
| 186 | MX53_PAD_NANDF_WP_B__GPIO6_9, |
| 187 | MX53_PAD_NANDF_RB0__GPIO6_10, |
| 188 | MX53_PAD_NANDF_CS1__GPIO6_14, |
| 189 | MX53_PAD_NANDF_CS2__GPIO6_15, |
| 190 | MX53_PAD_NANDF_CS3__GPIO6_16, |
| 191 | MX53_PAD_GPIO_5__GPIO1_5, |
| 192 | MX53_PAD_GPIO_16__GPIO7_11, |
| 193 | MX53_PAD_GPIO_8__GPIO1_8, |
Yong Shen | 3b18c34 | 2011-01-12 17:14:47 +0800 | [diff] [blame] | 194 | }; |
| 195 | |
Frank Li | 14fb20c | 2011-03-15 17:04:10 +0800 | [diff] [blame] | 196 | #define GPIO_BUTTON(gpio_num, ev_code, act_low, descr, wake) \ |
| 197 | { \ |
| 198 | .gpio = gpio_num, \ |
| 199 | .type = EV_KEY, \ |
| 200 | .code = ev_code, \ |
| 201 | .active_low = act_low, \ |
| 202 | .desc = "btn " descr, \ |
| 203 | .wakeup = wake, \ |
| 204 | } |
| 205 | |
Fabio Estevam | 3da25cc | 2011-04-03 22:47:23 -0300 | [diff] [blame] | 206 | static struct gpio_keys_button loco_buttons[] = { |
Frank Li | 14fb20c | 2011-03-15 17:04:10 +0800 | [diff] [blame] | 207 | GPIO_BUTTON(MX53_LOCO_POWER, KEY_POWER, 1, "power", 0), |
| 208 | GPIO_BUTTON(MX53_LOCO_UI1, KEY_VOLUMEUP, 1, "volume-up", 0), |
| 209 | GPIO_BUTTON(MX53_LOCO_UI2, KEY_VOLUMEDOWN, 1, "volume-down", 0), |
| 210 | }; |
| 211 | |
| 212 | static const struct gpio_keys_platform_data loco_button_data __initconst = { |
| 213 | .buttons = loco_buttons, |
| 214 | .nbuttons = ARRAY_SIZE(loco_buttons), |
| 215 | }; |
| 216 | |
Andre Silva | 1a63693 | 2011-06-10 13:15:19 -0300 | [diff] [blame] | 217 | static const struct esdhc_platform_data mx53_loco_sd1_data __initconst = { |
| 218 | .cd_gpio = LOCO_SD1_CD, |
Shawn Guo | 913413c | 2011-06-21 22:41:51 +0800 | [diff] [blame] | 219 | .cd_type = ESDHC_CD_GPIO, |
| 220 | .wp_type = ESDHC_WP_NONE, |
Andre Silva | 1a63693 | 2011-06-10 13:15:19 -0300 | [diff] [blame] | 221 | }; |
| 222 | |
| 223 | static const struct esdhc_platform_data mx53_loco_sd3_data __initconst = { |
| 224 | .cd_gpio = LOCO_SD3_CD, |
| 225 | .wp_gpio = LOCO_SD3_WP, |
Shawn Guo | 913413c | 2011-06-21 22:41:51 +0800 | [diff] [blame] | 226 | .cd_type = ESDHC_CD_GPIO, |
| 227 | .wp_type = ESDHC_WP_GPIO, |
Andre Silva | 1a63693 | 2011-06-10 13:15:19 -0300 | [diff] [blame] | 228 | }; |
| 229 | |
Yong Shen | 3b18c34 | 2011-01-12 17:14:47 +0800 | [diff] [blame] | 230 | static inline void mx53_loco_fec_reset(void) |
| 231 | { |
| 232 | int ret; |
| 233 | |
| 234 | /* reset FEC PHY */ |
| 235 | ret = gpio_request(LOCO_FEC_PHY_RST, "fec-phy-reset"); |
| 236 | if (ret) { |
| 237 | printk(KERN_ERR"failed to get GPIO_FEC_PHY_RESET: %d\n", ret); |
| 238 | return; |
| 239 | } |
| 240 | gpio_direction_output(LOCO_FEC_PHY_RST, 0); |
| 241 | msleep(1); |
| 242 | gpio_set_value(LOCO_FEC_PHY_RST, 1); |
| 243 | } |
| 244 | |
| 245 | static struct fec_platform_data mx53_loco_fec_data = { |
| 246 | .phy = PHY_INTERFACE_MODE_RMII, |
| 247 | }; |
| 248 | |
Richard Zhao | 942b99f | 2011-02-18 12:36:16 +0800 | [diff] [blame] | 249 | static const struct imxi2c_platform_data mx53_loco_i2c_data __initconst = { |
| 250 | .bitrate = 100000, |
| 251 | }; |
| 252 | |
Fabio Estevam | 5dc3394 | 2011-05-28 11:51:32 -0300 | [diff] [blame] | 253 | static const struct gpio_led mx53loco_leds[] __initconst = { |
| 254 | { |
| 255 | .name = "green", |
| 256 | .default_trigger = "heartbeat", |
| 257 | .gpio = LOCO_LED, |
| 258 | }, |
| 259 | }; |
| 260 | |
| 261 | static const struct gpio_led_platform_data mx53loco_leds_data __initconst = { |
| 262 | .leds = mx53loco_leds, |
| 263 | .num_leds = ARRAY_SIZE(mx53loco_leds), |
| 264 | }; |
| 265 | |
Shawn Guo | 73d2b4c | 2011-10-17 08:42:16 +0800 | [diff] [blame] | 266 | void __init imx53_qsb_common_init(void) |
| 267 | { |
| 268 | mxc_iomux_v3_setup_multiple_pads(mx53_loco_pads, |
| 269 | ARRAY_SIZE(mx53_loco_pads)); |
| 270 | } |
| 271 | |
Fabio Estevam | 2f81b4d | 2011-08-24 17:31:35 -0300 | [diff] [blame] | 272 | static struct i2c_board_info mx53loco_i2c_devices[] = { |
| 273 | { |
| 274 | I2C_BOARD_INFO("mma8450", 0x1C), |
| 275 | }, |
| 276 | }; |
| 277 | |
Yong Shen | 3b18c34 | 2011-01-12 17:14:47 +0800 | [diff] [blame] | 278 | static void __init mx53_loco_board_init(void) |
| 279 | { |
Fabio Estevam | 2f81b4d | 2011-08-24 17:31:35 -0300 | [diff] [blame] | 280 | int ret; |
Shawn Guo | b78d8e5 | 2011-06-06 00:07:55 +0800 | [diff] [blame] | 281 | imx53_soc_init(); |
Shawn Guo | 73d2b4c | 2011-10-17 08:42:16 +0800 | [diff] [blame] | 282 | imx53_qsb_common_init(); |
Shawn Guo | b78d8e5 | 2011-06-06 00:07:55 +0800 | [diff] [blame] | 283 | |
Fabio Estevam | abc1813 | 2011-01-25 13:08:35 -0200 | [diff] [blame] | 284 | imx53_add_imx_uart(0, NULL); |
Yong Shen | 3b18c34 | 2011-01-12 17:14:47 +0800 | [diff] [blame] | 285 | mx53_loco_fec_reset(); |
| 286 | imx53_add_fec(&mx53_loco_fec_data); |
Fabio Estevam | daa7954 | 2011-02-17 18:09:53 -0200 | [diff] [blame] | 287 | imx53_add_imx2_wdt(0, NULL); |
Fabio Estevam | 2f81b4d | 2011-08-24 17:31:35 -0300 | [diff] [blame] | 288 | |
| 289 | ret = gpio_request_one(LOCO_ACCEL_EN, GPIOF_OUT_INIT_HIGH, "accel_en"); |
| 290 | if (ret) |
| 291 | pr_err("Cannot request ACCEL_EN pin: %d\n", ret); |
| 292 | |
| 293 | i2c_register_board_info(0, mx53loco_i2c_devices, |
| 294 | ARRAY_SIZE(mx53loco_i2c_devices)); |
Richard Zhao | 942b99f | 2011-02-18 12:36:16 +0800 | [diff] [blame] | 295 | imx53_add_imx_i2c(0, &mx53_loco_i2c_data); |
| 296 | imx53_add_imx_i2c(1, &mx53_loco_i2c_data); |
Andre Silva | 1a63693 | 2011-06-10 13:15:19 -0300 | [diff] [blame] | 297 | imx53_add_sdhci_esdhc_imx(0, &mx53_loco_sd1_data); |
| 298 | imx53_add_sdhci_esdhc_imx(2, &mx53_loco_sd3_data); |
Frank Li | 14fb20c | 2011-03-15 17:04:10 +0800 | [diff] [blame] | 299 | imx_add_gpio_keys(&loco_button_data); |
Fabio Estevam | 5dc3394 | 2011-05-28 11:51:32 -0300 | [diff] [blame] | 300 | gpio_led_register_device(-1, &mx53loco_leds_data); |
Richard Zhu | 0661b82 | 2011-09-28 15:41:56 +0800 | [diff] [blame] | 301 | imx53_add_ahci_imx(); |
Yong Shen | 3b18c34 | 2011-01-12 17:14:47 +0800 | [diff] [blame] | 302 | } |
| 303 | |
| 304 | static void __init mx53_loco_timer_init(void) |
| 305 | { |
| 306 | mx53_clocks_init(32768, 24000000, 0, 0); |
| 307 | } |
| 308 | |
| 309 | static struct sys_timer mx53_loco_timer = { |
| 310 | .init = mx53_loco_timer_init, |
| 311 | }; |
| 312 | |
| 313 | MACHINE_START(MX53_LOCO, "Freescale MX53 LOCO Board") |
| 314 | .map_io = mx53_map_io, |
Uwe Kleine-König | ab130421 | 2011-02-07 16:35:21 +0100 | [diff] [blame] | 315 | .init_early = imx53_init_early, |
Yong Shen | 3b18c34 | 2011-01-12 17:14:47 +0800 | [diff] [blame] | 316 | .init_irq = mx53_init_irq, |
Sascha Hauer | ffa2ea3 | 2011-09-20 14:31:24 +0200 | [diff] [blame] | 317 | .handle_irq = imx53_handle_irq, |
Yong Shen | 3b18c34 | 2011-01-12 17:14:47 +0800 | [diff] [blame] | 318 | .timer = &mx53_loco_timer, |
Uwe Kleine-König | ab130421 | 2011-02-07 16:35:21 +0100 | [diff] [blame] | 319 | .init_machine = mx53_loco_board_init, |
Yong Shen | 3b18c34 | 2011-01-12 17:14:47 +0800 | [diff] [blame] | 320 | MACHINE_END |