aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/board-ap4evb.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2010-11-02 11:27:34 +0000
committerPaul Mundt <lethal@linux-sh.org>2010-11-10 17:59:43 +0900
commit640dcfa0ff49ea1fcddad39e7c468683d9f00342 (patch)
tree1905072e89e68e99872592ff525ea9ccece3c520 /arch/arm/mach-shmobile/board-ap4evb.c
parentc724d07a56e60e91b0aa75193f86fb000545ffe4 (diff)
downloadkernel_samsung_smdk4412-640dcfa0ff49ea1fcddad39e7c468683d9f00342.zip
kernel_samsung_smdk4412-640dcfa0ff49ea1fcddad39e7c468683d9f00342.tar.gz
kernel_samsung_smdk4412-640dcfa0ff49ea1fcddad39e7c468683d9f00342.tar.bz2
ARM: mach-shmobile: optimize PLLC2 frequency for HDMI
On ap4evb PLLC2 is only used as a parent of the HDMI clock, therefore it can be reconfigured freely to improve HDMI clock precision. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/arm/mach-shmobile/board-ap4evb.c')
-rw-r--r--arch/arm/mach-shmobile/board-ap4evb.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index 32d9e28..732baed 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -669,10 +669,15 @@ static struct platform_device lcdc1_device = {
},
};
+static long ap4evb_clk_optimize(unsigned long target, unsigned long *best_freq,
+ unsigned long *parent_freq);
+
+
static struct sh_mobile_hdmi_info hdmi_info = {
.lcd_chan = &sh_mobile_lcdc1_info.ch[0],
.lcd_dev = &lcdc1_device.dev,
.flags = HDMI_SND_SRC_SPDIF,
+ .clk_optimize_parent = ap4evb_clk_optimize,
};
static struct resource hdmi_resources[] = {
@@ -699,6 +704,25 @@ static struct platform_device hdmi_device = {
},
};
+static long ap4evb_clk_optimize(unsigned long target, unsigned long *best_freq,
+ unsigned long *parent_freq)
+{
+ struct clk *hdmi_ick = clk_get(&hdmi_device.dev, "ick");
+ long error;
+
+ if (IS_ERR(hdmi_ick)) {
+ int ret = PTR_ERR(hdmi_ick);
+ pr_err("Cannot get HDMI ICK: %d\n", ret);
+ return ret;
+ }
+
+ error = clk_round_parent(hdmi_ick, target, best_freq, parent_freq, 1, 64);
+
+ clk_put(hdmi_ick);
+
+ return error;
+}
+
static struct gpio_led ap4evb_leds[] = {
{
.name = "led4",