aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-exynos
diff options
context:
space:
mode:
authorArun Kumar K <arun.kk@samsung.com>2012-10-23 09:51:33 -0400
committerKukjin Kim <kgene.kim@samsung.com>2012-10-18 21:26:31 -0400
commit2eae613b95a786714bd1b5825ea3abc78d229d3f (patch)
tree01999929d439e632ee08e1f3ec79bf5cd1ba3d28 /arch/arm/mach-exynos
parent70191db9308e33b5d0063f3a4a6ad22abf594a9d (diff)
ARM: EXYNOS: Add MFC device tree support
This patch adds device tree entry for MFC v6 in the Exynos5 SoC. Makes the required changes in the clock files and adds MFC to the DT device list. Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Signed-off-by: Arun Kumar K <arun.kk@samsung.com> [kgene.kim@samsung.com: fixed section mismatches Seung-Woo Kim reported] Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-exynos')
-rw-r--r--arch/arm/mach-exynos/Kconfig1
-rw-r--r--arch/arm/mach-exynos/clock-exynos5.c2
-rw-r--r--arch/arm/mach-exynos/mach-exynos5-dt.c16
3 files changed, 18 insertions, 1 deletions
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index da55107033dd..bb3b09aa9183 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -63,6 +63,7 @@ config SOC_EXYNOS5250
63 depends on ARCH_EXYNOS5 63 depends on ARCH_EXYNOS5
64 select S5P_PM if PM 64 select S5P_PM if PM
65 select S5P_SLEEP if PM 65 select S5P_SLEEP if PM
66 select S5P_DEV_MFC
66 select SAMSUNG_DMADEV 67 select SAMSUNG_DMADEV
67 help 68 help
68 Enable EXYNOS5250 SoC support 69 Enable EXYNOS5250 SoC support
diff --git a/arch/arm/mach-exynos/clock-exynos5.c b/arch/arm/mach-exynos/clock-exynos5.c
index c44ca1ee1b8d..8c4e3253cdb0 100644
--- a/arch/arm/mach-exynos/clock-exynos5.c
+++ b/arch/arm/mach-exynos/clock-exynos5.c
@@ -664,7 +664,7 @@ static struct clk exynos5_init_clocks_off[] = {
664 .ctrlbit = (1 << 25), 664 .ctrlbit = (1 << 25),
665 }, { 665 }, {
666 .name = "mfc", 666 .name = "mfc",
667 .devname = "s5p-mfc", 667 .devname = "s5p-mfc-v6",
668 .enable = exynos5_clk_ip_mfc_ctrl, 668 .enable = exynos5_clk_ip_mfc_ctrl,
669 .ctrlbit = (1 << 0), 669 .ctrlbit = (1 << 0),
670 }, { 670 }, {
diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c
index db1cd8eacf28..b7f1154088bd 100644
--- a/arch/arm/mach-exynos/mach-exynos5-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos5-dt.c
@@ -11,6 +11,8 @@
11 11
12#include <linux/of_platform.h> 12#include <linux/of_platform.h>
13#include <linux/serial_core.h> 13#include <linux/serial_core.h>
14#include <linux/memblock.h>
15#include <linux/of_fdt.h>
14 16
15#include <asm/mach/arch.h> 17#include <asm/mach/arch.h>
16#include <asm/hardware/gic.h> 18#include <asm/hardware/gic.h>
@@ -18,6 +20,7 @@
18 20
19#include <plat/cpu.h> 21#include <plat/cpu.h>
20#include <plat/regs-serial.h> 22#include <plat/regs-serial.h>
23#include <plat/mfc.h>
21 24
22#include "common.h" 25#include "common.h"
23 26
@@ -72,6 +75,7 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = {
72 "exynos-gsc.2", NULL), 75 "exynos-gsc.2", NULL),
73 OF_DEV_AUXDATA("samsung,exynos5-gsc", EXYNOS5_PA_GSC3, 76 OF_DEV_AUXDATA("samsung,exynos5-gsc", EXYNOS5_PA_GSC3,
74 "exynos-gsc.3", NULL), 77 "exynos-gsc.3", NULL),
78 OF_DEV_AUXDATA("samsung,mfc-v6", 0x11000000, "s5p-mfc-v6", NULL),
75 {}, 79 {},
76}; 80};
77 81
@@ -92,6 +96,17 @@ static char const *exynos5250_dt_compat[] __initdata = {
92 NULL 96 NULL
93}; 97};
94 98
99static void __init exynos5_reserve(void)
100{
101 struct s5p_mfc_dt_meminfo mfc_mem;
102
103 /* Reserve memory for MFC only if it's available */
104 mfc_mem.compatible = "samsung,mfc-v6";
105 if (of_scan_flat_dt(s5p_fdt_find_mfc_mem, &mfc_mem))
106 s5p_mfc_reserve_mem(mfc_mem.roff, mfc_mem.rsize, mfc_mem.loff,
107 mfc_mem.lsize);
108}
109
95DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)") 110DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)")
96 /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ 111 /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
97 .init_irq = exynos5_init_irq, 112 .init_irq = exynos5_init_irq,
@@ -103,4 +118,5 @@ DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)")
103 .timer = &exynos4_timer, 118 .timer = &exynos4_timer,
104 .dt_compat = exynos5250_dt_compat, 119 .dt_compat = exynos5250_dt_compat,
105 .restart = exynos5_restart, 120 .restart = exynos5_restart,
121 .reserve = exynos5_reserve,
106MACHINE_END 122MACHINE_END