diff options
author | Arun Ramadoss <arun.ramadoss@microchip.com> | 2022-06-22 12:04:16 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-06-24 13:31:43 +0300 |
commit | d2822e68687926ec8b103f4f146bf47ce6f0362e (patch) | |
tree | 40552218befb3750a8ca33f7da52d919915bd7a5 /drivers/net/dsa/microchip/ksz_common.h | |
parent | 331d64f752bbdae4c846416d6f4406010a24f539 (diff) | |
download | linux-d2822e68687926ec8b103f4f146bf47ce6f0362e.tar.xz |
net: dsa: microchip: move setup function to ksz_common
This patch move the common initialization of switches to ksz_setup and
perform the switch specific initialization using the ksz_dev_ops
function pointer.
Signed-off-by: Arun Ramadoss <arun.ramadoss@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/microchip/ksz_common.h')
-rw-r--r-- | drivers/net/dsa/microchip/ksz_common.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/dsa/microchip/ksz_common.h b/drivers/net/dsa/microchip/ksz_common.h index e38bdf1f5b41..3b8e1d1887b8 100644 --- a/drivers/net/dsa/microchip/ksz_common.h +++ b/drivers/net/dsa/microchip/ksz_common.h @@ -162,6 +162,7 @@ struct alu_struct { }; struct ksz_dev_ops { + int (*setup)(struct dsa_switch *ds); u32 (*get_port_addr)(int port, int offset); void (*cfg_port_member)(struct ksz_device *dev, int port, u8 member); void (*flush_dyn_mac_table)(struct ksz_device *dev, int port); @@ -229,6 +230,7 @@ extern const struct ksz_chip_data ksz_switch_chips[]; /* Common DSA access functions */ +int ksz_setup(struct dsa_switch *ds); int ksz_phy_read16(struct dsa_switch *ds, int addr, int reg); int ksz_phy_write16(struct dsa_switch *ds, int addr, int reg, u16 val); u32 ksz_get_phy_flags(struct dsa_switch *ds, int port); |