Skip to contentSkip to conversation

Support for Micrel/Kendin KS899xM managed switches.

PATCH New Sami Kantoluoto 1 participant 1 message Sep 1, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Support for Micrel/Kendin KS899xM managed switches.

This patch adds simple support for KS8993M and KS8995MA managed switches. It uses SPI interface for configuration (as everything cannot be configured through MII). Switch can be configured to either regular switch or to "router mode" so that every port (except the host port) has it's own VLAN ("port based VLAN").

---
 drivers/net/phy/Makefile  |    1 +
 drivers/net/phy/ks899xm.c |  189 +++++++++++++++++++++++++++++++++
 drivers/net/phy/ks899xm.h |  255 +++++++++++++++++++++++++++++++++++++++++++++
 include/netdev.h          |   15 +++
 4 files changed, 460 insertions(+), 0 deletions(-)
 create mode 100644 drivers/net/phy/ks899xm.c
 create mode 100644 drivers/net/phy/ks899xm.h
drivers/net/phy/Makefile +1 -0
index 3b92614..d91244c 100644
@@ -26,6 +26,7 @@ include $(TOPDIR)/config.mk
 LIB	:= $(obj)libphy.a
 
 COBJS-$(CONFIG_BITBANGMII) += miiphybb.o
+COBJS-$(CONFIG_KS899XM_SWITCH) += ks899xm.o
 COBJS-$(CONFIG_MV88E61XX_SWITCH) += mv88e61xx.o
 
 COBJS	:= $(COBJS-y)
drivers/net/phy/ks899xm.c new file +189 -0

189 lines not on this page · raw message

drivers/net/phy/ks899xm.h new file +255 -0

255 lines not on this page · raw message

include/netdev.h +15 -0
index a50ec67..628de38 100644
@@ -171,4 +171,19 @@ struct mv88e61xx_config {
 int mv88e61xx_switch_initialize(struct mv88e61xx_config *swconfig);
 #endif /* CONFIG_MV88E61XX_SWITCH */
 
+#ifdef	CONFIG_KS899XM_SWITCH
+enum ks899xm_cfg_vlan {
+	KS899XM_VLANCFG_DEFAULT,
+	KS899XM_VLANCFG_ROUTER
+};
+
+struct ks899xm_config {
+	unsigned spibus, spics;
+	enum ks899xm_cfg_vlan vlancfg;
+};
+
+int ks899xm_switch_initialize(const struct ks899xm_config *swconfig);
+
+#endif	/* CONFIG_KS899XM_SWITCH */
+
 #endif /* _NETDEV_H_ */
Signature · 1 line
1.6.0.4