aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/plat-samsung
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-11-21 11:30:32 -0800
committerOlof Johansson <olof@lixom.net>2012-11-21 11:30:32 -0800
commit24025f6f5821bf3715b283f6490212ac44d6a4fe (patch)
treecb6fe5b1f7f389f1a5f38c10fb390c9fdb7be7f8 /arch/arm/plat-samsung
parente642779b4994638d063e2f3ceedb99a565d98dfa (diff)
parentc47d244a646d08e2161b7fa22c5512e7988762ae (diff)
Merge branch 'next/dt-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/dt
From Kukjin Kim: Here is Samsung DT for v3.8 and this is including DT for EXYNOS4X12 SoC, SMDK4412 board, pinctrl for exynos4x12, TMU, MFC, SATA and SATA PHY. As I commented on [4/7], this branch merged pinctrl/samsung to support pinctrl for exynos4x12 without useless merge conflicts. * 'next/dt-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: (32 commits) ARM: EXYNOS: DT Support for SATA and SATA PHY ARM: dts: Remove broken-voltage property from sdhci node for exynos4210-trats ARM: dts: Add node for touchscreen for exynos4210-trats ARM: dts: Add node for touchscreen voltage regulator for exynos4210-trats ARM: dts: Add node for i2c3 bus for exynos4210-trats ARM: dts: Add nodes for GPIO keys available on Trats ARM: dts: Update for pinctrl-samsung driver for exynos4210-trats ARM: dts: Add nodes for pin controllers for exynos4x12 pinctrl: samsung: Add support for EXYNOS4X12 gpio: samsung: Skip registration if pinctrl driver is present on EXYNOS4X12 ARM: EXYNOS: Skip wakeup-int setup if pinctrl driver is used on EXYNOS4X12 ARM: dts: add board dts file for EXYNOS4412 based SMDK board ARM: dts: Add support for EXYNOS4X12 SoCs ARM: EXYNOS: Add devicetree node for TMU driver for exynos5 ARM: EXYNOS: Add devicetree node for TMU driver for exynos4 ARM: EXYNOS: Add MFC device tree support ARM: dts: Enable serial controllers on Origen and SMDKV310 Documentation: Update samsung-pinctrl device tree bindings documentation pinctrl: samsung: Add GPIO to IRQ translation pinctrl: exynos: Set pin function to EINT in irq_set_type of wake-up EINT ... Add/add conflicts in: arch/arm/boot/dts/exynos5250-smdk5250.dts arch/arm/boot/dts/exynos5250.dtsi arch/arm/mach-exynos/mach-exynos5-dt.c Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/plat-samsung')
-rw-r--r--arch/arm/plat-samsung/devs.c1
-rw-r--r--arch/arm/plat-samsung/include/plat/mfc.h11
-rw-r--r--arch/arm/plat-samsung/s5p-dev-mfc.c34
3 files changed, 46 insertions, 0 deletions
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index 03f654d55ef..52dfa8f914c 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -933,6 +933,7 @@ struct platform_device s5p_device_mfc_r = {
.coherent_dma_mask = DMA_BIT_MASK(32),
},
};
+
#endif /* CONFIG_S5P_DEV_MFC */
/* MIPI CSIS */
diff --git a/arch/arm/plat-samsung/include/plat/mfc.h b/arch/arm/plat-samsung/include/plat/mfc.h
index ac13227272f..e6d7c42d68b 100644
--- a/arch/arm/plat-samsung/include/plat/mfc.h
+++ b/arch/arm/plat-samsung/include/plat/mfc.h
@@ -10,6 +10,14 @@
#ifndef __PLAT_SAMSUNG_MFC_H
#define __PLAT_SAMSUNG_MFC_H __FILE__
+struct s5p_mfc_dt_meminfo {
+ unsigned long loff;
+ unsigned long lsize;
+ unsigned long roff;
+ unsigned long rsize;
+ char *compatible;
+};
+
/**
* s5p_mfc_reserve_mem - function to early reserve memory for MFC driver
* @rbase: base address for MFC 'right' memory interface
@@ -24,4 +32,7 @@
void __init s5p_mfc_reserve_mem(phys_addr_t rbase, unsigned int rsize,
phys_addr_t lbase, unsigned int lsize);
+int __init s5p_fdt_find_mfc_mem(unsigned long node, const char *uname,
+ int depth, void *data);
+
#endif /* __PLAT_SAMSUNG_MFC_H */
diff --git a/arch/arm/plat-samsung/s5p-dev-mfc.c b/arch/arm/plat-samsung/s5p-dev-mfc.c
index ad6089465e2..5ec104b5408 100644
--- a/arch/arm/plat-samsung/s5p-dev-mfc.c
+++ b/arch/arm/plat-samsung/s5p-dev-mfc.c
@@ -14,6 +14,8 @@
#include <linux/dma-mapping.h>
#include <linux/memblock.h>
#include <linux/ioport.h>
+#include <linux/of_fdt.h>
+#include <linux/of.h>
#include <mach/map.h>
#include <plat/devs.h>
@@ -69,3 +71,35 @@ static int __init s5p_mfc_memory_init(void)
return 0;
}
device_initcall(s5p_mfc_memory_init);
+
+#ifdef CONFIG_OF
+int __init s5p_fdt_find_mfc_mem(unsigned long node, const char *uname,
+ int depth, void *data)
+{
+ __be32 *prop;
+ unsigned long len;
+ struct s5p_mfc_dt_meminfo *mfc_mem = data;
+
+ if (!data)
+ return 0;
+
+ if (!of_flat_dt_is_compatible(node, mfc_mem->compatible))
+ return 0;
+
+ prop = of_get_flat_dt_prop(node, "samsung,mfc-l", &len);
+ if (!prop || (len != 2 * sizeof(unsigned long)))
+ return 0;
+
+ mfc_mem->loff = be32_to_cpu(prop[0]);
+ mfc_mem->lsize = be32_to_cpu(prop[1]);
+
+ prop = of_get_flat_dt_prop(node, "samsung,mfc-r", &len);
+ if (!prop || (len != 2 * sizeof(unsigned long)))
+ return 0;
+
+ mfc_mem->roff = be32_to_cpu(prop[0]);
+ mfc_mem->rsize = be32_to_cpu(prop[1]);
+
+ return 1;
+}
+#endif