[U-Boot] [PATCH 08/11] Blackfin: bf60x: add rsi/sdh support

Wolfgang Denk wd at denx.de
Mon Mar 4 12:21:41 CET 2013


Dear Sonic Zhang,

In message <CAJxxZ0O_OZk7w_CDfJkzPwDMFqwT1m-Yn_Bz6yzHRDFqT6wrBw at mail.gmail.com> you wrote:
> 
> Maybe I didn't describe it clearly. Yes, I return 0 at the end of this
> function. But, the same function may return UNUSABLE_ERR(-17) at the
> beginning if the data flags match MMC_DATA_WRITE. That's why the
> function can't return void. Is anything contradicting in my
> explanation?

I see.  Sorry, I missed that other return.

One additional question, though:

>         /* kick off transfer */
>         bfin_write_SDH_DATA_CTL(bfin_read_SDH_DATA_CTL() | DTX_DMA_E | DTX_E);
> 
> -       return ret;
> +       return 0;

Are the bfin_read_SDH_DATA_CTL() and bfin_write_SDH_DATA_CTL()
supposed to always work, i. e. are we positively sure that these can
never fail, so there is no need to test the return code and handle
error conditions?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
People have one thing in common: they are all different.


More information about the U-Boot mailing list