Home
last modified time | relevance | path

Searched hist:ccec1bd5ca37c4a8b74d9ce9e2931da95f987bc0 (Results 1 – 1 of 1) sorted by relevance

/rk3399_ARM-atf/drivers/marvell/comphy/
H A Dphy-comphy-3700.cccec1bd5ca37c4a8b74d9ce9e2931da95f987bc0 Wed Mar 24 15:40:46 UTC 2021 Pali Rohár <pali@kernel.org> drivers: marvell: comphy-a3700: Set mask parameter for every reg_set call

The third argument of the reg_set() function has name 'mask', which
indicates that it is a mask applied to the register value which is
going to be updated. But the implementation of this function uses
this argument to clear prior value of the register, i.e. instead of
new_val = (old_val & ~mask) | (data & mask);
it does
new_val = (new_val & ~mask) | data;

(The more proper name for this function should be reg_clrsetbits(),
since internally it calls mmio_clrsetbits_32().)

To make code more readable set 'mask' argument to real mask, i.e. bits
of register values which are going to be updated.

This patch does not make any functional change, only cosmetic, due to
how 'mask' is interpreted.

Signed-off-by: Pali Rohár <pali@kernel.org>
Change-Id: Ifa0339e79c07d1994c7971b65d966b92cb735f65