ARM: SAMSUNG: Reorganize calls to reserve memory for MFC
authorTushar Behera <tushar.behera@linaro.org>
Thu, 20 Mar 2014 16:49:24 +0000 (01:49 +0900)
committerKukjin Kim <kgene.kim@samsung.com>
Thu, 20 Mar 2014 17:00:09 +0000 (02:00 +0900)
Reorganize code so that "plat/mfc.h" is no more referred
from mach-exynos directory.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
arch/arm/mach-exynos/mach-exynos4-dt.c
arch/arm/mach-exynos/mach-exynos5-dt.c
arch/arm/mach-exynos/mfc.h [new file with mode: 0644]
arch/arm/plat-samsung/include/plat/mfc.h
arch/arm/plat-samsung/s5p-dev-mfc.c

index d3e54b7..fa019fd 100644 (file)
@@ -15,9 +15,9 @@
 #include <linux/of_fdt.h>
 
 #include <asm/mach/arch.h>
-#include <plat/mfc.h>
 
 #include "common.h"
+#include "mfc.h"
 
 static void __init exynos4_dt_machine_init(void)
 {
@@ -37,13 +37,7 @@ static char const *exynos4_dt_compat[] __initdata = {
 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);
+       of_scan_flat_dt(s5p_fdt_alloc_mfc_mem, "samsung,mfc-v5");
 #endif
 }
 DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)")
index 37ea261..9586439 100644 (file)
@@ -14,9 +14,9 @@
 #include <linux/io.h>
 
 #include <asm/mach/arch.h>
-#include <plat/mfc.h>
 
 #include "common.h"
+#include "mfc.h"
 #include "regs-pmu.h"
 
 static void __init exynos5_dt_machine_init(void)
@@ -59,13 +59,7 @@ static char const *exynos5_dt_compat[] __initdata = {
 static void __init exynos5_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-v6";
-       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);
+       of_scan_flat_dt(s5p_fdt_alloc_mfc_mem, "samsung,mfc-v6");
 #endif
 }
 
Simple merge
Simple merge