mach-exynos4-dt.c 1.7 KB
Newer Older
1
/*
2
 * Samsung's EXYNOS4 flattened device tree enabled machine
3 4 5 6 7 8 9 10 11 12 13
 *
 * 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.
*/

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
#include <linux/clocksource.h>
20 21

#include <asm/mach/arch.h>
22
#include <plat/mfc.h>
23 24

#include "common.h"
25

26
static void __init exynos4_dt_machine_init(void)
27
{
28 29
	exynos_cpuidle_init();

30
	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
31 32
}

33
static char const *exynos4_dt_compat[] __initdata = {
34
	"samsung,exynos4210",
35 36
	"samsung,exynos4212",
	"samsung,exynos4412",
37 38 39
	NULL
};

40 41 42 43 44 45 46 47 48 49 50 51
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
}
52 53
DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)")
	/* Maintainer: Thomas Abraham <thomas.abraham@linaro.org> */
54
	.smp		= smp_ops(exynos_smp_ops),
55
	.map_io		= exynos_init_io,
56
	.init_early	= exynos_firmware_init,
57
	.init_machine	= exynos4_dt_machine_init,
58
	.init_late	= exynos_init_late,
59
	.init_time	= exynos_init_time,
60
	.dt_compat	= exynos4_dt_compat,
61
	.restart        = exynos4_restart,
62
	.reserve	= exynos4_reserve,
63
MACHINE_END