diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2012-11-02 14:20:27 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-12-21 12:23:41 -0200 |
commit | cd65a645a4f5e456607067734f9a11385c9dce7b (patch) | |
tree | 0497ad79d4c2cbd5a57070a9cc7e74e531cd3bf3 /drivers/media/platform/s5p-fimc/mipi-csis.c | |
parent | e26991b49a132626130428d64222a355ffdd7139 (diff) |
[media] s5p-csis: Enable only data lanes that are actively used
Enable only MIPI CSI-2 data lanes at the DPHY that are actively
used, rather than unmasking all unconditionally.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/s5p-fimc/mipi-csis.c')
-rw-r--r-- | drivers/media/platform/s5p-fimc/mipi-csis.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/media/platform/s5p-fimc/mipi-csis.c b/drivers/media/platform/s5p-fimc/mipi-csis.c index 36916d3f199..8ec7c3b7965 100644 --- a/drivers/media/platform/s5p-fimc/mipi-csis.c +++ b/drivers/media/platform/s5p-fimc/mipi-csis.c @@ -273,7 +273,8 @@ static void s5pcsis_reset(struct csis_state *state) static void s5pcsis_system_enable(struct csis_state *state, int on) { - u32 val; + struct s5p_platform_mipi_csis *pdata = state->pdev->dev.platform_data; + u32 val, mask; val = s5pcsis_read(state, S5PCSIS_CTRL); if (on) @@ -283,10 +284,11 @@ static void s5pcsis_system_enable(struct csis_state *state, int on) s5pcsis_write(state, S5PCSIS_CTRL, val); val = s5pcsis_read(state, S5PCSIS_DPHYCTRL); - if (on) - val |= S5PCSIS_DPHYCTRL_ENABLE; - else - val &= ~S5PCSIS_DPHYCTRL_ENABLE; + val &= ~S5PCSIS_DPHYCTRL_ENABLE; + if (on) { + mask = (1 << (pdata->lanes + 1)) - 1; + val |= (mask & S5PCSIS_DPHYCTRL_ENABLE); + } s5pcsis_write(state, S5PCSIS_DPHYCTRL, val); } |