aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx5/board-mx51_3ds.c
diff options
context:
space:
mode:
authorJason Wang <jason77.wang@gmail.com>2010-07-14 09:24:52 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2010-07-26 08:29:20 -0400
commitbeaac6f32ce484bf141d550bc0f26005782161fe (patch)
tree7a67b577682eaa3d343bb5561f929038de51e6ed /arch/arm/mach-mx5/board-mx51_3ds.c
parent3fac6cf35806f099fad956d7b4ca76eebb26297e (diff)
mx51_3ds: Add support for the imx51 3-stack board
3-stack is a reference board from Freescale for their i.MX51 SoC. Add board definition, Kconfig and Makefile to enable Freescale 3-stack board. Boot tested on a i.MX51 3-stack Rev2.0 board Signed-off-by: Jason Wang <jason77.wang@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx5/board-mx51_3ds.c')
-rw-r--r--arch/arm/mach-mx5/board-mx51_3ds.c103
1 files changed, 103 insertions, 0 deletions
diff --git a/arch/arm/mach-mx5/board-mx51_3ds.c b/arch/arm/mach-mx5/board-mx51_3ds.c
new file mode 100644
index 000000000000..f6a338c3345b
--- /dev/null
+++ b/arch/arm/mach-mx5/board-mx51_3ds.c
@@ -0,0 +1,103 @@
1/*
2 * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved.
3 * Copyright (C) 2010 Jason Wang <jason77.wang@gmail.com>
4 *
5 * The code contained herein is licensed under the GNU General Public
6 * License. You may obtain a copy of the GNU General Public License
7 * Version 2 or later at the following locations:
8 *
9 * http://www.opensource.org/licenses/gpl-license.html
10 * http://www.gnu.org/copyleft/gpl.html
11 */
12
13#include <linux/irq.h>
14#include <linux/platform_device.h>
15
16#include <asm/mach-types.h>
17#include <asm/mach/arch.h>
18#include <asm/mach/time.h>
19
20#include <mach/hardware.h>
21#include <mach/common.h>
22#include <mach/iomux-mx51.h>
23#include <mach/imx-uart.h>
24#include <mach/3ds_debugboard.h>
25
26#include "devices.h"
27
28#define EXPIO_PARENT_INT (MXC_INTERNAL_IRQS + GPIO_PORTA + 6)
29
30static struct pad_desc mx51_3ds_pads[] = {
31 /* UART1 */
32 MX51_PAD_UART1_RXD__UART1_RXD,
33 MX51_PAD_UART1_TXD__UART1_TXD,
34 MX51_PAD_UART1_RTS__UART1_RTS,
35 MX51_PAD_UART1_CTS__UART1_CTS,
36
37 /* UART2 */
38 MX51_PAD_UART2_RXD__UART2_RXD,
39 MX51_PAD_UART2_TXD__UART2_TXD,
40 MX51_PAD_EIM_D25__UART2_CTS,
41 MX51_PAD_EIM_D26__UART2_RTS,
42
43 /* UART3 */
44 MX51_PAD_UART3_RXD__UART3_RXD,
45 MX51_PAD_UART3_TXD__UART3_TXD,
46 MX51_PAD_EIM_D24__UART3_CTS,
47 MX51_PAD_EIM_D27__UART3_RTS,
48
49 /* CPLD PARENT IRQ PIN */
50 MX51_PAD_GPIO_1_6__GPIO_1_6,
51};
52
53/* Serial ports */
54#if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE)
55static struct imxuart_platform_data uart_pdata = {
56 .flags = IMXUART_HAVE_RTSCTS,
57};
58
59static inline void mxc_init_imx_uart(void)
60{
61 mxc_register_device(&mxc_uart_device0, &uart_pdata);
62 mxc_register_device(&mxc_uart_device1, &uart_pdata);
63 mxc_register_device(&mxc_uart_device2, &uart_pdata);
64}
65#else /* !SERIAL_IMX */
66static inline void mxc_init_imx_uart(void)
67{
68}
69#endif /* SERIAL_IMX */
70
71/*
72 * Board specific initialization.
73 */
74static void __init mxc_board_init(void)
75{
76 mxc_iomux_v3_setup_multiple_pads(mx51_3ds_pads,
77 ARRAY_SIZE(mx51_3ds_pads));
78 mxc_init_imx_uart();
79
80 if (mxc_expio_init(MX51_CS5_BASE_ADDR, EXPIO_PARENT_INT))
81 printk(KERN_WARNING "Init of the debugboard failed, all "
82 "devices on the board are unusable.\n");
83}
84
85static void __init mx51_3ds_timer_init(void)
86{
87 mx51_clocks_init(32768, 24000000, 22579200, 0);
88}
89
90static struct sys_timer mxc_timer = {
91 .init = mx51_3ds_timer_init,
92};
93
94MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board")
95 /* Maintainer: Freescale Semiconductor, Inc. */
96 .phys_io = MX51_AIPS1_BASE_ADDR,
97 .io_pg_offst = ((MX51_AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
98 .boot_params = PHYS_OFFSET + 0x100,
99 .map_io = mx51_map_io,
100 .init_irq = mx51_init_irq,
101 .init_machine = mxc_board_init,
102 .timer = &mxc_timer,
103MACHINE_END