net: dsa: mt7530: Convert to PHYLINK API
Convert mt7530 to PHYLINK API Signed-off-by: René van Dorst <opensource@vdorst.com> Tested-by: Frank Wunderlich <frank-w@public-files.de> Acked-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
771efeda39
commit
ca366d6c88
@@ -198,26 +198,20 @@ enum mt7530_vlan_port_attr {
|
||||
#define PMCR_FORCE_SPEED_100 BIT(2)
|
||||
#define PMCR_FORCE_FDX BIT(1)
|
||||
#define PMCR_FORCE_LNK BIT(0)
|
||||
#define PMCR_COMMON_LINK (PMCR_IFG_XMIT(1) | PMCR_MAC_MODE | \
|
||||
PMCR_BACKOFF_EN | PMCR_BACKPR_EN | \
|
||||
PMCR_TX_EN | PMCR_RX_EN | \
|
||||
PMCR_TX_FC_EN | PMCR_RX_FC_EN)
|
||||
#define PMCR_CPUP_LINK (PMCR_COMMON_LINK | PMCR_FORCE_MODE | \
|
||||
PMCR_FORCE_SPEED_1000 | \
|
||||
PMCR_FORCE_FDX | \
|
||||
PMCR_FORCE_LNK)
|
||||
#define PMCR_USERP_LINK PMCR_COMMON_LINK
|
||||
#define PMCR_FIXED_LINK (PMCR_IFG_XMIT(1) | PMCR_MAC_MODE | \
|
||||
PMCR_FORCE_MODE | PMCR_TX_EN | \
|
||||
PMCR_RX_EN | PMCR_BACKPR_EN | \
|
||||
PMCR_BACKOFF_EN | \
|
||||
PMCR_FORCE_SPEED_1000 | \
|
||||
PMCR_FORCE_FDX | \
|
||||
PMCR_FORCE_LNK)
|
||||
#define PMCR_FIXED_LINK_FC (PMCR_FIXED_LINK | \
|
||||
PMCR_TX_FC_EN | PMCR_RX_FC_EN)
|
||||
#define PMCR_SPEED_MASK (PMCR_FORCE_SPEED_100 | \
|
||||
PMCR_FORCE_SPEED_1000)
|
||||
|
||||
#define MT7530_PMSR_P(x) (0x3008 + (x) * 0x100)
|
||||
#define PMSR_EEE1G BIT(7)
|
||||
#define PMSR_EEE100M BIT(6)
|
||||
#define PMSR_RX_FC BIT(5)
|
||||
#define PMSR_TX_FC BIT(4)
|
||||
#define PMSR_SPEED_1000 BIT(3)
|
||||
#define PMSR_SPEED_100 BIT(2)
|
||||
#define PMSR_SPEED_10 0x00
|
||||
#define PMSR_SPEED_MASK (PMSR_SPEED_100 | PMSR_SPEED_1000)
|
||||
#define PMSR_DPX BIT(1)
|
||||
#define PMSR_LINK BIT(0)
|
||||
|
||||
/* Register for MIB */
|
||||
#define MT7530_PORT_MIB_COUNTER(x) (0x4000 + (x) * 0x100)
|
||||
@@ -423,6 +417,7 @@ struct mt7530_port {
|
||||
* @ports: Holding the state among ports
|
||||
* @reg_mutex: The lock for protecting among process accessing
|
||||
* registers
|
||||
* @p6_interface Holding the current port 6 interface
|
||||
*/
|
||||
struct mt7530_priv {
|
||||
struct device *dev;
|
||||
@@ -435,6 +430,7 @@ struct mt7530_priv {
|
||||
struct gpio_desc *reset;
|
||||
unsigned int id;
|
||||
bool mcm;
|
||||
phy_interface_t p6_interface;
|
||||
|
||||
struct mt7530_port ports[MT7530_NUM_PORTS];
|
||||
/* protect among processes for registers access*/
|
||||
|
Reference in New Issue
Block a user