aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/omap2/dss')
-rw-r--r--drivers/video/omap2/dss/dsi.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 20291570f7a7..bbed3a13f9a4 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -1743,42 +1743,52 @@ static void dsi_vc_initial_config(int channel)
1743 dsi.vc[channel].mode = DSI_VC_MODE_L4; 1743 dsi.vc[channel].mode = DSI_VC_MODE_L4;
1744} 1744}
1745 1745
1746static void dsi_vc_config_l4(int channel) 1746static int dsi_vc_config_l4(int channel)
1747{ 1747{
1748 if (dsi.vc[channel].mode == DSI_VC_MODE_L4) 1748 if (dsi.vc[channel].mode == DSI_VC_MODE_L4)
1749 return; 1749 return 0;
1750 1750
1751 DSSDBGF("%d", channel); 1751 DSSDBGF("%d", channel);
1752 1752
1753 dsi_vc_enable(channel, 0); 1753 dsi_vc_enable(channel, 0);
1754 1754
1755 if (REG_GET(DSI_VC_CTRL(channel), 15, 15)) /* VC_BUSY */ 1755 /* VC_BUSY */
1756 if (wait_for_bit_change(DSI_VC_CTRL(channel), 15, 0) != 0) {
1756 DSSERR("vc(%d) busy when trying to config for L4\n", channel); 1757 DSSERR("vc(%d) busy when trying to config for L4\n", channel);
1758 return -EIO;
1759 }
1757 1760
1758 REG_FLD_MOD(DSI_VC_CTRL(channel), 0, 1, 1); /* SOURCE, 0 = L4 */ 1761 REG_FLD_MOD(DSI_VC_CTRL(channel), 0, 1, 1); /* SOURCE, 0 = L4 */
1759 1762
1760 dsi_vc_enable(channel, 1); 1763 dsi_vc_enable(channel, 1);
1761 1764
1762 dsi.vc[channel].mode = DSI_VC_MODE_L4; 1765 dsi.vc[channel].mode = DSI_VC_MODE_L4;
1766
1767 return 0;
1763} 1768}
1764 1769
1765static void dsi_vc_config_vp(int channel) 1770static int dsi_vc_config_vp(int channel)
1766{ 1771{
1767 if (dsi.vc[channel].mode == DSI_VC_MODE_VP) 1772 if (dsi.vc[channel].mode == DSI_VC_MODE_VP)
1768 return; 1773 return 0;
1769 1774
1770 DSSDBGF("%d", channel); 1775 DSSDBGF("%d", channel);
1771 1776
1772 dsi_vc_enable(channel, 0); 1777 dsi_vc_enable(channel, 0);
1773 1778
1774 if (REG_GET(DSI_VC_CTRL(channel), 15, 15)) /* VC_BUSY */ 1779 /* VC_BUSY */
1780 if (wait_for_bit_change(DSI_VC_CTRL(channel), 15, 0) != 0) {
1775 DSSERR("vc(%d) busy when trying to config for VP\n", channel); 1781 DSSERR("vc(%d) busy when trying to config for VP\n", channel);
1782 return -EIO;
1783 }
1776 1784
1777 REG_FLD_MOD(DSI_VC_CTRL(channel), 1, 1, 1); /* SOURCE, 1 = video port */ 1785 REG_FLD_MOD(DSI_VC_CTRL(channel), 1, 1, 1); /* SOURCE, 1 = video port */
1778 1786
1779 dsi_vc_enable(channel, 1); 1787 dsi_vc_enable(channel, 1);
1780 1788
1781 dsi.vc[channel].mode = DSI_VC_MODE_VP; 1789 dsi.vc[channel].mode = DSI_VC_MODE_VP;
1790
1791 return 0;
1782} 1792}
1783 1793
1784 1794