aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof HaƂasa <khalasa@piap.pl>2017-10-17 02:12:25 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-12-11 12:21:25 -0500
commitfb7451c75fe7d4e6b6bd59b41f0582774f363ce9 (patch)
treecccda564e3433becfb0e8f4266b3d300fbcb3275
parentafb9a9b43e0a1f45ec9fa1dd76d2f7a7ae7c8f89 (diff)
media: i.MX6: Fix MIPI CSI-2 LP-11 check
Bitmask for the MIPI CSI-2 data PHY status doesn't seem to be correct. Fix it. Signed-off-by: Krzysztof Ha?asa <khalasa@piap.pl> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Steve Longerbeam <steve_longerbeam@mentor.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r--drivers/staging/media/imx/imx6-mipi-csi2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/media/imx/imx6-mipi-csi2.c b/drivers/staging/media/imx/imx6-mipi-csi2.c
index 5061f3f524fd..477d191c568b 100644
--- a/drivers/staging/media/imx/imx6-mipi-csi2.c
+++ b/drivers/staging/media/imx/imx6-mipi-csi2.c
@@ -252,8 +252,8 @@ static int csi2_dphy_wait_stopstate(struct csi2_dev *csi2)
u32 mask, reg;
int ret;
- mask = PHY_STOPSTATECLK |
- ((csi2->bus.num_data_lanes - 1) << PHY_STOPSTATEDATA_BIT);
+ mask = PHY_STOPSTATECLK | (((1 << csi2->bus.num_data_lanes) - 1) <<
+ PHY_STOPSTATEDATA_BIT);
ret = readl_poll_timeout(csi2->base + CSI2_PHY_STATE, reg,
(reg & mask) == mask, 0, 500000);

Privacy Policy