linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] ARM: S5PV310: Add support FIMD
@ 2010-10-18 12:55 Sangbeom Kim
  2010-10-18 12:55 ` [PATCH 1/4] ARM: S5PV310: Add FIMD resource definition Sangbeom Kim
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Sangbeom Kim @ 2010-10-18 12:55 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds support FIMD(Fully Interactive Mobile Display) on S5PV310 and S5PC210.
The 3rd patch is update s3c-fb for it and others are for platform data.

[PATCH 1/4] ARM: S5PV310: Add FIMD resource definition
[PATCH 2/4] ARM: S5PV310: Add platform device and helper functions for FIMD
[PATCH 3/4] s3c-fb: Add support S5PV310 FIMD
[PATCH 4/4] ARM: S5PV310: Add platform data for S5PV310 FIMD and LTE480WV platform-lcd

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 1/4] ARM: S5PV310: Add FIMD resource definition
  2010-10-18 12:55 [PATCH 0/4] ARM: S5PV310: Add support FIMD Sangbeom Kim
@ 2010-10-18 12:55 ` Sangbeom Kim
  2010-10-18 12:55 ` [PATCH 2/4] ARM: S5PV310: Add platform device and helper functions for FIMD Sangbeom Kim
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 15+ messages in thread
From: Sangbeom Kim @ 2010-10-18 12:55 UTC (permalink / raw)
  To: linux-arm-kernel

From: Jonghun Han <jonghun.han@samsung.com>

This patch adds resource definitions for S5PV310 FIMD.
IRQ and SFR definitions are added.

Signed-off-by: Jonghun Han <jonghun.han@samsung.com>
Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
---
 arch/arm/mach-s5pv310/include/mach/irqs.h |    8 ++++++++
 arch/arm/mach-s5pv310/include/mach/map.h  |    5 +++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-s5pv310/include/mach/irqs.h b/arch/arm/mach-s5pv310/include/mach/irqs.h
index fa7a8a3..16a910d 100644
--- a/arch/arm/mach-s5pv310/include/mach/irqs.h
+++ b/arch/arm/mach-s5pv310/include/mach/irqs.h
@@ -54,6 +54,14 @@
 #define COMBINER_GROUP(x)	((x) * MAX_IRQ_IN_COMBINER + IRQ_SPI(64))
 #define COMBINER_IRQ(x, y)	(COMBINER_GROUP(x) + y)
 
+#define IRQ_FIMD0_FIFO		COMBINER_IRQ(11, 0)
+#define IRQ_FIMD0_VSYNC		COMBINER_IRQ(11, 1)
+#define IRQ_FIMD0_SYSTEM	COMBINER_IRQ(11, 2)
+
+#define IRQ_FIMD1_FIFO		COMBINER_IRQ(12, 0)
+#define IRQ_FIMD1_VSYNC		COMBINER_IRQ(12, 1)
+#define IRQ_FIMD1_SYSTEM	COMBINER_IRQ(12, 2)
+
 #define IRQ_TIMER0_VIC		COMBINER_IRQ(22, 0)
 #define IRQ_TIMER1_VIC		COMBINER_IRQ(22, 1)
 #define IRQ_TIMER2_VIC		COMBINER_IRQ(22, 2)
diff --git a/arch/arm/mach-s5pv310/include/mach/map.h b/arch/arm/mach-s5pv310/include/mach/map.h
index 1429510..65fe077 100644
--- a/arch/arm/mach-s5pv310/include/mach/map.h
+++ b/arch/arm/mach-s5pv310/include/mach/map.h
@@ -56,6 +56,9 @@
 #define S5PV310_PA_GPIO2		(0x11000000)
 #define S5PV310_PA_GPIO3		(0x03860000)
 
+#define S5PV310_PA_FIMD0		(0x11C00000)
+#define S5PV310_PA_FIMD1		(0x12000000)
+
 #define S5PV310_PA_HSMMC(x)		(0x12510000 + ((x) * 0x10000))
 
 #define S5PV310_PA_UART			(0x13800000)
@@ -78,6 +81,8 @@
 #define S5P_PA_SDRAM			S5PV310_PA_SDRAM
 
 /* compatibiltiy defines. */
+#define S5P_PA_FIMD0			S5PV310_PA_FIMD0
+#define S5P_PA_FIMD1			S5PV310_PA_FIMD1
 #define S3C_PA_UART			S5PV310_PA_UART
 #define S3C_PA_HSMMC0			S5PV310_PA_HSMMC(0)
 #define S3C_PA_HSMMC1			S5PV310_PA_HSMMC(1)
-- 
1.6.2.5


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 2/4] ARM: S5PV310: Add platform device and helper functions for FIMD
  2010-10-18 12:55 [PATCH 0/4] ARM: S5PV310: Add support FIMD Sangbeom Kim
  2010-10-18 12:55 ` [PATCH 1/4] ARM: S5PV310: Add FIMD resource definition Sangbeom Kim
