summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--share/man/man4/Makefile1
-rw-r--r--share/man/man4/mdio.453
-rw-r--r--sys/conf/files4
-rw-r--r--sys/dev/etherswitch/arswitch/arswitch.c2
-rw-r--r--sys/dev/etherswitch/arswitch/arswitch_7240.c2
-rw-r--r--sys/dev/etherswitch/arswitch/arswitch_8216.c2
-rw-r--r--sys/dev/etherswitch/arswitch/arswitch_8226.c2
-rw-r--r--sys/dev/etherswitch/arswitch/arswitch_8316.c2
-rw-r--r--sys/dev/etherswitch/arswitch/arswitch_8327.c2
-rw-r--r--sys/dev/etherswitch/arswitch/arswitch_9340.c2
-rw-r--r--sys/dev/etherswitch/arswitch/arswitch_phy.c2
-rw-r--r--sys/dev/etherswitch/arswitch/arswitch_reg.c2
-rw-r--r--sys/dev/etherswitch/e6000sw/e6000sw.c2
-rw-r--r--sys/dev/etherswitch/ip17x/ip17x.c2
-rw-r--r--sys/dev/etherswitch/ukswitch/ukswitch.c2
-rw-r--r--sys/dev/mdio/mdio.c (renamed from sys/dev/etherswitch/mdio.c)5
-rw-r--r--sys/dev/mdio/mdio.h (renamed from sys/dev/etherswitch/mdio.h)6
-rw-r--r--sys/dev/mdio/mdio_if.m (renamed from sys/dev/etherswitch/mdio_if.m)0
-rw-r--r--sys/dev/mge/if_mge.c2
-rw-r--r--sys/modules/Makefile1
-rw-r--r--sys/modules/mdio/Makefile10
21 files changed, 87 insertions, 19 deletions
diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile
index 1807876..6cf392a 100644
--- a/share/man/man4/Makefile
+++ b/share/man/man4/Makefile
@@ -266,6 +266,7 @@ MAN= aac.4 \
malo.4 \
mcd.4 \
md.4 \
+ mdio.4 \
me.4 \
mem.4 \
meteor.4 \
diff --git a/share/man/man4/mdio.4 b/share/man/man4/mdio.4
new file mode 100644
index 0000000..1a8bdd0
--- /dev/null
+++ b/share/man/man4/mdio.4
@@ -0,0 +1,53 @@
+.\" Written by Landon Fuller for the FreeBSD Project.
+.\" Based on the miibus(4) manual page written by Tom Rhodes.
+.\" Please see the /usr/src/COPYRIGHT file for copyright information.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 17, 2015
+.Dt MDIO 4
+.Os
+.Sh NAME
+.Nm mdio
+.Nd IEEE 802.3 Management Data Input/Output interface
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device mdio"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides an interconnection between the Media Access Control (MAC)
+sublayer and Physical Layer (PHY) entities' control and status registers,
+as defined by the IEEE 802.3 Standard.
+.Pp
+The
+.Nm
+layer allows device drivers to share common support code for various
+external PHY devices.
+.Pp
+.Tn MDIO
+is one of two signal interfaces that comprise the
+Media Independent Interface (MII) defined by the IEEE 802.3
+Standard. The
+.Xr miibus 4
+driver provides support for devices that require full
+.Tn MII
+support.
+.Sh SEE ALSO
+.Xr miibus 4
+.Sh STANDARDS
+More information on
+.Tn MDIO
+can be found in the IEEE 802.3 Standard.
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+The driver was written by
+.An Stefan Bethke Aq Mt stb@lassitu.de .
diff --git a/sys/conf/files b/sys/conf/files
index 0436bd2..9b9ccfa 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -1404,8 +1404,6 @@ dev/etherswitch/ip17x/ip175c.c optional ip17x
dev/etherswitch/ip17x/ip175d.c optional ip17x
dev/etherswitch/ip17x/ip17x_phy.c optional ip17x
dev/etherswitch/ip17x/ip17x_vlans.c optional ip17x
-dev/etherswitch/mdio_if.m optional miiproxy | mdio
-dev/etherswitch/mdio.c optional miiproxy | mdio
dev/etherswitch/miiproxy.c optional miiproxy
dev/etherswitch/rtl8366/rtl8366rb.c optional rtl8366rb
dev/etherswitch/ukswitch/ukswitch.c optional ukswitch
@@ -1908,6 +1906,8 @@ dev/mca/mca_bus.c optional mca
dev/mcd/mcd.c optional mcd isa nowerror
dev/mcd/mcd_isa.c optional mcd isa nowerror
dev/md/md.c optional md
+dev/mdio/mdio_if.m optional miiproxy | mdio
+dev/mdio/mdio.c optional miiproxy | mdio
dev/mem/memdev.c optional mem
dev/mem/memutil.c optional mem
dev/mfi/mfi.c optional mfi
diff --git a/sys/dev/etherswitch/arswitch/arswitch.c b/sys/dev/etherswitch/arswitch/arswitch.c
index 3b1d575..4388819 100644
--- a/sys/dev/etherswitch/arswitch/arswitch.c
+++ b/sys/dev/etherswitch/arswitch/arswitch.c
@@ -52,7 +52,7 @@
#include <dev/iicbus/iicbus.h>
#include <dev/mii/mii.h>
#include <dev/mii/miivar.h>
-#include <dev/etherswitch/mdio.h>
+#include <dev/mdio/mdio.h>
#include <dev/etherswitch/etherswitch.h>
diff --git a/sys/dev/etherswitch/arswitch/arswitch_7240.c b/sys/dev/etherswitch/arswitch/arswitch_7240.c
index f3750bf..3d2543a7 100644
--- a/sys/dev/etherswitch/arswitch/arswitch_7240.c
+++ b/sys/dev/etherswitch/arswitch/arswitch_7240.c
@@ -50,7 +50,7 @@
#include <dev/iicbus/iicbus.h>
#include <dev/mii/mii.h>
#include <dev/mii/miivar.h>
-#include <dev/etherswitch/mdio.h>
+#include <dev/mdio/mdio.h>
#include <dev/etherswitch/etherswitch.h>
diff --git a/sys/dev/etherswitch/arswitch/arswitch_8216.c b/sys/dev/etherswitch/arswitch/arswitch_8216.c
index 72b2327..bd5c2cb 100644
--- a/sys/dev/etherswitch/arswitch/arswitch_8216.c
+++ b/sys/dev/etherswitch/arswitch/arswitch_8216.c
@@ -50,7 +50,7 @@
#include <dev/iicbus/iicbus.h>
#include <dev/mii/mii.h>
#include <dev/mii/miivar.h>
-#include <dev/etherswitch/mdio.h>
+#include <dev/mdio/mdio.h>
#include <dev/etherswitch/etherswitch.h>
diff --git a/sys/dev/etherswitch/arswitch/arswitch_8226.c b/sys/dev/etherswitch/arswitch/arswitch_8226.c
index 43d2281..5a86627 100644
--- a/sys/dev/etherswitch/arswitch/arswitch_8226.c
+++ b/sys/dev/etherswitch/arswitch/arswitch_8226.c
@@ -50,7 +50,7 @@
#include <dev/iicbus/iicbus.h>
#include <dev/mii/mii.h>
#include <dev/mii/miivar.h>
-#include <dev/etherswitch/mdio.h>
+#include <dev/mdio/mdio.h>
#include <dev/etherswitch/etherswitch.h>
diff --git a/sys/dev/etherswitch/arswitch/arswitch_8316.c b/sys/dev/etherswitch/arswitch/arswitch_8316.c
index 91dd72d..d646e18 100644
--- a/sys/dev/etherswitch/arswitch/arswitch_8316.c
+++ b/sys/dev/etherswitch/arswitch/arswitch_8316.c
@@ -50,7 +50,7 @@
#include <dev/iicbus/iicbus.h>
#include <dev/mii/mii.h>
#include <dev/mii/miivar.h>
-#include <dev/etherswitch/mdio.h>
+#include <dev/mdio/mdio.h>
#include <dev/etherswitch/etherswitch.h>
diff --git a/sys/dev/etherswitch/arswitch/arswitch_8327.c b/sys/dev/etherswitch/arswitch/arswitch_8327.c
index 96c2282..6e221a8 100644
--- a/sys/dev/etherswitch/arswitch/arswitch_8327.c
+++ b/sys/dev/etherswitch/arswitch/arswitch_8327.c
@@ -50,7 +50,7 @@
#include <dev/iicbus/iicbus.h>
#include <dev/mii/mii.h>
#include <dev/mii/miivar.h>
-#include <dev/etherswitch/mdio.h>
+#include <dev/mdio/mdio.h>
#include <dev/etherswitch/etherswitch.h>
diff --git a/sys/dev/etherswitch/arswitch/arswitch_9340.c b/sys/dev/etherswitch/arswitch/arswitch_9340.c
index 7754335..89f6caa 100644
--- a/sys/dev/etherswitch/arswitch/arswitch_9340.c
+++ b/sys/dev/etherswitch/arswitch/arswitch_9340.c
@@ -50,7 +50,7 @@
#include <dev/iicbus/iicbus.h>
#include <dev/mii/mii.h>
#include <dev/mii/miivar.h>
-#include <dev/etherswitch/mdio.h>
+#include <dev/mdio/mdio.h>
#include <dev/etherswitch/etherswitch.h>
diff --git a/sys/dev/etherswitch/arswitch/arswitch_phy.c b/sys/dev/etherswitch/arswitch/arswitch_phy.c
index 43abaa1..ceeb307 100644
--- a/sys/dev/etherswitch/arswitch/arswitch_phy.c
+++ b/sys/dev/etherswitch/arswitch/arswitch_phy.c
@@ -48,7 +48,7 @@
#include <dev/iicbus/iicbus.h>
#include <dev/mii/mii.h>
#include <dev/mii/miivar.h>
-#include <dev/etherswitch/mdio.h>
+#include <dev/mdio/mdio.h>
#include <dev/etherswitch/etherswitch.h>
diff --git a/sys/dev/etherswitch/arswitch/arswitch_reg.c b/sys/dev/etherswitch/arswitch/arswitch_reg.c
index d6797a8..420e516 100644
--- a/sys/dev/etherswitch/arswitch/arswitch_reg.c
+++ b/sys/dev/etherswitch/arswitch/arswitch_reg.c
@@ -49,7 +49,7 @@
#include <dev/iicbus/iicbus.h>
#include <dev/mii/mii.h>
#include <dev/mii/miivar.h>
-#include <dev/etherswitch/mdio.h>
+#include <dev/mdio/mdio.h>
#include <dev/etherswitch/etherswitch.h>
diff --git a/sys/dev/etherswitch/e6000sw/e6000sw.c b/sys/dev/etherswitch/e6000sw/e6000sw.c
index e598607..ca4ec3f 100644
--- a/sys/dev/etherswitch/e6000sw/e6000sw.c
+++ b/sys/dev/etherswitch/e6000sw/e6000sw.c
@@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$");
#include <arm/mv/mvvar.h>
#include <dev/etherswitch/etherswitch.h>
-#include <dev/etherswitch/mdio.h>
+#include <dev/mdio/mdio.h>
#include <dev/mii/mii.h>
#include <dev/mii/miivar.h>
#include <dev/mge/if_mgevar.h>
diff --git a/sys/dev/etherswitch/ip17x/ip17x.c b/sys/dev/etherswitch/ip17x/ip17x.c
index 2f51217..43cdddb 100644
--- a/sys/dev/etherswitch/ip17x/ip17x.c
+++ b/sys/dev/etherswitch/ip17x/ip17x.c
@@ -51,7 +51,7 @@
#include <machine/bus.h>
#include <dev/mii/mii.h>
#include <dev/mii/miivar.h>
-#include <dev/etherswitch/mdio.h>
+#include <dev/mdio/mdio.h>
#include <dev/etherswitch/etherswitch.h>
#include <dev/etherswitch/ip17x/ip17x_phy.h>
diff --git a/sys/dev/etherswitch/ukswitch/ukswitch.c b/sys/dev/etherswitch/ukswitch/ukswitch.c
index fa65455..876aa9d 100644
--- a/sys/dev/etherswitch/ukswitch/ukswitch.c
+++ b/sys/dev/etherswitch/ukswitch/ukswitch.c
@@ -50,7 +50,7 @@
#include <machine/bus.h>
#include <dev/mii/mii.h>
#include <dev/mii/miivar.h>
-#include <dev/etherswitch/mdio.h>
+#include <dev/mdio/mdio.h>
#include <dev/etherswitch/etherswitch.h>
diff --git a/sys/dev/etherswitch/mdio.c b/sys/dev/mdio/mdio.c
index 1d1d370..4258a69 100644
--- a/sys/dev/etherswitch/mdio.c
+++ b/sys/dev/mdio/mdio.c
@@ -29,8 +29,9 @@
#include <sys/param.h>
#include <sys/bus.h>
#include <sys/systm.h>
+#include <sys/module.h>
-#include <dev/etherswitch/mdio.h>
+#include <dev/mdio/mdio.h>
#include "mdio_if.h"
@@ -115,3 +116,5 @@ driver_t mdio_driver = {
};
devclass_t mdio_devclass;
+
+MODULE_VERSION(mdio, 1);
diff --git a/sys/dev/etherswitch/mdio.h b/sys/dev/mdio/mdio.h
index 82578e0..cb5d169 100644
--- a/sys/dev/etherswitch/mdio.h
+++ b/sys/dev/mdio/mdio.h
@@ -26,10 +26,10 @@
* $FreeBSD$
*/
-#ifndef __DEV_ETHERSWITCH_MDIO_H__
-#define __DEV_ETHERSWITCH_MDIO_H__
+#ifndef __DEV_MDIO_MDIO_H__
+#define __DEV_MDIO_MDIO_H__
extern driver_t mdio_driver;
extern devclass_t mdio_devclass;
-#endif /* __DEV_ETHERSWITCH_MDIO_H__ */
+#endif /* __DEV_MDIO_MDIO_H__ */
diff --git a/sys/dev/etherswitch/mdio_if.m b/sys/dev/mdio/mdio_if.m
index 9aedd92..9aedd92 100644
--- a/sys/dev/etherswitch/mdio_if.m
+++ b/sys/dev/mdio/mdio_if.m
diff --git a/sys/dev/mge/if_mge.c b/sys/dev/mge/if_mge.c
index 61579a9..e0801d8 100644
--- a/sys/dev/mge/if_mge.c
+++ b/sys/dev/mge/if_mge.c
@@ -74,7 +74,7 @@ __FBSDID("$FreeBSD$");
#include <dev/fdt/fdt_common.h>
#include <dev/ofw/ofw_bus.h>
#include <dev/ofw/ofw_bus_subr.h>
-#include <dev/etherswitch/mdio.h>
+#include <dev/mdio/mdio.h>
#include <dev/mge/if_mgevar.h>
#include <arm/mv/mvreg.h>
diff --git a/sys/modules/Makefile b/sys/modules/Makefile
index dc95750..1b3b7eb 100644
--- a/sys/modules/Makefile
+++ b/sys/modules/Makefile
@@ -220,6 +220,7 @@ SUBDIR= \
malo \
mcd \
md \
+ mdio \
mem \
mfi \
mii \
diff --git a/sys/modules/mdio/Makefile b/sys/modules/mdio/Makefile
new file mode 100644
index 0000000..0d7ed59
--- /dev/null
+++ b/sys/modules/mdio/Makefile
@@ -0,0 +1,10 @@
+# $FreeBSD$
+
+.PATH: ${.CURDIR}/../../dev/mdio
+
+KMOD= mdio
+SRCS= mdio.c
+SRCS+= mdio_if.c mdio_if.h
+SRCS+= device_if.h bus_if.h
+
+.include <bsd.kmod.mk>
OpenPOWER on IntegriCloud