summaryrefslogtreecommitdiff
path: root/arch/arm/mach-mxs/mach-mx23evk.c
blob: d7240547f0dbdb928bb9a03ac61c756d81c877e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
 * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/gpio.h>
#include <linux/irq.h>

#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/time.h>

#include <mach/common.h>
#include <mach/iomux-mx23.h>

#include "devices-mx23.h"

static const iomux_cfg_t mx23evk_pads[] __initconst = {
	/* duart */
	MX23_PAD_PWM0__DUART_RX | MXS_PAD_CTRL,
	MX23_PAD_PWM1__DUART_TX | MXS_PAD_CTRL,

	/* auart */
	MX23_PAD_AUART1_RX__AUART1_RX | MXS_PAD_CTRL,
	MX23_PAD_AUART1_TX__AUART1_TX | MXS_PAD_CTRL,
	MX23_PAD_AUART1_CTS__AUART1_CTS | MXS_PAD_CTRL,
	MX23_PAD_AUART1_RTS__AUART1_RTS | MXS_PAD_CTRL,
};

static void __init mx23evk_init(void)
{
	mxs_iomux_setup_multiple_pads(mx23evk_pads, ARRAY_SIZE(mx23evk_pads));

	mx23_add_duart();
	mx23_add_auart0();
}

static void __init mx23evk_timer_init(void)
{
	mx23_clocks_init();
}

static struct sys_timer mx23evk_timer = {
	.init	= mx23evk_timer_init,
};

MACHINE_START(MX23EVK, "Freescale MX23 EVK")
	/* Maintainer: Freescale Semiconductor, Inc. */
	.map_io		= mx23_map_io,
	.init_irq	= mx23_init_irq,
	.init_machine	= mx23evk_init,
	.timer		= &mx23evk_timer,
MACHINE_END