net: dsa: mt7530: refactor MT7530_HWTRAP and MT7530_MHWTRAP
authorArınç ÜNAL <arinc.unal@arinc9.com>
Mon, 22 Apr 2024 07:15:13 +0000 (10:15 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Apr 2024 10:57:02 +0000 (11:57 +0100)
commit7c8d14029dffaa1e9d2bb0bb9226469e00e95f9f
treecc716cd0fb9fa1464460218d83ddef322b0e25e4
parent9c7401dc1b13b9f7776616eb1d3b2779e33593f2
net: dsa: mt7530: refactor MT7530_HWTRAP and MT7530_MHWTRAP

The MT7530_HWTRAP and MT7530_MHWTRAP registers are on MT7530 and MT7531.
It's called hardware trap on MT7530, software trap on MT7531. That's
because some bits of the trap on MT7530 cannot be modified by software
whilst all bits of the trap on MT7531 can. Rename the definitions for them
to MT753X_TRAP and MT753X_MTRAP. Add MT7530 and MT7531 prefixes to the
definitions specific to the switch model.

Remove the extra parentheses from MT7530_XTAL_40MHZ and MT7530_XTAL_20MHZ.

Rename MHWTRAP_PHY0_SEL, MHWTRAP_MANUAL, and MHWTRAP_PHY_ACCESS to be on
par with the "MT7621 Giga Switch Programming Guide v0.3" document.

Make an enumaration for the XTAL frequency. Set the data type of the xtal
variable on mt7531_pll_setup() to it.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mt7530.c
drivers/net/dsa/mt7530.h