Commit 07bca160 authored by Arun Ramadoss's avatar Arun Ramadoss Committed by David S. Miller

net: dsa: microchip: common menuconfig for ksz series switch

This patch replaces the two different menuconfig for ksz9477 and ksz8795
to single ksz_common. so that it can be extended for the other switch
like lan937x. And removes the export_symbols for the extern functions in
the ksz_common.h.
Signed-off-by: default avatarArun Ramadoss <arun.ramadoss@microchip.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7a8988a1
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
config NET_DSA_MICROCHIP_KSZ_COMMON menuconfig NET_DSA_MICROCHIP_KSZ_COMMON
select NET_DSA_TAG_KSZ tristate "Microchip KSZ8795/KSZ9477 series switch support"
tristate
menuconfig NET_DSA_MICROCHIP_KSZ9477
tristate "Microchip KSZ9477 series switch support"
depends on NET_DSA depends on NET_DSA
select NET_DSA_MICROCHIP_KSZ_COMMON select NET_DSA_TAG_KSZ
help help
This driver adds support for Microchip KSZ9477 switch chips. This driver adds support for Microchip KSZ9477 series switch and
KSZ8795/KSZ88x3 switch chips.
config NET_DSA_MICROCHIP_KSZ9477_I2C config NET_DSA_MICROCHIP_KSZ9477_I2C
tristate "KSZ9477 series I2C connected switch driver" tristate "KSZ9477 series I2C connected switch driver"
depends on NET_DSA_MICROCHIP_KSZ9477 && I2C depends on NET_DSA_MICROCHIP_KSZ_COMMON && I2C
select REGMAP_I2C select REGMAP_I2C
help help
Select to enable support for registering switches configured through I2C. Select to enable support for registering switches configured through I2C.
config NET_DSA_MICROCHIP_KSZ9477_SPI config NET_DSA_MICROCHIP_KSZ9477_SPI
tristate "KSZ9477 series SPI connected switch driver" tristate "KSZ9477 series SPI connected switch driver"
depends on NET_DSA_MICROCHIP_KSZ9477 && SPI depends on NET_DSA_MICROCHIP_KSZ_COMMON && SPI
select REGMAP_SPI select REGMAP_SPI
help help
Select to enable support for registering switches configured through SPI. Select to enable support for registering switches configured through SPI.
menuconfig NET_DSA_MICROCHIP_KSZ8795
tristate "Microchip KSZ8795 series switch support"
depends on NET_DSA
select NET_DSA_MICROCHIP_KSZ_COMMON
help
This driver adds support for Microchip KSZ8795/KSZ88X3 switch chips.
config NET_DSA_MICROCHIP_KSZ8795_SPI config NET_DSA_MICROCHIP_KSZ8795_SPI
tristate "KSZ8795 series SPI connected switch driver" tristate "KSZ8795 series SPI connected switch driver"
depends on NET_DSA_MICROCHIP_KSZ8795 && SPI depends on NET_DSA_MICROCHIP_KSZ_COMMON && SPI
select REGMAP_SPI select REGMAP_SPI
help help
This driver accesses KSZ8795 chip through SPI. This driver accesses KSZ8795 chip through SPI.
...@@ -43,7 +33,7 @@ config NET_DSA_MICROCHIP_KSZ8795_SPI ...@@ -43,7 +33,7 @@ config NET_DSA_MICROCHIP_KSZ8795_SPI
config NET_DSA_MICROCHIP_KSZ8863_SMI config NET_DSA_MICROCHIP_KSZ8863_SMI
tristate "KSZ series SMI connected switch driver" tristate "KSZ series SMI connected switch driver"
depends on NET_DSA_MICROCHIP_KSZ8795 depends on NET_DSA_MICROCHIP_KSZ_COMMON
select MDIO_BITBANG select MDIO_BITBANG
help help
Select to enable support for registering switches configured through Select to enable support for registering switches configured through
......
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
obj-$(CONFIG_NET_DSA_MICROCHIP_KSZ_COMMON) += ksz_common.o obj-$(CONFIG_NET_DSA_MICROCHIP_KSZ_COMMON) += ksz_switch.o
obj-$(CONFIG_NET_DSA_MICROCHIP_KSZ9477) += ksz9477.o ksz_switch-objs := ksz_common.o
ksz_switch-objs += ksz9477.o
ksz_switch-objs += ksz8795.o
obj-$(CONFIG_NET_DSA_MICROCHIP_KSZ9477_I2C) += ksz9477_i2c.o obj-$(CONFIG_NET_DSA_MICROCHIP_KSZ9477_I2C) += ksz9477_i2c.o
obj-$(CONFIG_NET_DSA_MICROCHIP_KSZ9477_SPI) += ksz9477_spi.o obj-$(CONFIG_NET_DSA_MICROCHIP_KSZ9477_SPI) += ksz9477_spi.o
obj-$(CONFIG_NET_DSA_MICROCHIP_KSZ8795) += ksz8795.o
obj-$(CONFIG_NET_DSA_MICROCHIP_KSZ8795_SPI) += ksz8795_spi.o obj-$(CONFIG_NET_DSA_MICROCHIP_KSZ8795_SPI) += ksz8795_spi.o
obj-$(CONFIG_NET_DSA_MICROCHIP_KSZ8863_SMI) += ksz8863_smi.o obj-$(CONFIG_NET_DSA_MICROCHIP_KSZ8863_SMI) += ksz8863_smi.o
...@@ -555,7 +555,6 @@ void ksz_r_mib_stats64(struct ksz_device *dev, int port) ...@@ -555,7 +555,6 @@ void ksz_r_mib_stats64(struct ksz_device *dev, int port)
spin_unlock(&mib->stats64_lock); spin_unlock(&mib->stats64_lock);
} }
EXPORT_SYMBOL_GPL(ksz_r_mib_stats64);
static void ksz_get_stats64(struct dsa_switch *ds, int port, static void ksz_get_stats64(struct dsa_switch *ds, int port,
struct rtnl_link_stats64 *s) struct rtnl_link_stats64 *s)
...@@ -765,7 +764,6 @@ void ksz_init_mib_timer(struct ksz_device *dev) ...@@ -765,7 +764,6 @@ void ksz_init_mib_timer(struct ksz_device *dev)
memset(mib->counters, 0, dev->info->mib_cnt * sizeof(u64)); memset(mib->counters, 0, dev->info->mib_cnt * sizeof(u64));
} }
} }
EXPORT_SYMBOL_GPL(ksz_init_mib_timer);
static int ksz_phy_read16(struct dsa_switch *ds, int addr, int reg) static int ksz_phy_read16(struct dsa_switch *ds, int addr, int reg)
{ {
...@@ -987,7 +985,6 @@ void ksz_port_stp_state_set(struct dsa_switch *ds, int port, u8 state) ...@@ -987,7 +985,6 @@ void ksz_port_stp_state_set(struct dsa_switch *ds, int port, u8 state)
ksz_update_port_member(dev, port); ksz_update_port_member(dev, port);
} }
EXPORT_SYMBOL_GPL(ksz_port_stp_state_set);
static enum dsa_tag_protocol ksz_get_tag_protocol(struct dsa_switch *ds, static enum dsa_tag_protocol ksz_get_tag_protocol(struct dsa_switch *ds,
int port, int port,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment