blob: 0737ce2e6cfb5b8d9351c01cc94cf085e613c8ab [file] [log] [blame]
Shawn Guo55cf4182010-12-20 22:57:44 +08001/*
2 * Copyright 2010 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
15#include <linux/delay.h>
16#include <linux/platform_device.h>
17#include <linux/gpio.h>
18#include <linux/irq.h>
19
20#include <asm/mach-types.h>
21#include <asm/mach/arch.h>
22#include <asm/mach/time.h>
23
24#include <mach/common.h>
25#include <mach/iomux-mx23.h>
26
27#include "devices-mx23.h"
28
29static const iomux_cfg_t mx23evk_pads[] __initconst = {
30 /* duart */
31 MX23_PAD_PWM0__DUART_RX | MXS_PAD_4MA,
32 MX23_PAD_PWM1__DUART_TX | MXS_PAD_4MA,
Shawn Guo2e8acbc2011-02-17 14:28:51 +080033
34 /* auart */
35 MX23_PAD_AUART1_RX__AUART1_RX |
36 (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
37 MX23_PAD_AUART1_TX__AUART1_TX |
38 (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
39 MX23_PAD_AUART1_CTS__AUART1_CTS |
40 (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
41 MX23_PAD_AUART1_RTS__AUART1_RTS |
42 (MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
Shawn Guo55cf4182010-12-20 22:57:44 +080043};
44
45static void __init mx23evk_init(void)
46{
47 mxs_iomux_setup_multiple_pads(mx23evk_pads, ARRAY_SIZE(mx23evk_pads));
48
49 mx23_add_duart();
Shawn Guo2e8acbc2011-02-17 14:28:51 +080050 mx23_add_auart0();
Shawn Guo55cf4182010-12-20 22:57:44 +080051}
52
53static void __init mx23evk_timer_init(void)
54{
55 mx23_clocks_init();
56}
57
58static struct sys_timer mx23evk_timer = {
59 .init = mx23evk_timer_init,
60};
61
62MACHINE_START(MX23EVK, "Freescale MX23 EVK")
63 /* Maintainer: Freescale Semiconductor, Inc. */
64 .map_io = mx23_map_io,
65 .init_irq = mx23_init_irq,
66 .init_machine = mx23evk_init,
67 .timer = &mx23evk_timer,
68MACHINE_END