diff options
author | Chanwoo Choi <cw00.choi@samsung.com> | 2013-12-20 19:39:16 +0900 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-11-18 12:00:10 +0900 |
commit | 2528fd42693d5528f81a16d07d92415443fd4eb8 (patch) | |
tree | 68108e865c4141998c651bf42503fdef2fdb26e1 /arch/arm/mach-exynos | |
parent | 4146a00832bc95fea8cd23d35ad6ef6ac92b77a8 (diff) | |
download | linux-3.10-2528fd42693d5528f81a16d07d92415443fd4eb8.tar.gz linux-3.10-2528fd42693d5528f81a16d07d92415443fd4eb8.tar.bz2 linux-3.10-2528fd42693d5528f81a16d07d92415443fd4eb8.zip |
ARM: exynos3: Add Exynos3's machine_desc structure to support Device Tree
This patch add Exynos4's machine desc structure to support Device Tree.
The dt driver of Exynos3 SoC include dt compatible string of Exynos3250.
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'arch/arm/mach-exynos')
-rw-r--r-- | arch/arm/mach-exynos/Kconfig | 14 | ||||
-rw-r--r-- | arch/arm/mach-exynos/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-exynos/common.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-exynos/common.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-exynos/mach-exynos3-dt.c | 48 |
5 files changed, 71 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 5ef335237e6..537153b2181 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -433,6 +433,20 @@ endif comment "Flattened Device Tree based board for EXYNOS SoCs" +config MACH_EXYNOS3_DT + bool "Samsung Exynos3 Machine using device tree" + depends on ARCH_EXYNOS3 + select ARM_AMBA + select CLKSRC_OF + select SOC_EXYNOS3250 + select USE_OF + select TIZEN_WIP + help + Machine support for Samsung Exynos3 machine with device tree enabled. + Select this if a fdt blob is available for the Exynos3 SoC based board. + Note: This is under development and not all peripherals can be supported + with this machine file. + config MACH_EXYNOS4_DT bool "Samsung Exynos4 Machine using device tree" depends on ARCH_EXYNOS4 diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile index 9f6844cf498..636e54181f3 100644 --- a/arch/arm/mach-exynos/Makefile +++ b/arch/arm/mach-exynos/Makefile @@ -43,6 +43,7 @@ obj-$(CONFIG_MACH_ORIGEN) += mach-origen.o obj-$(CONFIG_MACH_SMDK4212) += mach-smdk4x12.o obj-$(CONFIG_MACH_SMDK4412) += mach-smdk4x12.o +obj-$(CONFIG_MACH_EXYNOS3_DT) += mach-exynos3-dt.o obj-$(CONFIG_MACH_EXYNOS4_DT) += mach-exynos4-dt.o obj-$(CONFIG_MACH_EXYNOS5_DT) += mach-exynos5-dt.o diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 20b98e05418..a68da003299 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c @@ -601,6 +601,13 @@ static unsigned int max_combiner_nr(void) return EXYNOS4210_MAX_COMBINER_NR; } +void __init exynos3_init_irq(void) +{ +#ifdef CONFIG_OF + irqchip_init(); +#endif + gic_arch_extn.irq_set_wake = s3c_irq_wake; +} void __init exynos4_init_irq(void) { diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h index eeed0c56403..ebe1158dc53 100644 --- a/arch/arm/mach-exynos/common.h +++ b/arch/arm/mach-exynos/common.h @@ -20,6 +20,7 @@ extern unsigned long xxti_f, xusbxti_f; struct map_desc; void exynos_init_io(struct map_desc *mach_desc, int size); +void exynos3_init_irq(void); void exynos4_init_irq(void); void exynos5_init_irq(void); void exynos4_restart(char mode, const char *cmd); diff --git a/arch/arm/mach-exynos/mach-exynos3-dt.c b/arch/arm/mach-exynos/mach-exynos3-dt.c new file mode 100644 index 00000000000..c329031c082 --- /dev/null +++ b/arch/arm/mach-exynos/mach-exynos3-dt.c @@ -0,0 +1,48 @@ +/* + * Samsung's EXYNOS3 flattened device tree enabled machine + * + * Copyright (c) 2013 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 <linux/kernel.h> +#include <linux/of_platform.h> +#include <linux/serial_core.h> +#include <linux/clocksource.h> + +#include <asm/mach/arch.h> + +#include "common.h" + +static void __init exynos3_dt_map_io(void) +{ + exynos_init_io(NULL, 0); +} + +static void __init exynos3_dt_machine_init(void) +{ + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); +} + +static char const *exynos3_dt_compat[] __initdata = { + "samsung,exynos3250", + NULL +}; + +DT_MACHINE_START(EXYNOS3250_DT, "Samsung Exynos3 (Flattened Device Tree)") + .smp = smp_ops(exynos_smp_ops), + .init_irq = exynos3_init_irq, + .map_io = exynos3_dt_map_io, + .init_early = exynos_firmware_init, + .init_machine = exynos3_dt_machine_init, + .init_late = exynos_init_late, + .init_time = exynos_init_time, + .dt_compat = exynos3_dt_compat, + .restart = exynos4_restart, +MACHINE_END |