Dear Nikhil Badola,

In message <1399468595-953-1-git-send-email-nikhil.bad...@freescale.com> you 
wrote:
> Introduce new APIs to write fsl usb registers that have w1c bits.
> Existing API framework do not take care of w1c bits

Why exactly do we need a new API for that?  All you'r doing is adding
just more bits to the mask, right?

> -             setbits_be32(&ehci->control, PHY_CLK_SEL_UTMI);
> -             setbits_be32(&ehci->control, UTMI_PHY_EN);
> +             fsl_usb_setbits(&ehci->control, PHY_CLK_SEL_UTMI,
> +                             CONTROL_REGISTER_W1C_MASK);
> +             fsl_usb_setbits(&ehci->control, UTMI_PHY_EN,
> +                             CONTROL_REGISTER_W1C_MASK);
...

> +#define CONTROL_REGISTER_W1C_MASK       0x00020000  /* W1C: PHY_CLK_VALID */
> +#define fsl_usb_setbits(_addr, _v, _mask) out_be32((_addr), \
> +                     ((in_be32(_addr) & ~_mask) | _v))
> +#define fsl_usb_clrbits(_addr, _v, _mask) out_be32((_addr), \
> +                     ((in_be32(_addr) & ~_mask) & ~_v))
> +

I cannot understand in which way

        fsl_usb_setbits(&ehci->control, PHY_CLK_SEL_UTMI, 
CONTROL_REGISTER_W1C_MASK);

would be different from

        setbits_be32(&ehci->control, PHY_CLK_SEL_UTMI | 
CONTROL_REGISTER_W1C_MASK);

?


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: w...@denx.de
I am not now, nor have I ever been, a member of the demigodic party.
                                                   -- Dennis Ritchie
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to