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>
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);