From owner-svn-src-all@FreeBSD.ORG Wed Oct 16 03:19:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C05CA8B4; Wed, 16 Oct 2013 03:19:05 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ACF292B76; Wed, 16 Oct 2013 03:19:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9G3J5fw011162; Wed, 16 Oct 2013 03:19:05 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9G3J5wW011161; Wed, 16 Oct 2013 03:19:05 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201310160319.r9G3J5wW011161@svn.freebsd.org> From: Adrian Chadd Date: Wed, 16 Oct 2013 03:19:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r256577 - head/sys/dev/etherswitch/arswitch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Oct 2013 03:19:05 -0000 Author: adrian Date: Wed Oct 16 03:19:05 2013 New Revision: 256577 URL: http://svnweb.freebsd.org/changeset/base/256577 Log: 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! Modified: head/sys/dev/etherswitch/arswitch/arswitchvar.h Modified: head/sys/dev/etherswitch/arswitch/arswitchvar.h ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitchvar.h Wed Oct 16 03:15:52 2013 (r256576) +++ head/sys/dev/etherswitch/arswitch/arswitchvar.h Wed Oct 16 03:19:05 2013 (r256577) @@ -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];