|
@@ -87,6 +87,7 @@ struct dss_features {
|
|
int num_ports;
|
|
int num_ports;
|
|
const struct dss_ops *ops;
|
|
const struct dss_ops *ops;
|
|
struct dss_reg_field dispc_clk_switch;
|
|
struct dss_reg_field dispc_clk_switch;
|
|
|
|
+ bool has_lcd_clk_src;
|
|
};
|
|
};
|
|
|
|
|
|
static struct {
|
|
static struct {
|
|
@@ -433,8 +434,7 @@ static void dss_select_dispc_clk_source(enum dss_clk_source clk_src)
|
|
* We always use PRCM clock as the DISPC func clock, except on DSS3,
|
|
* We always use PRCM clock as the DISPC func clock, except on DSS3,
|
|
* where we don't have separate DISPC and LCD clock sources.
|
|
* where we don't have separate DISPC and LCD clock sources.
|
|
*/
|
|
*/
|
|
- if (WARN_ON(dss_has_feature(FEAT_LCD_CLK_SRC) &&
|
|
|
|
- clk_src != DSS_CLK_SRC_FCK))
|
|
|
|
|
|
+ if (WARN_ON(dss.feat->has_lcd_clk_src && clk_src != DSS_CLK_SRC_FCK))
|
|
return;
|
|
return;
|
|
|
|
|
|
switch (clk_src) {
|
|
switch (clk_src) {
|
|
@@ -578,7 +578,7 @@ void dss_select_lcd_clk_source(enum omap_channel channel,
|
|
int idx = dss_get_channel_index(channel);
|
|
int idx = dss_get_channel_index(channel);
|
|
int r;
|
|
int r;
|
|
|
|
|
|
- if (!dss_has_feature(FEAT_LCD_CLK_SRC)) {
|
|
|
|
|
|
+ if (!dss.feat->has_lcd_clk_src) {
|
|
dss_select_dispc_clk_source(clk_src);
|
|
dss_select_dispc_clk_source(clk_src);
|
|
dss.lcd_clk_source[idx] = clk_src;
|
|
dss.lcd_clk_source[idx] = clk_src;
|
|
return;
|
|
return;
|
|
@@ -603,7 +603,7 @@ enum dss_clk_source dss_get_dsi_clk_source(int dsi_module)
|
|
|
|
|
|
enum dss_clk_source dss_get_lcd_clk_source(enum omap_channel channel)
|
|
enum dss_clk_source dss_get_lcd_clk_source(enum omap_channel channel)
|
|
{
|
|
{
|
|
- if (dss_has_feature(FEAT_LCD_CLK_SRC)) {
|
|
|
|
|
|
+ if (dss.feat->has_lcd_clk_src) {
|
|
int idx = dss_get_channel_index(channel);
|
|
int idx = dss_get_channel_index(channel);
|
|
return dss.lcd_clk_source[idx];
|
|
return dss.lcd_clk_source[idx];
|
|
} else {
|
|
} else {
|
|
@@ -1011,6 +1011,7 @@ static const struct dss_features omap24xx_dss_feats = {
|
|
.num_ports = ARRAY_SIZE(omap2plus_ports),
|
|
.num_ports = ARRAY_SIZE(omap2plus_ports),
|
|
.ops = &dss_ops_omap2_omap3,
|
|
.ops = &dss_ops_omap2_omap3,
|
|
.dispc_clk_switch = { 0, 0 },
|
|
.dispc_clk_switch = { 0, 0 },
|
|
|
|
+ .has_lcd_clk_src = false,
|
|
};
|
|
};
|
|
|
|
|
|
static const struct dss_features omap34xx_dss_feats = {
|
|
static const struct dss_features omap34xx_dss_feats = {
|
|
@@ -1022,6 +1023,7 @@ static const struct dss_features omap34xx_dss_feats = {
|
|
.num_ports = ARRAY_SIZE(omap34xx_ports),
|
|
.num_ports = ARRAY_SIZE(omap34xx_ports),
|
|
.ops = &dss_ops_omap2_omap3,
|
|
.ops = &dss_ops_omap2_omap3,
|
|
.dispc_clk_switch = { 0, 0 },
|
|
.dispc_clk_switch = { 0, 0 },
|
|
|
|
+ .has_lcd_clk_src = false,
|
|
};
|
|
};
|
|
|
|
|
|
static const struct dss_features omap3630_dss_feats = {
|
|
static const struct dss_features omap3630_dss_feats = {
|
|
@@ -1033,6 +1035,7 @@ static const struct dss_features omap3630_dss_feats = {
|
|
.num_ports = ARRAY_SIZE(omap2plus_ports),
|
|
.num_ports = ARRAY_SIZE(omap2plus_ports),
|
|
.ops = &dss_ops_omap2_omap3,
|
|
.ops = &dss_ops_omap2_omap3,
|
|
.dispc_clk_switch = { 0, 0 },
|
|
.dispc_clk_switch = { 0, 0 },
|
|
|
|
+ .has_lcd_clk_src = false,
|
|
};
|
|
};
|
|
|
|
|
|
static const struct dss_features omap44xx_dss_feats = {
|
|
static const struct dss_features omap44xx_dss_feats = {
|
|
@@ -1044,6 +1047,7 @@ static const struct dss_features omap44xx_dss_feats = {
|
|
.num_ports = ARRAY_SIZE(omap2plus_ports),
|
|
.num_ports = ARRAY_SIZE(omap2plus_ports),
|
|
.ops = &dss_ops_omap4,
|
|
.ops = &dss_ops_omap4,
|
|
.dispc_clk_switch = { 9, 8 },
|
|
.dispc_clk_switch = { 9, 8 },
|
|
|
|
+ .has_lcd_clk_src = true,
|
|
};
|
|
};
|
|
|
|
|
|
static const struct dss_features omap54xx_dss_feats = {
|
|
static const struct dss_features omap54xx_dss_feats = {
|
|
@@ -1055,6 +1059,7 @@ static const struct dss_features omap54xx_dss_feats = {
|
|
.num_ports = ARRAY_SIZE(omap2plus_ports),
|
|
.num_ports = ARRAY_SIZE(omap2plus_ports),
|
|
.ops = &dss_ops_omap5,
|
|
.ops = &dss_ops_omap5,
|
|
.dispc_clk_switch = { 9, 7 },
|
|
.dispc_clk_switch = { 9, 7 },
|
|
|
|
+ .has_lcd_clk_src = true,
|
|
};
|
|
};
|
|
|
|
|
|
static const struct dss_features am43xx_dss_feats = {
|
|
static const struct dss_features am43xx_dss_feats = {
|
|
@@ -1066,6 +1071,7 @@ static const struct dss_features am43xx_dss_feats = {
|
|
.num_ports = ARRAY_SIZE(omap2plus_ports),
|
|
.num_ports = ARRAY_SIZE(omap2plus_ports),
|
|
.ops = &dss_ops_omap2_omap3,
|
|
.ops = &dss_ops_omap2_omap3,
|
|
.dispc_clk_switch = { 0, 0 },
|
|
.dispc_clk_switch = { 0, 0 },
|
|
|
|
+ .has_lcd_clk_src = true,
|
|
};
|
|
};
|
|
|
|
|
|
static const struct dss_features dra7xx_dss_feats = {
|
|
static const struct dss_features dra7xx_dss_feats = {
|
|
@@ -1077,6 +1083,7 @@ static const struct dss_features dra7xx_dss_feats = {
|
|
.num_ports = ARRAY_SIZE(dra7xx_ports),
|
|
.num_ports = ARRAY_SIZE(dra7xx_ports),
|
|
.ops = &dss_ops_dra7,
|
|
.ops = &dss_ops_dra7,
|
|
.dispc_clk_switch = { 9, 7 },
|
|
.dispc_clk_switch = { 9, 7 },
|
|
|
|
+ .has_lcd_clk_src = true,
|
|
};
|
|
};
|
|
|
|
|
|
static int dss_init_ports(struct platform_device *pdev)
|
|
static int dss_init_ports(struct platform_device *pdev)
|