[mdio] migrate mdiobus out of etherswitch and into a top-level device of its own.
The mdio driver interface is generally useful for devices that require MDIO without the full MII bus interface. This lifts the driver/interface out of etherswitch(4), and adds a mdio(4) man page. Submitted by: Landon Fuller <landon@landonf.org> Differential Revision: https://reviews.freebsd.org/D4606
This commit is contained in:
parent
9eb533d3b4
commit
71e8eac4fd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=292738
@ -266,6 +266,7 @@ MAN= aac.4 \
|
||||
malo.4 \
|
||||
mcd.4 \
|
||||
md.4 \
|
||||
mdio.4 \
|
||||
me.4 \
|
||||
mem.4 \
|
||||
meteor.4 \
|
||||
|
53
share/man/man4/mdio.4
Normal file
53
share/man/man4/mdio.4
Normal file
@ -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 .
|
@ -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
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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);
|
@ -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__ */
|
@ -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>
|
||||
|
@ -220,6 +220,7 @@ SUBDIR= \
|
||||
malo \
|
||||
mcd \
|
||||
md \
|
||||
mdio \
|
||||
mem \
|
||||
mfi \
|
||||
mii \
|
||||
|
10
sys/modules/mdio/Makefile
Normal file
10
sys/modules/mdio/Makefile
Normal file
@ -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>
|
Loading…
Reference in New Issue
Block a user