blob: d89d7b810a459a588646e83ef069b2af6450ef63 [file] [log] [blame]
Vivien Didelotec561272016-09-02 14:45:33 -04001/*
Vivien Didelot1d900162017-06-19 10:55:45 -04002 * Marvell 88E6xxx Switch Global 2 Registers support
Vivien Didelotec561272016-09-02 14:45:33 -04003 *
4 * Copyright (c) 2008 Marvell Semiconductor
5 *
Vivien Didelot4333d612017-03-28 15:10:36 -04006 * Copyright (c) 2016-2017 Savoir-faire Linux Inc.
7 * Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Vivien Didelotec561272016-09-02 14:45:33 -04008 *
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 Didelot4d5f2ba72017-06-02 17:06:15 -040018#include "chip.h"
Vivien Didelotec561272016-09-02 14:45:33 -040019
Vivien Didelot1d900162017-06-19 10:55:45 -040020#define MV88E6XXX_G2 0x1c
Vivien Didelotd23a83f2017-06-02 17:06:19 -040021
Vivien Didelot1d900162017-06-19 10:55:45 -040022/* Offset 0x00: Interrupt Source Register */
Vivien Didelotd6c5e6a2017-07-17 13:03:40 -040023#define MV88E6XXX_G2_INT_SRC 0x00
24#define MV88E6XXX_G2_INT_SRC_WDOG 0x8000
25#define MV88E6XXX_G2_INT_SRC_JAM_LIMIT 0x4000
26#define MV88E6XXX_G2_INT_SRC_DUPLEX_MISMATCH 0x2000
27#define MV88E6XXX_G2_INT_SRC_WAKE_EVENT 0x1000
28#define MV88E6352_G2_INT_SRC_SERDES 0x0800
29#define MV88E6352_G2_INT_SRC_PHY 0x001f
30#define MV88E6390_G2_INT_SRC_PHY 0x07fe
31
Vivien Didelot1d900162017-06-19 10:55:45 -040032#define MV88E6XXX_G2_INT_SOURCE_WATCHDOG 15
33
34/* Offset 0x01: Interrupt Mask Register */
Vivien Didelotd6c5e6a2017-07-17 13:03:40 -040035#define MV88E6XXX_G2_INT_MASK 0x01
36#define MV88E6XXX_G2_INT_MASK_WDOG 0x8000
37#define MV88E6XXX_G2_INT_MASK_JAM_LIMIT 0x4000
38#define MV88E6XXX_G2_INT_MASK_DUPLEX_MISMATCH 0x2000
39#define MV88E6XXX_G2_INT_MASK_WAKE_EVENT 0x1000
40#define MV88E6352_G2_INT_MASK_SERDES 0x0800
41#define MV88E6352_G2_INT_MASK_PHY 0x001f
42#define MV88E6390_G2_INT_MASK_PHY 0x07fe
Vivien Didelot6bff47b2017-06-19 10:55:40 -040043
44/* Offset 0x02: MGMT Enable Register 2x */
45#define MV88E6XXX_G2_MGMT_EN_2X 0x02
46
47/* Offset 0x03: MGMT Enable Register 0x */
48#define MV88E6XXX_G2_MGMT_EN_0X 0x03
49
Vivien Didelot1d900162017-06-19 10:55:45 -040050/* Offset 0x04: Flow Control Delay Register */
51#define MV88E6XXX_G2_FLOW_CTL 0x04
Vivien Didelot6bff47b2017-06-19 10:55:40 -040052
53/* Offset 0x05: Switch Management Register */
54#define MV88E6XXX_G2_SWITCH_MGMT 0x05
55#define MV88E6XXX_G2_SWITCH_MGMT_USE_DOUBLE_TAG_DATA 0x8000
56#define MV88E6XXX_G2_SWITCH_MGMT_PREVENT_LOOPS 0x4000
57#define MV88E6XXX_G2_SWITCH_MGMT_FLOW_CTL_MSG 0x2000
58#define MV88E6XXX_G2_SWITCH_MGMT_FORCE_FLOW_CTL_PRI 0x0080
59#define MV88E6XXX_G2_SWITCH_MGMT_RSVD2CPU 0x0008
Vivien Didelot067e4742017-06-19 10:55:39 -040060
61/* Offset 0x06: Device Mapping Table Register */
62#define MV88E6XXX_G2_DEVICE_MAPPING 0x06
63#define MV88E6XXX_G2_DEVICE_MAPPING_UPDATE 0x8000
64#define MV88E6XXX_G2_DEVICE_MAPPING_DEV_MASK 0x1f00
65#define MV88E6XXX_G2_DEVICE_MAPPING_PORT_MASK 0x000f
Vivien Didelot56dc7342017-06-19 10:55:38 -040066
67/* Offset 0x07: Trunk Mask Table Register */
68#define MV88E6XXX_G2_TRUNK_MASK 0x07
69#define MV88E6XXX_G2_TRUNK_MASK_UPDATE 0x8000
70#define MV88E6XXX_G2_TRUNK_MASK_NUM_MASK 0x7000
71#define MV88E6XXX_G2_TRUNK_MASK_HASH 0x0800
72
73/* Offset 0x08: Trunk Mapping Table Register */
74#define MV88E6XXX_G2_TRUNK_MAPPING 0x08
75#define MV88E6XXX_G2_TRUNK_MAPPING_UPDATE 0x8000
76#define MV88E6XXX_G2_TRUNK_MAPPING_ID_MASK 0x7800
Vivien Didelotcd8da8b2017-06-19 10:55:36 -040077
78/* Offset 0x09: Ingress Rate Command Register */
79#define MV88E6XXX_G2_IRL_CMD 0x09
80#define MV88E6XXX_G2_IRL_CMD_BUSY 0x8000
81#define MV88E6352_G2_IRL_CMD_OP_MASK 0x7000
82#define MV88E6352_G2_IRL_CMD_OP_NOOP 0x0000
83#define MV88E6352_G2_IRL_CMD_OP_INIT_ALL 0x1000
84#define MV88E6352_G2_IRL_CMD_OP_INIT_RES 0x2000
85#define MV88E6352_G2_IRL_CMD_OP_WRITE_REG 0x3000
86#define MV88E6352_G2_IRL_CMD_OP_READ_REG 0x4000
87#define MV88E6390_G2_IRL_CMD_OP_MASK 0x6000
88#define MV88E6390_G2_IRL_CMD_OP_READ_REG 0x0000
89#define MV88E6390_G2_IRL_CMD_OP_INIT_ALL 0x2000
90#define MV88E6390_G2_IRL_CMD_OP_INIT_RES 0x4000
91#define MV88E6390_G2_IRL_CMD_OP_WRITE_REG 0x6000
92#define MV88E6352_G2_IRL_CMD_PORT_MASK 0x0f00
93#define MV88E6390_G2_IRL_CMD_PORT_MASK 0x1f00
94#define MV88E6XXX_G2_IRL_CMD_RES_MASK 0x00e0
95#define MV88E6XXX_G2_IRL_CMD_REG_MASK 0x000f
96
97/* Offset 0x0A: Ingress Rate Data Register */
98#define MV88E6XXX_G2_IRL_DATA 0x0a
99#define MV88E6XXX_G2_IRL_DATA_MASK 0xffff
100
Vivien Didelot67d1ea82017-06-19 10:55:41 -0400101/* Offset 0x0B: Cross-chip Port VLAN Register */
102#define MV88E6XXX_G2_PVT_ADDR 0x0b
103#define MV88E6XXX_G2_PVT_ADDR_BUSY 0x8000
104#define MV88E6XXX_G2_PVT_ADDR_OP_MASK 0x7000
105#define MV88E6XXX_G2_PVT_ADDR_OP_INIT_ONES 0x1000
106#define MV88E6XXX_G2_PVT_ADDR_OP_WRITE_PVLAN 0x3000
107#define MV88E6XXX_G2_PVT_ADDR_OP_READ 0x4000
108#define MV88E6XXX_G2_PVT_ADDR_PTR_MASK 0x01ff
109
110/* Offset 0x0C: Cross-chip Port VLAN Data Register */
111#define MV88E6XXX_G2_PVT_DATA 0x0c
112#define MV88E6XXX_G2_PVT_DATA_MASK 0x7f
113
Vivien Dideloted441522017-06-19 10:55:43 -0400114/* Offset 0x0D: Switch MAC/WoL/WoF Register */
115#define MV88E6XXX_G2_SWITCH_MAC 0x0d
116#define MV88E6XXX_G2_SWITCH_MAC_UPDATE 0x8000
117#define MV88E6XXX_G2_SWITCH_MAC_PTR_MASK 0x1f00
118#define MV88E6XXX_G2_SWITCH_MAC_DATA_MASK 0x00ff
119
Vivien Didelot1d900162017-06-19 10:55:45 -0400120/* Offset 0x0E: ATU Stats Register */
121#define MV88E6XXX_G2_ATU_STATS 0x0e
122
123/* Offset 0x0F: Priority Override Table */
124#define MV88E6XXX_G2_PRIO_OVERRIDE 0x0f
125#define MV88E6XXX_G2_PRIO_OVERRIDE_UPDATE 0x8000
126#define MV88E6XXX_G2_PRIO_OVERRIDE_FPRISET 0x1000
127#define MV88E6XXX_G2_PRIO_OVERRIDE_PTR_MASK 0x0f00
128#define MV88E6352_G2_PRIO_OVERRIDE_QPRIAVBEN 0x0080
129#define MV88E6352_G2_PRIO_OVERRIDE_DATAAVB_MASK 0x0030
130#define MV88E6XXX_G2_PRIO_OVERRIDE_QFPRIEN 0x0008
131#define MV88E6XXX_G2_PRIO_OVERRIDE_DATA_MASK 0x0007
Vivien Didelot7fc8c9d2017-06-19 10:55:42 -0400132
133/* Offset 0x14: EEPROM Command */
134#define MV88E6XXX_G2_EEPROM_CMD 0x14
135#define MV88E6XXX_G2_EEPROM_CMD_BUSY 0x8000
136#define MV88E6XXX_G2_EEPROM_CMD_OP_MASK 0x7000
137#define MV88E6XXX_G2_EEPROM_CMD_OP_WRITE 0x3000
138#define MV88E6XXX_G2_EEPROM_CMD_OP_READ 0x4000
139#define MV88E6XXX_G2_EEPROM_CMD_OP_LOAD 0x6000
140#define MV88E6XXX_G2_EEPROM_CMD_RUNNING 0x0800
141#define MV88E6XXX_G2_EEPROM_CMD_WRITE_EN 0x0400
142#define MV88E6352_G2_EEPROM_CMD_ADDR_MASK 0x00ff
143#define MV88E6390_G2_EEPROM_CMD_DATA_MASK 0x00ff
144
145/* Offset 0x15: EEPROM Data */
146#define MV88E6352_G2_EEPROM_DATA 0x15
147#define MV88E6352_G2_EEPROM_DATA_MASK 0xffff
148
149/* Offset 0x15: EEPROM Addr */
150#define MV88E6390_G2_EEPROM_ADDR 0x15
151#define MV88E6390_G2_EEPROM_ADDR_MASK 0xffff
152
Vivien Didelot1d900162017-06-19 10:55:45 -0400153/* Offset 0x16: AVB Command Register */
154#define MV88E6352_G2_AVB_CMD 0x16
155
156/* Offset 0x17: AVB Data Register */
157#define MV88E6352_G2_AVB_DATA 0x17
Vivien Didelotd23a83f2017-06-02 17:06:19 -0400158
Vivien Didelote289ef02017-06-19 10:55:37 -0400159/* Offset 0x18: SMI PHY Command Register */
160#define MV88E6XXX_G2_SMI_PHY_CMD 0x18
161#define MV88E6XXX_G2_SMI_PHY_CMD_BUSY 0x8000
162#define MV88E6390_G2_SMI_PHY_CMD_FUNC_MASK 0x6000
163#define MV88E6390_G2_SMI_PHY_CMD_FUNC_INTERNAL 0x0000
164#define MV88E6390_G2_SMI_PHY_CMD_FUNC_EXTERNAL 0x2000
165#define MV88E6390_G2_SMI_PHY_CMD_FUNC_SETUP 0x4000
166#define MV88E6XXX_G2_SMI_PHY_CMD_MODE_MASK 0x1000
167#define MV88E6XXX_G2_SMI_PHY_CMD_MODE_45 0x0000
168#define MV88E6XXX_G2_SMI_PHY_CMD_MODE_22 0x1000
169#define MV88E6XXX_G2_SMI_PHY_CMD_OP_MASK 0x0c00
170#define MV88E6XXX_G2_SMI_PHY_CMD_OP_22_WRITE_DATA 0x0400
171#define MV88E6XXX_G2_SMI_PHY_CMD_OP_22_READ_DATA 0x0800
172#define MV88E6XXX_G2_SMI_PHY_CMD_OP_45_WRITE_ADDR 0x0000
173#define MV88E6XXX_G2_SMI_PHY_CMD_OP_45_WRITE_DATA 0x0400
174#define MV88E6XXX_G2_SMI_PHY_CMD_OP_45_READ_DATA_INC 0x0800
175#define MV88E6XXX_G2_SMI_PHY_CMD_OP_45_READ_DATA 0x0c00
176#define MV88E6XXX_G2_SMI_PHY_CMD_DEV_ADDR_MASK 0x03e0
177#define MV88E6XXX_G2_SMI_PHY_CMD_REG_ADDR_MASK 0x001f
178#define MV88E6XXX_G2_SMI_PHY_CMD_SETUP_PTR_MASK 0x03ff
179
180/* Offset 0x19: SMI PHY Data Register */
181#define MV88E6XXX_G2_SMI_PHY_DATA 0x19
182
Vivien Didelot1d900162017-06-19 10:55:45 -0400183/* Offset 0x1A: Scratch and Misc. Register */
184#define MV88E6XXX_G2_SCRATCH_MISC_MISC 0x1a
185#define MV88E6XXX_G2_SCRATCH_MISC_UPDATE 0x8000
186#define MV88E6XXX_G2_SCRATCH_MISC_PTR_MASK 0x7f00
187#define MV88E6XXX_G2_SCRATCH_MISC_DATA_MASK 0x00ff
Vivien Didelot3b19df72017-06-19 10:55:44 -0400188
189/* Offset 0x1B: Watch Dog Control Register */
190#define MV88E6352_G2_WDOG_CTL 0x1b
191#define MV88E6352_G2_WDOG_CTL_EGRESS_EVENT 0x0080
192#define MV88E6352_G2_WDOG_CTL_RMU_TIMEOUT 0x0040
193#define MV88E6352_G2_WDOG_CTL_QC_ENABLE 0x0020
194#define MV88E6352_G2_WDOG_CTL_EGRESS_HISTORY 0x0010
195#define MV88E6352_G2_WDOG_CTL_EGRESS_ENABLE 0x0008
196#define MV88E6352_G2_WDOG_CTL_FORCE_IRQ 0x0004
197#define MV88E6352_G2_WDOG_CTL_HISTORY 0x0002
198#define MV88E6352_G2_WDOG_CTL_SWRESET 0x0001
199
200/* Offset 0x1B: Watch Dog Control Register */
201#define MV88E6390_G2_WDOG_CTL 0x1b
202#define MV88E6390_G2_WDOG_CTL_UPDATE 0x8000
203#define MV88E6390_G2_WDOG_CTL_PTR_MASK 0x7f00
204#define MV88E6390_G2_WDOG_CTL_PTR_INT_SOURCE 0x0000
205#define MV88E6390_G2_WDOG_CTL_PTR_INT_STS 0x1000
206#define MV88E6390_G2_WDOG_CTL_PTR_INT_ENABLE 0x1100
207#define MV88E6390_G2_WDOG_CTL_PTR_EVENT 0x1200
208#define MV88E6390_G2_WDOG_CTL_PTR_HISTORY 0x1300
209#define MV88E6390_G2_WDOG_CTL_DATA_MASK 0x00ff
210#define MV88E6390_G2_WDOG_CTL_CUT_THROUGH 0x0008
211#define MV88E6390_G2_WDOG_CTL_QUEUE_CONTROLLER 0x0004
212#define MV88E6390_G2_WDOG_CTL_EGRESS 0x0002
213#define MV88E6390_G2_WDOG_CTL_FORCE_IRQ 0x0001
214
Vivien Didelot1d900162017-06-19 10:55:45 -0400215/* Offset 0x1C: QoS Weights Register */
216#define MV88E6XXX_G2_QOS_WEIGHTS 0x1c
217#define MV88E6XXX_G2_QOS_WEIGHTS_UPDATE 0x8000
218#define MV88E6352_G2_QOS_WEIGHTS_PTR_MASK 0x3f00
219#define MV88E6390_G2_QOS_WEIGHTS_PTR_MASK 0x7f00
220#define MV88E6XXX_G2_QOS_WEIGHTS_DATA_MASK 0x00ff
221
222/* Offset 0x1D: Misc Register */
223#define MV88E6XXX_G2_MISC 0x1d
224#define MV88E6XXX_G2_MISC_5_BIT_PORT 0x4000
225#define MV88E6352_G2_NOEGR_POLICY 0x2000
226#define MV88E6390_G2_LAG_ID_4 0x2000
Vivien Didelotd23a83f2017-06-02 17:06:19 -0400227
Vivien Didelotca070c12016-09-02 14:45:34 -0400228#ifdef CONFIG_NET_DSA_MV88E6XXX_GLOBAL2
229
230static inline int mv88e6xxx_g2_require(struct mv88e6xxx_chip *chip)
231{
232 return 0;
233}
234
Vivien Didelotcd8da8b2017-06-19 10:55:36 -0400235int mv88e6352_g2_irl_init_all(struct mv88e6xxx_chip *chip, int port);
236int mv88e6390_g2_irl_init_all(struct mv88e6xxx_chip *chip, int port);
237
Andrew Lunnee26a222017-01-24 14:53:48 +0100238int mv88e6xxx_g2_smi_phy_read(struct mv88e6xxx_chip *chip,
239 struct mii_bus *bus,
240 int addr, int reg, u16 *val);
241int mv88e6xxx_g2_smi_phy_write(struct mv88e6xxx_chip *chip,
242 struct mii_bus *bus,
243 int addr, int reg, u16 val);
Vivien Didelotec561272016-09-02 14:45:33 -0400244int mv88e6xxx_g2_set_switch_mac(struct mv88e6xxx_chip *chip, u8 *addr);
Vivien Didelot98fc3c62017-01-12 18:07:16 -0500245
246int mv88e6xxx_g2_get_eeprom8(struct mv88e6xxx_chip *chip,
247 struct ethtool_eeprom *eeprom, u8 *data);
248int mv88e6xxx_g2_set_eeprom8(struct mv88e6xxx_chip *chip,
249 struct ethtool_eeprom *eeprom, u8 *data);
250
Vivien Didelotec561272016-09-02 14:45:33 -0400251int mv88e6xxx_g2_get_eeprom16(struct mv88e6xxx_chip *chip,
252 struct ethtool_eeprom *eeprom, u8 *data);
253int mv88e6xxx_g2_set_eeprom16(struct mv88e6xxx_chip *chip,
254 struct ethtool_eeprom *eeprom, u8 *data);
Vivien Didelot98fc3c62017-01-12 18:07:16 -0500255
Vivien Didelot17a15942017-03-30 17:37:09 -0400256int mv88e6xxx_g2_pvt_write(struct mv88e6xxx_chip *chip, int src_dev,
257 int src_port, u16 data);
Vivien Didelot81228992017-03-30 17:37:08 -0400258int mv88e6xxx_g2_misc_4_bit_port(struct mv88e6xxx_chip *chip);
259
Vivien Didelotec561272016-09-02 14:45:33 -0400260int mv88e6xxx_g2_setup(struct mv88e6xxx_chip *chip);
Andrew Lunndc30c352016-10-16 19:56:49 +0200261int mv88e6xxx_g2_irq_setup(struct mv88e6xxx_chip *chip);
262void mv88e6xxx_g2_irq_free(struct mv88e6xxx_chip *chip);
Vivien Didelot51c901a2017-07-17 13:03:41 -0400263
264int mv88e6185_g2_mgmt_rsvd2cpu(struct mv88e6xxx_chip *chip);
265int mv88e6352_g2_mgmt_rsvd2cpu(struct mv88e6xxx_chip *chip);
Vivien Didelotec561272016-09-02 14:45:33 -0400266
Vivien Didelot9e907d72017-07-17 13:03:43 -0400267int mv88e6xxx_g2_pot_clear(struct mv88e6xxx_chip *chip);
268
Andrew Lunnfcd25162017-02-09 00:03:42 +0100269extern const struct mv88e6xxx_irq_ops mv88e6097_watchdog_ops;
Andrew Lunn61303732017-02-09 00:03:43 +0100270extern const struct mv88e6xxx_irq_ops mv88e6390_watchdog_ops;
Andrew Lunnfcd25162017-02-09 00:03:42 +0100271
Vivien Didelotca070c12016-09-02 14:45:34 -0400272#else /* !CONFIG_NET_DSA_MV88E6XXX_GLOBAL2 */
273
274static inline int mv88e6xxx_g2_require(struct mv88e6xxx_chip *chip)
275{
276 if (mv88e6xxx_has(chip, MV88E6XXX_FLAG_GLOBAL2)) {
277 dev_err(chip->dev, "this chip requires CONFIG_NET_DSA_MV88E6XXX_GLOBAL2 enabled\n");
278 return -EOPNOTSUPP;
279 }
280
281 return 0;
282}
283
Vivien Didelotcd8da8b2017-06-19 10:55:36 -0400284static inline int mv88e6352_g2_irl_init_all(struct mv88e6xxx_chip *chip,
285 int port)
286{
287 return -EOPNOTSUPP;
288}
289
290static inline int mv88e6390_g2_irl_init_all(struct mv88e6xxx_chip *chip,
291 int port)
292{
293 return -EOPNOTSUPP;
294}
295
Vivien Didelotca070c12016-09-02 14:45:34 -0400296static inline int mv88e6xxx_g2_smi_phy_read(struct mv88e6xxx_chip *chip,
Andrew Lunnee26a222017-01-24 14:53:48 +0100297 struct mii_bus *bus,
Vivien Didelotca070c12016-09-02 14:45:34 -0400298 int addr, int reg, u16 *val)
299{
300 return -EOPNOTSUPP;
301}
302
303static inline int mv88e6xxx_g2_smi_phy_write(struct mv88e6xxx_chip *chip,
Andrew Lunnee26a222017-01-24 14:53:48 +0100304 struct mii_bus *bus,
Vivien Didelotca070c12016-09-02 14:45:34 -0400305 int addr, int reg, u16 val)
306{
307 return -EOPNOTSUPP;
308}
309
310static inline int mv88e6xxx_g2_set_switch_mac(struct mv88e6xxx_chip *chip,
311 u8 *addr)
312{
313 return -EOPNOTSUPP;
314}
315
Vivien Didelot98fc3c62017-01-12 18:07:16 -0500316static inline int mv88e6xxx_g2_get_eeprom8(struct mv88e6xxx_chip *chip,
317 struct ethtool_eeprom *eeprom,
318 u8 *data)
319{
320 return -EOPNOTSUPP;
321}
322
323static inline int mv88e6xxx_g2_set_eeprom8(struct mv88e6xxx_chip *chip,
324 struct ethtool_eeprom *eeprom,
325 u8 *data)
326{
327 return -EOPNOTSUPP;
328}
329
Vivien Didelotca070c12016-09-02 14:45:34 -0400330static inline int mv88e6xxx_g2_get_eeprom16(struct mv88e6xxx_chip *chip,
331 struct ethtool_eeprom *eeprom,
332 u8 *data)
333{
334 return -EOPNOTSUPP;
335}
336
337static inline int mv88e6xxx_g2_set_eeprom16(struct mv88e6xxx_chip *chip,
338 struct ethtool_eeprom *eeprom,
339 u8 *data)
340{
341 return -EOPNOTSUPP;
342}
343
Arnd Bergmann59b2c312017-05-29 14:56:01 +0200344static inline int mv88e6xxx_g2_pvt_write(struct mv88e6xxx_chip *chip,
345 int src_dev, int src_port, u16 data)
Vivien Didelot17a15942017-03-30 17:37:09 -0400346{
347 return -EOPNOTSUPP;
348}
349
Arnd Bergmann59b2c312017-05-29 14:56:01 +0200350static inline int mv88e6xxx_g2_misc_4_bit_port(struct mv88e6xxx_chip *chip)
Vivien Didelot81228992017-03-30 17:37:08 -0400351{
352 return -EOPNOTSUPP;
353}
354
Vivien Didelotca070c12016-09-02 14:45:34 -0400355static inline int mv88e6xxx_g2_setup(struct mv88e6xxx_chip *chip)
356{
357 return -EOPNOTSUPP;
358}
359
Andrew Lunndc30c352016-10-16 19:56:49 +0200360static inline int mv88e6xxx_g2_irq_setup(struct mv88e6xxx_chip *chip)
361{
362 return -EOPNOTSUPP;
363}
364
365static inline void mv88e6xxx_g2_irq_free(struct mv88e6xxx_chip *chip)
366{
367}
368
Vivien Didelot51c901a2017-07-17 13:03:41 -0400369static inline int mv88e6185_g2_mgmt_rsvd2cpu(struct mv88e6xxx_chip *chip)
370{
371 return -EOPNOTSUPP;
372}
373
374static inline int mv88e6352_g2_mgmt_rsvd2cpu(struct mv88e6xxx_chip *chip)
Andrew Lunn6e55f692016-12-03 04:45:16 +0100375{
376 return -EOPNOTSUPP;
377}
378
Vivien Didelot9e907d72017-07-17 13:03:43 -0400379static inline int mv88e6xxx_g2_pot_clear(struct mv88e6xxx_chip *chip)
380{
381 return -EOPNOTSUPP;
382}
383
Andrew Lunnfcd25162017-02-09 00:03:42 +0100384static const struct mv88e6xxx_irq_ops mv88e6097_watchdog_ops = {};
Andrew Lunn61303732017-02-09 00:03:43 +0100385static const struct mv88e6xxx_irq_ops mv88e6390_watchdog_ops = {};
Andrew Lunnfcd25162017-02-09 00:03:42 +0100386
Vivien Didelotca070c12016-09-02 14:45:34 -0400387#endif /* CONFIG_NET_DSA_MV88E6XXX_GLOBAL2 */
388
Vivien Didelotec561272016-09-02 14:45:33 -0400389#endif /* _MV88E6XXX_GLOBAL2_H */