drm/omap: add field for PLL type
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 18 May 2016 07:48:44 +0000 (10:48 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 19 May 2016 17:19:05 +0000 (20:19 +0300)
DSS uses two types of PLLs, type A (DSI & Video) and type B (HDMI). The
two types behave slightly differently, but we don't have the type of the
PLL available anywhere for the driver.

This patch adds an enum for the PLL type and a field in the PLL's HW
data to store it.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/gpu/drm/omapdrm/dss/dsi.c
drivers/gpu/drm/omapdrm/dss/dss.h
drivers/gpu/drm/omapdrm/dss/hdmi_pll.c
drivers/gpu/drm/omapdrm/dss/video-pll.c

index 290bd07520f61f936899a54581a0b7f171e70c38..5f96a1af138d38c35a497fc12992d2f56b223cf2 100644 (file)
@@ -5147,6 +5147,8 @@ static const struct dss_pll_ops dsi_pll_ops = {
 };
 
 static const struct dss_pll_hw dss_omap3_dsi_pll_hw = {
+       .type = DSS_PLL_TYPE_A,
+
        .n_max = (1 << 7) - 1,
        .m_max = (1 << 11) - 1,
        .mX_max = (1 << 4) - 1,
@@ -5172,6 +5174,8 @@ static const struct dss_pll_hw dss_omap3_dsi_pll_hw = {
 };
 
 static const struct dss_pll_hw dss_omap4_dsi_pll_hw = {
+       .type = DSS_PLL_TYPE_A,
+
        .n_max = (1 << 8) - 1,
        .m_max = (1 << 12) - 1,
        .mX_max = (1 << 5) - 1,
@@ -5197,6 +5201,8 @@ static const struct dss_pll_hw dss_omap4_dsi_pll_hw = {
 };
 
 static const struct dss_pll_hw dss_omap5_dsi_pll_hw = {
+       .type = DSS_PLL_TYPE_A,
+
        .n_max = (1 << 8) - 1,
        .m_max = (1 << 12) - 1,
        .mX_max = (1 << 5) - 1,
index 38e77fac20789be70364fceae09be63215bb6f96..52895ba2d717405f0ed726de5e40a158962cbed9 100644 (file)
@@ -128,6 +128,11 @@ struct dss_pll;
 
 #define DSS_PLL_MAX_HSDIVS 4
 
+enum dss_pll_type {
+       DSS_PLL_TYPE_A,
+       DSS_PLL_TYPE_B,
+};
+
 /*
  * Type-A PLLs: clkout[]/mX[] refer to hsdiv outputs m4, m5, m6, m7.
  * Type-B PLLs: clkout[0] refers to m2.
@@ -154,6 +159,8 @@ struct dss_pll_ops {
 };
 
 struct dss_pll_hw {
+       enum dss_pll_type type;
+
        unsigned n_max;
        unsigned m_min;
        unsigned m_max;
index efd40f940aaa22221c84dc71bfcaafd374943b55..110ed50d5ce189d1d6ae9e4e822948a95c98cde8 100644 (file)
@@ -130,6 +130,8 @@ static const struct dss_pll_ops dsi_pll_ops = {
 };
 
 static const struct dss_pll_hw dss_omap4_hdmi_pll_hw = {
+       .type = DSS_PLL_TYPE_B,
+
        .n_max = 255,
        .m_min = 20,
        .m_max = 4095,
@@ -153,6 +155,8 @@ static const struct dss_pll_hw dss_omap4_hdmi_pll_hw = {
 };
 
 static const struct dss_pll_hw dss_omap5_hdmi_pll_hw = {
+       .type = DSS_PLL_TYPE_B,
+
        .n_max = 255,
        .m_min = 20,
        .m_max = 2045,
index cc87eb4e2906eeb5c6eab03a006d1bc041baab67..c13e1accda17ebd59b2d0bb269413956f86414e4 100644 (file)
@@ -108,6 +108,8 @@ static const struct dss_pll_ops dss_pll_ops = {
 };
 
 static const struct dss_pll_hw dss_dra7_video_pll_hw = {
+       .type = DSS_PLL_TYPE_A,
+
        .n_max = (1 << 8) - 1,
        .m_max = (1 << 12) - 1,
        .mX_max = (1 << 5) - 1,
This page took 0.027449 seconds and 5 git commands to generate.