@ 2010-10-18 12:55 ` Sangbeom Kim
  2010-10-18 12:55 ` [PATCH 3/4] s3c-fb: Add support S5PV310 FIMD Sangbeom Kim
  2010-10-18 12:55 ` [PATCH 4/4] ARM: S5PV310: Add platform data for S5PV310 FIMD and LTE480WV platform-lcd Sangbeom Kim
  3 siblings, 0 replies; 15+ messages in thread
From: Sangbeom Kim @ 2010-10-18 12:55 UTC (permalink / raw)
  To: linux-arm-kernel

From: Jonghun Han <jonghun.han@samsung.com>

This patch adds platform device s5p_device_fimd0 for S5PV310 FIMD0.
S5PV310 has two FIMDs(FIMD0, FIMD1). FIMD1 will be added later.
Some definitions used to enable S5PV310 FIMD0 are added.

Signed-off-by: Jonghun Han <jonghun.han@samsung.com>
Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
---
 arch/arm/mach-s5pv310/Kconfig                |    7 +++
 arch/arm/mach-s5pv310/Makefile               |    1 +
 arch/arm/mach-s5pv310/cpu.c                  |    3 +
 arch/arm/mach-s5pv310/include/mach/regs-fb.h |   21 ++++++++
 arch/arm/mach-s5pv310/setup-fimd0-24bpp.c    |   47 ++++++++++++++++++
 arch/arm/plat-s5p/Kconfig                    |    5 ++
 arch/arm/plat-s5p/Makefile                   |    1 +
 arch/arm/plat-s5p/dev-fimd0.c                |   67 ++++++++++++++++++++++++++
 arch/arm/plat-samsung/include/plat/devs.h    |    1 +
 arch/arm/plat-samsung/include/plat/fb-core.h |   15 ++++++
 10 files changed, 168 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-s5pv310/include/mach/regs-fb.h
 create mode 100644 arch/arm/mach-s5pv310/setup-fimd0-24bpp.c
 create mode 100644 arch/arm/plat-s5p/dev-fimd0.c

diff --git a/arch/arm/mach-s5pv310/Kconfig b/arch/arm/mach-s5pv310/Kconfig
index 1150b36..696f300 100644
--- a/arch/arm/mach-s5pv310/Kconfig
+++ b/arch/arm/mach-s5pv310/Kconfig
@@ -14,6 +14,11 @@ config CPU_S5PV310
 	help
 	  Enable S5PV310 CPU support
 
+config S5PV310_SETUP_FIMD0_24BPP
+	bool
+	help
+	  Common setup code for FIMD0 with an 24bpp RGB display helper.
+
 config S5PV310_SETUP_I2C1
 	bool
 	help
@@ -95,12 +100,14 @@ menu "S5PV310 Machines"
 config MACH_SMDKV310
 	bool "SMDKV310"
 	select CPU_S5PV310
+	select S5P_DEV_FIMD0
 	select S3C_DEV_RTC
 	select S3C_DEV_WDT
 	select S3C_DEV_HSMMC
 	select S3C_DEV_HSMMC1
 	select S3C_DEV_HSMMC2
 	select S3C_DEV_HSMMC3
+	select S5PV310_SETUP_FIMD0_24BPP
 	select S5PV310_SETUP_SDHCI
 	help
 	  Machine support for Samsung SMDKV310
diff --git a/arch/arm/mach-s5pv310/Makefile b/arch/arm/mach-s5pv310/Makefile
index 97aba6d..58bb305 100644
--- a/arch/arm/mach-s5pv310/Makefile
+++ b/arch/arm/mach-s5pv310/Makefile
@@ -28,6 +28,7 @@ obj-$(CONFIG_MACH_UNIVERSAL_C210)	+= mach-universal_c210.o
 
 # device support
 
+obj-$(CONFIG_S5PV310_SETUP_FIMD0_24BPP)	+= setup-fimd0-24bpp.o
 obj-$(CONFIG_S5PV310_SETUP_I2C1)	+= setup-i2c1.o
 obj-$(CONFIG_S5PV310_SETUP_I2C2)	+= setup-i2c2.o
 obj-$(CONFIG_S5PV310_SETUP_I2C3)	+= setup-i2c3.o
diff --git a/arch/arm/mach-s5pv310/cpu.c b/arch/arm/mach-s5pv310/cpu.c
index df00df0..f2817cd 100644
--- a/arch/arm/mach-s5pv310/cpu.c
+++ b/arch/arm/mach-s5pv310/cpu.c
@@ -18,6 +18,8 @@
 
 #include <plat/cpu.h>
 #include <plat/clock.h>
+#include <plat/devs.h>
+#include <plat/fb-core.h>
 #include <plat/s5pv310.h>
 #include <plat/sdhci.h>
 
@@ -105,6 +107,7 @@ void __init s5pv310_map_io(void)
 	s5pv310_default_sdhci1();
 	s5pv310_default_sdhci2();
 	s5pv310_default_sdhci3();
+	s5p_fb_setname(0, "s5pv310-fb");	/* FIMD0 */
 }
 
 void __init s5pv310_init_clocks(int xtal)
diff --git a/arch/arm/mach-s5pv310/include/mach/regs-fb.h b/arch/arm/mach-s5pv310/include/mach/regs-fb.h
new file mode 100644
index 0000000..f320105
--- /dev/null
+++ b/arch/arm/mach-s5pv310/include/mach/regs-fb.h
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2010 Ben Dooks <ben-linux@fluff.org>
+ *
+ * Dummy framebuffer to allow build for the moment.
+ *
+ * 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.
+*/
+
+#ifndef __ASM_ARCH_MACH_REGS_FB_H
+#define __ASM_ARCH_MACH_REGS_FB_H __FILE__
+
+#include <plat/regs-fb-v4.h>
+
+static inline unsigned int s3c_fb_pal_reg(unsigned int window, int reg)
+{
+	return 0x2400 + (window * 256 * 4) + reg;
+}
+
+#endif /* __ASM_ARCH_MACH_REGS_FB_H */
diff --git a/arch/arm/mach-s5pv310/setup-fimd0-24bpp.c b/arch/arm/mach-s5pv310/setup-fimd0-24bpp.c
new file mode 100644
index 0000000..7b6b182
--- /dev/null
+++ b/arch/arm/mach-s5pv310/setup-fimd0-24bpp.c
@@ -0,0 +1,47 @@
+/* linux/arch/arm/mach-s5pv310/setup-fimd0-24bpp.c
+ *
+ * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com
+ *
+ * Base s5pv210 setup information for 24bpp LCD framebuffer
+ *
+ * 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/types.h>
+#include <linux/fb.h>
+#include <linux/gpio.h>
+
+#include <plat/fb.h>
+#include <plat/gpio-cfg.h>
+
+#include <mach/regs-clock.h>
+#include <mach/regs-fb.h>
+#include <mach/map.h>
+
+void s5pv310_fimd0_gpio_setup_24bpp(void)
+{
+	unsigned int reg = 0;
+
+	s3c_gpio_cfgrange_nopull(S5PV310_GPF0(0), 8, S3C_GPIO_SFN(2));
+	s3c_gpio_cfgrange_nopull(S5PV310_GPF1(0), 8, S3C_GPIO_SFN(2));
+	s3c_gpio_cfgrange_nopull(S5PV310_GPF2(0), 8, S3C_GPIO_SFN(2));
+	s3c_gpio_cfgrange_nopull(S5PV310_GPF3(0), 4, S3C_GPIO_SFN(2));
+
+	/* 
+	 * Set DISPLAY_CONTROL register for Display path selection.
+	 *
+	 * DISPLAY_CONTROL[1:0]
+	 * ---------------------
+	 *  00 | MIE
+	 *  01 | MDINE
+	 *  10 | FIMD : selected
+	 *  11 | FIMD
+	 */
+	reg = __raw_readl(S3C_VA_SYS + 0x0210);
+	reg |= (1 << 1);
+	__raw_writel(reg, S3C_VA_SYS + 0x0210);
+}
diff --git a/arch/arm/plat-s5p/Kconfig b/arch/arm/plat-s5p/Kconfig
index 65dbfa8..c4e0515 100644
--- a/arch/arm/plat-s5p/Kconfig
+++ b/arch/arm/plat-s5p/Kconfig
@@ -52,6 +52,11 @@ config S5P_DEV_FIMC2
 	help
 	  Compile in platform device definitions for FIMC controller 2
 
+config S5P_DEV_FIMD0
+	bool
+	help
+	  Compile in platform device definitions for FIMD controller 0
+
 config S5P_DEV_ONENAND
 	bool
 	help
diff --git a/arch/arm/plat-s5p/Makefile b/arch/arm/plat-s5p/Makefile
index de65238..149e413 100644
--- a/arch/arm/plat-s5p/Makefile
+++ b/arch/arm/plat-s5p/Makefile
@@ -27,4 +27,5 @@ obj-$(CONFIG_PM)		+= irq-pm.o
 obj-$(CONFIG_S5P_DEV_FIMC0)	+= dev-fimc0.o
 obj-$(CONFIG_S5P_DEV_FIMC1)	+= dev-fimc1.o
 obj-$(CONFIG_S5P_DEV_FIMC2)	+= dev-fimc2.o
+obj-$(CONFIG_S5P_DEV_FIMD0)	+= dev-fimd0.o
 obj-$(CONFIG_S5P_DEV_ONENAND)	+= dev-onenand.o
diff --git a/arch/arm/plat-s5p/dev-fimd0.c b/arch/arm/plat-s5p/dev-fimd0.c
new file mode 100644
index 0000000..81d460a
--- /dev/null
+++ b/arch/arm/plat-s5p/dev-fimd0.c
@@ -0,0 +1,67 @@
+/* linux/arch/arm/plat-s5p/dev-fimd0.c
+ *
+ * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com
+ *
+ * Core file for Samsung Display Controller (FIMD) driver
+ *
+ * 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/string.h>
+#include <linux/platform_device.h>
+#include <linux/fb.h>
+#include <linux/gfp.h>
+#include <linux/dma-mapping.h>
+
+#include <mach/irqs.h>
+#include <mach/map.h>
+
+#include <plat/fb.h>
+#include <plat/devs.h>
+#include <plat/cpu.h>
+
+static struct resource s5p_fimd0_resource[] = {
+	[0] = {
+		.start	= S5P_PA_FIMD0,
+		.end	= S5P_PA_FIMD0 + SZ_32K - 1,
+		.flags	= IORESOURCE_MEM,
+	},
+	[1] = {
+		.start	= IRQ_FIMD0_VSYNC,
+		.end	= IRQ_FIMD0_VSYNC,
+		.flags	= IORESOURCE_IRQ,
+	},
+	[2] = {
+		.start	= IRQ_FIMD0_FIFO,
+		.end	= IRQ_FIMD0_FIFO,
+		.flags	= IORESOURCE_IRQ,
+	},
+	[3] = {
+		.start	= IRQ_FIMD0_SYSTEM,
+		.end	= IRQ_FIMD0_SYSTEM,
+		.flags	= IORESOURCE_IRQ,
+	},
+};
+
+static u64 fimd0_dmamask = DMA_BIT_MASK(32);
+
+struct platform_device s5p_device_fimd0 = {
+	.name		= "s5p-fb",
+	.id		= 0,
+	.num_resources	= ARRAY_SIZE(s5p_fimd0_resource),
+	.resource	= s5p_fimd0_resource,
+	.dev		= {
+		.dma_mask		= &fimd0_dmamask,
+		.coherent_dma_mask	= DMA_BIT_MASK(32),
+	},
+};
+
+void __init s5p_fimd0_set_platdata(struct s3c_fb_platdata *pd)
+{
+	s3c_set_platdata(pd, sizeof(struct s3c_fb_platdata),
+			 &s5p_device_fimd0);
+}
diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/plat-samsung/include/plat/devs.h
index 16521cc..066b7aa 100644
--- a/arch/arm/plat-samsung/include/plat/devs.h
+++ b/arch/arm/plat-samsung/include/plat/devs.h
@@ -40,6 +40,7 @@ extern struct platform_device s3c64xx_device_ac97;
 extern struct platform_device s3c_device_ts;
 
 extern struct platform_device s3c_device_fb;
+extern struct platform_device s5p_device_fimd0;
 extern struct platform_device s3c_device_ohci;
 extern struct platform_device s3c_device_lcd;
 extern struct platform_device s3c_device_wdt;
diff --git a/arch/arm/plat-samsung/include/plat/fb-core.h b/arch/arm/plat-samsung/include/plat/fb-core.h
index bca383e..5be34f8 100644
--- a/arch/arm/plat-samsung/include/plat/fb-core.h
+++ b/arch/arm/plat-samsung/include/plat/fb-core.h
@@ -26,4 +26,19 @@ static inline void s3c_fb_setname(char *name)
 #endif
 }
 
+/* Re-define device name depending on support. */
+static inline void s5p_fb_setname(int id, char *name)
+{
+	switch (id) {
+#ifdef CONFIG_S5P_DEV_FIMD0
+	case 0:
+		s5p_device_fimd0.name = name;
+		break;
+#endif
+	default:
+		printk(KERN_ERR "%s: invalid device id(%d)\n", __func__, id);
+		break;
+	}
+}
+
 #endif /* __ASM_PLAT_FB_CORE_H */
-- 
1.6.2.5


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 3/4] s3c-fb: Add support S5PV310 FIMD
  2010-10-18 12:55 [PATCH 0/4] ARM: S5PV310: Add support FIMD Sangbeom Kim
  2010-10-18 12:55 ` [PATCH 1/4] ARM: S5PV310: Add FIMD resource definition Sangbeom Kim
  2010-10-18 12:55 ` [PATCH 2/4] ARM: S5PV310: Add platform device and helper functions for FIMD Sangbeom Kim
@ 2010-10-18 12:55 ` Sangbeom Kim
  2010-10-19  7:22   ` Marek Szyprowski
                     ` (4 more replies)
  2010-10-18 12:55 ` [PATCH 4/4] ARM: S5PV310: Add platform data for S5PV310 FIMD and LTE480WV platform-lcd Sangbeom Kim
  3 siblings, 5 replies; 15+ messages in thread
From: Sangbeom Kim @ 2010-10-18 12:55 UTC (permalink / raw)
  To: linux-arm-kernel

From: Jonghun Han <jonghun.han@samsung.com>

This patch adds s3c_fb_driverdata for S5PV310 FIMD0. The clk_type is added
to distinguish clock type in structure s3c_fb_variant and lcd_clk is added
in structure s3c_fb to calculate divider for lcd panel.
FIMD can handles two clocks. The one is for FIMD IP and the other is for
LCD pixel clock. Before S5PV310 LCD pixel clock can be same with FIMD IP
clock. From S5PV310 LCD pixel clock is separated from FIMD IP clock.

Signed-off-by: Jonghun Han <jonghun.han@samsung.com>
Reviewed-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
---
NOTE: This patch is only for FIMD0.
FIMD1 will be implemented later.
 drivers/video/Kconfig  |    2 +-
 drivers/video/s3c-fb.c |  128 ++++++++++++++++++++++++++++++++++++++++++------
 2 files changed, 114 insertions(+), 16 deletions(-)

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 8b31fdf..3e2e02a 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -1946,7 +1946,7 @@ config FB_TMIO_ACCELL
 
 config FB_S3C
 	tristate "Samsung S3C framebuffer support"
-	depends on FB && S3C_DEV_FB
+	depends on FB && (S3C_DEV_FB || S5P_DEV_FIMD0)
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
index f9aca9d..bc182ea 100644
--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -65,6 +65,9 @@ struct s3c_fb;
 #define VIDOSD_C(win, variant) (OSD_BASE(win, variant) + 0x08)
 #define VIDOSD_D(win, variant) (OSD_BASE(win, variant) + 0x0C)
 
+#define FIMD_CLK_TYPE0	0
+#define FIMD_CLK_TYPE1	1
+
 /**
  * struct s3c_fb_variant - fb variant information
  * @is_2443: Set if S3C2443/S3C2416 style hardware.
@@ -97,6 +100,7 @@ struct s3c_fb_variant {
 
 	unsigned int	has_prtcon:1;
 	unsigned int	has_shadowcon:1;
+	unsigned int	clk_type:1;
 };
 
 /**
@@ -183,7 +187,8 @@ struct s3c_fb_vsync {
  * struct s3c_fb - overall hardware state of the hardware
  * @dev: The device that we bound to, for printing, etc.
  * @regs_res: The resource we claimed for the IO registers.
- * @bus_clk: The clk (hclk) feeding our interface and possibly pixclk.
+ * @bus_clk: The clk (hclk) feeding FIMD IP core.
+ * @lcd_clk: The clk (sclk) feeding our interface and possibly pixclk.
  * @regs: The mapped hardware registers.
  * @variant: Variant information for this hardware.
  * @enabled: A bitmask of enabled hardware windows.
@@ -197,6 +202,7 @@ struct s3c_fb {
 	struct device		*dev;
 	struct resource		*regs_res;
 	struct clk		*bus_clk;
+	struct clk		*lcd_clk;
 	void __iomem		*regs;
 	struct s3c_fb_variant	 variant;
 
@@ -334,7 +340,7 @@ static int s3c_fb_check_var(struct fb_var_screeninfo *var,
  */
 static int s3c_fb_calc_pixclk(struct s3c_fb *sfb, unsigned int pixclk)
 {
-	unsigned long clk = clk_get_rate(sfb->bus_clk);
+	unsigned long clk = clk_get_rate(sfb->lcd_clk);
 	unsigned long long tmp;
 	unsigned int result;
 
@@ -517,7 +523,7 @@ static int s3c_fb_set_par(struct fb_info *info)
 
 		data = VIDTCON2_LINEVAL(var->yres - 1) |
 		       VIDTCON2_HOZVAL(var->xres - 1);
-		writel(data, regs +sfb->variant.vidtcon + 8 );
+		writel(data, regs + sfb->variant.vidtcon + 8);
 	}
 
 	/* write the buffer address */
@@ -1286,8 +1292,10 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
 	struct s3c_fb_platdata *pd;
 	struct s3c_fb *sfb;
 	struct resource *res;
+	struct clk *mout_mpll = NULL;
 	int win;
 	int ret = 0;
+	u32 rate = 134000000;
 
 	fbdrv = (struct s3c_fb_driverdata *)platform_get_device_id(pdev)->driver_data;
 
@@ -1314,19 +1322,56 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
 	sfb->pdata = pd;
 	sfb->variant = fbdrv->variant;
 
-	sfb->bus_clk = clk_get(dev, "lcd");
-	if (IS_ERR(sfb->bus_clk)) {
-		dev_err(dev, "failed to get bus clock\n");
+	switch (sfb->variant.clk_type) {
+	case FIMD_CLK_TYPE0:
+		sfb->bus_clk = clk_get(dev, "lcd");
+		if (IS_ERR(sfb->bus_clk)) {
+			dev_err(dev, "failed to get bus clock\n");
+			goto err_sfb;
+		}
+
+		clk_enable(sfb->bus_clk);
+
+		sfb->lcd_clk = sfb->bus_clk;
+		break;
+
+	case FIMD_CLK_TYPE1:
+		sfb->bus_clk = clk_get(&pdev->dev, "fimd");
+		if (IS_ERR(sfb->bus_clk)) {
+			dev_err(&pdev->dev, "failed to get clock for fimd\n");
+			goto err_sfb;
+		}
+		clk_enable(sfb->bus_clk);
+
+		sfb->lcd_clk = clk_get(&pdev->dev, "sclk_fimd");
+		if (IS_ERR(sfb->lcd_clk)) {
+			dev_err(&pdev->dev, "failed to get sclk for fimd\n");
+			goto err_bus_clk;
+		}
+
+		mout_mpll = clk_get(&pdev->dev, "mout_mpll");
+		if (IS_ERR(mout_mpll)) {
+			dev_err(&pdev->dev, "failed to get mout_mpll\n");
+			goto err_lcd_clk;
+		}
+		clk_set_parent(sfb->lcd_clk, mout_mpll);
+		clk_put(mout_mpll);
+
+		clk_set_rate(sfb->lcd_clk, rate);
+		clk_enable(sfb->lcd_clk);
+		dev_dbg(&pdev->dev, "set fimd sclk rate to %d\n", rate);
+		break;
+
+	default:
+		dev_err(dev, "failed to enable clock for FIMD\n");
 		goto err_sfb;
 	}
 
-	clk_enable(sfb->bus_clk);
-
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	if (!res) {
 		dev_err(dev, "failed to find registers\n");
 		ret = -ENOENT;
-		goto err_clk;
+		goto err_lcd_clk;
 	}
 
 	sfb->regs_res = request_mem_region(res->start, resource_size(res),
@@ -1334,7 +1379,7 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
 	if (!sfb->regs_res) {
 		dev_err(dev, "failed to claim register region\n");
 		ret = -ENOENT;
-		goto err_clk;
+		goto err_lcd_clk;
 	}
 
 	sfb->regs = ioremap(res->start, resource_size(res));
@@ -1413,9 +1458,15 @@ err_req_region:
 	release_resource(sfb->regs_res);
 	kfree(sfb->regs_res);
 
-err_clk:
-	clk_disable(sfb->bus_clk);
-	clk_put(sfb->bus_clk);
+err_lcd_clk:
+	clk_disable(sfb->lcd_clk);
+	clk_put(sfb->lcd_clk);
+
+err_bus_clk:
+	if (sfb->variant.clk_type != FIMD_CLK_TYPE0) {
+		clk_disable(sfb->bus_clk);
+		clk_put(sfb->bus_clk);
+	}
 
 err_sfb:
 	kfree(sfb);
@@ -1442,8 +1493,20 @@ static int __devexit s3c_fb_remove(struct platform_device *pdev)
 
 	iounmap(sfb->regs);
 
-	clk_disable(sfb->bus_clk);
-	clk_put(sfb->bus_clk);
+	switch (sfb->variant.clk_type) {
+	case FIMD_CLK_TYPE1:
+		clk_disable(sfb->lcd_clk);
+		clk_put(sfb->lcd_clk);
+		/* fall through to default case */
+	case FIMD_CLK_TYPE0:
+		clk_disable(sfb->bus_clk);
+		clk_put(sfb->bus_clk);
+		break;
+	default:
+		dev_err(sfb->dev, "invalid clock type(%d)\n",
+			sfb->variant.clk_type);
+		break;
+	}
 
 	release_resource(sfb->regs_res);
 	kfree(sfb->regs_res);
@@ -1470,6 +1533,7 @@ static int s3c_fb_suspend(struct platform_device *pdev, pm_message_t state)
 	}
 
 	clk_disable(sfb->bus_clk);
+
 	return 0;
 }
 
@@ -1656,6 +1720,37 @@ static struct s3c_fb_driverdata s3c_fb_data_s5pv210 = {
 	.win[4]	= &s3c_fb_data_64xx_wins[4],
 };
 
+static struct s3c_fb_driverdata s3c_fb_data_s5pv310 = {
+	.variant = {
+		.nr_windows	= 5,
+		.vidtcon	= VIDTCON0,
+		.wincon		= WINCON(0),
+		.winmap		= WINxMAP(0),
+		.keycon		= WKEYCON,
+		.osd		= VIDOSD_BASE,
+		.osd_stride	= 16,
+		.buf_start	= VIDW_BUF_START(0),
+		.buf_size	= VIDW_BUF_SIZE(0),
+		.buf_end	= VIDW_BUF_END(0),
+
+		.palette = {
+			[0] = 0x2400,
+			[1] = 0x2800,
+			[2] = 0x2c00,
+			[3] = 0x3000,
+			[4] = 0x3400,
+		},
+
+		.has_shadowcon	= 1,
+		.clk_type	= FIMD_CLK_TYPE1,
+	},
+	.win[0]	= &s3c_fb_data_64xx_wins[0],
+	.win[1]	= &s3c_fb_data_64xx_wins[1],
+	.win[2]	= &s3c_fb_data_64xx_wins[2],
+	.win[3]	= &s3c_fb_data_64xx_wins[3],
+	.win[4]	= &s3c_fb_data_64xx_wins[4],
+};
+
 /* S3C2443/S3C2416 style hardware */
 static struct s3c_fb_driverdata s3c_fb_data_s3c2443 = {
 	.variant = {
@@ -1703,6 +1798,9 @@ static struct platform_device_id s3c_fb_driver_ids[] = {
 		.name		= "s5pv210-fb",
 		.driver_data	= (unsigned long)&s3c_fb_data_s5pv210,
 	}, {
+		.name		= "s5pv310-fb",
+		.driver_data	= (unsigned long)&s3c_fb_data_s5pv310,
+	}, {
 		.name		= "s3c2443-fb",
 		.driver_data	= (unsigned long)&s3c_fb_data_s3c2443,
 	},
-- 
1.6.2.5


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 4/4] ARM: S5PV310: Add platform data for S5PV310 FIMD and LTE480WV platform-lcd
  2010-10-18 12:55 [PATCH 0/4] ARM: S5PV310: Add support FIMD Sangbeom Kim
                   ` (2 preceding siblings ...)
  2010-10-18 12:55 ` [PATCH 3/4] s3c-fb: Add support S5PV310 FIMD Sangbeom Kim
@ 2010-10-18 12:55 ` Sangbeom Kim
  2010-10-19  6:50   ` [PATCH 4/4] ARM: S5PV310: Add platform data for S5PV310 FIMD and Marek Szyprowski
  3 siblings, 1 reply; 15+ messages in thread
From: Sangbeom Kim @ 2010-10-18 12:55 UTC (permalink / raw)
  To: linux-arm-kernel

From: Jonghun Han <jonghun.han@samsung.com>

Some platform data for S5PV310 FIMD0 are added.
LTE480WV lcd pannel used by SMDKV310 are added via platform-lcd interface.
extern helper functions used by machine file are added.

Signed-off-by: Jonghun Han <jonghun.han@samsung.com>
Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
---
 arch/arm/mach-s5pv310/mach-smdkv310.c   |   72 +++++++++++++++++++++++++++++++
 arch/arm/plat-samsung/include/plat/fb.h |   14 ++++++
 2 files changed, 86 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-s5pv310/mach-smdkv310.c b/arch/arm/mach-s5pv310/mach-smdkv310.c
index 10f8056..8a83eec 100644
--- a/arch/arm/mach-s5pv310/mach-smdkv310.c
+++ b/arch/arm/mach-s5pv310/mach-smdkv310.c
@@ -9,7 +9,9 @@
 */
 
 #include <linux/serial_core.h>
+#include <linux/delay.h>
 #include <linux/gpio.h>
+#include <linux/lcd.h>
 #include <linux/mmc/host.h>
 #include <linux/platform_device.h>
 
@@ -17,13 +19,17 @@
 #include <asm/mach-types.h>
 #include <asm/hardware/cache-l2x0.h>
 
+#include <video/platform_lcd.h>
+
 #include <plat/regs-serial.h>
 #include <plat/s5pv310.h>
 #include <plat/cpu.h>
 #include <plat/devs.h>
+#include <plat/fb.h>
 #include <plat/sdhci.h>
 
 #include <mach/map.h>
+#include <mach/regs-fb.h>
 
 /* Following are default values for UCON, ULCON and UFCON UART registers */
 #define SMDKV310_UCON_DEFAULT	(S3C2410_UCON_TXILEVEL |	\
@@ -106,7 +112,71 @@ static struct s3c_sdhci_platdata smdkv310_hsmmc3_pdata __initdata = {
 	.clk_type		= S3C_SDHCI_CLK_DIV_EXTERNAL,
 };
 
+static void lcd_lte480wv_set_power(struct plat_lcd_data *pd,
+				   unsigned int power)
+{
+	if (power) {
+#if !defined(CONFIG_BACKLIGHT_PWM)
+		gpio_request(S5PV310_GPD0(1), "GPD0");
+		gpio_direction_output(S5PV310_GPD0(1), 1);
+		gpio_free(S5PV310_GPD0(1));
+#endif
+		/* fire nRESET on power up */
+		gpio_request(S5PV310_GPX0(6), "GPX0");
+
+		gpio_direction_output(S5PV310_GPX0(6), 1);
+		mdelay(100);
+
+		gpio_set_value(S5PV310_GPX0(6), 0);
+		mdelay(10);
+
+		gpio_set_value(S5PV310_GPX0(6), 1);
+		mdelay(10);
+
+		gpio_free(S5PV310_GPX0(6));
+	} else {
+#if !defined(CONFIG_BACKLIGHT_PWM)
+		gpio_request(S5PV310_GPD0(1), "GPD0");
+		gpio_direction_output(S5PV310_GPD0(1), 0);
+		gpio_free(S5PV310_GPD0(1));
+#endif
+	}
+}
+
+static struct plat_lcd_data smdkv310_lcd_lte480wv_data = {
+	.set_power	= lcd_lte480wv_set_power,
+};
+
+static struct platform_device smdkv310_lcd_lte480wv = {
+	.name			= "platform-lcd",
+	.dev.parent		= &s5p_device_fimd0.dev,
+	.dev.platform_data	= &smdkv310_lcd_lte480wv_data,
+};
+
+static struct s3c_fb_pd_win smdkv310_fb_win0 = {
+	.win_mode = {
+		.left_margin	= 13,
+		.right_margin	= 8,
+		.upper_margin	= 7,
+		.lower_margin	= 5,
+		.hsync_len	= 3,
+		.vsync_len	= 1,
+		.xres	= 800,
+		.yres	= 480,
+	},
+	.max_bpp	= 32,
+	.default_bpp	= 24,
+};
+static struct s3c_fb_platdata smdkv310_lcd0_pdata __initdata = {
+	.win[0]		= &smdkv310_fb_win0,
+	.vidcon0	= VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
+	.vidcon1	= VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
+	.setup_gpio	= s5pv310_fimd0_gpio_setup_24bpp,
+};
+
 static struct platform_device *smdkv310_devices[] __initdata = {
+	&s5p_device_fimd0,
+	&smdkv310_lcd_lte480wv,
 	&s3c_device_hsmmc0,
 	&s3c_device_hsmmc1,
 	&s3c_device_hsmmc2,
@@ -133,6 +203,8 @@ static void __init smdkv310_machine_init(void)
 	l2x0_init(S5P_VA_L2CC, 1 << 28, 0xffffffff);
 #endif
 
+	s5p_fimd0_set_platdata(&smdkv310_lcd0_pdata);
+
 	platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices));
 }
 
diff --git a/arch/arm/plat-samsung/include/plat/fb.h b/arch/arm/plat-samsung/include/plat/fb.h
index cb3ca3a..67733b5 100644
--- a/arch/arm/plat-samsung/include/plat/fb.h
+++ b/arch/arm/plat-samsung/include/plat/fb.h
@@ -74,6 +74,14 @@ struct s3c_fb_platdata {
 extern void s3c_fb_set_platdata(struct s3c_fb_platdata *pd);
 
 /**
+ * s5p_fimd0_set_platdata() - Setup the FB device with platform data.
+ * @pd: The platform data to set. The data is copied from the passed structure
+ *      so the machine data can mark the data __initdata so that any unused
+ *      machines will end up dumping their data at runtime.
+ */
+extern void s5p_fimd0_set_platdata(struct s3c_fb_platdata *pd);
+
+/**
  * s3c64xx_fb_gpio_setup_24bpp() - S3C64XX setup function for 24bpp LCD
  *
  * Initialise the GPIO for an 24bpp LCD display on the RGB interface.
@@ -94,4 +102,10 @@ extern void s5pc100_fb_gpio_setup_24bpp(void);
  */
 extern void s5pv210_fb_gpio_setup_24bpp(void);
 
+/**
+ * s5pv310_fimd0_gpio_setup_24bpp() - S5PV310/S5PC210 setup function for 24bpp LCD0
+ *
+ * Initialise the GPIO for an 24bpp LCD display on the RGB interface 0.
+ */
+extern void s5pv310_fimd0_gpio_setup_24bpp(void);
 #endif /* __PLAT_S3C_FB_H */
-- 
1.6.2.5


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* RE: [PATCH 4/4] ARM: S5PV310: Add platform data for S5PV310 FIMD and
  2010-10-18 12:55 ` [PATCH 4/4] ARM: S5PV310: Add platform data for S5PV310 FIMD and LTE480WV platform-lcd Sangbeom Kim
