Commit | Line | Data |
---|---|---|
6c18c91b VR |
1 | /* |
2 | * Hawkboard.org based on TI's OMAP-L138 Platform | |
3 | * | |
4 | * Initial code: Syed Mohammed Khasim | |
5 | * | |
6 | * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com | |
7 | * | |
8 | * This file is licensed under the terms of the GNU General Public License | |
9 | * version 2. This program is licensed "as is" without any warranty of | |
10 | * any kind, whether express or implied. | |
11 | */ | |
12 | #include <linux/kernel.h> | |
13 | #include <linux/init.h> | |
14 | #include <linux/console.h> | |
15 | #include <linux/gpio.h> | |
16 | ||
17 | #include <asm/mach-types.h> | |
18 | #include <asm/mach/arch.h> | |
19 | ||
20 | #include <mach/cp_intc.h> | |
21 | #include <mach/da8xx.h> | |
22 | ||
23 | static struct davinci_uart_config omapl138_hawk_uart_config __initdata = { | |
24 | .enabled_uarts = 0x7, | |
25 | }; | |
26 | ||
27 | static __init void omapl138_hawk_init(void) | |
28 | { | |
29 | int ret; | |
30 | ||
31 | davinci_serial_init(&omapl138_hawk_uart_config); | |
32 | ||
33 | ret = da8xx_register_watchdog(); | |
34 | if (ret) | |
35 | pr_warning("omapl138_hawk_init: " | |
36 | "watchdog registration failed: %d\n", | |
37 | ret); | |
38 | } | |
39 | ||
40 | #ifdef CONFIG_SERIAL_8250_CONSOLE | |
41 | static int __init omapl138_hawk_console_init(void) | |
42 | { | |
43 | if (!machine_is_omapl138_hawkboard()) | |
44 | return 0; | |
45 | ||
46 | return add_preferred_console("ttyS", 2, "115200"); | |
47 | } | |
48 | console_initcall(omapl138_hawk_console_init); | |
49 | #endif | |
50 | ||
51 | static void __init omapl138_hawk_map_io(void) | |
52 | { | |
53 | da850_init(); | |
54 | } | |
55 | ||
56 | MACHINE_START(OMAPL138_HAWKBOARD, "AM18x/OMAP-L138 Hawkboard") | |
6c18c91b VR |
57 | .boot_params = (DA8XX_DDR_BASE + 0x100), |
58 | .map_io = omapl138_hawk_map_io, | |
59 | .init_irq = cp_intc_init, | |
60 | .timer = &davinci_timer, | |
61 | .init_machine = omapl138_hawk_init, | |
62 | MACHINE_END |