2 * Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved.
3 * Copyright (C) 2009-2010 Amit Kucheria <amit.kucheria@canonical.com>
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:
9 * http://www.opensource.org/licenses/gpl-license.html
10 * http://www.gnu.org/copyleft/gpl.html
13 #include <linux/init.h>
14 #include <linux/platform_device.h>
16 #include <mach/common.h>
17 #include <mach/hardware.h>
18 #include <mach/imx-uart.h>
19 #include <mach/iomux-mx51.h>
22 #include <asm/setup.h>
23 #include <asm/mach-types.h>
24 #include <asm/mach/arch.h>
25 #include <asm/mach/time.h>
29 static struct platform_device
*devices
[] __initdata
= {
33 static struct pad_desc mx51babbage_pads
[] = {
35 MX51_PAD_UART1_RXD__UART1_RXD
,
36 MX51_PAD_UART1_TXD__UART1_TXD
,
37 MX51_PAD_UART1_RTS__UART1_RTS
,
38 MX51_PAD_UART1_CTS__UART1_CTS
,
41 MX51_PAD_UART2_RXD__UART2_RXD
,
42 MX51_PAD_UART2_TXD__UART2_TXD
,
45 MX51_PAD_EIM_D25__UART3_RXD
,
46 MX51_PAD_EIM_D26__UART3_TXD
,
47 MX51_PAD_EIM_D27__UART3_RTS
,
48 MX51_PAD_EIM_D24__UART3_CTS
,
52 #if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE)
53 static struct imxuart_platform_data uart_pdata
= {
54 .flags
= IMXUART_HAVE_RTSCTS
,
57 static inline void mxc_init_imx_uart(void)
59 mxc_register_device(&mxc_uart_device0
, &uart_pdata
);
60 mxc_register_device(&mxc_uart_device1
, &uart_pdata
);
61 mxc_register_device(&mxc_uart_device2
, &uart_pdata
);
63 #else /* !SERIAL_IMX */
64 static inline void mxc_init_imx_uart(void)
67 #endif /* SERIAL_IMX */
70 * Board specific initialization.
72 static void __init
mxc_board_init(void)
74 mxc_iomux_v3_setup_multiple_pads(mx51babbage_pads
,
75 ARRAY_SIZE(mx51babbage_pads
));
77 platform_add_devices(devices
, ARRAY_SIZE(devices
));
80 static void __init
mx51_babbage_timer_init(void)
82 mx51_clocks_init(32768, 24000000, 22579200, 0);
85 static struct sys_timer mxc_timer
= {
86 .init
= mx51_babbage_timer_init
,
89 MACHINE_START(MX51_BABBAGE
, "Freescale MX51 Babbage Board")
90 /* Maintainer: Amit Kucheria <amit.kucheria@canonical.com> */
91 .phys_io
= MX51_AIPS1_BASE_ADDR
,
92 .io_pg_offst
= ((MX51_AIPS1_BASE_ADDR_VIRT
) >> 18) & 0xfffc,
93 .boot_params
= PHYS_OFFSET
+ 0x100,
94 .map_io
= mx51_map_io
,
95 .init_irq
= mx51_init_irq
,
96 .init_machine
= mxc_board_init
,