diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-10-13 09:18:52 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-12-02 01:54:18 -0500 |
commit | 522a0c2fe58fb6eb145cce07a303857b08322a2b (patch) | |
tree | fc22192a4c9102abbf2f662e1d06c54b6d02b08d /drivers/video/omap2/dss/dsi.c | |
parent | db18644f90e664bf30f58cf9b8bc879598bff62f (diff) |
OMAPDSS: DSI: fix lane handling when entering ULPS
The current code always enters ULPS for 3 lanes. This is not right, as
there could be only 2 lanes used, and on OMAP4 we have 5 lanes.
Fix the code to put all used lanes into ULPS.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/dsi.c')
-rw-r--r-- | drivers/video/omap2/dss/dsi.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 2b375c6027b6..22055db1dabe 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c | |||
@@ -3517,7 +3517,8 @@ static int dsi_enter_ulps(struct platform_device *dsidev) | |||
3517 | { | 3517 | { |
3518 | struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); | 3518 | struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); |
3519 | DECLARE_COMPLETION_ONSTACK(completion); | 3519 | DECLARE_COMPLETION_ONSTACK(completion); |
3520 | int r; | 3520 | int r, i; |
3521 | unsigned mask; | ||
3521 | 3522 | ||
3522 | DSSDBGF(); | 3523 | DSSDBGF(); |
3523 | 3524 | ||
@@ -3560,10 +3561,16 @@ static int dsi_enter_ulps(struct platform_device *dsidev) | |||
3560 | if (r) | 3561 | if (r) |
3561 | return r; | 3562 | return r; |
3562 | 3563 | ||
3564 | mask = 0; | ||
3565 | |||
3566 | for (i = 0; i < dsi->num_lanes_supported; ++i) { | ||
3567 | if (dsi->lanes[i].function == DSI_LANE_UNUSED) | ||
3568 | continue; | ||
3569 | mask |= 1 << i; | ||
3570 | } | ||
3563 | /* Assert TxRequestEsc for data lanes and TxUlpsClk for clk lane */ | 3571 | /* Assert TxRequestEsc for data lanes and TxUlpsClk for clk lane */ |
3564 | /* LANEx_ULPS_SIG2 */ | 3572 | /* LANEx_ULPS_SIG2 */ |
3565 | REG_FLD_MOD(dsidev, DSI_COMPLEXIO_CFG2, (1 << 0) | (1 << 1) | (1 << 2), | 3573 | REG_FLD_MOD(dsidev, DSI_COMPLEXIO_CFG2, mask, 9, 5); |
3566 | 7, 5); | ||
3567 | 3574 | ||
3568 | /* flush posted write and wait for SCP interface to finish the write */ | 3575 | /* flush posted write and wait for SCP interface to finish the write */ |
3569 | dsi_read_reg(dsidev, DSI_COMPLEXIO_CFG2); | 3576 | dsi_read_reg(dsidev, DSI_COMPLEXIO_CFG2); |
@@ -3579,8 +3586,7 @@ static int dsi_enter_ulps(struct platform_device *dsidev) | |||
3579 | DSI_CIO_IRQ_ULPSACTIVENOT_ALL0); | 3586 | DSI_CIO_IRQ_ULPSACTIVENOT_ALL0); |
3580 | 3587 | ||
3581 | /* Reset LANEx_ULPS_SIG2 */ | 3588 | /* Reset LANEx_ULPS_SIG2 */ |
3582 | REG_FLD_MOD(dsidev, DSI_COMPLEXIO_CFG2, (0 << 0) | (0 << 1) | (0 << 2), | 3589 | REG_FLD_MOD(dsidev, DSI_COMPLEXIO_CFG2, 0, 9, 5); |
3583 | 7, 5); | ||
3584 | 3590 | ||
3585 | /* flush posted write and wait for SCP interface to finish the write */ | 3591 | /* flush posted write and wait for SCP interface to finish the write */ |
3586 | dsi_read_reg(dsidev, DSI_COMPLEXIO_CFG2); | 3592 | dsi_read_reg(dsidev, DSI_COMPLEXIO_CFG2); |