svn commit: r234326 - head/sys/mips/atheros

Adrian Chadd adrian at FreeBSD.org
Sun Apr 15 22:34:23 UTC 2012


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 <mips/atheros/ar71xxreg.h>
 #include <mips/atheros/ar71xx_cpudef.h>
+#include <mips/atheros/ar71xx_chip.h>
 #include <mips/atheros/ar91xxreg.h>
 #include <mips/atheros/ar91xx_chip.h>
 
@@ -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,


More information about the svn-src-all mailing list