diff options
author | Vivien Didelot <vivien.didelot@gmail.com> | 2019-08-31 16:18:29 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-09-01 12:16:37 -0700 |
commit | 4241ef52372ebee93f4ed67e08c9316ccb20bdd7 (patch) | |
tree | 4909e0f4d5da9fde3bffd3f3242ab1ad8505497c /drivers/net/dsa/mv88e6xxx/serdes.h | |
parent | f441ed0f4c89c14dd68ce477f513bae43509237e (diff) | |
download | lwn-4241ef52372ebee93f4ed67e08c9316ccb20bdd7.tar.gz lwn-4241ef52372ebee93f4ed67e08c9316ccb20bdd7.zip |
net: dsa: mv88e6xxx: introduce .serdes_irq_mapping
Introduce a new .serdes_irq_mapping operation to prepare the
abstraction of IRQ mapping from the SERDES IRQ setup code.
Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx/serdes.h')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/serdes.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/serdes.h b/drivers/net/dsa/mv88e6xxx/serdes.h index c2e6fc3ddf8b..cb8d287c9388 100644 --- a/drivers/net/dsa/mv88e6xxx/serdes.h +++ b/drivers/net/dsa/mv88e6xxx/serdes.h @@ -90,6 +90,10 @@ static inline int mv88e6xxx_serdes_get_lane(struct mv88e6xxx_chip *chip, int mv88e6341_serdes_get_lane(struct mv88e6xxx_chip *chip, int port, u8 *lane); int mv88e6390_serdes_get_lane(struct mv88e6xxx_chip *chip, int port, u8 *lane); int mv88e6390x_serdes_get_lane(struct mv88e6xxx_chip *chip, int port, u8 *lane); +unsigned int mv88e6352_serdes_irq_mapping(struct mv88e6xxx_chip *chip, + int port); +unsigned int mv88e6390_serdes_irq_mapping(struct mv88e6xxx_chip *chip, + int port); int mv88e6352_serdes_power(struct mv88e6xxx_chip *chip, int port, bool on); int mv88e6390_serdes_power(struct mv88e6xxx_chip *chip, int port, bool on); int mv88e6390_serdes_irq_setup(struct mv88e6xxx_chip *chip, int port); @@ -106,5 +110,13 @@ int mv88e6390_serdes_irq_disable(struct mv88e6xxx_chip *chip, int port, int mv88e6352_serdes_irq_setup(struct mv88e6xxx_chip *chip, int port); void mv88e6352_serdes_irq_free(struct mv88e6xxx_chip *chip, int port); +static inline unsigned int +mv88e6xxx_serdes_irq_mapping(struct mv88e6xxx_chip *chip, int port) +{ + if (!chip->info->ops->serdes_irq_mapping) + return 0; + + return chip->info->ops->serdes_irq_mapping(chip, port); +} #endif |