aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx5/board-mx51_efikamx.c
diff options
context:
space:
mode:
authorAmit Kucheria <amit.kucheria@linaro.org>2010-10-06 20:58:12 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2010-10-11 10:29:17 -0400
commit088d01b00e335230bc51be6ae396babb9767e9ea (patch)
treed332efc34d19a6cb31632db5f3c034d0762c8cdd /arch/arm/mach-mx5/board-mx51_efikamx.c
parent6ff554e06869e970e6ef2c4d44ea43315917d22c (diff)
mx51: add support for genesi efikamx nettop
Get serial port working for now Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx5/board-mx51_efikamx.c')
-rw-r--r--arch/arm/mach-mx5/board-mx51_efikamx.c91
1 files changed, 91 insertions, 0 deletions
diff --git a/arch/arm/mach-mx5/board-mx51_efikamx.c b/arch/arm/mach-mx5/board-mx51_efikamx.c
new file mode 100644
index 000000000000..4c921fc31816
--- /dev/null
+++ b/arch/arm/mach-mx5/board-mx51_efikamx.c
@@ -0,0 +1,91 @@
1/*
2 * Copyright (C) 2010 Linaro Limited
3 *
4 * based on code from the following
5 * Copyright 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved.
6 * Copyright 2009-2010 Pegatron Corporation. All Rights Reserved.
7 * Copyright 2009-2010 Genesi USA, Inc. All Rights Reserved.
8 *
9 * The code contained herein is licensed under the GNU General Public
10 * License. You may obtain a copy of the GNU General Public License
11 * Version 2 or later at the following locations:
12 *
13 * http://www.opensource.org/licenses/gpl-license.html
14 * http://www.gnu.org/copyleft/gpl.html
15 */
16
17#include <linux/init.h>
18#include <linux/platform_device.h>
19#include <linux/i2c.h>
20#include <linux/gpio.h>
21#include <linux/delay.h>
22#include <linux/io.h>
23#include <linux/fsl_devices.h>
24
25#include <mach/common.h>
26#include <mach/hardware.h>
27#include <mach/iomux-mx51.h>
28#include <mach/i2c.h>
29#include <mach/mxc_ehci.h>
30
31#include <asm/irq.h>
32#include <asm/setup.h>
33#include <asm/mach-types.h>
34#include <asm/mach/arch.h>
35#include <asm/mach/time.h>
36
37#include "devices-imx51.h"
38#include "devices.h"
39
40static struct pad_desc mx51efikamx_pads[] = {
41 /* UART1 */
42 MX51_PAD_UART1_RXD__UART1_RXD,
43 MX51_PAD_UART1_TXD__UART1_TXD,
44 MX51_PAD_UART1_RTS__UART1_RTS,
45 MX51_PAD_UART1_CTS__UART1_CTS,
46};
47
48/* Serial ports */
49#if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE)
50static const struct imxuart_platform_data uart_pdata = {
51 .flags = IMXUART_HAVE_RTSCTS,
52};
53
54static inline void mxc_init_imx_uart(void)
55{
56 imx51_add_imx_uart(0, &uart_pdata);
57 imx51_add_imx_uart(1, &uart_pdata);
58 imx51_add_imx_uart(2, &uart_pdata);
59}
60#else /* !SERIAL_IMX */
61static inline void mxc_init_imx_uart(void)
62{
63}
64#endif /* SERIAL_IMX */
65
66static void __init mxc_board_init(void)
67{
68 mxc_iomux_v3_setup_multiple_pads(mx51efikamx_pads,
69 ARRAY_SIZE(mx51efikamx_pads));
70 mxc_init_imx_uart();
71}
72
73static void __init mx51_efikamx_timer_init(void)
74{
75 mx51_clocks_init(32768, 24000000, 22579200, 24576000);
76}
77
78static struct sys_timer mxc_timer = {
79 .init = mx51_efikamx_timer_init,
80};
81
82MACHINE_START(MX51_EFIKAMX, "Genesi EfikaMX nettop")
83 /* Maintainer: Amit Kucheria <amit.kucheria@linaro.org> */
84 .phys_io = MX51_AIPS1_BASE_ADDR,
85 .io_pg_offst = ((MX51_AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
86 .boot_params = MX51_PHYS_OFFSET + 0x100,
87 .map_io = mx51_map_io,
88 .init_irq = mx51_init_irq,
89 .init_machine = mxc_board_init,
90 .timer = &mxc_timer,
91MACHINE_END