On Wed, Feb 07, 2018 at 11:21:44PM +0100, Wolfram Sang wrote:
> 
> > +   /* Reset HS400 mode */
> > +   sd_ctrl_write16(host, CTL_SDIF_MODE, ~0x0001 &
> > +                   sd_ctrl_read16(host, CTL_SDIF_MODE));
> > +   sd_scc_write32(host, priv, SH_MOBILE_SDHI_SCC_TMPPORT2,
> > +                  ~(SH_MOBILE_SDHI_SCC_TMPPORT2_HS400EN |
> > +                    SH_MOBILE_SDHI_SCC_TMPPORT2_HS400OSEL) &
> > +                   sd_scc_read32(host, priv, SH_MOBILE_SDHI_SCC_TMPPORT2));
> > +
> 
> This looks like code duplication. Can't we simply call
> renesas_sdhi_reset_hs400_mode()?

Yes, thanks for noticing. I will make that so.

I think that the previous few lines, not added by this patch,
can also be consolidated into a renesas_sdhi_reset_scc() function
and re-used in renesas_sdhi_reset_scc().

Reply via email to