]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: dwmac-meson8b: fix mask definition of the m250_sel mux
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Sat, 5 Dec 2020 21:32:07 +0000 (22:32 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 8 Dec 2020 01:58:22 +0000 (17:58 -0800)
commitc3f1b9e2341d108ae4d39e21bfbdd2094099530b
tree7917fb2cd68873ba1c11bbb0ce50448ce4433214
parent15493afb93cd0d3fa8964ad95a6be11dce0a4737
net: stmmac: dwmac-meson8b: fix mask definition of the m250_sel mux

The m250_sel mux clock uses bit 4 in the PRG_ETH0 register. Fix this by
shifting the PRG_ETH0_CLK_M250_SEL_MASK accordingly as the "mask" in
struct clk_mux expects the mask relative to the "shift" field in the
same struct.

While here, get rid of the PRG_ETH0_CLK_M250_SEL_SHIFT macro and use
__ffs() to determine it from the existing PRG_ETH0_CLK_M250_SEL_MASK
macro.

Fixes: 5b97865dfed54e ("net: stmmac: add a glue driver for the Amlogic Meson 8b / GXBB DWMAC")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20201205213207.519341-1-martin.blumenstingl@googlemail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c