1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00
freebsd/sys/dev/mii/miibus_if.m
Doug Rabson f7b7769172 * Factor out the object system from new-bus so that it can be used by
non-device code.
* Re-implement the method dispatch to improve efficiency. The new system
  takes about 40ns for a method dispatch on a 300Mhz PII which is only
  10ns slower than a direct function call on the same hardware.

This changes the new-bus ABI slightly so make sure you re-compile any
driver modules which you use.
2000-04-08 14:17:18 +00:00

39 lines
451 B
Objective-C

# $FreeBSD$
#include <sys/bus.h>
INTERFACE miibus;
#
# Read register from device on MII bus
#
METHOD int readreg {
device_t dev;
int phy;
int reg;
};
#
# Write register to device on MII bus
#
METHOD int writereg {
device_t dev;
int phy;
int reg;
int val;
};
#
# Notify bus about PHY status change.
#
METHOD void statchg {
device_t dev;
};
#
# Notify bus that media has been set.
#
METHOD void mediainit {
device_t dev;
};