Message ID | m3k1zul2uu.fsf@t19.piap.pl (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, 2017-10-17 at 08:12 +0200, Krzysztof Hałasa wrote: > 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> > > --- 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); Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> regards Philipp
On 10/16/2017 11:12 PM, Krzysztof Hałasa wrote: > 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> > > --- 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); > Thanks for catching. Reviewed-by: Steve Longerbeam <steve_longerbeam@mentor.com>
--- 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);
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>