]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: dwmac-sun8i: Use regmap_field for syscon register access
authorChen-Yu Tsai <wens@csie.org>
Sun, 13 May 2018 19:14:22 +0000 (03:14 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 May 2018 19:06:54 +0000 (15:06 -0400)
commit65daf723b13a84029ea8bc612804a236744f7f69
treea3993c55860a32d798c5f4c0246a32f333343e0d
parentde78d08d12aca17b727aaf0f5b8d6f77b6a15307
net: stmmac: dwmac-sun8i: Use regmap_field for syscon register access

On the Allwinner R40, the "GMAC clock" register is located in the CCU
block, at a different register address than the other SoCs that have
it in the "system control" block.

This patch converts the use of regmap to regmap_field for mapping and
accessing the syscon register, so we can have the register address in
the variants data, and not in the actual register manipulation code.

This patch only converts regmap_read() and regmap_write() calls to
regmap_field_read() and regmap_field_write() calls. There are some
places where it might make sense to switch to regmap_field_update_bits(),
but this is not done here to keep the patch simple.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c