diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-10-13 08:12:23 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-12-02 01:54:16 -0500 |
commit | 85f17e8e2c8d5f9266ca28f05cbc57598eddb05a (patch) | |
tree | f10db4af4508490d10a155f6d98070443eddda92 /drivers/video/omap2/dss/dsi.c | |
parent | 48368395f670ac8cc60288674de940a38693412e (diff) |
OMAPDSS: DSI: use lane config in dsi_get_lane_mask
Use the new lane config in dsi_get_lane_mask().
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 | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index ba8d6b328a38..1a209a23f515 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c | |||
@@ -2422,22 +2422,20 @@ static int dsi_cio_wait_tx_clk_esc_reset(struct omap_dss_device *dssdev) | |||
2422 | return 0; | 2422 | return 0; |
2423 | } | 2423 | } |
2424 | 2424 | ||
2425 | /* return bitmask of enabled lanes, lane0 being the lsb */ | ||
2425 | static unsigned dsi_get_lane_mask(struct omap_dss_device *dssdev) | 2426 | static unsigned dsi_get_lane_mask(struct omap_dss_device *dssdev) |
2426 | { | 2427 | { |
2427 | unsigned lanes = 0; | 2428 | struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); |
2429 | struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); | ||
2430 | unsigned mask = 0; | ||
2431 | int i; | ||
2428 | 2432 | ||
2429 | if (dssdev->phy.dsi.clk_lane != 0) | 2433 | for (i = 0; i < dsi->num_lanes_supported; ++i) { |
2430 | lanes |= 1 << (dssdev->phy.dsi.clk_lane - 1); | 2434 | if (dsi->lanes[i].function != DSI_LANE_UNUSED) |
2431 | if (dssdev->phy.dsi.data1_lane != 0) | 2435 | mask |= 1 << i; |
2432 | lanes |= 1 << (dssdev->phy.dsi.data1_lane - 1); | 2436 | } |
2433 | if (dssdev->phy.dsi.data2_lane != 0) | ||
2434 | lanes |= 1 << (dssdev->phy.dsi.data2_lane - 1); | ||
2435 | if (dssdev->phy.dsi.data3_lane != 0) | ||
2436 | lanes |= 1 << (dssdev->phy.dsi.data3_lane - 1); | ||
2437 | if (dssdev->phy.dsi.data4_lane != 0) | ||
2438 | lanes |= 1 << (dssdev->phy.dsi.data4_lane - 1); | ||
2439 | 2437 | ||
2440 | return lanes; | 2438 | return mask; |
2441 | } | 2439 | } |
2442 | 2440 | ||
2443 | static int dsi_cio_init(struct omap_dss_device *dssdev) | 2441 | static int dsi_cio_init(struct omap_dss_device *dssdev) |