Vivien Didelot | ec56127 | 2016-09-02 14:45:33 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Marvell 88E6xxx Switch Global 2 Registers support (device address 0x1C) |
| 3 | * |
| 4 | * Copyright (c) 2008 Marvell Semiconductor |
| 5 | * |
Vivien Didelot | 4333d61 | 2017-03-28 15:10:36 -0400 | [diff] [blame] | 6 | * Copyright (c) 2016-2017 Savoir-faire Linux Inc. |
| 7 | * Vivien Didelot <vivien.didelot@savoirfairelinux.com> |
Vivien Didelot | ec56127 | 2016-09-02 14:45:33 -0400 | [diff] [blame] | 8 | * |
| 9 | * This program is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU General Public License as published by |
| 11 | * the Free Software Foundation; either version 2 of the License, or |
| 12 | * (at your option) any later version. |
| 13 | */ |
| 14 | |
| 15 | #ifndef _MV88E6XXX_GLOBAL2_H |
| 16 | #define _MV88E6XXX_GLOBAL2_H |
| 17 | |
Vivien Didelot | 4d5f2ba7 | 2017-06-02 17:06:15 -0400 | [diff] [blame] | 18 | #include "chip.h" |
Vivien Didelot | ec56127 | 2016-09-02 14:45:33 -0400 | [diff] [blame] | 19 | |
Vivien Didelot | d23a83f | 2017-06-02 17:06:19 -0400 | [diff] [blame] | 20 | #define ADDR_GLOBAL2 0x1c |
| 21 | |
| 22 | #define GLOBAL2_INT_SOURCE 0x00 |
| 23 | #define GLOBAL2_INT_SOURCE_WATCHDOG 15 |
| 24 | #define GLOBAL2_INT_MASK 0x01 |
Vivien Didelot | 6bff47b | 2017-06-19 10:55:40 -0400 | [diff] [blame] | 25 | |
| 26 | /* Offset 0x02: MGMT Enable Register 2x */ |
| 27 | #define MV88E6XXX_G2_MGMT_EN_2X 0x02 |
| 28 | |
| 29 | /* Offset 0x03: MGMT Enable Register 0x */ |
| 30 | #define MV88E6XXX_G2_MGMT_EN_0X 0x03 |
| 31 | |
Vivien Didelot | d23a83f | 2017-06-02 17:06:19 -0400 | [diff] [blame] | 32 | #define GLOBAL2_FLOW_CONTROL 0x04 |
Vivien Didelot | 6bff47b | 2017-06-19 10:55:40 -0400 | [diff] [blame] | 33 | |
| 34 | /* Offset 0x05: Switch Management Register */ |
| 35 | #define MV88E6XXX_G2_SWITCH_MGMT 0x05 |
| 36 | #define MV88E6XXX_G2_SWITCH_MGMT_USE_DOUBLE_TAG_DATA 0x8000 |
| 37 | #define MV88E6XXX_G2_SWITCH_MGMT_PREVENT_LOOPS 0x4000 |
| 38 | #define MV88E6XXX_G2_SWITCH_MGMT_FLOW_CTL_MSG 0x2000 |
| 39 | #define MV88E6XXX_G2_SWITCH_MGMT_FORCE_FLOW_CTL_PRI 0x0080 |
| 40 | #define MV88E6XXX_G2_SWITCH_MGMT_RSVD2CPU 0x0008 |
Vivien Didelot | 067e474 | 2017-06-19 10:55:39 -0400 | [diff] [blame] | 41 | |
| 42 | /* Offset 0x06: Device Mapping Table Register */ |
| 43 | #define MV88E6XXX_G2_DEVICE_MAPPING 0x06 |
| 44 | #define MV88E6XXX_G2_DEVICE_MAPPING_UPDATE 0x8000 |
| 45 | #define MV88E6XXX_G2_DEVICE_MAPPING_DEV_MASK 0x1f00 |
| 46 | #define MV88E6XXX_G2_DEVICE_MAPPING_PORT_MASK 0x000f |
Vivien Didelot | 56dc734 | 2017-06-19 10:55:38 -0400 | [diff] [blame] | 47 | |
| 48 | /* Offset 0x07: Trunk Mask Table Register */ |
| 49 | #define MV88E6XXX_G2_TRUNK_MASK 0x07 |
| 50 | #define MV88E6XXX_G2_TRUNK_MASK_UPDATE 0x8000 |
| 51 | #define MV88E6XXX_G2_TRUNK_MASK_NUM_MASK 0x7000 |
| 52 | #define MV88E6XXX_G2_TRUNK_MASK_HASH 0x0800 |
| 53 | |
| 54 | /* Offset 0x08: Trunk Mapping Table Register */ |
| 55 | #define MV88E6XXX_G2_TRUNK_MAPPING 0x08 |
| 56 | #define MV88E6XXX_G2_TRUNK_MAPPING_UPDATE 0x8000 |
| 57 | #define MV88E6XXX_G2_TRUNK_MAPPING_ID_MASK 0x7800 |
Vivien Didelot | cd8da8b | 2017-06-19 10:55:36 -0400 | [diff] [blame] | 58 | |
| 59 | /* Offset 0x09: Ingress Rate Command Register */ |
| 60 | #define MV88E6XXX_G2_IRL_CMD 0x09 |
| 61 | #define MV88E6XXX_G2_IRL_CMD_BUSY 0x8000 |
| 62 | #define MV88E6352_G2_IRL_CMD_OP_MASK 0x7000 |
| 63 | #define MV88E6352_G2_IRL_CMD_OP_NOOP 0x0000 |
| 64 | #define MV88E6352_G2_IRL_CMD_OP_INIT_ALL 0x1000 |
| 65 | #define MV88E6352_G2_IRL_CMD_OP_INIT_RES 0x2000 |
| 66 | #define MV88E6352_G2_IRL_CMD_OP_WRITE_REG 0x3000 |
| 67 | #define MV88E6352_G2_IRL_CMD_OP_READ_REG 0x4000 |
| 68 | #define MV88E6390_G2_IRL_CMD_OP_MASK 0x6000 |
| 69 | #define MV88E6390_G2_IRL_CMD_OP_READ_REG 0x0000 |
| 70 | #define MV88E6390_G2_IRL_CMD_OP_INIT_ALL 0x2000 |
| 71 | #define MV88E6390_G2_IRL_CMD_OP_INIT_RES 0x4000 |
| 72 | #define MV88E6390_G2_IRL_CMD_OP_WRITE_REG 0x6000 |
| 73 | #define MV88E6352_G2_IRL_CMD_PORT_MASK 0x0f00 |
| 74 | #define MV88E6390_G2_IRL_CMD_PORT_MASK 0x1f00 |
| 75 | #define MV88E6XXX_G2_IRL_CMD_RES_MASK 0x00e0 |
| 76 | #define MV88E6XXX_G2_IRL_CMD_REG_MASK 0x000f |
| 77 | |
| 78 | /* Offset 0x0A: Ingress Rate Data Register */ |
| 79 | #define MV88E6XXX_G2_IRL_DATA 0x0a |
| 80 | #define MV88E6XXX_G2_IRL_DATA_MASK 0xffff |
| 81 | |
Vivien Didelot | 67d1ea8 | 2017-06-19 10:55:41 -0400 | [diff] [blame] | 82 | /* Offset 0x0B: Cross-chip Port VLAN Register */ |
| 83 | #define MV88E6XXX_G2_PVT_ADDR 0x0b |
| 84 | #define MV88E6XXX_G2_PVT_ADDR_BUSY 0x8000 |
| 85 | #define MV88E6XXX_G2_PVT_ADDR_OP_MASK 0x7000 |
| 86 | #define MV88E6XXX_G2_PVT_ADDR_OP_INIT_ONES 0x1000 |
| 87 | #define MV88E6XXX_G2_PVT_ADDR_OP_WRITE_PVLAN 0x3000 |
| 88 | #define MV88E6XXX_G2_PVT_ADDR_OP_READ 0x4000 |
| 89 | #define MV88E6XXX_G2_PVT_ADDR_PTR_MASK 0x01ff |
| 90 | |
| 91 | /* Offset 0x0C: Cross-chip Port VLAN Data Register */ |
| 92 | #define MV88E6XXX_G2_PVT_DATA 0x0c |
| 93 | #define MV88E6XXX_G2_PVT_DATA_MASK 0x7f |
| 94 | |
Vivien Didelot | ed44152 | 2017-06-19 10:55:43 -0400 | [diff] [blame] | 95 | /* Offset 0x0D: Switch MAC/WoL/WoF Register */ |
| 96 | #define MV88E6XXX_G2_SWITCH_MAC 0x0d |
| 97 | #define MV88E6XXX_G2_SWITCH_MAC_UPDATE 0x8000 |
| 98 | #define MV88E6XXX_G2_SWITCH_MAC_PTR_MASK 0x1f00 |
| 99 | #define MV88E6XXX_G2_SWITCH_MAC_DATA_MASK 0x00ff |
| 100 | |
Vivien Didelot | d23a83f | 2017-06-02 17:06:19 -0400 | [diff] [blame] | 101 | #define GLOBAL2_ATU_STATS 0x0e |
| 102 | #define GLOBAL2_PRIO_OVERRIDE 0x0f |
| 103 | #define GLOBAL2_PRIO_OVERRIDE_FORCE_SNOOP BIT(7) |
| 104 | #define GLOBAL2_PRIO_OVERRIDE_SNOOP_SHIFT 4 |
| 105 | #define GLOBAL2_PRIO_OVERRIDE_FORCE_ARP BIT(3) |
| 106 | #define GLOBAL2_PRIO_OVERRIDE_ARP_SHIFT 0 |
Vivien Didelot | 7fc8c9d | 2017-06-19 10:55:42 -0400 | [diff] [blame] | 107 | |
| 108 | /* Offset 0x14: EEPROM Command */ |
| 109 | #define MV88E6XXX_G2_EEPROM_CMD 0x14 |
| 110 | #define MV88E6XXX_G2_EEPROM_CMD_BUSY 0x8000 |
| 111 | #define MV88E6XXX_G2_EEPROM_CMD_OP_MASK 0x7000 |
| 112 | #define MV88E6XXX_G2_EEPROM_CMD_OP_WRITE 0x3000 |
| 113 | #define MV88E6XXX_G2_EEPROM_CMD_OP_READ 0x4000 |
| 114 | #define MV88E6XXX_G2_EEPROM_CMD_OP_LOAD 0x6000 |
| 115 | #define MV88E6XXX_G2_EEPROM_CMD_RUNNING 0x0800 |
| 116 | #define MV88E6XXX_G2_EEPROM_CMD_WRITE_EN 0x0400 |
| 117 | #define MV88E6352_G2_EEPROM_CMD_ADDR_MASK 0x00ff |
| 118 | #define MV88E6390_G2_EEPROM_CMD_DATA_MASK 0x00ff |
| 119 | |
| 120 | /* Offset 0x15: EEPROM Data */ |
| 121 | #define MV88E6352_G2_EEPROM_DATA 0x15 |
| 122 | #define MV88E6352_G2_EEPROM_DATA_MASK 0xffff |
| 123 | |
| 124 | /* Offset 0x15: EEPROM Addr */ |
| 125 | #define MV88E6390_G2_EEPROM_ADDR 0x15 |
| 126 | #define MV88E6390_G2_EEPROM_ADDR_MASK 0xffff |
| 127 | |
Vivien Didelot | d23a83f | 2017-06-02 17:06:19 -0400 | [diff] [blame] | 128 | #define GLOBAL2_PTP_AVB_OP 0x16 |
| 129 | #define GLOBAL2_PTP_AVB_DATA 0x17 |
Vivien Didelot | d23a83f | 2017-06-02 17:06:19 -0400 | [diff] [blame] | 130 | |
Vivien Didelot | e289ef0 | 2017-06-19 10:55:37 -0400 | [diff] [blame] | 131 | /* Offset 0x18: SMI PHY Command Register */ |
| 132 | #define MV88E6XXX_G2_SMI_PHY_CMD 0x18 |
| 133 | #define MV88E6XXX_G2_SMI_PHY_CMD_BUSY 0x8000 |
| 134 | #define MV88E6390_G2_SMI_PHY_CMD_FUNC_MASK 0x6000 |
| 135 | #define MV88E6390_G2_SMI_PHY_CMD_FUNC_INTERNAL 0x0000 |
| 136 | #define MV88E6390_G2_SMI_PHY_CMD_FUNC_EXTERNAL 0x2000 |
| 137 | #define MV88E6390_G2_SMI_PHY_CMD_FUNC_SETUP 0x4000 |
| 138 | #define MV88E6XXX_G2_SMI_PHY_CMD_MODE_MASK 0x1000 |
| 139 | #define MV88E6XXX_G2_SMI_PHY_CMD_MODE_45 0x0000 |
| 140 | #define MV88E6XXX_G2_SMI_PHY_CMD_MODE_22 0x1000 |
| 141 | #define MV88E6XXX_G2_SMI_PHY_CMD_OP_MASK 0x0c00 |
| 142 | #define MV88E6XXX_G2_SMI_PHY_CMD_OP_22_WRITE_DATA 0x0400 |
| 143 | #define MV88E6XXX_G2_SMI_PHY_CMD_OP_22_READ_DATA 0x0800 |
| 144 | #define MV88E6XXX_G2_SMI_PHY_CMD_OP_45_WRITE_ADDR 0x0000 |
| 145 | #define MV88E6XXX_G2_SMI_PHY_CMD_OP_45_WRITE_DATA 0x0400 |
| 146 | #define MV88E6XXX_G2_SMI_PHY_CMD_OP_45_READ_DATA_INC 0x0800 |
| 147 | #define MV88E6XXX_G2_SMI_PHY_CMD_OP_45_READ_DATA 0x0c00 |
| 148 | #define MV88E6XXX_G2_SMI_PHY_CMD_DEV_ADDR_MASK 0x03e0 |
| 149 | #define MV88E6XXX_G2_SMI_PHY_CMD_REG_ADDR_MASK 0x001f |
| 150 | #define MV88E6XXX_G2_SMI_PHY_CMD_SETUP_PTR_MASK 0x03ff |
| 151 | |
| 152 | /* Offset 0x19: SMI PHY Data Register */ |
| 153 | #define MV88E6XXX_G2_SMI_PHY_DATA 0x19 |
| 154 | |
Vivien Didelot | d23a83f | 2017-06-02 17:06:19 -0400 | [diff] [blame] | 155 | #define GLOBAL2_SCRATCH_MISC 0x1a |
| 156 | #define GLOBAL2_SCRATCH_BUSY BIT(15) |
| 157 | #define GLOBAL2_SCRATCH_REGISTER_SHIFT 8 |
| 158 | #define GLOBAL2_SCRATCH_VALUE_MASK 0xff |
Vivien Didelot | 3b19df7 | 2017-06-19 10:55:44 -0400 | [diff] [blame^] | 159 | |
| 160 | /* Offset 0x1B: Watch Dog Control Register */ |
| 161 | #define MV88E6352_G2_WDOG_CTL 0x1b |
| 162 | #define MV88E6352_G2_WDOG_CTL_EGRESS_EVENT 0x0080 |
| 163 | #define MV88E6352_G2_WDOG_CTL_RMU_TIMEOUT 0x0040 |
| 164 | #define MV88E6352_G2_WDOG_CTL_QC_ENABLE 0x0020 |
| 165 | #define MV88E6352_G2_WDOG_CTL_EGRESS_HISTORY 0x0010 |
| 166 | #define MV88E6352_G2_WDOG_CTL_EGRESS_ENABLE 0x0008 |
| 167 | #define MV88E6352_G2_WDOG_CTL_FORCE_IRQ 0x0004 |
| 168 | #define MV88E6352_G2_WDOG_CTL_HISTORY 0x0002 |
| 169 | #define MV88E6352_G2_WDOG_CTL_SWRESET 0x0001 |
| 170 | |
| 171 | /* Offset 0x1B: Watch Dog Control Register */ |
| 172 | #define MV88E6390_G2_WDOG_CTL 0x1b |
| 173 | #define MV88E6390_G2_WDOG_CTL_UPDATE 0x8000 |
| 174 | #define MV88E6390_G2_WDOG_CTL_PTR_MASK 0x7f00 |
| 175 | #define MV88E6390_G2_WDOG_CTL_PTR_INT_SOURCE 0x0000 |
| 176 | #define MV88E6390_G2_WDOG_CTL_PTR_INT_STS 0x1000 |
| 177 | #define MV88E6390_G2_WDOG_CTL_PTR_INT_ENABLE 0x1100 |
| 178 | #define MV88E6390_G2_WDOG_CTL_PTR_EVENT 0x1200 |
| 179 | #define MV88E6390_G2_WDOG_CTL_PTR_HISTORY 0x1300 |
| 180 | #define MV88E6390_G2_WDOG_CTL_DATA_MASK 0x00ff |
| 181 | #define MV88E6390_G2_WDOG_CTL_CUT_THROUGH 0x0008 |
| 182 | #define MV88E6390_G2_WDOG_CTL_QUEUE_CONTROLLER 0x0004 |
| 183 | #define MV88E6390_G2_WDOG_CTL_EGRESS 0x0002 |
| 184 | #define MV88E6390_G2_WDOG_CTL_FORCE_IRQ 0x0001 |
| 185 | |
Vivien Didelot | d23a83f | 2017-06-02 17:06:19 -0400 | [diff] [blame] | 186 | #define GLOBAL2_QOS_WEIGHT 0x1c |
| 187 | #define GLOBAL2_MISC 0x1d |
| 188 | #define GLOBAL2_MISC_5_BIT_PORT BIT(14) |
| 189 | |
Vivien Didelot | ca070c1 | 2016-09-02 14:45:34 -0400 | [diff] [blame] | 190 | #ifdef CONFIG_NET_DSA_MV88E6XXX_GLOBAL2 |
| 191 | |
| 192 | static inline int mv88e6xxx_g2_require(struct mv88e6xxx_chip *chip) |
| 193 | { |
| 194 | return 0; |
| 195 | } |
| 196 | |
Vivien Didelot | cd8da8b | 2017-06-19 10:55:36 -0400 | [diff] [blame] | 197 | int mv88e6352_g2_irl_init_all(struct mv88e6xxx_chip *chip, int port); |
| 198 | int mv88e6390_g2_irl_init_all(struct mv88e6xxx_chip *chip, int port); |
| 199 | |
Andrew Lunn | ee26a22 | 2017-01-24 14:53:48 +0100 | [diff] [blame] | 200 | int mv88e6xxx_g2_smi_phy_read(struct mv88e6xxx_chip *chip, |
| 201 | struct mii_bus *bus, |
| 202 | int addr, int reg, u16 *val); |
| 203 | int mv88e6xxx_g2_smi_phy_write(struct mv88e6xxx_chip *chip, |
| 204 | struct mii_bus *bus, |
| 205 | int addr, int reg, u16 val); |
Vivien Didelot | ec56127 | 2016-09-02 14:45:33 -0400 | [diff] [blame] | 206 | int mv88e6xxx_g2_set_switch_mac(struct mv88e6xxx_chip *chip, u8 *addr); |
Vivien Didelot | 98fc3c6 | 2017-01-12 18:07:16 -0500 | [diff] [blame] | 207 | |
| 208 | int mv88e6xxx_g2_get_eeprom8(struct mv88e6xxx_chip *chip, |
| 209 | struct ethtool_eeprom *eeprom, u8 *data); |
| 210 | int mv88e6xxx_g2_set_eeprom8(struct mv88e6xxx_chip *chip, |
| 211 | struct ethtool_eeprom *eeprom, u8 *data); |
| 212 | |
Vivien Didelot | ec56127 | 2016-09-02 14:45:33 -0400 | [diff] [blame] | 213 | int mv88e6xxx_g2_get_eeprom16(struct mv88e6xxx_chip *chip, |
| 214 | struct ethtool_eeprom *eeprom, u8 *data); |
| 215 | int mv88e6xxx_g2_set_eeprom16(struct mv88e6xxx_chip *chip, |
| 216 | struct ethtool_eeprom *eeprom, u8 *data); |
Vivien Didelot | 98fc3c6 | 2017-01-12 18:07:16 -0500 | [diff] [blame] | 217 | |
Vivien Didelot | 17a1594 | 2017-03-30 17:37:09 -0400 | [diff] [blame] | 218 | int mv88e6xxx_g2_pvt_write(struct mv88e6xxx_chip *chip, int src_dev, |
| 219 | int src_port, u16 data); |
Vivien Didelot | 8122899 | 2017-03-30 17:37:08 -0400 | [diff] [blame] | 220 | int mv88e6xxx_g2_misc_4_bit_port(struct mv88e6xxx_chip *chip); |
| 221 | |
Vivien Didelot | ec56127 | 2016-09-02 14:45:33 -0400 | [diff] [blame] | 222 | int mv88e6xxx_g2_setup(struct mv88e6xxx_chip *chip); |
Andrew Lunn | dc30c35 | 2016-10-16 19:56:49 +0200 | [diff] [blame] | 223 | int mv88e6xxx_g2_irq_setup(struct mv88e6xxx_chip *chip); |
| 224 | void mv88e6xxx_g2_irq_free(struct mv88e6xxx_chip *chip); |
Andrew Lunn | 6e55f69 | 2016-12-03 04:45:16 +0100 | [diff] [blame] | 225 | int mv88e6095_g2_mgmt_rsvd2cpu(struct mv88e6xxx_chip *chip); |
Vivien Didelot | ec56127 | 2016-09-02 14:45:33 -0400 | [diff] [blame] | 226 | |
Andrew Lunn | fcd2516 | 2017-02-09 00:03:42 +0100 | [diff] [blame] | 227 | extern const struct mv88e6xxx_irq_ops mv88e6097_watchdog_ops; |
Andrew Lunn | 6130373 | 2017-02-09 00:03:43 +0100 | [diff] [blame] | 228 | extern const struct mv88e6xxx_irq_ops mv88e6390_watchdog_ops; |
Andrew Lunn | fcd2516 | 2017-02-09 00:03:42 +0100 | [diff] [blame] | 229 | |
Vivien Didelot | ca070c1 | 2016-09-02 14:45:34 -0400 | [diff] [blame] | 230 | #else /* !CONFIG_NET_DSA_MV88E6XXX_GLOBAL2 */ |
| 231 | |
| 232 | static inline int mv88e6xxx_g2_require(struct mv88e6xxx_chip *chip) |
| 233 | { |
| 234 | if (mv88e6xxx_has(chip, MV88E6XXX_FLAG_GLOBAL2)) { |
| 235 | dev_err(chip->dev, "this chip requires CONFIG_NET_DSA_MV88E6XXX_GLOBAL2 enabled\n"); |
| 236 | return -EOPNOTSUPP; |
| 237 | } |
| 238 | |
| 239 | return 0; |
| 240 | } |
| 241 | |
Vivien Didelot | cd8da8b | 2017-06-19 10:55:36 -0400 | [diff] [blame] | 242 | static inline int mv88e6352_g2_irl_init_all(struct mv88e6xxx_chip *chip, |
| 243 | int port) |
| 244 | { |
| 245 | return -EOPNOTSUPP; |
| 246 | } |
| 247 | |
| 248 | static inline int mv88e6390_g2_irl_init_all(struct mv88e6xxx_chip *chip, |
| 249 | int port) |
| 250 | { |
| 251 | return -EOPNOTSUPP; |
| 252 | } |
| 253 | |
Vivien Didelot | ca070c1 | 2016-09-02 14:45:34 -0400 | [diff] [blame] | 254 | static inline int mv88e6xxx_g2_smi_phy_read(struct mv88e6xxx_chip *chip, |
Andrew Lunn | ee26a22 | 2017-01-24 14:53:48 +0100 | [diff] [blame] | 255 | struct mii_bus *bus, |
Vivien Didelot | ca070c1 | 2016-09-02 14:45:34 -0400 | [diff] [blame] | 256 | int addr, int reg, u16 *val) |
| 257 | { |
| 258 | return -EOPNOTSUPP; |
| 259 | } |
| 260 | |
| 261 | static inline int mv88e6xxx_g2_smi_phy_write(struct mv88e6xxx_chip *chip, |
Andrew Lunn | ee26a22 | 2017-01-24 14:53:48 +0100 | [diff] [blame] | 262 | struct mii_bus *bus, |
Vivien Didelot | ca070c1 | 2016-09-02 14:45:34 -0400 | [diff] [blame] | 263 | int addr, int reg, u16 val) |
| 264 | { |
| 265 | return -EOPNOTSUPP; |
| 266 | } |
| 267 | |
| 268 | static inline int mv88e6xxx_g2_set_switch_mac(struct mv88e6xxx_chip *chip, |
| 269 | u8 *addr) |
| 270 | { |
| 271 | return -EOPNOTSUPP; |
| 272 | } |
| 273 | |
Vivien Didelot | 98fc3c6 | 2017-01-12 18:07:16 -0500 | [diff] [blame] | 274 | static inline int mv88e6xxx_g2_get_eeprom8(struct mv88e6xxx_chip *chip, |
| 275 | struct ethtool_eeprom *eeprom, |
| 276 | u8 *data) |
| 277 | { |
| 278 | return -EOPNOTSUPP; |
| 279 | } |
| 280 | |
| 281 | static inline int mv88e6xxx_g2_set_eeprom8(struct mv88e6xxx_chip *chip, |
| 282 | struct ethtool_eeprom *eeprom, |
| 283 | u8 *data) |
| 284 | { |
| 285 | return -EOPNOTSUPP; |
| 286 | } |
| 287 | |
Vivien Didelot | ca070c1 | 2016-09-02 14:45:34 -0400 | [diff] [blame] | 288 | static inline int mv88e6xxx_g2_get_eeprom16(struct mv88e6xxx_chip *chip, |
| 289 | struct ethtool_eeprom *eeprom, |
| 290 | u8 *data) |
| 291 | { |
| 292 | return -EOPNOTSUPP; |
| 293 | } |
| 294 | |
| 295 | static inline int mv88e6xxx_g2_set_eeprom16(struct mv88e6xxx_chip *chip, |
| 296 | struct ethtool_eeprom *eeprom, |
| 297 | u8 *data) |
| 298 | { |
| 299 | return -EOPNOTSUPP; |
| 300 | } |
| 301 | |
Arnd Bergmann | 59b2c31 | 2017-05-29 14:56:01 +0200 | [diff] [blame] | 302 | static inline int mv88e6xxx_g2_pvt_write(struct mv88e6xxx_chip *chip, |
| 303 | int src_dev, int src_port, u16 data) |
Vivien Didelot | 17a1594 | 2017-03-30 17:37:09 -0400 | [diff] [blame] | 304 | { |
| 305 | return -EOPNOTSUPP; |
| 306 | } |
| 307 | |
Arnd Bergmann | 59b2c31 | 2017-05-29 14:56:01 +0200 | [diff] [blame] | 308 | static inline int mv88e6xxx_g2_misc_4_bit_port(struct mv88e6xxx_chip *chip) |
Vivien Didelot | 8122899 | 2017-03-30 17:37:08 -0400 | [diff] [blame] | 309 | { |
| 310 | return -EOPNOTSUPP; |
| 311 | } |
| 312 | |
Vivien Didelot | ca070c1 | 2016-09-02 14:45:34 -0400 | [diff] [blame] | 313 | static inline int mv88e6xxx_g2_setup(struct mv88e6xxx_chip *chip) |
| 314 | { |
| 315 | return -EOPNOTSUPP; |
| 316 | } |
| 317 | |
Andrew Lunn | dc30c35 | 2016-10-16 19:56:49 +0200 | [diff] [blame] | 318 | static inline int mv88e6xxx_g2_irq_setup(struct mv88e6xxx_chip *chip) |
| 319 | { |
| 320 | return -EOPNOTSUPP; |
| 321 | } |
| 322 | |
| 323 | static inline void mv88e6xxx_g2_irq_free(struct mv88e6xxx_chip *chip) |
| 324 | { |
| 325 | } |
| 326 | |
Andrew Lunn | 6e55f69 | 2016-12-03 04:45:16 +0100 | [diff] [blame] | 327 | static inline int mv88e6095_g2_mgmt_rsvd2cpu(struct mv88e6xxx_chip *chip) |
| 328 | { |
| 329 | return -EOPNOTSUPP; |
| 330 | } |
| 331 | |
Andrew Lunn | fcd2516 | 2017-02-09 00:03:42 +0100 | [diff] [blame] | 332 | static const struct mv88e6xxx_irq_ops mv88e6097_watchdog_ops = {}; |
Andrew Lunn | 6130373 | 2017-02-09 00:03:43 +0100 | [diff] [blame] | 333 | static const struct mv88e6xxx_irq_ops mv88e6390_watchdog_ops = {}; |
Andrew Lunn | fcd2516 | 2017-02-09 00:03:42 +0100 | [diff] [blame] | 334 | |
Vivien Didelot | ca070c1 | 2016-09-02 14:45:34 -0400 | [diff] [blame] | 335 | #endif /* CONFIG_NET_DSA_MV88E6XXX_GLOBAL2 */ |
| 336 | |
Vivien Didelot | ec56127 | 2016-09-02 14:45:33 -0400 | [diff] [blame] | 337 | #endif /* _MV88E6XXX_GLOBAL2_H */ |