@ 2010-10-19  6:50   ` Marek Szyprowski
  0 siblings, 0 replies; 15+ messages in thread
From: Marek Szyprowski @ 2010-10-19  6:50 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

On Monday, October 18, 2010 2:55 PM Sangbeom Kim wrote:

> From: Jonghun Han <jonghun.han@samsung.com>
> 
> Some platform data for S5PV310 FIMD0 are added.
> LTE480WV lcd pannel used by SMDKV310 are added via platform-lcd interface.
> extern helper functions used by machine file are added.
> 
> Signed-off-by: Jonghun Han <jonghun.han@samsung.com>
> Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
> ---
>  arch/arm/mach-s5pv310/mach-smdkv310.c   |   72 +++++++++++++++++++++++++++++++
>  arch/arm/plat-samsung/include/plat/fb.h |   14 ++++++
>  2 files changed, 86 insertions(+), 0 deletions(-)
> 
> ...

> diff --git a/arch/arm/plat-samsung/include/plat/fb.h b/arch/arm/plat-samsung/include/plat/fb.h
> index cb3ca3a..67733b5 100644
> --- a/arch/arm/plat-samsung/include/plat/fb.h
> +++ b/arch/arm/plat-samsung/include/plat/fb.h
> @@ -74,6 +74,14 @@ struct s3c_fb_platdata {
>  extern void s3c_fb_set_platdata(struct s3c_fb_platdata *pd);
> 
>  /**
> + * s5p_fimd0_set_platdata() - Setup the FB device with platform data.
> + * @pd: The platform data to set. The data is copied from the passed structure
> + *      so the machine data can mark the data __initdata so that any unused
> + *      machines will end up dumping their data at runtime.
> + */
> +extern void s5p_fimd0_set_platdata(struct s3c_fb_platdata *pd);
> +
> +/**
>   * s3c64xx_fb_gpio_setup_24bpp() - S3C64XX setup function for 24bpp LCD
>   *
>   * Initialise the GPIO for an 24bpp LCD display on the RGB interface.
> @@ -94,4 +102,10 @@ extern void s5pc100_fb_gpio_setup_24bpp(void);
>   */
>  extern void s5pv210_fb_gpio_setup_24bpp(void);
> 
> +/**
> + * s5pv310_fimd0_gpio_setup_24bpp() - S5PV310/S5PC210 setup function for 24bpp LCD0
> + *
> + * Initialise the GPIO for an 24bpp LCD display on the RGB interface 0.
> + */
> +extern void s5pv310_fimd0_gpio_setup_24bpp(void);
>  #endif /* __PLAT_S3C_FB_H */

Changes to arch/arm/plat-samsung/include/plat/fb.h file should go together with patch
2/4 from your series - they are not related to SMDK board at all.

Best regards
--
Marek Szyprowski
Samsung Poland R&D Center



^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH 3/4] s3c-fb: Add support S5PV310 FIMD
  2010-10-18 12:55 ` [PATCH 3/4] s3c-fb: Add support S5PV310 FIMD Sangbeom Kim
@ 2010-10-19  7:22   ` Marek Szyprowski
  2010-10-21  3:45     ` Jonghun Han
  2010-10-21  4:58   ` Inki Dae
                     ` (3 subsequent siblings)
  4 siblings, 1 reply; 15+ messages in thread
From: Marek Szyprowski @ 2010-10-19  7:22 UTC (permalink / raw)
  To: linux-arm-kernel

1AFAAVgAzADEAMAAgAEY
	ASQBNAEQA
x-cr-puzzleid: {C4CCB40E-D5C6-4119-AA7C-BBBA7A1503E4}

Hello,

On Monday, October 18, 2010 2:55 PM Sangbeom Kim wrote:

