From owner-svn-src-all@FreeBSD.ORG Sun Apr 15 22:34:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57FFE1065673; Sun, 15 Apr 2012 22:34:23 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A4A58FC15; Sun, 15 Apr 2012 22:34:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3FMYNet004574; Sun, 15 Apr 2012 22:34:23 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3FMYMqx004570; Sun, 15 Apr 2012 22:34:22 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201204152234.q3FMYMqx004570@svn.freebsd.org> From: Adrian Chadd Date: Sun, 15 Apr 2012 22:34:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234326 - head/sys/mips/atheros X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 15 Apr 2012 22:34:23 -0000 Author: adrian Date: Sun Apr 15 22:34:22 2012 New Revision: 234326 URL: http://svn.freebsd.org/changeset/base/234326 Log: The AR913x MII speed configuration matches the AR71xx MII configuration. So share the code. Don't do it for the AR724x - that has a completely different set of PLL and MII configuration parameters. Modified: head/sys/mips/atheros/ar71xx_chip.c head/sys/mips/atheros/ar71xx_chip.h head/sys/mips/atheros/ar91xx_chip.c Modified: head/sys/mips/atheros/ar71xx_chip.c ============================================================================== --- head/sys/mips/atheros/ar71xx_chip.c Sun Apr 15 21:59:28 2012 (r234325) +++ head/sys/mips/atheros/ar71xx_chip.c Sun Apr 15 22:34:22 2012 (r234326) @@ -136,7 +136,7 @@ ar71xx_chip_device_stopped(uint32_t mask return ((reg & mask) == mask); } -static void +void ar71xx_chip_set_mii_speed(uint32_t unit, uint32_t speed) { uint32_t val, reg, ctrl; Modified: head/sys/mips/atheros/ar71xx_chip.h ============================================================================== --- head/sys/mips/atheros/ar71xx_chip.h Sun Apr 15 21:59:28 2012 (r234325) +++ head/sys/mips/atheros/ar71xx_chip.h Sun Apr 15 22:34:22 2012 (r234326) @@ -30,5 +30,6 @@ #define __AR71XX_CHIP_H__ extern struct ar71xx_cpu_def ar71xx_chip_def; +extern void ar71xx_chip_set_mii_speed(uint32_t unit, uint32_t speed); #endif Modified: head/sys/mips/atheros/ar91xx_chip.c ============================================================================== --- head/sys/mips/atheros/ar91xx_chip.c Sun Apr 15 21:59:28 2012 (r234325) +++ head/sys/mips/atheros/ar91xx_chip.c Sun Apr 15 22:34:22 2012 (r234326) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -111,13 +112,6 @@ ar91xx_chip_device_stopped(uint32_t mask } static void -ar91xx_chip_set_mii_speed(uint32_t unit, uint32_t speed) -{ - /* XXX TODO */ -} - - -static void ar91xx_chip_set_pll_ge(int unit, int speed) { uint32_t pll; @@ -216,7 +210,7 @@ struct ar71xx_cpu_def ar91xx_chip_def = &ar91xx_chip_device_start, &ar91xx_chip_device_stopped, &ar91xx_chip_set_pll_ge, - &ar91xx_chip_set_mii_speed, + &ar71xx_chip_set_mii_speed, &ar91xx_chip_ddr_flush_ge, &ar91xx_chip_get_eth_pll, &ar91xx_chip_ddr_flush_ip2,