[PATCH 2/3] dma: apbh: check for errors when resetting ip core

Wolfram Sang w.sang at pengutronix.de
Wed Oct 31 04:36:21 EDT 2012


On Wed, Oct 31, 2012 at 09:29:56AM +0100, Juergen Beisert wrote:
> Wolfram Sang wrote:
> > Signed-off-by: Wolfram Sang <w.sang at pengutronix.de>
> > ---
> >  drivers/dma/apbh_dma.c |    4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/dma/apbh_dma.c b/drivers/dma/apbh_dma.c
> > index 363878f..d30b8fb 100644
> > --- a/drivers/dma/apbh_dma.c
> > +++ b/drivers/dma/apbh_dma.c
> > @@ -555,7 +555,9 @@ int mxs_dma_init(void)
> >  	int ret, channel;
> >  	u32 val, reg;
> >
> > -	mxs_reset_block(apbh_regs, 0);
> > +	ret = mxs_reset_block(apbh_regs, 0);
> > +	if (ret)
> > +		return ret;
> 
> In this case the user faces a "MXS: Timeout resetting block via register ...". 
> Do you think this message is helpful to give the user a pointer *where* the 
> failure happens?

Yes, since it points to the IP core which was used here. Which again,
makes clear which driver was trying to reset the IP core.

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/barebox/attachments/20121031/c4129e72/attachment.sig>


More information about the barebox mailing list