Searched hist:"4 d01bfe66522b13f0d9042206e986551c94fc01e" (Results 1 – 1 of 1) sorted by relevance
| /rk3399_ARM-atf/drivers/marvell/comphy/ |
| H A D | phy-comphy-3700.c | 4d01bfe66522b13f0d9042206e986551c94fc01e Wed Dec 01 17:03:09 UTC 2021 Marek Behún <marek.behun@nic.cz> 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 updated): 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 <marek.behun@nic.cz> Change-Id: Ib29a1dd7edcdee7a39c4752dbc9dfcd600d8cb5c
|