• Arınç ÜNAL's avatar
    net: dsa: mt7530: refactor MT7530_HWTRAP and MT7530_MHWTRAP · 7c8d1402
    Arınç ÜNAL authored
    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: default avatarArınç ÜNAL <arinc.unal@arinc9.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    7c8d1402
mt7530.h 25.8 KB