From 8e4bff4cab0ddac6060645b0715210484d02ff40 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Wed, 30 Aug 2017 08:25:59 +0000 Subject: Initial file dump from open source release --- arch/arm/mach-exynos/mach-exynos4-dt.c | 67 ++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 arch/arm/mach-exynos/mach-exynos4-dt.c (limited to 'arch/arm/mach-exynos/mach-exynos4-dt.c') diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c b/arch/arm/mach-exynos/mach-exynos4-dt.c new file mode 100644 index 00000000..b9ed834a --- /dev/null +++ b/arch/arm/mach-exynos/mach-exynos4-dt.c @@ -0,0 +1,67 @@ +/* + * Samsung's EXYNOS4 flattened device tree enabled machine + * + * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * Copyright (c) 2010-2011 Linaro Ltd. + * www.linaro.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "common.h" + +static void __init exynos4_dt_map_io(void) +{ + exynos_init_io(NULL, 0); +} + +static void __init exynos4_dt_machine_init(void) +{ + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); +} + +static char const *exynos4_dt_compat[] __initdata = { + "samsung,exynos4210", + "samsung,exynos4212", + "samsung,exynos4412", + NULL +}; + +static void __init exynos4_reserve(void) +{ +#ifdef CONFIG_S5P_DEV_MFC + struct s5p_mfc_dt_meminfo mfc_mem; + + /* Reserve memory for MFC only if it's available */ + mfc_mem.compatible = "samsung,mfc-v5"; + if (of_scan_flat_dt(s5p_fdt_find_mfc_mem, &mfc_mem)) + s5p_mfc_reserve_mem(mfc_mem.roff, mfc_mem.rsize, mfc_mem.loff, + mfc_mem.lsize); +#endif +} +DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)") + /* Maintainer: Thomas Abraham */ + .smp = smp_ops(exynos_smp_ops), + .init_irq = exynos4_init_irq, + .map_io = exynos4_dt_map_io, + .init_early = exynos_firmware_init, + .init_machine = exynos4_dt_machine_init, + .init_late = exynos_init_late, + .init_time = exynos_init_time, + .dt_compat = exynos4_dt_compat, + .restart = exynos4_restart, + .reserve = exynos4_reserve, +MACHINE_END -- cgit v1.3.1