fix(drivers/marvell/comphy-3700): use reg_set() according to update semantics

Currently reg_set() and reg_set16() are almost everywhere (both in
phy-comphy-3700.c and phy-comphy-cp110.c) used as if the semantics were
that of register update function (only bits that are set in mask are
  reg_set(addr, data, mask) {
    *addr = (*addr & ~mask) | (data & mask);

This comes both from names of arguments (data and mask), and from usage.

But both functions are in fact implemented via mmio_clrsetbits_32(), so
they actually first clear bits from mask and then set bits from data:
  reg_set(addr, data, mask) {
    *addr = (*addr & ~mask) | data;

There are only two places where this is leveraged (where some bits are
put into data argument but they are not put into the mask argument).

Fix those two usages to allow to convert the implementation from
clrsetbits semantics to update semantics.

Signed-off-by: Marek Behún <>
Change-Id: Ib29a1dd7edcdee7a39c4752dbc9dfcd600d8cb5c
1 file changed