[PATCH 6/7] ARM: S5PV210: enable FIMC on Aquila
Sylwester Nawrocki
s.nawrocki at samsung.com
Wed Jun 16 06:12:02 EDT 2010
Add support for FIMC on Samsung Aquila board. Enable support for local
path mode between fimc and frame buffer.
Signed-off-by: Sylwester Nawrocki <s.nawrocki at samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski at samsung.com>
---
arch/arm/mach-s5pv210/Kconfig | 6 ++++
arch/arm/mach-s5pv210/mach-aquila.c | 51 +++++++++++++++++++++++++++++++++++
2 files changed, 57 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
index 7cbba86..65635ef 100644
--- a/arch/arm/mach-s5pv210/Kconfig
+++ b/arch/arm/mach-s5pv210/Kconfig
@@ -66,6 +66,12 @@ config MACH_AQUILA
select ARCH_SPARSEMEM_ENABLE
select S5PV210_SETUP_FB_24BPP
select S3C_DEV_FB
+ select S5P_DEV_FIMC0
+ select S5PV210_SETUP_FIMC0
+ select S5P_DEV_FIMC1
+ select S5PV210_SETUP_FIMC1
+ select S5P_DEV_FIMC2
+ select S5PV210_SETUP_FIMC2
help
Machine support for the Samsung Aquila target based on S5PC110 SoC
diff --git a/arch/arm/mach-s5pv210/mach-aquila.c b/arch/arm/mach-s5pv210/mach-aquila.c
index 10bc76e..8af0db8 100644
--- a/arch/arm/mach-s5pv210/mach-aquila.c
+++ b/arch/arm/mach-s5pv210/mach-aquila.c
@@ -13,6 +13,7 @@
#include <linux/init.h>
#include <linux/serial_core.h>
#include <linux/fb.h>
+#include <linux/clk.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
@@ -28,6 +29,8 @@
#include <plat/devs.h>
#include <plat/cpu.h>
#include <plat/fb.h>
+#include <plat/fimc.h>
+#include <plat/fifo.h>
/* Following are default values for UCON, ULCON and UFCON UART registers */
#define S5PV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
@@ -116,8 +119,44 @@ static struct s3c_fb_platdata aquila_lcd_pdata __initdata = {
.setup_gpio = s5pv210_fb_gpio_setup_24bpp,
};
+static void __init aquila_fimc_clk_init(void)
+{
+ int i;
+ struct clk *clk_fimc, *parent;
+ struct s5p_platform_fimc *pldata;
+
+ struct device *fimc_devs[] = {
+ &s5p_device_fimc0.dev,
+ &s5p_device_fimc1.dev,
+ &s5p_device_fimc2.dev
+ };
+
+ parent = clk_get(NULL, "mout_epll");
+ if (IS_ERR(parent))
+ return;
+
+ for (i = 0; i < ARRAY_SIZE(fimc_devs); i++) {
+ if (fimc_devs[i]) {
+ clk_fimc = clk_get(fimc_devs[i], "sclk_fimc");
+
+ if (IS_ERR(clk_fimc))
+ continue;
+
+ clk_set_parent(clk_fimc, parent);
+ pldata = fimc_devs[i]->platform_data;
+ if (pldata)
+ clk_set_rate(clk_fimc, 133000000);
+ clk_enable(clk_fimc);
+ }
+ }
+ clk_put(parent);
+}
+
static struct platform_device *aquila_devices[] __initdata = {
&s3c_device_fb,
+ &s5p_device_fimc0,
+ &s5p_device_fimc1,
+ &s5p_device_fimc2,
};
static void __init aquila_map_io(void)
@@ -129,10 +168,22 @@ static void __init aquila_map_io(void)
static void __init aquila_machine_init(void)
{
+ /* FIMC */
+ s5p_fimc0_set_platdata(NULL);
+ s5p_fimc1_set_platdata(NULL);
+ s5p_fimc2_set_platdata(NULL);
+
/* FB */
s3c_fb_set_platdata(&aquila_lcd_pdata);
+ /* FIMC->FB fifo links */
+ s5pv210_setup_fimc0_fb_link();
+ s5pv210_setup_fimc1_fb_link();
+ s5pv210_setup_fimc2_fb_link();
+
platform_add_devices(aquila_devices, ARRAY_SIZE(aquila_devices));
+
+ aquila_fimc_clk_init();
}
MACHINE_START(AQUILA, "Aquila")
--
1.7.0.4
More information about the linux-arm-kernel
mailing list