PERFORCE change 107372 for review
Warner Losh
imp at FreeBSD.org
Fri Oct 6 12:48:21 PDT 2006
http://perforce.freebsd.org/chv.cgi?CH=107372
Change 107372 by imp at imp_lighthouse on 2006/10/06 19:48:15
Report the rmii config info via a sysctl. Tweak a comment.
Affected files ...
.. //depot/projects/arm/src/sys/arm/at91/if_ate.c#55 edit
Differences ...
==== //depot/projects/arm/src/sys/arm/at91/if_ate.c#55 (text+ko) ====
@@ -29,7 +29,7 @@
*
* 1) detach
* 2) Free dma setup
- * 3) Turn on the clock in pmc and turn on pins? Turn off?
+ * 3) Turn on the clock in pmc? Turn off?
*/
#include <sys/cdefs.h>
@@ -45,6 +45,7 @@
#include <sys/rman.h>
#include <sys/socket.h>
#include <sys/sockio.h>
+#include <sys/sysctl.h>
#include <machine/bus.h>
#include <net/ethernet.h>
@@ -167,6 +168,8 @@
{
struct ate_softc *sc = device_get_softc(dev);
struct ifnet *ifp = NULL;
+ struct sysctl_ctx_list *sctx;
+ struct sysctl_oid *soid;
int err;
u_char eaddr[6];
@@ -177,6 +180,13 @@
sc->use_rmii = (RD4(sc, ETH_CFG) & ETH_CFG_RMII) == ETH_CFG_RMII;
+
+ /*Sysctls*/
+ sctx = device_get_sysctl_ctx(dev);
+ soid = device_get_sysctl_tree(dev);
+ SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "rmii",
+ CTLFLAG_RD, &sc->use_rmii, 0, "rmii in use");
+
/* calling atestop before ifp is set is OK */
atestop(sc);
ATE_LOCK_INIT(sc);
More information about the p4-projects
mailing list