[U-Boot] [PATCH v3.2 14/58] musb-new: sunxi: Use CLK and RESET support

Maxime Ripard maxime.ripard at bootlin.com
Thu Aug 23 12:44:18 UTC 2018


On Wed, Aug 22, 2018 at 09:33:27PM +0530, Jagan Teki wrote:
> On Wed, Aug 22, 2018 at 9:24 PM, Maxime Ripard
> <maxime.ripard at bootlin.com> wrote:
> > Hi,
> >
> > On Mon, Aug 20, 2018 at 10:02:31PM +0530, Jagan Teki wrote:
> >> -     glue->ccm = (struct sunxi_ccm_reg *)SUNXI_CCM_BASE;
> >> -     if (IS_ERR(glue->ccm))
> >> -             return PTR_ERR(glue->ccm);
> >> +     if (glue->cfg->has_reset)
> >> +             test_and_set_bit(SUNXI_MUSB_FL_HAS_RESET, &glue->flags);
> >
> > I'm not sure why the flag is needed here. It's completely redundant
> > with the boolean you're testing to set that flag.
> 
> Since the reset is optional, set the flag for reset required SoC's
> instead of using reset_get_by_index_optional

Yeah, I understood the intent, but you can remove the flag and use
glue->cfg->has_reset.

Maxime

-- 
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180823/0fa7733a/attachment.sig>


More information about the U-Boot mailing list