> From: Jonghun Han <jonghun.han@samsung.com>
> 
> This patch adds s3c_fb_driverdata for S5PV310 FIMD0. The clk_type is added
> to distinguish clock type in structure s3c_fb_variant and lcd_clk is added
> in structure s3c_fb to calculate divider for lcd panel.
> FIMD can handles two clocks. The one is for FIMD IP and the other is for
> LCD pixel clock. Before S5PV310 LCD pixel clock can be same with FIMD IP
> clock. From S5PV310 LCD pixel clock is separated from FIMD IP clock.
> 
> Signed-off-by: Jonghun Han <jonghun.han@samsung.com>
> Reviewed-by: Kukjin Kim <kgene.kim@samsung.com>
> Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
> Cc: Ben Dooks <ben-linux@fluff.org>
> ---
> NOTE: This patch is only for FIMD0.
> FIMD1 will be implemented later.
>  drivers/video/Kconfig  |    2 +-
>  drivers/video/s3c-fb.c |  128 ++++++++++++++++++++++++++++++++++++++++++------
>  2 files changed, 114 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> index 8b31fdf..3e2e02a 100644
> --- a/drivers/video/Kconfig
> +++ b/drivers/video/Kconfig
> @@ -1946,7 +1946,7 @@ config FB_TMIO_ACCELL
> 
>  config FB_S3C
>  	tristate "Samsung S3C framebuffer support"
> -	depends on FB && S3C_DEV_FB
> +	depends on FB && (S3C_DEV_FB || S5P_DEV_FIMD0)
>  	select FB_CFB_FILLRECT
>  	select FB_CFB_COPYAREA
>  	select FB_CFB_IMAGEBLIT
> diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
> index f9aca9d..bc182ea 100644
> --- a/drivers/video/s3c-fb.c
> +++ b/drivers/video/s3c-fb.c
> @@ -65,6 +65,9 @@ struct s3c_fb;
>  #define VIDOSD_C(win, variant) (OSD_BASE(win, variant) + 0x08)
>  #define VIDOSD_D(win, variant) (OSD_BASE(win, variant) + 0x0C)
> 
> +#define FIMD_CLK_TYPE0	0
> +#define FIMD_CLK_TYPE1	1
> +
>  /**
>   * struct s3c_fb_variant - fb variant information
>   * @is_2443: Set if S3C2443/S3C2416 style hardware.
> @@ -97,6 +100,7 @@ struct s3c_fb_variant {
> 
>  	unsigned int	has_prtcon:1;
>  	unsigned int	has_shadowcon:1;
> +	unsigned int	clk_type:1;
>  };
> 
>  /**
> @@ -183,7 +187,8 @@ struct s3c_fb_vsync {
>   * struct s3c_fb - overall hardware state of the hardware
>   * @dev: The device that we bound to, for printing, etc.
>   * @regs_res: The resource we claimed for the IO registers.
> - * @bus_clk: The clk (hclk) feeding our interface and possibly pixclk.
> + * @bus_clk: The clk (hclk) feeding FIMD IP core.
> + * @lcd_clk: The clk (sclk) feeding our interface and possibly pixclk.
>   * @regs: The mapped hardware registers.
>   * @variant: Variant information for this hardware.
>   * @enabled: A bitmask of enabled hardware windows.
> @@ -197,6 +202,7 @@ struct s3c_fb {
>  	struct device		*dev;
>  	struct resource		*regs_res;
>  	struct clk		*bus_clk;
> +	struct clk		*lcd_clk;
>  	void __iomem		*regs;
>  	struct s3c_fb_variant	 variant;
> 
> @@ -334,7 +340,7 @@ static int s3c_fb_check_var(struct fb_var_screeninfo *var,
>   */
>  static int s3c_fb_calc_pixclk(struct s3c_fb *sfb, unsigned int pixclk)
>  {
> -	unsigned long clk = clk_get_rate(sfb->bus_clk);
> +	unsigned long clk = clk_get_rate(sfb->lcd_clk);
>  	unsigned long long tmp;
>  	unsigned int result;
> 
> @@ -517,7 +523,7 @@ static int s3c_fb_set_par(struct fb_info *info)
> 
>  		data = VIDTCON2_LINEVAL(var->yres - 1) |
>  		       VIDTCON2_HOZVAL(var->xres - 1);
> -		writel(data, regs +sfb->variant.vidtcon + 8 );
> +		writel(data, regs + sfb->variant.vidtcon + 8);
>  	}
> 
>  	/* write the buffer address */
> @@ -1286,8 +1292,10 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
>  	struct s3c_fb_platdata *pd;
>  	struct s3c_fb *sfb;
>  	struct resource *res;
> +	struct clk *mout_mpll = NULL;
>  	int win;
>  	int ret = 0;
> +	u32 rate = 134000000;
> 
>  	fbdrv = (struct s3c_fb_driverdata *)platform_get_device_id(pdev)->driver_data;
> 
> @@ -1314,19 +1322,56 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
>  	sfb->pdata = pd;
>  	sfb->variant = fbdrv->variant;
> 
> -	sfb->bus_clk = clk_get(dev, "lcd");
> -	if (IS_ERR(sfb->bus_clk)) {
> -		dev_err(dev, "failed to get bus clock\n");
> +	switch (sfb->variant.clk_type) {
> +	case FIMD_CLK_TYPE0:
> +		sfb->bus_clk = clk_get(dev, "lcd");
> +		if (IS_ERR(sfb->bus_clk)) {
> +			dev_err(dev, "failed to get bus clock\n");
> +			goto err_sfb;
> +		}
> +
> +		clk_enable(sfb->bus_clk);
> +
> +		sfb->lcd_clk = sfb->bus_clk;
> +		break;
> +
> +	case FIMD_CLK_TYPE1:
> +		sfb->bus_clk = clk_get(&pdev->dev, "fimd");
> +		if (IS_ERR(sfb->bus_clk)) {
> +			dev_err(&pdev->dev, "failed to get clock for fimd\n");
> +			goto err_sfb;
> +		}
> +		clk_enable(sfb->bus_clk);
> +
> +		sfb->lcd_clk = clk_get(&pdev->dev, "sclk_fimd");
> +		if (IS_ERR(sfb->lcd_clk)) {
> +			dev_err(&pdev->dev, "failed to get sclk for fimd\n");
> +			goto err_bus_clk;
> +		}
> +
> +		mout_mpll = clk_get(&pdev->dev, "mout_mpll");
> +		if (IS_ERR(mout_mpll)) {
> +			dev_err(&pdev->dev, "failed to get mout_mpll\n");
> +			goto err_lcd_clk;
> +		}
> +		clk_set_parent(sfb->lcd_clk, mout_mpll);
> +		clk_put(mout_mpll);

I don't think that the driver is the right place to change the parent of the sclk_fimd
clock. It should be done in the boot loader or the board startup code.

We should also be a bit more consistent on clock naming. s3c6410..s5pv210 used the 'lcd'
clock name. Maybe you should also provide a patch to rename all these clocks to common
name.

> +
> +		clk_set_rate(sfb->lcd_clk, rate);
> +		clk_enable(sfb->lcd_clk);
> +		dev_dbg(&pdev->dev, "set fimd sclk rate to %d\n", rate);
> +		break;
> +
> +	default:
> +		dev_err(dev, "failed to enable clock for FIMD\n");
>  		goto err_sfb;
>  	}
> 
> -	clk_enable(sfb->bus_clk);
> -
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	if (!res) {
>  		dev_err(dev, "failed to find registers\n");
>  		ret = -ENOENT;
> -		goto err_clk;
> +		goto err_lcd_clk;
>  	}
> 
>  	sfb->regs_res = request_mem_region(res->start, resource_size(res),
> @@ -1334,7 +1379,7 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
>  	if (!sfb->regs_res) {
>  		dev_err(dev, "failed to claim register region\n");
>  		ret = -ENOENT;
> -		goto err_clk;
> +		goto err_lcd_clk;
>  	}
> 
>  	sfb->regs = ioremap(res->start, resource_size(res));
> @@ -1413,9 +1458,15 @@ err_req_region:
>  	release_resource(sfb->regs_res);
>  	kfree(sfb->regs_res);
> 
> -err_clk:
> -	clk_disable(sfb->bus_clk);
> -	clk_put(sfb->bus_clk);
> +err_lcd_clk:
> +	clk_disable(sfb->lcd_clk);
> +	clk_put(sfb->lcd_clk);
> +
> +err_bus_clk:
> +	if (sfb->variant.clk_type != FIMD_CLK_TYPE0) {
> +		clk_disable(sfb->bus_clk);
> +		clk_put(sfb->bus_clk);
> +	}
> 
>  err_sfb:
>  	kfree(sfb);
> @@ -1442,8 +1493,20 @@ static int __devexit s3c_fb_remove(struct platform_device *pdev)
> 
>  	iounmap(sfb->regs);
> 
> -	clk_disable(sfb->bus_clk);
> -	clk_put(sfb->bus_clk);
> +	switch (sfb->variant.clk_type) {
> +	case FIMD_CLK_TYPE1:
> +		clk_disable(sfb->lcd_clk);
> +		clk_put(sfb->lcd_clk);
> +		/* fall through to default case */
> +	case FIMD_CLK_TYPE0:
> +		clk_disable(sfb->bus_clk);
> +		clk_put(sfb->bus_clk);
> +		break;
> +	default:
> +		dev_err(sfb->dev, "invalid clock type(%d)\n",
> +			sfb->variant.clk_type);
> +		break;
> +	}
> 
>  	release_resource(sfb->regs_res);
>  	kfree(sfb->regs_res);
> @@ -1470,6 +1533,7 @@ static int s3c_fb_suspend(struct platform_device *pdev, pm_message_t state)
>  	}
> 
>  	clk_disable(sfb->bus_clk);
> +
>  	return 0;
>  }
> 
> @@ -1656,6 +1720,37 @@ static struct s3c_fb_driverdata s3c_fb_data_s5pv210 = {
>  	.win[4]	= &s3c_fb_data_64xx_wins[4],
>  };
> 
> +static struct s3c_fb_driverdata s3c_fb_data_s5pv310 = {
> +	.variant = {
> +		.nr_windows	= 5,
> +		.vidtcon	= VIDTCON0,
> +		.wincon		= WINCON(0),
> +		.winmap		= WINxMAP(0),
> +		.keycon		= WKEYCON,
> +		.osd		= VIDOSD_BASE,
> +		.osd_stride	= 16,
> +		.buf_start	= VIDW_BUF_START(0),
> +		.buf_size	= VIDW_BUF_SIZE(0),
> +		.buf_end	= VIDW_BUF_END(0),
> +
> +		.palette = {
> +			[0] = 0x2400,
> +			[1] = 0x2800,
> +			[2] = 0x2c00,
> +			[3] = 0x3000,
> +			[4] = 0x3400,
> +		},
> +
> +		.has_shadowcon	= 1,
> +		.clk_type	= FIMD_CLK_TYPE1,
> +	},
> +	.win[0]	= &s3c_fb_data_64xx_wins[0],
> +	.win[1]	= &s3c_fb_data_64xx_wins[1],
> +	.win[2]	= &s3c_fb_data_64xx_wins[2],
> +	.win[3]	= &s3c_fb_data_64xx_wins[3],
> +	.win[4]	= &s3c_fb_data_64xx_wins[4],
> +};
> +
>  /* S3C2443/S3C2416 style hardware */
>  static struct s3c_fb_driverdata s3c_fb_data_s3c2443 = {
>  	.variant = {
> @@ -1703,6 +1798,9 @@ static struct platform_device_id s3c_fb_driver_ids[] = {
>  		.name		= "s5pv210-fb",
>  		.driver_data	= (unsigned long)&s3c_fb_data_s5pv210,
>  	}, {
> +		.name		= "s5pv310-fb",
> +		.driver_data	= (unsigned long)&s3c_fb_data_s5pv310,
> +	}, {
>  		.name		= "s3c2443-fb",
>  		.driver_data	= (unsigned long)&s3c_fb_data_s3c2443,
>  	},
> --

Best regards
--
Marek Szyprowski
Samsung Poland R&D Center



^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH 3/4] s3c-fb: Add support S5PV310 FIMD
  2010-10-19  7:22   ` Marek Szyprowski
@ 2010-10-21  3:45     ` Jonghun Han
  0 siblings, 0 replies; 15+ messages in thread
From: Jonghun Han @ 2010-10-21  3:45 UTC (permalink / raw)
  To: linux-arm-kernel

1AFAAVgAzADEAMAAgAEY
	ASQBNAEQA
x-cr-puzzleid: {B7526269-A73C-412A-8DAE-B8EB603CF9D0}


Hi, 

Marek Szyprowski wrote:

> -----Original Message-----
> From: Marek Szyprowski [mailto:m.szyprowski@samsung.com]
> Sent: Tuesday, October 19, 2010 4:22 PM
> To: 'Sangbeom Kim'; linux-arm-kernel@lists.infradead.org; linux-samsung-
> soc@vger.kernel.org; linux-fbdev@vger.kernel.org
> Cc: 'Jonghun Han'; akpm@linux-foundation.org; kgene.kim@samsung.com; ben-
> linux@fluff.org; kyungmin.park@samsung.com
> Subject: RE: [PATCH 3/4] s3c-fb: Add support S5PV310 FIMD
> 
> 1AFAAVgAzADEAMAAgAEY
> 	ASQBNAEQA
> x-cr-puzzleid: {C4CCB40E-D5C6-4119-AA7C-BBBA7A1503E4}
> 
> Hello,
> 
> On Monday, October 18, 2010 2:55 PM Sangbeom Kim wrote:
> 
> > From: Jonghun Han <jonghun.han@samsung.com>
> >
> > This patch adds s3c_fb_driverdata for S5PV310 FIMD0. The clk_type is
> added
> > to distinguish clock type in structure s3c_fb_variant and lcd_clk is
> added
> > in structure s3c_fb to calculate divider for lcd panel.
> > FIMD can handles two clocks. The one is for FIMD IP and the other is for
> > LCD pixel clock. Before S5PV310 LCD pixel clock can be same with FIMD IP
> > clock. From S5PV310 LCD pixel clock is separated from FIMD IP clock.
> >
> > Signed-off-by: Jonghun Han <jonghun.han@samsung.com>
> > Reviewed-by: Kukjin Kim <kgene.kim@samsung.com>
> > Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
> > Cc: Ben Dooks <ben-linux@fluff.org>
> > ---
> > NOTE: This patch is only for FIMD0.
> > FIMD1 will be implemented later.
> >  drivers/video/Kconfig  |    2 +-
> >  drivers/video/s3c-fb.c |  128
> ++++++++++++++++++++++++++++++++++++++++++------
> >  2 files changed, 114 insertions(+), 16 deletions(-)
> >

[snip]

> >  	/* write the buffer address */
> > @@ -1286,8 +1292,10 @@ static int __devinit s3c_fb_probe(struct
> platform_device *pdev)
> >  	struct s3c_fb_platdata *pd;
> >  	struct s3c_fb *sfb;
> >  	struct resource *res;
> > +	struct clk *mout_mpll = NULL;
> >  	int win;
> >  	int ret = 0;
> > +	u32 rate = 134000000;
> >
> >  	fbdrv = (struct s3c_fb_driverdata *)platform_get_device_id(pdev)-
> >driver_data;
> >
> > @@ -1314,19 +1322,56 @@ static int __devinit s3c_fb_probe(struct
> platform_device *pdev)
> >  	sfb->pdata = pd;
> >  	sfb->variant = fbdrv->variant;
> >
> > -	sfb->bus_clk = clk_get(dev, "lcd");
> > -	if (IS_ERR(sfb->bus_clk)) {
> > -		dev_err(dev, "failed to get bus clock\n");
> > +	switch (sfb->variant.clk_type) {
> > +	case FIMD_CLK_TYPE0:
> > +		sfb->bus_clk = clk_get(dev, "lcd");
> > +		if (IS_ERR(sfb->bus_clk)) {
> > +			dev_err(dev, "failed to get bus clock\n");
> > +			goto err_sfb;
> > +		}
> > +
> > +		clk_enable(sfb->bus_clk);
> > +
> > +		sfb->lcd_clk = sfb->bus_clk;
> > +		break;
> > +
> > +	case FIMD_CLK_TYPE1:
> > +		sfb->bus_clk = clk_get(&pdev->dev, "fimd");
> > +		if (IS_ERR(sfb->bus_clk)) {
> > +			dev_err(&pdev->dev, "failed to get clock for
fimd\n");
> > +			goto err_sfb;
> > +		}
> > +		clk_enable(sfb->bus_clk);
> > +
> > +		sfb->lcd_clk = clk_get(&pdev->dev, "sclk_fimd");
> > +		if (IS_ERR(sfb->lcd_clk)) {
> > +			dev_err(&pdev->dev, "failed to get sclk for
fimd\n");
> > +			goto err_bus_clk;
> > +		}
> > +
> > +		mout_mpll = clk_get(&pdev->dev, "mout_mpll");
> > +		if (IS_ERR(mout_mpll)) {
> > +			dev_err(&pdev->dev, "failed to get mout_mpll\n");
> > +			goto err_lcd_clk;
> > +		}
> > +		clk_set_parent(sfb->lcd_clk, mout_mpll);
> > +		clk_put(mout_mpll);
> 
> I don't think that the driver is the right place to change the parent of
> the sclk_fimd
> clock. It should be done in the boot loader or the board startup code.
> 

As you know, there are two clock sources for LCD pixel clock. 
s3c-fb only used 'lcd' clock as a parent of LCD pixel clock.
But from S5PV310 SCLK_FIMD is only used as a source of LCD pixel clock.
And SCLK_FIMD is only for FIMD. So the parent of the SCLK_FIMD can be
selected in the driver.
In my opinion it doesn't matter.


> We should also be a bit more consistent on clock naming. s3c6410..s5pv210
> used the 'lcd'
> clock name. Maybe you should also provide a patch to rename all these
> clocks to common
> name.
> 
Please refer to the following diagram.
Before S5PV310 clk 'lcd' was used for FIMD IP core clock and source of the
LCD pixel clock.
But the mux used to select source of LCD pixel clock is removed.
So 'lcd' clock is only used for core clock of FIMD IP. It isn't used for LCD
pixel clock.
As a result clock name was changed from lcd to fimd in the S5PV310
datasheet.
I agree to rearrange clock name later.

Before S5PV310
           ------------------------------------
                      dsys bus
           ----------------+-------------------
                           |
                           |1.clk 'lcd'
                           |
                           | FIMD block
                       +---+-----------+
4.mout_mpll |\         |   |           |
    --------|m|        | +-+-+ +----+  |
            |u|-+      | |   +-+core|  |
            |x| |      | |     +----+  |
            |/  |      | | |\          |
                |      | +-|m|  +---+  |
                |      |   |u|--+div|  |
                +------+---|x|  +---+  |
           2.SCLK_FIMD |   |/     |    |
                       |          |    |
                       +----------+----+
                                  |
           inside of SoC          |
           -----------------------+--------------------------
           outside of SoC         |
                                  | 3.LCD pixel clock
                                  |
                          +--------------+
                          | LCD module   |
                          +--------------+


S5PV310
           ------------------------------------
                      dsys bus
           ----------------+-------------------
                           |
                           |1.clk 'fimd'
                           |
                           | FIMD block
                       +---+-----------+
4.mout_mpll |\         |   |           |
    --------|m|        |   |   +----+  |
            |u|-+      |   +---+core|  |
            |x| |      |       +----+  |
            |/  |      |               |
                |      |        +---+  |
                |      |     +--+div|  |
                +------+-----+  +---+  |
           2.SCLK_FIMD |          |    |
                       |          |    |
                       +----------+----+
                                  |
           inside of SoC          |
           -----------------------+--------------------------
           outside of SoC         |
                                  | 3.LCD pixel clock
                                  |
                          +--------------+
                          | LCD module   |
                          +--------------+

> > +
> > +		clk_set_rate(sfb->lcd_clk, rate);
> > +		clk_enable(sfb->lcd_clk);
> > +		dev_dbg(&pdev->dev, "set fimd sclk rate to %d\n", rate);
> > +		break;
> > +
> > +	default:
> > +		dev_err(dev, "failed to enable clock for FIMD\n");
> >  		goto err_sfb;
> >  	}
> >
> > -	clk_enable(sfb->bus_clk);
> > -
> >  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> >  	if (!res) {
> >  		dev_err(dev, "failed to find registers\n");
> >  		ret = -ENOENT;
> > -		goto err_clk;
> > +		goto err_lcd_clk;
> >  	}
> >
> >  	sfb->regs_res = request_mem_region(res->start, resource_size(res),
> > @@ -1334,7 +1379,7 @@ static int __devinit s3c_fb_probe(struct
> platform_device *pdev)
> >  	if (!sfb->regs_res) {
> >  		dev_err(dev, "failed to claim register region\n");
> >  		ret = -ENOENT;
> > -		goto err_clk;
> > +		goto err_lcd_clk;
> >  	}
> >
> >  	sfb->regs = ioremap(res->start, resource_size(res));
> > @@ -1413,9 +1458,15 @@ err_req_region:
> >  	release_resource(sfb->regs_res);
> >  	kfree(sfb->regs_res);
> >
> > -err_clk:
> > -	clk_disable(sfb->bus_clk);
> > -	clk_put(sfb->bus_clk);
> > +err_lcd_clk:
> > +	clk_disable(sfb->lcd_clk);
> > +	clk_put(sfb->lcd_clk);
> > +
> > +err_bus_clk:
> > +	if (sfb->variant.clk_type != FIMD_CLK_TYPE0) {
> > +		clk_disable(sfb->bus_clk);
> > +		clk_put(sfb->bus_clk);
> > +	}
> >
> >  err_sfb:
> >  	kfree(sfb);
[snip]

BRs,



^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH 3/4] s3c-fb: Add support S5PV310 FIMD
  2010-10-18 12:55 ` [PATCH 3/4] s3c-fb: Add support S5PV310 FIMD Sangbeom Kim
  2010-10-19  7:22   ` Marek Szyprowski
@ 2010-10-21  4:58   ` Inki Dae
  2010-10-25  7:10     ` han jonghun
  2010-11-12  5:26   ` Kukjin Kim
                     ` (2 subsequent siblings)
  4 siblings, 1 reply; 15+ messages in thread
From: Inki Dae @ 2010-10-21  4:58 UTC (permalink / raw)
  To: linux-fbdev

Hello, Jonghun.

Below is my opinion.

Have a good time :)
> -----Original Message-----
> From: linux-fbdev-owner@vger.kernel.org [mailto:linux-fbdev-
> owner@vger.kernel.org] On Behalf Of Jonghun Han
> Sent: Thursday, October 21, 2010 12:45 PM
> To: 'Marek Szyprowski'; 'Sangbeom Kim'; linux-arm-
> kernel@lists.infradead.org; linux-samsung-soc@vger.kernel.org; linux-
> fbdev@vger.kernel.org
> Cc: akpm@linux-foundation.org; kgene.kim@samsung.com; ben-linux@fluff.org;
> kyungmin.park@samsung.com
> Subject: RE: [PATCH 3/4] s3c-fb: Add support S5PV310 FIMD
> 
> 1AFAAVgAzADEAMAAgAEY
> 	ASQBNAEQA
> x-cr-puzzleid: {B7526269-A73C-412A-8DAE-B8EB603CF9D0}
> 
> 
> Hi,
> 
> Marek Szyprowski wrote:
> 
> > -----Original Message-----
> > From: Marek Szyprowski [mailto:m.szyprowski@samsung.com]
> > Sent: Tuesday, October 19, 2010 4:22 PM
> > To: 'Sangbeom Kim'; linux-arm-kernel@lists.infradead.org; linux-samsung-
> > soc@vger.kernel.org; linux-fbdev@vger.kernel.org
> > Cc: 'Jonghun Han'; akpm@linux-foundation.org; kgene.kim@samsung.com;
> ben-
> > linux@fluff.org; kyungmin.park@samsung.com
> > Subject: RE: [PATCH 3/4] s3c-fb: Add support S5PV310 FIMD
> >
> > 1AFAAVgAzADEAMAAgAEY
> > 	ASQBNAEQA
> > x-cr-puzzleid: {C4CCB40E-D5C6-4119-AA7C-BBBA7A1503E4}
> >
> > Hello,
> >
> > On Monday, October 18, 2010 2:55 PM Sangbeom Kim wrote:
> >
> > > From: Jonghun Han <jonghun.han@samsung.com>
> > >
> > > This patch adds s3c_fb_driverdata for S5PV310 FIMD0. The clk_type is
> > added
> > > to distinguish clock type in structure s3c_fb_variant and lcd_clk is
> > added
> > > in structure s3c_fb to calculate divider for lcd panel.
> > > FIMD can handles two clocks. The one is for FIMD IP and the other is
> for
> > > LCD pixel clock. Before S5PV310 LCD pixel clock can be same with FIMD
> IP
> > > clock. From S5PV310 LCD pixel clock is separated from FIMD IP clock.
> > >
> > > Signed-off-by: Jonghun Han <jonghun.han@samsung.com>
> > > Reviewed-by: Kukjin Kim <kgene.kim@samsung.com>
> > > Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
> > > Cc: Ben Dooks <ben-linux@fluff.org>
> > > ---
> > > NOTE: This patch is only for FIMD0.
> > > FIMD1 will be implemented later.
> > >  drivers/video/Kconfig  |    2 +-
> > >  drivers/video/s3c-fb.c |  128
> > ++++++++++++++++++++++++++++++++++++++++++------
> > >  2 files changed, 114 insertions(+), 16 deletions(-)
> > >
> 
> [snip]
> 
> > >  	/* write the buffer address */
> > > @@ -1286,8 +1292,10 @@ static int __devinit s3c_fb_probe(struct
> > platform_device *pdev)
> > >  	struct s3c_fb_platdata *pd;
> > >  	struct s3c_fb *sfb;
> > >  	struct resource *res;
> > > +	struct clk *mout_mpll = NULL;
> > >  	int win;
> > >  	int ret = 0;
> > > +	u32 rate = 134000000;
> > >
> > >  	fbdrv = (struct s3c_fb_driverdata *)platform_get_device_id(pdev)-
> > >driver_data;
> > >
> > > @@ -1314,19 +1322,56 @@ static int __devinit s3c_fb_probe(struct
> > platform_device *pdev)
> > >  	sfb->pdata = pd;
> > >  	sfb->variant = fbdrv->variant;
> > >
> > > -	sfb->bus_clk = clk_get(dev, "lcd");
> > > -	if (IS_ERR(sfb->bus_clk)) {
> > > -		dev_err(dev, "failed to get bus clock\n");
> > > +	switch (sfb->variant.clk_type) {
> > > +	case FIMD_CLK_TYPE0:
> > > +		sfb->bus_clk = clk_get(dev, "lcd");
> > > +		if (IS_ERR(sfb->bus_clk)) {
> > > +			dev_err(dev, "failed to get bus clock\n");
> > > +			goto err_sfb;
> > > +		}
> > > +
> > > +		clk_enable(sfb->bus_clk);
> > > +
> > > +		sfb->lcd_clk = sfb->bus_clk;
> > > +		break;
> > > +
> > > +	case FIMD_CLK_TYPE1:
> > > +		sfb->bus_clk = clk_get(&pdev->dev, "fimd");
> > > +		if (IS_ERR(sfb->bus_clk)) {
> > > +			dev_err(&pdev->dev, "failed to get clock for
> fimd\n");
> > > +			goto err_sfb;
> > > +		}
> > > +		clk_enable(sfb->bus_clk);
> > > +
> > > +		sfb->lcd_clk = clk_get(&pdev->dev, "sclk_fimd");
> > > +		if (IS_ERR(sfb->lcd_clk)) {
> > > +			dev_err(&pdev->dev, "failed to get sclk for
> fimd\n");
> > > +			goto err_bus_clk;
> > > +		}
> > > +
> > > +		mout_mpll = clk_get(&pdev->dev, "mout_mpll");
> > > +		if (IS_ERR(mout_mpll)) {
> > > +			dev_err(&pdev->dev, "failed to get mout_mpll\n");
> > > +			goto err_lcd_clk;
> > > +		}
> > > +		clk_set_parent(sfb->lcd_clk, mout_mpll);
> > > +		clk_put(mout_mpll);
> >
> > I don't think that the driver is the right place to change the parent of
> > the sclk_fimd
> > clock. It should be done in the boot loader or the board startup code.
> >
> 
> As you know, there are two clock sources for LCD pixel clock.
> s3c-fb only used 'lcd' clock as a parent of LCD pixel clock.
> But from S5PV310 SCLK_FIMD is only used as a source of LCD pixel clock.
> And SCLK_FIMD is only for FIMD. So the parent of the SCLK_FIMD can be
> selected in the driver.
> In my opinion it doesn't matter.
> 

Parent clock is specific to machine
because machines could have different type of lcd panel each other and
any parent clocks for FIMD could be used according to the lcd panel.
So for stable pixel clock setting, parent clock should be set
at machine specific code and FIMD driver should preserve just clock gating.

> 
> > We should also be a bit more consistent on clock naming.
> s3c6410..s5pv210
> > used the 'lcd'
> > clock name. Maybe you should also provide a patch to rename all these
> > clocks to common
> > name.
> >
> Please refer to the following diagram.
> Before S5PV310 clk 'lcd' was used for FIMD IP core clock and source of the
> LCD pixel clock.
> But the mux used to select source of LCD pixel clock is removed.
> So 'lcd' clock is only used for core clock of FIMD IP. It isn't used for
> LCD
> pixel clock.
> As a result clock name was changed from lcd to fimd in the S5PV310
> datasheet.
> I agree to rearrange clock name later.
> 
> Before S5PV310
>            ------------------------------------
>                       dsys bus
>            ----------------+-------------------
>                            |
>                            |1.clk 'lcd'
>                            |
>                            | FIMD block
>                        +---+-----------+
> 4.mout_mpll |\         |   |           |
>     --------|m|        | +-+-+ +----+  |
>             |u|-+      | |   +-+core|  |
>             |x| |      | |     +----+  |
>             |/  |      | | |\          |
>                 |      | +-|m|  +---+  |
>                 |      |   |u|--+div|  |
>                 +------+---|x|  +---+  |
>            2.SCLK_FIMD |   |/     |    |
>                        |          |    |
>                        +----------+----+
>                                   |
>            inside of SoC          |
>            -----------------------+--------------------------
>            outside of SoC         |
>                                   | 3.LCD pixel clock
>                                   |
>                           +--------------+
>                           | LCD module   |
>                           +--------------+
> 
> 
> S5PV310
>            ------------------------------------
>                       dsys bus
>            ----------------+-------------------
>                            |
>                            |1.clk 'fimd'
>                            |
>                            | FIMD block
>                        +---+-----------+
> 4.mout_mpll |\         |   |           |
>     --------|m|        |   |   +----+  |
>             |u|-+      |   +---+core|  |
>             |x| |      |       +----+  |
>             |/  |      |               |
>                 |      |        +---+  |
>                 |      |     +--+div|  |
>                 +------+-----+  +---+  |
>            2.SCLK_FIMD |          |    |
>                        |          |    |
>                        +----------+----+
>                                   |
>            inside of SoC          |
>            -----------------------+--------------------------
>            outside of SoC         |
>                                   | 3.LCD pixel clock
>                                   |
>                           +--------------+
>                           | LCD module   |
>                           +--------------+
> 
> > > +
> > > +		clk_set_rate(sfb->lcd_clk, rate);
> > > +		clk_enable(sfb->lcd_clk);
> > > +		dev_dbg(&pdev->dev, "set fimd sclk rate to %d\n", rate);
> > > +		break;
> > > +
> > > +	default:
> > > +		dev_err(dev, "failed to enable clock for FIMD\n");
> > >  		goto err_sfb;
> > >  	}
> > >
> > > -	clk_enable(sfb->bus_clk);
> > > -
> > >  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > >  	if (!res) {
> > >  		dev_err(dev, "failed to find registers\n");
> > >  		ret = -ENOENT;
> > > -		goto err_clk;
> > > +		goto err_lcd_clk;
> > >  	}
> > >
> > >  	sfb->regs_res = request_mem_region(res->start, resource_size(res),
> > > @@ -1334,7 +1379,7 @@ static int __devinit s3c_fb_probe(struct
> > platform_device *pdev)
> > >  	if (!sfb->regs_res) {
> > >  		dev_err(dev, "failed to claim register region\n");
> > >  		ret = -ENOENT;
> > > -		goto err_clk;
> > > +		goto err_lcd_clk;
> > >  	}
> > >
> > >  	sfb->regs = ioremap(res->start, resource_size(res));
> > > @@ -1413,9 +1458,15 @@ err_req_region:
> > >  	release_resource(sfb->regs_res);
> > >  	kfree(sfb->regs_res);
> > >
> > > -err_clk:
> > > -	clk_disable(sfb->bus_clk);
> > > -	clk_put(sfb->bus_clk);
> > > +err_lcd_clk:
> > > +	clk_disable(sfb->lcd_clk);
> > > +	clk_put(sfb->lcd_clk);
> > > +
> > > +err_bus_clk:
> > > +	if (sfb->variant.clk_type != FIMD_CLK_TYPE0) {
> > > +		clk_disable(sfb->bus_clk);
> > > +		clk_put(sfb->bus_clk);
> > > +	}
> > >
> > >  err_sfb:
> > >  	kfree(sfb);
> [snip]
> 
> BRs,
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 3/4] s3c-fb: Add support S5PV310 FIMD
  2010-10-21  4:58   ` Inki Dae
@ 2010-10-25  7:10     ` han jonghun
  0 siblings, 0 replies; 15+ messages in thread
From: han jonghun @ 2010-10-25  7:10 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

Thanks for comment.

[snip]
>> >
>> > I don't think that the driver is the right place to change the parent of
>> > the sclk_fimd
>> > clock. It should be done in the boot loader or the board startup code.
>> >
>>
>> As you know, there are two clock sources for LCD pixel clock.
>> s3c-fb only used 'lcd' clock as a parent of LCD pixel clock.
>> But from S5PV310 SCLK_FIMD is only used as a source of LCD pixel clock.
>> And SCLK_FIMD is only for FIMD. So the parent of the SCLK_FIMD can be
>> selected in the driver.
>> In my opinion it doesn't matter.
>>
>
> Parent clock is specific to machine
> because machines could have different type of lcd panel each other and
> any parent clocks for FIMD could be used according to the lcd panel.
> So for stable pixel clock setting, parent clock should be set
> at machine specific code and FIMD driver should preserve just clock gating.
>
Right. Parent clock is specific to machine.
But as you know, 'mout_mpll' can cover almost LCD pixel clock.
If other parent clock is needed, I'll get the parent clock or
separator via platform data from board file.
It is better than setting parent clock in board file at the point of
samsung mainline scheme.

BRs,

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH 3/4] s3c-fb: Add support S5PV310 FIMD
  2010-10-18 12:55 ` [PATCH 3/4] s3c-fb: Add support S5PV310 FIMD Sangbeom Kim
  2010-10-19  7:22   ` Marek Szyprowski
  2010-10-21  4:58   ` Inki Dae
@ 2010-11-12  5:26   ` Kukjin Kim
  2010-11-12  9:54   ` Inki Dae
  2010-11-12 10:40   ` Inki Dae
  4 siblings, 0 replies; 15+ messages in thread
From: Kukjin Kim @ 2010-11-12  5:26 UTC (permalink / raw)
  To: linux-arm-kernel

Sangbeom Kim wrote:
> 
> From: Jonghun Han <jonghun.han@samsung.com>
> 
> This patch adds s3c_fb_driverdata for S5PV310 FIMD0. The clk_type is added
> to distinguish clock type in structure s3c_fb_variant and lcd_clk is added
> in structure s3c_fb to calculate divider for lcd panel.
> FIMD can handles two clocks. The one is for FIMD IP and the other is for
> LCD pixel clock. Before S5PV310 LCD pixel clock can be same with FIMD IP
> clock. From S5PV310 LCD pixel clock is separated from FIMD IP clock.
> 
> Signed-off-by: Jonghun Han <jonghun.han@samsung.com>
> Reviewed-by: Kukjin Kim <kgene.kim@samsung.com>
> Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
> Cc: Ben Dooks <ben-linux@fluff.org>

Hi Ben,

How do you think about this?
If you're ok, I'd like to send this to upstream via mmotm.

> ---
> NOTE: This patch is only for FIMD0.
> FIMD1 will be implemented later.
>  drivers/video/Kconfig  |    2 +-
>  drivers/video/s3c-fb.c |  128
++++++++++++++++++++++++++++++++++++++++++----
> --
>  2 files changed, 114 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> index 8b31fdf..3e2e02a 100644
> --- a/drivers/video/Kconfig
> +++ b/drivers/video/Kconfig
> @@ -1946,7 +1946,7 @@ config FB_TMIO_ACCELL
> 
>  config FB_S3C
>  	tristate "Samsung S3C framebuffer support"
> -	depends on FB && S3C_DEV_FB
> +	depends on FB && (S3C_DEV_FB || S5P_DEV_FIMD0)
>  	select FB_CFB_FILLRECT
>  	select FB_CFB_COPYAREA
>  	select FB_CFB_IMAGEBLIT
> diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
> index f9aca9d..bc182ea 100644
> --- a/drivers/video/s3c-fb.c
> +++ b/drivers/video/s3c-fb.c
> @@ -65,6 +65,9 @@ struct s3c_fb;
>  #define VIDOSD_C(win, variant) (OSD_BASE(win, variant) + 0x08)
>  #define VIDOSD_D(win, variant) (OSD_BASE(win, variant) + 0x0C)
> 
> +#define FIMD_CLK_TYPE0	0
> +#define FIMD_CLK_TYPE1	1
> +
>  /**
>   * struct s3c_fb_variant - fb variant information
>   * @is_2443: Set if S3C2443/S3C2416 style hardware.
> @@ -97,6 +100,7 @@ struct s3c_fb_variant {
> 
>  	unsigned int	has_prtcon:1;
>  	unsigned int	has_shadowcon:1;
> +	unsigned int	clk_type:1;
>  };
> 
>  /**
> @@ -183,7 +187,8 @@ struct s3c_fb_vsync {
>   * struct s3c_fb - overall hardware state of the hardware
>   * @dev: The device that we bound to, for printing, etc.
>   * @regs_res: The resource we claimed for the IO registers.
> - * @bus_clk: The clk (hclk) feeding our interface and possibly pixclk.
> + * @bus_clk: The clk (hclk) feeding FIMD IP core.
> + * @lcd_clk: The clk (sclk) feeding our interface and possibly pixclk.
>   * @regs: The mapped hardware registers.
>   * @variant: Variant information for this hardware.
>   * @enabled: A bitmask of enabled hardware windows.
> @@ -197,6 +202,7 @@ struct s3c_fb {
>  	struct device		*dev;
>  	struct resource		*regs_res;
>  	struct clk		*bus_clk;
> +	struct clk		*lcd_clk;
>  	void __iomem		*regs;
>  	struct s3c_fb_variant	 variant;
> 
> @@ -334,7 +340,7 @@ static int s3c_fb_check_var(struct fb_var_screeninfo
*var,
>   */
>  static int s3c_fb_calc_pixclk(struct s3c_fb *sfb, unsigned int pixclk)
>  {
> -	unsigned long clk = clk_get_rate(sfb->bus_clk);
> +	unsigned long clk = clk_get_rate(sfb->lcd_clk);
>  	unsigned long long tmp;
>  	unsigned int result;
> 
> @@ -517,7 +523,7 @@ static int s3c_fb_set_par(struct fb_info *info)
> 
>  		data = VIDTCON2_LINEVAL(var->yres - 1) |
>  		       VIDTCON2_HOZVAL(var->xres - 1);
> -		writel(data, regs +sfb->variant.vidtcon + 8 );
> +		writel(data, regs + sfb->variant.vidtcon + 8);
>  	}
> 
>  	/* write the buffer address */
> @@ -1286,8 +1292,10 @@ static int __devinit s3c_fb_probe(struct
> platform_device *pdev)
>  	struct s3c_fb_platdata *pd;
>  	struct s3c_fb *sfb;
>  	struct resource *res;
> +	struct clk *mout_mpll = NULL;
>  	int win;
>  	int ret = 0;
> +	u32 rate = 134000000;
> 
>  	fbdrv = (struct s3c_fb_driverdata *)platform_get_device_id(pdev)-
> >driver_data;
> 
> @@ -1314,19 +1322,56 @@ static int __devinit s3c_fb_probe(struct
> platform_device *pdev)
>  	sfb->pdata = pd;
>  	sfb->variant = fbdrv->variant;
> 
> -	sfb->bus_clk = clk_get(dev, "lcd");
> -	if (IS_ERR(sfb->bus_clk)) {
> -		dev_err(dev, "failed to get bus clock\n");
> +	switch (sfb->variant.clk_type) {
> +	case FIMD_CLK_TYPE0:
> +		sfb->bus_clk = clk_get(dev, "lcd");
> +		if (IS_ERR(sfb->bus_clk)) {
> +			dev_err(dev, "failed to get bus clock\n");
> +			goto err_sfb;
> +		}
> +
> +		clk_enable(sfb->bus_clk);
> +
> +		sfb->lcd_clk = sfb->bus_clk;
> +		break;
> +
> +	case FIMD_CLK_TYPE1:
> +		sfb->bus_clk = clk_get(&pdev->dev, "fimd");
> +		if (IS_ERR(sfb->bus_clk)) {
> +			dev_err(&pdev->dev, "failed to get clock for
fimd\n");
> +			goto err_sfb;
> +		}
> +		clk_enable(sfb->bus_clk);
> +
> +		sfb->lcd_clk = clk_get(&pdev->dev, "sclk_fimd");
> +		if (IS_ERR(sfb->lcd_clk)) {
> +			dev_err(&pdev->dev, "failed to get sclk for
fimd\n");
> +			goto err_bus_clk;
> +		}
> +
> +		mout_mpll = clk_get(&pdev->dev, "mout_mpll");
> +		if (IS_ERR(mout_mpll)) {
> +			dev_err(&pdev->dev, "failed to get mout_mpll\n");
> +			goto err_lcd_clk;
> +		}
> +		clk_set_parent(sfb->lcd_clk, mout_mpll);
> +		clk_put(mout_mpll);
> +
> +		clk_set_rate(sfb->lcd_clk, rate);
> +		clk_enable(sfb->lcd_clk);
> +		dev_dbg(&pdev->dev, "set fimd sclk rate to %d\n", rate);
> +		break;
> +
> +	default:
> +		dev_err(dev, "failed to enable clock for FIMD\n");
>  		goto err_sfb;
>  	}
> 
> -	clk_enable(sfb->bus_clk);
> -
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	if (!res) {
>  		dev_err(dev, "failed to find registers\n");
>  		ret = -ENOENT;
> -		goto err_clk;
> +		goto err_lcd_clk;
>  	}
> 
>  	sfb->regs_res = request_mem_region(res->start, resource_size(res),
> @@ -1334,7 +1379,7 @@ static int __devinit s3c_fb_probe(struct
> platform_device *pdev)
>  	if (!sfb->regs_res) {
>  		dev_err(dev, "failed to claim register region\n");
>  		ret = -ENOENT;
> -		goto err_clk;
> +		goto err_lcd_clk;
>  	}
> 
>  	sfb->regs = ioremap(res->start, resource_size(res));
> @@ -1413,9 +1458,15 @@ err_req_region:
>  	release_resource(sfb->regs_res);
>  	kfree(sfb->regs_res);
> 
> -err_clk:
> -	clk_disable(sfb->bus_clk);
> -	clk_put(sfb->bus_clk);
> +err_lcd_clk:
> +	clk_disable(sfb->lcd_clk);
> +	clk_put(sfb->lcd_clk);
> +
> +err_bus_clk:
> +	if (sfb->variant.clk_type != FIMD_CLK_TYPE0) {
> +		clk_disable(sfb->bus_clk);
> +		clk_put(sfb->bus_clk);
> +	}
> 
>  err_sfb:
>  	kfree(sfb);
> @@ -1442,8 +1493,20 @@ static int __devexit s3c_fb_remove(struct
> platform_device *pdev)
> 
>  	iounmap(sfb->regs);
> 
> -	clk_disable(sfb->bus_clk);
> -	clk_put(sfb->bus_clk);
> +	switch (sfb->variant.clk_type) {
> +	case FIMD_CLK_TYPE1:
> +		clk_disable(sfb->lcd_clk);
> +		clk_put(sfb->lcd_clk);
> +		/* fall through to default case */
> +	case FIMD_CLK_TYPE0:
> +		clk_disable(sfb->bus_clk);
> +		clk_put(sfb->bus_clk);
> +		break;
> +	default:
> +		dev_err(sfb->dev, "invalid clock type(%d)\n",
> +			sfb->variant.clk_type);
> +		break;
> +	}
> 
>  	release_resource(sfb->regs_res);
>  	kfree(sfb->regs_res);
> @@ -1470,6 +1533,7 @@ static int s3c_fb_suspend(struct platform_device
*pdev,
> pm_message_t state)
>  	}
> 
>  	clk_disable(sfb->bus_clk);
> +
>  	return 0;
>  }
> 
> @@ -1656,6 +1720,37 @@ static struct s3c_fb_driverdata s3c_fb_data_s5pv210
> {
>  	.win[4]	= &s3c_fb_data_64xx_wins[4],
>  };
> 
> +static struct s3c_fb_driverdata s3c_fb_data_s5pv310 = {
> +	.variant = {
> +		.nr_windows	= 5,
> +		.vidtcon	= VIDTCON0,
> +		.wincon		= WINCON(0),
> +		.winmap		= WINxMAP(0),
> +		.keycon		= WKEYCON,
> +		.osd		= VIDOSD_BASE,
> +		.osd_stride	= 16,
> +		.buf_start	= VIDW_BUF_START(0),
> +		.buf_size	= VIDW_BUF_SIZE(0),
> +		.buf_end	= VIDW_BUF_END(0),
> +
> +		.palette = {
> +			[0] = 0x2400,
> +			[1] = 0x2800,
> +			[2] = 0x2c00,
> +			[3] = 0x3000,
> +			[4] = 0x3400,
> +		},
> +
> +		.has_shadowcon	= 1,
> +		.clk_type	= FIMD_CLK_TYPE1,
> +	},
> +	.win[0]	= &s3c_fb_data_64xx_wins[0],
> +	.win[1]	= &s3c_fb_data_64xx_wins[1],
> +	.win[2]	= &s3c_fb_data_64xx_wins[2],
> +	.win[3]	= &s3c_fb_data_64xx_wins[3],
> +	.win[4]	= &s3c_fb_data_64xx_wins[4],
> +};
> +
>  /* S3C2443/S3C2416 style hardware */
>  static struct s3c_fb_driverdata s3c_fb_data_s3c2443 = {
>  	.variant = {
> @@ -1703,6 +1798,9 @@ static struct platform_device_id s3c_fb_driver_ids[]
> {
>  		.name		= "s5pv210-fb",
>  		.driver_data	= (unsigned long)&s3c_fb_data_s5pv210,
>  	}, {
> +		.name		= "s5pv310-fb",
> +		.driver_data	= (unsigned long)&s3c_fb_data_s5pv310,
> +	}, {
>  		.name		= "s3c2443-fb",
>  		.driver_data	= (unsigned long)&s3c_fb_data_s3c2443,
>  	},
> --


Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH 3/4] s3c-fb: Add support S5PV310 FIMD
  2010-10-18 12:55 ` [PATCH 3/4] s3c-fb: Add support S5PV310 FIMD Sangbeom Kim
                     ` (2 preceding siblings ...)
  2010-11-12  5:26   ` Kukjin Kim
@ 2010-11-12  9:54   ` Inki Dae
  2010-11-12 10:08     ` Paul Mundt
  2010-11-12 10:40   ` Inki Dae
  4 siblings, 1 reply; 15+ messages in thread
From: Inki Dae @ 2010-11-12  9:54 UTC (permalink / raw)
  To: linux-fbdev

Hello, all.

This is my opinion and patch.

Jonghun's patch is adding clock type(FIMD_CLK_TYPE1 or FIMD_CLK_TYPE2) and
also
clk_type variable to s3c_fb_variant to select which clock would be used.
I think we could meet that simply if source clock and parent clock
names are set to platform data in machine file.

I added my comments to Jonghun's patch and attached modified patch below.
Thank you.

diff --git a/arch/arm/plat-samsung/include/plat/fb.h
b/arch/arm/plat-samsung/include/plat/fb.h
index ed70fc5..411380e 100644
--- a/arch/arm/plat-samsung/include/plat/fb.h
+++ b/arch/arm/plat-samsung/include/plat/fb.h
@@ -47,6 +47,10 @@ struct s3c_fb_pd_win {
  * @vidcon1: The base vidcon1 values to control the panel data output.
  * @win: The setup data for each hardware window, or NULL for unused.
  * @display_mode: The LCD output display mode.
+ * @sclk_name:	source clock name and sclk_name valiable should be set
+ *		at machine specific file.
+ * @pclk_name: parent clock name and pclk_name valiable should be set
+ *		at machine specific file.
  *
  * The platform data supplies the video driver with all the information
  * it requires to work with the display(s) attached to the machine. It
@@ -63,6 +67,9 @@ struct s3c_fb_platdata {
 
 	u32			 vidcon0;
 	u32			 vidcon1;
+
+	const char		*sclk_name;
+	const char		*pclk_name;
 };
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
index f9aca9d..96a746c 100644
--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -27,6 +27,7 @@
 #include <mach/map.h>
 #include <plat/regs-fb-v4.h>
 #include <plat/fb.h>
+#include <plat/clock.h>
 
 /* This driver will export a number of framebuffer interfaces depending
  * on the configuration passed in via the platform data. Each fb instance
@@ -183,7 +184,7 @@ struct s3c_fb_vsync {
  * struct s3c_fb - overall hardware state of the hardware
  * @dev: The device that we bound to, for printing, etc.
  * @regs_res: The resource we claimed for the IO registers.
- * @bus_clk: The clk (hclk) feeding our interface and possibly pixclk.
+ * @lcd_clk: The clk (hclk or sclk) feeding our interface and possibly
pixclk.
  * @regs: The mapped hardware registers.
  * @variant: Variant information for this hardware.
  * @enabled: A bitmask of enabled hardware windows.
@@ -196,7 +197,7 @@ struct s3c_fb_vsync {
 struct s3c_fb {
 	struct device		*dev;
 	struct resource		*regs_res;
-	struct clk		*bus_clk;
+	struct clk		*lcd_clk;
 	void __iomem		*regs;
 	struct s3c_fb_variant	 variant;
 
@@ -334,7 +335,11 @@ static int s3c_fb_check_var(struct fb_var_screeninfo
*var,
  */
 static int s3c_fb_calc_pixclk(struct s3c_fb *sfb, unsigned int pixclk)
 {
-	unsigned long clk = clk_get_rate(sfb->bus_clk);
+	/**
+	 * if it fails to get clock rate from lcd_clk
+	 * then would get it from parent clock of lcd_clk.
+	 */
+	unsigned long clk = clk_get_rate(sfb->lcd_clk);
 	unsigned long long tmp;
 	unsigned int result;
 
@@ -1314,13 +1319,22 @@ static int __devinit s3c_fb_probe(struct
platform_device *pdev)
 	sfb->pdata = pd;
 	sfb->variant = fbdrv->variant;
 
-	sfb->bus_clk = clk_get(dev, "lcd");
-	if (IS_ERR(sfb->bus_clk)) {
-		dev_err(dev, "failed to get bus clock\n");
+	/* if sclk_name is NULL then it would use bus clock as default. */
+	if (!pd->sclk_name)
+		sfb->lcd_clk = clk_get(dev, "lcd");
+	else
+		sfb->lcd_clk = clk_get(dev, pd->sclk_name);
+
+	if (IS_ERR(sfb->lcd_clk)) {
+		dev_err(dev, "failed to get lcd clock\n");
+		clk_put(sfb->lcd_clk);
 		goto err_sfb;
 	}
 
-	clk_enable(sfb->bus_clk);
+	if (pd->pclk_name)
+		sfb->lcd_clk->parent = clk_get(dev, pd->pclk_name);
+
+	clk_enable(sfb->lcd_clk);
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	if (!res) {
@@ -1414,8 +1428,8 @@ err_req_region:
 	kfree(sfb->regs_res);
 
 err_clk:
-	clk_disable(sfb->bus_clk);
-	clk_put(sfb->bus_clk);
+	clk_disable(sfb->lcd_clk);
+	clk_put(sfb->lcd_clk);
 
 err_sfb:
 	kfree(sfb);
@@ -1442,8 +1456,8 @@ static int __devexit s3c_fb_remove(struct
platform_device *pdev)
 
 	iounmap(sfb->regs);
 
-	clk_disable(sfb->bus_clk);
-	clk_put(sfb->bus_clk);
+	clk_disable(sfb->lcd_clk);
+	clk_put(sfb->lcd_clk);
 
 	release_resource(sfb->regs_res);
 	kfree(sfb->regs_res);
@@ -1469,7 +1483,8 @@ static int s3c_fb_suspend(struct platform_device
*pdev, pm_message_t state)
 		s3c_fb_blank(FB_BLANK_POWERDOWN, win->fbinfo);
 	}
 
-	clk_disable(sfb->bus_clk);
+	clk_disable(sfb->lcd_clk);
+
 	return 0;
 }
 
@@ -1480,7 +1495,7 @@ static int s3c_fb_resume(struct platform_device *pdev)
 	struct s3c_fb_win *win;
 	int win_no;
 
-	clk_enable(sfb->bus_clk);
+	clk_enable(sfb->lcd_clk);
 
 	/* setup registers */
 	writel(pd->vidcon1, sfb->regs + VIDCON1);
@@ -1656,6 +1671,36 @@ static struct s3c_fb_driverdata s3c_fb_data_s5pv210 {
 	.win[4]	= &s3c_fb_data_64xx_wins[4],
 };
 
+static struct s3c_fb_driverdata s3c_fb_data_s5pv310 = {
+       .variant = {
+               .nr_windows     = 5,
+               .vidtcon        = VIDTCON0,
+               .wincon         = WINCON(0),
+               .winmap         = WINxMAP(0),
+               .keycon         = WKEYCON,
+               .osd            = VIDOSD_BASE,
+               .osd_stride     = 16,
+               .buf_start      = VIDW_BUF_START(0),
+               .buf_size       = VIDW_BUF_SIZE(0),
+               .buf_end        = VIDW_BUF_END(0),
+
+               .palette = {
+                       [0] = 0x2400,
+                       [1] = 0x2800,
+                       [2] = 0x2c00,
+                       [3] = 0x3000,
+                       [4] = 0x3400,
+               },
+
+               .has_shadowcon  = 1,
+       },
+       .win[0] = &s3c_fb_data_64xx_wins[0],
+       .win[1] = &s3c_fb_data_64xx_wins[1],
+       .win[2] = &s3c_fb_data_64xx_wins[2],
+       .win[3] = &s3c_fb_data_64xx_wins[3],
+       .win[4] = &s3c_fb_data_64xx_wins[4],
+};
+
 /* S3C2443/S3C2416 style hardware */
 static struct s3c_fb_driverdata s3c_fb_data_s3c2443 = {
 	.variant = {
@@ -1703,6 +1748,9 @@ static struct platform_device_id s3c_fb_driver_ids[] {
 		.name		= "s5pv210-fb",
 		.driver_data	= (unsigned long)&s3c_fb_data_s5pv210,
 	}, {
+		.name		= "s5pv310-fb",
+		.driver_data	= (unsigned long)&s3c_fb_data_s5pv310,
+	}, {
 		.name		= "s3c2443-fb",
 		.driver_data	= (unsigned long)&s3c_fb_data_s3c2443,
 	},

> -----Original Message-----
> From: linux-fbdev-owner@vger.kernel.org [mailto:linux-fbdev-
> owner@vger.kernel.org] On Behalf Of Kukjin Kim
> Sent: Friday, November 12, 2010 2:26 PM
> To: 'Sangbeom Kim'; linux-arm-kernel@lists.infradead.org; linux-samsung-
> soc@vger.kernel.org; linux-fbdev@vger.kernel.org
> Cc: ben-linux@fluff.org; akpm@linux-foundation.org; 'Jonghun Han'
> Subject: RE: [PATCH 3/4] s3c-fb: Add support S5PV310 FIMD
> 
> Sangbeom Kim wrote:
> >
> > From: Jonghun Han <jonghun.han@samsung.com>
> >
> > This patch adds s3c_fb_driverdata for S5PV310 FIMD0. The clk_type is
> added
> > to distinguish clock type in structure s3c_fb_variant and lcd_clk is
> added
> > in structure s3c_fb to calculate divider for lcd panel.
> > FIMD can handles two clocks. The one is for FIMD IP and the other is for
> > LCD pixel clock. Before S5PV310 LCD pixel clock can be same with FIMD IP
> > clock. From S5PV310 LCD pixel clock is separated from FIMD IP clock.
> >
> > Signed-off-by: Jonghun Han <jonghun.han@samsung.com>
> > Reviewed-by: Kukjin Kim <kgene.kim@samsung.com>
> > Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
> > Cc: Ben Dooks <ben-linux@fluff.org>
> 
> Hi Ben,
> 
> How do you think about this?
> If you're ok, I'd like to send this to upstream via mmotm.
> 
> > ---
> > NOTE: This patch is only for FIMD0.
> > FIMD1 will be implemented later.
> >  drivers/video/Kconfig  |    2 +-
> >  drivers/video/s3c-fb.c |  128
> ++++++++++++++++++++++++++++++++++++++++++----
> > --
> >  2 files changed, 114 insertions(+), 16 deletions(-)
> >
> > diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> > index 8b31fdf..3e2e02a 100644
> > --- a/drivers/video/Kconfig
> > +++ b/drivers/video/Kconfig
> > @@ -1946,7 +1946,7 @@ config FB_TMIO_ACCELL
> >
> >  config FB_S3C
> >  	tristate "Samsung S3C framebuffer support"
> > -	depends on FB && S3C_DEV_FB
> > +	depends on FB && (S3C_DEV_FB || S5P_DEV_FIMD0)
> >  	select FB_CFB_FILLRECT
> >  	select FB_CFB_COPYAREA
> >  	select FB_CFB_IMAGEBLIT
> > diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
> > index f9aca9d..bc182ea 100644
> > --- a/drivers/video/s3c-fb.c
> > +++ b/drivers/video/s3c-fb.c
> > @@ -65,6 +65,9 @@ struct s3c_fb;
> >  #define VIDOSD_C(win, variant) (OSD_BASE(win, variant) + 0x08)
> >  #define VIDOSD_D(win, variant) (OSD_BASE(win, variant) + 0x0C)
> >
> > +#define FIMD_CLK_TYPE0	0
> > +#define FIMD_CLK_TYPE1	1
> > +
this macro is unnecessary.

> >  /**
> >   * struct s3c_fb_variant - fb variant information
> >   * @is_2443: Set if S3C2443/S3C2416 style hardware.
> > @@ -97,6 +100,7 @@ struct s3c_fb_variant {
> >
> >  	unsigned int	has_prtcon:1;
> >  	unsigned int	has_shadowcon:1;
> > +	unsigned int	clk_type:1;
> >  };
> >
> >  /**
> > @@ -183,7 +187,8 @@ struct s3c_fb_vsync {
> >   * struct s3c_fb - overall hardware state of the hardware
> >   * @dev: The device that we bound to, for printing, etc.
> >   * @regs_res: The resource we claimed for the IO registers.
> > - * @bus_clk: The clk (hclk) feeding our interface and possibly pixclk.
> > + * @bus_clk: The clk (hclk) feeding FIMD IP core.
> > + * @lcd_clk: The clk (sclk) feeding our interface and possibly pixclk.
> >   * @regs: The mapped hardware registers.
> >   * @variant: Variant information for this hardware.
> >   * @enabled: A bitmask of enabled hardware windows.
> > @@ -197,6 +202,7 @@ struct s3c_fb {
> >  	struct device		*dev;
> >  	struct resource		*regs_res;
> >  	struct clk		*bus_clk;
> > +	struct clk		*lcd_clk;
> >  	void __iomem		*regs;
> >  	struct s3c_fb_variant	 variant;
> >
bus_clk and lcd_clk could be integrated as lcd_clk.
and Ben, lcd_clk is better then bus_clk because hclk or sclk could be used
according to lcd panel on machine for stable use.

> > @@ -334,7 +340,7 @@ static int s3c_fb_check_var(struct fb_var_screeninfo
> *var,
> >   */
> >  static int s3c_fb_calc_pixclk(struct s3c_fb *sfb, unsigned int pixclk)
> >  {
> > -	unsigned long clk = clk_get_rate(sfb->bus_clk);
> > +	unsigned long clk = clk_get_rate(sfb->lcd_clk);
> >  	unsigned long long tmp;
> >  	unsigned int result;
> >
> > @@ -517,7 +523,7 @@ static int s3c_fb_set_par(struct fb_info *info)
> >
> >  		data = VIDTCON2_LINEVAL(var->yres - 1) |
> >  		       VIDTCON2_HOZVAL(var->xres - 1);
> > -		writel(data, regs +sfb->variant.vidtcon + 8 );
> > +		writel(data, regs + sfb->variant.vidtcon + 8);
> >  	}
> >
> >  	/* write the buffer address */
> > @@ -1286,8 +1292,10 @@ static int __devinit s3c_fb_probe(struct
> > platform_device *pdev)
> >  	struct s3c_fb_platdata *pd;
> >  	struct s3c_fb *sfb;
> >  	struct resource *res;
> > +	struct clk *mout_mpll = NULL;
> >  	int win;
> >  	int ret = 0;
> > +	u32 rate = 134000000;
> >
> >  	fbdrv = (struct s3c_fb_driverdata *)platform_get_device_id(pdev)-
> > >driver_data;
> >
> > @@ -1314,19 +1322,56 @@ static int __devinit s3c_fb_probe(struct
> > platform_device *pdev)
> >  	sfb->pdata = pd;
> >  	sfb->variant = fbdrv->variant;
> >
> > -	sfb->bus_clk = clk_get(dev, "lcd");
> > -	if (IS_ERR(sfb->bus_clk)) {
> > -		dev_err(dev, "failed to get bus clock\n");




> > +	switch (sfb->variant.clk_type) {
> > +	case FIMD_CLK_TYPE0:
> > +		sfb->bus_clk = clk_get(dev, "lcd");
> > +		if (IS_ERR(sfb->bus_clk)) {
> > +			dev_err(dev, "failed to get bus clock\n");
> > +			goto err_sfb;
> > +		}
> > +
> > +		clk_enable(sfb->bus_clk);
> > +
> > +		sfb->lcd_clk = sfb->bus_clk;
> > +		break;
> > +
> > +	case FIMD_CLK_TYPE1:
> > +		sfb->bus_clk = clk_get(&pdev->dev, "fimd");
> > +		if (IS_ERR(sfb->bus_clk)) {
> > +			dev_err(&pdev->dev, "failed to get clock for
> fimd\n");
> > +			goto err_sfb;
> > +		}
> > +		clk_enable(sfb->bus_clk);
> > +
> > +		sfb->lcd_clk = clk_get(&pdev->dev, "sclk_fimd");
> > +		if (IS_ERR(sfb->lcd_clk)) {
> > +			dev_err(&pdev->dev, "failed to get sclk for
> fimd\n");
> > +			goto err_bus_clk;
> > +		}
> > +
> > +		mout_mpll = clk_get(&pdev->dev, "mout_mpll");
> > +		if (IS_ERR(mout_mpll)) {
> > +			dev_err(&pdev->dev, "failed to get mout_mpll\n");
> > +			goto err_lcd_clk;
> > +		}
> > +		clk_set_parent(sfb->lcd_clk, mout_mpll);
> > +		clk_put(mout_mpll);
> > +
> > +		clk_set_rate(sfb->lcd_clk, rate);
> > +		clk_enable(sfb->lcd_clk);
> > +		dev_dbg(&pdev->dev, "set fimd sclk rate to %d\n", rate);
> > +		break;
> > +
> > +	default:
> > +		dev_err(dev, "failed to enable clock for FIMD\n");
> >  		goto err_sfb;
> >  	}
> >
This code above is unnecessary. if sclk_name of platform data is null then
it could get clock "lcd" otherwise sclk_name.
in case of "lcd", fimd would use bus clock as parent clock but
for sclk_name, sclk_fimd clock.

and
 if (pd->pclk_name)
	sfb->lcd_clk->parent = clk_get(dev, pd->pclk_name);
by adding the code above,
we could get appropriate clock rate through clk_get_rate(sfb->lcd_clk) call
at s3c_fb_calc_pixclk function.
(clk_get_rate function gets clock rate of parent if lcd_clk->rate is 0)


> > -	clk_enable(sfb->bus_clk);
> > -
> >  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> >  	if (!res) {
> >  		dev_err(dev, "failed to find registers\n");
> >  		ret = -ENOENT;
> > -		goto err_clk;
> > +		goto err_lcd_clk;
> >  	}
> >
> >  	sfb->regs_res = request_mem_region(res->start, resource_size(res),
> > @@ -1334,7 +1379,7 @@ static int __devinit s3c_fb_probe(struct
> > platform_device *pdev)
> >  	if (!sfb->regs_res) {
> >  		dev_err(dev, "failed to claim register region\n");
> >  		ret = -ENOENT;
> > -		goto err_clk;
> > +		goto err_lcd_clk;
> >  	}
> >
> >  	sfb->regs = ioremap(res->start, resource_size(res));
> > @@ -1413,9 +1458,15 @@ err_req_region:
> >  	release_resource(sfb->regs_res);
> >  	kfree(sfb->regs_res);
> >
> > -err_clk:
> > -	clk_disable(sfb->bus_clk);
> > -	clk_put(sfb->bus_clk);
> > +err_lcd_clk:
> > +	clk_disable(sfb->lcd_clk);
> > +	clk_put(sfb->lcd_clk);
> > +
> > +err_bus_clk:
> > +	if (sfb->variant.clk_type != FIMD_CLK_TYPE0) {
> > +		clk_disable(sfb->bus_clk);
> > +		clk_put(sfb->bus_clk);
> > +	}
> >
> >  err_sfb:
> >  	kfree(sfb);
> > @@ -1442,8 +1493,20 @@ static int __devexit s3c_fb_remove(struct
> > platform_device *pdev)
> >
> >  	iounmap(sfb->regs);
> >
> > -	clk_disable(sfb->bus_clk);
> > -	clk_put(sfb->bus_clk);


> > +	switch (sfb->variant.clk_type) {
> > +	case FIMD_CLK_TYPE1:
> > +		clk_disable(sfb->lcd_clk);
> > +		clk_put(sfb->lcd_clk);
> > +		/* fall through to default case */
> > +	case FIMD_CLK_TYPE0:
> > +		clk_disable(sfb->bus_clk);
> > +		clk_put(sfb->bus_clk);
> > +		break;
> > +	default:
> > +		dev_err(sfb->dev, "invalid clock type(%d)\n",
> > +			sfb->variant.clk_type);
> > +		break;
> > +	}
this code above is unnecessary anymore.


> >
> >  	release_resource(sfb->regs_res);
> >  	kfree(sfb->regs_res);
> > @@ -1470,6 +1533,7 @@ static int s3c_fb_suspend(struct platform_device
> *pdev,
> > pm_message_t state)
> >  	}
> >
> >  	clk_disable(sfb->bus_clk);
> > +
> >  	return 0;
> >  }
> >
> > @@ -1656,6 +1720,37 @@ static struct s3c_fb_driverdata
> s3c_fb_data_s5pv210
> > > {
> >  	.win[4]	= &s3c_fb_data_64xx_wins[4],
> >  };
> >
> > +static struct s3c_fb_driverdata s3c_fb_data_s5pv310 = {
> > +	.variant = {
> > +		.nr_windows	= 5,
> > +		.vidtcon	= VIDTCON0,
> > +		.wincon		= WINCON(0),
> > +		.winmap		= WINxMAP(0),
> > +		.keycon		= WKEYCON,
> > +		.osd		= VIDOSD_BASE,
> > +		.osd_stride	= 16,
> > +		.buf_start	= VIDW_BUF_START(0),
> > +		.buf_size	= VIDW_BUF_SIZE(0),
> > +		.buf_end	= VIDW_BUF_END(0),
> > +
> > +		.palette = {
> > +			[0] = 0x2400,
> > +			[1] = 0x2800,
> > +			[2] = 0x2c00,
> > +			[3] = 0x3000,
> > +			[4] = 0x3400,
> > +		},
> > +
> > +		.has_shadowcon	= 1,
> > +		.clk_type	= FIMD_CLK_TYPE1,
clk_type is unnecessary anymore.


> > +	},
> > +	.win[0]	= &s3c_fb_data_64xx_wins[0],
> > +	.win[1]	= &s3c_fb_data_64xx_wins[1],
> > +	.win[2]	= &s3c_fb_data_64xx_wins[2],
> > +	.win[3]	= &s3c_fb_data_64xx_wins[3],
> > +	.win[4]	= &s3c_fb_data_64xx_wins[4],
> > +};
> > +
> >  /* S3C2443/S3C2416 style hardware */
> >  static struct s3c_fb_driverdata s3c_fb_data_s3c2443 = {
> >  	.variant = {
> > @@ -1703,6 +1798,9 @@ static struct platform_device_id
> s3c_fb_driver_ids[]
> > > {
> >  		.name		= "s5pv210-fb",
> >  		.driver_data	= (unsigned long)&s3c_fb_data_s5pv210,
> >  	}, {
> > +		.name		= "s5pv310-fb",
> > +		.driver_data	= (unsigned long)&s3c_fb_data_s5pv310,
> > +	}, {
> >  		.name		= "s3c2443-fb",
> >  		.driver_data	= (unsigned long)&s3c_fb_data_s3c2443,
> >  	},
> > --
> 
> 
> Thanks.
> 
> Best regards,
> Kgene.
> --
> Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH 3/4] s3c-fb: Add support S5PV310 FIMD
  2010-11-12  9:54   ` Inki Dae
@ 2010-11-12 10:08     ` Paul Mundt
  0 siblings, 0 replies; 15+ messages in thread
From: Paul Mundt @ 2010-11-12 10:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Nov 12, 2010 at 06:54:29PM +0900, Inki Dae wrote:
> @@ -1314,13 +1319,22 @@ static int __devinit s3c_fb_probe(struct
> platform_device *pdev)
>  	sfb->pdata = pd;
>  	sfb->variant = fbdrv->variant;
>  
> -	sfb->bus_clk = clk_get(dev, "lcd");
> -	if (IS_ERR(sfb->bus_clk)) {
> -		dev_err(dev, "failed to get bus clock\n");
> +	/* if sclk_name is NULL then it would use bus clock as default. */
> +	if (!pd->sclk_name)
> +		sfb->lcd_clk = clk_get(dev, "lcd");
> +	else
> +		sfb->lcd_clk = clk_get(dev, pd->sclk_name);
> +
No, this is totally pointless. Simply establish a clk lookup for the
configuration you are running on in your board code and always have
clk_get() operate on a fixed id. You can use this same scheme with any
optional clocks you have too, and reconfigure according to whether the
lookups for optional clocks succeeded or not.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH 3/4] s3c-fb: Add support S5PV310 FIMD
  2010-10-18 12:55 ` [PATCH 3/4] s3c-fb: Add support S5PV310 FIMD Sangbeom Kim
                     ` (3 preceding siblings ...)
  2010-11-12  9:54   ` Inki Dae
@ 2010-11-12 10:40   ` Inki Dae
  2010-11-12 10:43     ` Paul Mundt
  4 siblings, 1 reply; 15+ messages in thread
From: Inki Dae @ 2010-11-12 10:40 UTC (permalink / raw)
  To: linux-fbdev


> -----Original Message-----
> From: Paul Mundt [mailto:lethal@linux-sh.org]
> Sent: Friday, November 12, 2010 7:09 PM
> To: Inki Dae
> Cc: 'Kukjin Kim'; 'Sangbeom Kim'; linux-arm-kernel@lists.infradead.org;
> linux-samsung-soc@vger.kernel.org; linux-fbdev@vger.kernel.org; ben-
> linux@fluff.org; akpm@linux-foundation.org; 'Jonghun Han'
> Subject: Re: [PATCH 3/4] s3c-fb: Add support S5PV310 FIMD
> 
> On Fri, Nov 12, 2010 at 06:54:29PM +0900, Inki Dae wrote:
> > @@ -1314,13 +1319,22 @@ static int __devinit s3c_fb_probe(struct
> > platform_device *pdev)
> >  	sfb->pdata = pd;
> >  	sfb->variant = fbdrv->variant;
> >
> > -	sfb->bus_clk = clk_get(dev, "lcd");
> > -	if (IS_ERR(sfb->bus_clk)) {
> > -		dev_err(dev, "failed to get bus clock\n");
> > +	/* if sclk_name is NULL then it would use bus clock as default. */
> > +	if (!pd->sclk_name)
> > +		sfb->lcd_clk = clk_get(dev, "lcd");
> > +	else
> > +		sfb->lcd_clk = clk_get(dev, pd->sclk_name);
> > +
> No, this is totally pointless. Simply establish a clk lookup for the
> configuration you are running on in your board code
You mean, call the function at s3c_fb_probe() establishing clk lookup in
board code?
Sorry but I could understand. Please give me more detail.

> and always have
> clk_get() operate on a fixed id. You can use this same scheme with any
> optional clocks you have too, and reconfigure according to whether the
> lookups for optional clocks succeeded or not.

optional clocks could be sclk_name?

I will glad to show me some example for it.
thank you.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 3/4] s3c-fb: Add support S5PV310 FIMD
  2010-11-12 10:40   ` Inki Dae
@ 2010-11-12 10:43     ` Paul Mundt
  0 siblings, 0 replies; 15+ messages in thread
From: Paul Mundt @ 2010-11-12 10:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Nov 12, 2010 at 07:40:16PM +0900, Inki Dae wrote:
> 
> > -----Original Message-----
> > From: Paul Mundt [mailto:lethal@linux-sh.org]
> > Sent: Friday, November 12, 2010 7:09 PM
> > To: Inki Dae
> > Cc: 'Kukjin Kim'; 'Sangbeom Kim'; linux-arm-kernel@lists.infradead.org;
> > linux-samsung-soc@vger.kernel.org; linux-fbdev@vger.kernel.org; ben-
> > linux@fluff.org; akpm@linux-foundation.org; 'Jonghun Han'
> > Subject: Re: [PATCH 3/4] s3c-fb: Add support S5PV310 FIMD
> > 
> > On Fri, Nov 12, 2010 at 06:54:29PM +0900, Inki Dae wrote:
> > > @@ -1314,13 +1319,22 @@ static int __devinit s3c_fb_probe(struct
> > > platform_device *pdev)
> > >  	sfb->pdata = pd;
> > >  	sfb->variant = fbdrv->variant;
> > >
> > > -	sfb->bus_clk = clk_get(dev, "lcd");
> > > -	if (IS_ERR(sfb->bus_clk)) {
> > > -		dev_err(dev, "failed to get bus clock\n");
> > > +	/* if sclk_name is NULL then it would use bus clock as default. */
> > > +	if (!pd->sclk_name)
> > > +		sfb->lcd_clk = clk_get(dev, "lcd");
> > > +	else
> > > +		sfb->lcd_clk = clk_get(dev, pd->sclk_name);
> > > +
> > No, this is totally pointless. Simply establish a clk lookup for the
> > configuration you are running on in your board code
> You mean, call the function at s3c_fb_probe() establishing clk lookup in
> board code?
> Sorry but I could understand. Please give me more detail.
> 
I mean use a clkdev lookup for resolving the clock instead of passing
around a string via platform data. Look at the asm/clkdev.h API and all
of the boards that are using it.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2010-11-12 10:43 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-18 12:55 [PATCH 0/4] ARM: S5PV310: Add support FIMD Sangbeom Kim
2010-10-18 12:55 ` [PATCH 1/4] ARM: S5PV310: Add FIMD resource definition Sangbeom Kim
2010-10-18 12:55 ` [PATCH 2/4] ARM: S5PV310: Add platform device and helper functions for FIMD Sangbeom Kim
2010-10-18 12:55 ` [PATCH 3/4] s3c-fb: Add support S5PV310 FIMD Sangbeom Kim
2010-10-19  7:22   ` Marek Szyprowski
2010-10-21  3:45     ` Jonghun Han
2010-10-21  4:58   ` Inki Dae
2010-10-25  7:10     ` han jonghun
2010-11-12  5:26   ` Kukjin Kim
2010-11-12  9:54   ` Inki Dae
2010-11-12 10:08     ` Paul Mundt
2010-11-12 10:40   ` Inki Dae
2010-11-12 10:43     ` Paul Mundt
2010-10-18 12:55 ` [PATCH 4/4] ARM: S5PV310: Add platform data for S5PV310 FIMD and LTE480WV platform-lcd Sangbeom Kim
2010-10-19  6:50   ` [PATCH 4/4] ARM: S5PV310: Add platform data for S5PV310 FIMD and Marek Szyprowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).