]> git.karo-electronics.de Git - karo-tx-linux.git/blob - arch/arm/mach-exynos/mach-exynos4-dt.c
Merge remote-tracking branch 'arm-soc/for-next'
[karo-tx-linux.git] / arch / arm / mach-exynos / mach-exynos4-dt.c
1 /*
2  * Samsung's EXYNOS4 flattened device tree enabled machine
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
14 #include <linux/kernel.h>
15 #include <linux/of_platform.h>
16 #include <linux/of_fdt.h>
17 #include <linux/serial_core.h>
18 #include <linux/memblock.h>
19
20 #include <asm/mach/arch.h>
21 #include <plat/mfc.h>
22
23 #include "common.h"
24
25 static void __init exynos4_dt_machine_init(void)
26 {
27         exynos_cpuidle_init();
28
29         of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
30 }
31
32 static char const *exynos4_dt_compat[] __initdata = {
33         "samsung,exynos4210",
34         "samsung,exynos4212",
35         "samsung,exynos4412",
36         NULL
37 };
38
39 static void __init exynos4_reserve(void)
40 {
41 #ifdef CONFIG_S5P_DEV_MFC
42         struct s5p_mfc_dt_meminfo mfc_mem;
43
44         /* Reserve memory for MFC only if it's available */
45         mfc_mem.compatible = "samsung,mfc-v5";
46         if (of_scan_flat_dt(s5p_fdt_find_mfc_mem, &mfc_mem))
47                 s5p_mfc_reserve_mem(mfc_mem.roff, mfc_mem.rsize, mfc_mem.loff,
48                                 mfc_mem.lsize);
49 #endif
50 }
51 DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)")
52         /* Maintainer: Thomas Abraham <thomas.abraham@linaro.org> */
53         .smp            = smp_ops(exynos_smp_ops),
54         .map_io         = exynos_init_io,
55         .init_early     = exynos_firmware_init,
56         .init_machine   = exynos4_dt_machine_init,
57         .init_late      = exynos_init_late,
58         .dt_compat      = exynos4_dt_compat,
59         .restart        = exynos4_restart,
60         .reserve        = exynos4_reserve,
61 MACHINE_END