Thomas Abraham | 6b5ab4f | 2011-11-06 21:54:27 +0530 | [diff] [blame] | 1 | /* |
Tomasz Figa | 3579a582 | 2012-09-21 10:13:29 +0900 | [diff] [blame] | 2 | * Samsung's EXYNOS4 flattened device tree enabled machine |
Thomas Abraham | 6b5ab4f | 2011-11-06 21:54:27 +0530 | [diff] [blame] | 3 | * |
| 4 | * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. |
| 5 | * http://www.samsung.com |
| 6 | * Copyright (c) 2010-2011 Linaro Ltd. |
| 7 | * www.linaro.org |
| 8 | * |
| 9 | * This program is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU General Public License version 2 as |
| 11 | * published by the Free Software Foundation. |
| 12 | */ |
| 13 | |
Thomas Abraham | ee6c7137 | 2013-03-09 17:10:23 +0900 | [diff] [blame] | 14 | #include <linux/kernel.h> |
Thomas Abraham | 6b5ab4f | 2011-11-06 21:54:27 +0530 | [diff] [blame] | 15 | #include <linux/of_platform.h> |
Sachin Kamat | 20901f7 | 2013-02-08 13:58:17 -0800 | [diff] [blame] | 16 | #include <linux/of_fdt.h> |
Thomas Abraham | 6b5ab4f | 2011-11-06 21:54:27 +0530 | [diff] [blame] | 17 | #include <linux/serial_core.h> |
Sachin Kamat | 20901f7 | 2013-02-08 13:58:17 -0800 | [diff] [blame] | 18 | #include <linux/memblock.h> |
Thomas Abraham | 9fbf0c8 | 2013-03-09 16:10:03 +0900 | [diff] [blame] | 19 | #include <linux/clocksource.h> |
Thomas Abraham | 6b5ab4f | 2011-11-06 21:54:27 +0530 | [diff] [blame] | 20 | |
| 21 | #include <asm/mach/arch.h> |
Sachin Kamat | 20901f7 | 2013-02-08 13:58:17 -0800 | [diff] [blame] | 22 | #include <plat/mfc.h> |
Karol Lewandowski | 35bded8 | 2012-02-08 11:42:39 +0900 | [diff] [blame] | 23 | |
| 24 | #include "common.h" |
Thomas Abraham | 6b5ab4f | 2011-11-06 21:54:27 +0530 | [diff] [blame] | 25 | |
Tomasz Figa | 3579a582 | 2012-09-21 10:13:29 +0900 | [diff] [blame] | 26 | static void __init exynos4_dt_machine_init(void) |
Thomas Abraham | 6b5ab4f | 2011-11-06 21:54:27 +0530 | [diff] [blame] | 27 | { |
Thomas Abraham | ee6c7137 | 2013-03-09 17:10:23 +0900 | [diff] [blame] | 28 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
Thomas Abraham | 6b5ab4f | 2011-11-06 21:54:27 +0530 | [diff] [blame] | 29 | } |
| 30 | |
Tomasz Figa | 3579a582 | 2012-09-21 10:13:29 +0900 | [diff] [blame] | 31 | static char const *exynos4_dt_compat[] __initdata = { |
Thomas Abraham | 6b5ab4f | 2011-11-06 21:54:27 +0530 | [diff] [blame] | 32 | "samsung,exynos4210", |
Tomasz Figa | 0f7238a | 2012-11-06 15:09:04 +0900 | [diff] [blame] | 33 | "samsung,exynos4212", |
| 34 | "samsung,exynos4412", |
Thomas Abraham | 6b5ab4f | 2011-11-06 21:54:27 +0530 | [diff] [blame] | 35 | NULL |
| 36 | }; |
| 37 | |
Sachin Kamat | 20901f7 | 2013-02-08 13:58:17 -0800 | [diff] [blame] | 38 | static void __init exynos4_reserve(void) |
| 39 | { |
| 40 | #ifdef CONFIG_S5P_DEV_MFC |
| 41 | struct s5p_mfc_dt_meminfo mfc_mem; |
| 42 | |
| 43 | /* Reserve memory for MFC only if it's available */ |
| 44 | mfc_mem.compatible = "samsung,mfc-v5"; |
| 45 | if (of_scan_flat_dt(s5p_fdt_find_mfc_mem, &mfc_mem)) |
| 46 | s5p_mfc_reserve_mem(mfc_mem.roff, mfc_mem.rsize, mfc_mem.loff, |
| 47 | mfc_mem.lsize); |
| 48 | #endif |
| 49 | } |
Thomas Abraham | 6b5ab4f | 2011-11-06 21:54:27 +0530 | [diff] [blame] | 50 | DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)") |
| 51 | /* Maintainer: Thomas Abraham <thomas.abraham@linaro.org> */ |
Tomasz Figa | 61ef3c0 | 2012-10-22 08:16:44 +0900 | [diff] [blame] | 52 | .smp = smp_ops(exynos_smp_ops), |
Arnd Bergmann | 0e2238e | 2013-06-19 01:36:47 +0900 | [diff] [blame] | 53 | .map_io = exynos_init_io, |
Tomasz Figa | bca28f8 | 2012-12-11 13:58:43 +0900 | [diff] [blame] | 54 | .init_early = exynos_firmware_init, |
Tomasz Figa | 3579a582 | 2012-09-21 10:13:29 +0900 | [diff] [blame] | 55 | .init_machine = exynos4_dt_machine_init, |
Shawn Guo | bb13fab | 2012-04-26 10:35:40 +0800 | [diff] [blame] | 56 | .init_late = exynos_init_late, |
Thomas Abraham | 6923ae4 | 2013-03-09 17:03:29 +0900 | [diff] [blame] | 57 | .init_time = exynos_init_time, |
Tomasz Figa | 3579a582 | 2012-09-21 10:13:29 +0900 | [diff] [blame] | 58 | .dt_compat = exynos4_dt_compat, |
Karol Lewandowski | 35bded8 | 2012-02-08 11:42:39 +0900 | [diff] [blame] | 59 | .restart = exynos4_restart, |
Sachin Kamat | 20901f7 | 2013-02-08 13:58:17 -0800 | [diff] [blame] | 60 | .reserve = exynos4_reserve, |
Thomas Abraham | 6b5ab4f | 2011-11-06 21:54:27 +0530 | [diff] [blame] | 61 | MACHINE_END |