Thomas Gleixner | c942fdd | 2019-05-27 08:55:06 +0200 | [diff] [blame^] | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
Denis 'GNUtoo' Carikli | ea7ee4c | 2011-02-18 22:22:23 +0100 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2000 Deep Blue Solutions Ltd |
| 4 | * Copyright (C) 2002 Shane Nay (shane@minirl.com) |
| 5 | * Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved. |
| 6 | * Copyright 2011 Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> |
Denis 'GNUtoo' Carikli | ea7ee4c | 2011-02-18 22:22:23 +0100 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #include <linux/kernel.h> |
| 10 | #include <linux/init.h> |
| 11 | #include <linux/platform_device.h> |
| 12 | |
Denis 'GNUtoo' Carikli | ea7ee4c | 2011-02-18 22:22:23 +0100 | [diff] [blame] | 13 | #include <asm/mach/time.h> |
| 14 | #include <asm/mach/arch.h> |
| 15 | #include <asm/mach-types.h> |
| 16 | |
Shawn Guo | e337247 | 2012-09-13 21:01:00 +0800 | [diff] [blame] | 17 | #include "common.h" |
Denis 'GNUtoo' Carikli | ea7ee4c | 2011-02-18 22:22:23 +0100 | [diff] [blame] | 18 | #include "devices-imx31.h" |
Shawn Guo | 50f2de6 | 2012-09-14 14:14:45 +0800 | [diff] [blame] | 19 | #include "hardware.h" |
Shawn Guo | 267dd34 | 2012-09-13 13:26:00 +0800 | [diff] [blame] | 20 | #include "iomux-mx3.h" |
Denis 'GNUtoo' Carikli | ea7ee4c | 2011-02-18 22:22:23 +0100 | [diff] [blame] | 21 | |
| 22 | static const struct imxuart_platform_data uart_pdata __initconst = { |
| 23 | .flags = IMXUART_HAVE_RTSCTS, |
| 24 | }; |
| 25 | |
| 26 | static const unsigned int bug_pins[] __initconst = { |
| 27 | MX31_PIN_PC_RST__CTS5, |
| 28 | MX31_PIN_PC_VS2__RTS5, |
| 29 | MX31_PIN_PC_BVD2__TXD5, |
| 30 | MX31_PIN_PC_BVD1__RXD5, |
| 31 | }; |
| 32 | |
| 33 | static void __init bug_board_init(void) |
| 34 | { |
Shawn Guo | b78d8e5 | 2011-06-06 00:07:55 +0800 | [diff] [blame] | 35 | imx31_soc_init(); |
| 36 | |
Denis 'GNUtoo' Carikli | ea7ee4c | 2011-02-18 22:22:23 +0100 | [diff] [blame] | 37 | mxc_iomux_setup_multiple_pins(bug_pins, |
| 38 | ARRAY_SIZE(bug_pins), "uart-4"); |
| 39 | imx31_add_imx_uart4(&uart_pdata); |
| 40 | } |
| 41 | |
| 42 | static void __init bug_timer_init(void) |
| 43 | { |
| 44 | mx31_clocks_init(26000000); |
| 45 | } |
| 46 | |
Denis 'GNUtoo' Carikli | ea7ee4c | 2011-02-18 22:22:23 +0100 | [diff] [blame] | 47 | MACHINE_START(BUG, "BugLabs BUGBase") |
| 48 | .map_io = mx31_map_io, |
| 49 | .init_early = imx31_init_early, |
| 50 | .init_irq = mx31_init_irq, |
Stephen Warren | 6bb27d7 | 2012-11-08 12:40:59 -0700 | [diff] [blame] | 51 | .init_time = bug_timer_init, |
Denis 'GNUtoo' Carikli | ea7ee4c | 2011-02-18 22:22:23 +0100 | [diff] [blame] | 52 | .init_machine = bug_board_init, |
Russell King | 65ea788 | 2011-11-06 17:12:08 +0000 | [diff] [blame] | 53 | .restart = mxc_restart, |
Denis 'GNUtoo' Carikli | ea7ee4c | 2011-02-18 22:22:23 +0100 | [diff] [blame] | 54 | MACHINE_END |