diff options
author | Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> | 2021-03-27 09:07:52 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-03-29 03:55:12 +0300 |
commit | 4732315ca9fe9f9f9327d6e4b0a2140446e9c48c (patch) | |
tree | 262ce1733b035bd0ebbca52a5c92ce2969174596 /net/l3mdev/l3mdev.c | |
parent | 54422bd436e084e6c74aff6026c1767f1570ab26 (diff) | |
download | linux-4732315ca9fe9f9f9327d6e4b0a2140446e9c48c.tar.xz |
net: dsa: mt7530: clean up core and TRGMII clock setup
Three minor changes:
- When disabling PLL, there is no need to call core_write_mmd_indirect
directly, use the core_write wrapper instead like the rest of the code
in the function does. This change helps with consistency and
readability. Move the comment to the definition of
core_read_mmd_indirect where it belongs.
- Disable both core and TRGMII Tx clocks prior to reconfiguring.
Previously, only the core clock was disabled, but not TRGMII Tx clock.
So disable both, then configure them, then re-enable both, for
consistency.
- The core clock enable bit (REG_GSWCK_EN) is written redundantly three
times. Simplify the code and only write the register only once at the
end of clock reconfiguration to enable both core and TRGMII Tx clocks.
Tested on Ubiquiti ER-X running the GMAC0 and MT7530 in TRGMII mode.
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/l3mdev/l3mdev.c')
0 files changed, 0 insertions, 0 deletions