Hi Laurent, On Wed, Jul 31, 2013 at 05:52:32PM +0200, Laurent Pinchart wrote: ... > +static int vsp1_device_init(struct vsp1_device *vsp1) > +{ > + unsigned int i; > + u32 status; > + > + /* Reset any channel that might be running. */ > + status = vsp1_read(vsp1, VI6_STATUS); > + > + for (i = 0; i < VPS1_MAX_WPF; ++i) { > + unsigned int timeout; > + > + if (!(status & VI6_STATUS_SYS_ACT(i))) > + continue; > + > + vsp1_write(vsp1, VI6_SRESET, VI6_SRESET_SRTS(i)); > + for (timeout = 10; timeout > 0; --timeout) { > + status = vsp1_read(vsp1, VI6_STATUS); > + if (!(status & VI6_STATUS_SYS_ACT(i))) > + break; > + > + usleep_range(1000, 2000); > + } > + > + if (timeout) { As discussed, with s/timeout/!timeout/, Acked-by: Sakari Ailus <sakari.ailus@xxxxxx> > + dev_err(vsp1->dev, "failed to reset wpf.%u\n", i); > + return -ETIMEDOUT; > + } > + } > + > + vsp1_write(vsp1, VI6_CLK_DCSWT, (8 << VI6_CLK_DCSWT_CSTPW_SHIFT) | > + (8 << VI6_CLK_DCSWT_CSTRW_SHIFT)); > + > + for (i = 0; i < VPS1_MAX_RPF; ++i) > + vsp1_write(vsp1, VI6_DPR_RPF_ROUTE(i), VI6_DPR_NODE_UNUSED); > + > + for (i = 0; i < VPS1_MAX_UDS; ++i) > + vsp1_write(vsp1, VI6_DPR_UDS_ROUTE(i), VI6_DPR_NODE_UNUSED); > + > + vsp1_write(vsp1, VI6_DPR_SRU_ROUTE, VI6_DPR_NODE_UNUSED); > + vsp1_write(vsp1, VI6_DPR_LUT_ROUTE, VI6_DPR_NODE_UNUSED); > + vsp1_write(vsp1, VI6_DPR_CLU_ROUTE, VI6_DPR_NODE_UNUSED); > + vsp1_write(vsp1, VI6_DPR_HST_ROUTE, VI6_DPR_NODE_UNUSED); > + vsp1_write(vsp1, VI6_DPR_HSI_ROUTE, VI6_DPR_NODE_UNUSED); > + vsp1_write(vsp1, VI6_DPR_BRU_ROUTE, VI6_DPR_NODE_UNUSED); > + > + vsp1_write(vsp1, VI6_DPR_HGO_SMPPT, (7 << VI6_DPR_SMPPT_TGW_SHIFT) | > + (VI6_DPR_NODE_UNUSED << VI6_DPR_SMPPT_PT_SHIFT)); > + vsp1_write(vsp1, VI6_DPR_HGT_SMPPT, (7 << VI6_DPR_SMPPT_TGW_SHIFT) | > + (VI6_DPR_NODE_UNUSED << VI6_DPR_SMPPT_PT_SHIFT)); > + > + return 0; > +} -- Cheers, Sakari Ailus e-mail: sakari.ailus@xxxxxx XMPP: sailus@xxxxxxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html