• Chen-Yu Tsai's avatar
    net: stmmac: dwmac-sun8i: Use regmap_field for syscon register access · 25ae15fb
    Chen-Yu Tsai authored
    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: default avatarChen-Yu Tsai <wens@csie.org>
    Acked-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    25ae15fb
dwmac-sun8i.c 28.9 KB