aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2011-08-22 06:02:52 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-12 13:32:58 -0400
commit1825e65dbb5370d5cebd13dbdfe4bce86caf351c (patch)
treeecc375351dd486c44ca74e6eb1146d87e1ef29c5
parent2d339926c077870a29181d37839920ce3ecd7409 (diff)
OMAP: DSS2: HDMI: use default dividers
commit 8d88767a4377171752c22ac39bcb2b505eb751da upstream. Use default regn and regm2 dividers in the hdmi driver if the board file does not define them. Cc: Mythri P K <mythripk@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c9
-rw-r--r--drivers/video/omap2/dss/hdmi.c15
2 files changed, 13 insertions, 11 deletions
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 63de2d396e2..f515fa29a10 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -617,15 +617,6 @@ static struct omap_dss_device sdp4430_hdmi_device = {
617 .name = "hdmi", 617 .name = "hdmi",
618 .driver_name = "hdmi_panel", 618 .driver_name = "hdmi_panel",
619 .type = OMAP_DISPLAY_TYPE_HDMI, 619 .type = OMAP_DISPLAY_TYPE_HDMI,
620 .clocks = {
621 .dispc = {
622 .dispc_fclk_src = OMAP_DSS_CLK_SRC_FCK,
623 },
624 .hdmi = {
625 .regn = 15,
626 .regm2 = 1,
627 },
628 },
629 .platform_enable = sdp4430_panel_enable_hdmi, 620 .platform_enable = sdp4430_panel_enable_hdmi,
630 .platform_disable = sdp4430_panel_disable_hdmi, 621 .platform_disable = sdp4430_panel_disable_hdmi,
631 .channel = OMAP_DSS_CHANNEL_DIGIT, 622 .channel = OMAP_DSS_CHANNEL_DIGIT,
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index b0555f4f0a7..f3369cf3337 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -40,6 +40,9 @@
40#include "hdmi.h" 40#include "hdmi.h"
41#include "dss_features.h" 41#include "dss_features.h"
42 42
43#define HDMI_DEFAULT_REGN 15
44#define HDMI_DEFAULT_REGM2 1
45
43static struct { 46static struct {
44 struct mutex lock; 47 struct mutex lock;
45 struct omap_display_platform_data *pdata; 48 struct omap_display_platform_data *pdata;
@@ -1069,7 +1072,11 @@ static void hdmi_compute_pll(struct omap_dss_device *dssdev, int phy,
1069 * Input clock is predivided by N + 1 1072 * Input clock is predivided by N + 1
1070 * out put of which is reference clk 1073 * out put of which is reference clk
1071 */ 1074 */
1072 pi->regn = dssdev->clocks.hdmi.regn; 1075 if (dssdev->clocks.hdmi.regn == 0)
1076 pi->regn = HDMI_DEFAULT_REGN;
1077 else
1078 pi->regn = dssdev->clocks.hdmi.regn;
1079
1073 refclk = clkin / (pi->regn + 1); 1080 refclk = clkin / (pi->regn + 1);
1074 1081
1075 /* 1082 /*
@@ -1077,7 +1084,11 @@ static void hdmi_compute_pll(struct omap_dss_device *dssdev, int phy,
1077 * Multiplying by 100 to avoid fractional part removal 1084 * Multiplying by 100 to avoid fractional part removal
1078 */ 1085 */
1079 pi->regm = (phy * 100 / (refclk)) / 100; 1086 pi->regm = (phy * 100 / (refclk)) / 100;
1080 pi->regm2 = dssdev->clocks.hdmi.regm2; 1087
1088 if (dssdev->clocks.hdmi.regm2 == 0)
1089 pi->regm2 = HDMI_DEFAULT_REGM2;
1090 else
1091 pi->regm2 = dssdev->clocks.hdmi.regm2;
1081 1092
1082 /* 1093 /*
1083 * fractional multiplier is remainder of the difference between 1094 * fractional multiplier is remainder of the difference between