From 657b84792c7c9cd76ee03841a975080308217b4e Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Wed, 16 Oct 2013 03:19:05 +0000 Subject: [PATCH] Prepare to link in the AR934x SoC switch support. * Add an AR9340 switch version entry; * Support the switch being connected via MII; * Add a flag to note that a switch is actually an internal switch rather than an external switch. Now: * The ar9340 switch can interconnect via MII; * Since some slightly different phy/switch register access methods and quirks appear for the internal versus external switch, we will need a flag to mark it as an "internal" switch. Tested: * AR9344 (internal switch) * AR9331 (internal switch) TODO: * Test the AR8316 switch! --- sys/dev/etherswitch/arswitch/arswitchvar.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/etherswitch/arswitch/arswitchvar.h b/sys/dev/etherswitch/arswitch/arswitchvar.h index 2db13ccdbcc..91d755aa492 100644 --- a/sys/dev/etherswitch/arswitch/arswitchvar.h +++ b/sys/dev/etherswitch/arswitch/arswitchvar.h @@ -34,6 +34,7 @@ typedef enum { AR8X16_SWITCH_AR8216, AR8X16_SWITCH_AR8226, AR8X16_SWITCH_AR8316, + AR8X16_SWITCH_AR9340, } ar8x16_switch_type; /* @@ -49,7 +50,9 @@ struct arswitch_softc { int numphys; /* PHYs we manage */ int is_rgmii; /* PHY mode is RGMII (XXX which PHY?) */ int is_gmii; /* PHY mode is GMII (XXX which PHY?) */ + int is_mii; /* PHY mode is MII (XXX which PHY?) */ int page; + int is_internal_switch; ar8x16_switch_type sc_switchtype; char *ifname[AR8X16_NUM_PHYS]; device_t miibus[AR8X16_NUM_PHYS];