blob: c97d7cb39135744ce03fe8d6d633eac45936a5db [file] [log] [blame]
Denis 'GNUtoo' Carikliea7ee4c2011-02-18 22:22:23 +01001/*
2 * Copyright (C) 2000 Deep Blue Solutions Ltd
3 * Copyright (C) 2002 Shane Nay (shane@minirl.com)
4 * Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved.
5 * Copyright 2011 Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 */
17
18#include <linux/kernel.h>
19#include <linux/init.h>
20#include <linux/platform_device.h>
21
Denis 'GNUtoo' Carikliea7ee4c2011-02-18 22:22:23 +010022#include <asm/mach/time.h>
23#include <asm/mach/arch.h>
24#include <asm/mach-types.h>
25
Shawn Guoe3372472012-09-13 21:01:00 +080026#include "common.h"
Denis 'GNUtoo' Carikliea7ee4c2011-02-18 22:22:23 +010027#include "devices-imx31.h"
Shawn Guo50f2de62012-09-14 14:14:45 +080028#include "hardware.h"
Shawn Guo267dd342012-09-13 13:26:00 +080029#include "iomux-mx3.h"
Denis 'GNUtoo' Carikliea7ee4c2011-02-18 22:22:23 +010030
31static const struct imxuart_platform_data uart_pdata __initconst = {
32 .flags = IMXUART_HAVE_RTSCTS,
33};
34
35static const unsigned int bug_pins[] __initconst = {
36 MX31_PIN_PC_RST__CTS5,
37 MX31_PIN_PC_VS2__RTS5,
38 MX31_PIN_PC_BVD2__TXD5,
39 MX31_PIN_PC_BVD1__RXD5,
40};
41
42static void __init bug_board_init(void)
43{
Shawn Guob78d8e52011-06-06 00:07:55 +080044 imx31_soc_init();
45
Denis 'GNUtoo' Carikliea7ee4c2011-02-18 22:22:23 +010046 mxc_iomux_setup_multiple_pins(bug_pins,
47 ARRAY_SIZE(bug_pins), "uart-4");
48 imx31_add_imx_uart4(&uart_pdata);
49}
50
51static void __init bug_timer_init(void)
52{
53 mx31_clocks_init(26000000);
54}
55
Denis 'GNUtoo' Carikliea7ee4c2011-02-18 22:22:23 +010056MACHINE_START(BUG, "BugLabs BUGBase")
57 .map_io = mx31_map_io,
58 .init_early = imx31_init_early,
59 .init_irq = mx31_init_irq,
Stephen Warren6bb27d72012-11-08 12:40:59 -070060 .init_time = bug_timer_init,
Denis 'GNUtoo' Carikliea7ee4c2011-02-18 22:22:23 +010061 .init_machine = bug_board_init,
Russell King65ea7882011-11-06 17:12:08 +000062 .restart = mxc_restart,
Denis 'GNUtoo' Carikliea7ee4c2011-02-18 22:22:23 +010063MACHINE_END