
Dear Nikhil Badola,
In message 1399468595-953-1-git-send-email-nikhil.badola@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