Lines Matching refs:dev
38 __FBSDID("$FreeBSD: releng/11.0/sys/dev/mii/mii_bitbang.c 226995 2011-11-01 16:13:59Z marius $");
44 #include <dev/mii/mii.h>
45 #include <dev/mii/mii_bitbang.h>
49 static void mii_bitbang_sendbits(device_t dev, mii_bitbang_ops_t ops,
54 ops->mbo_write(dev, (x)); \
58 #define MREAD ops->mbo_read(dev)
72 mii_bitbang_sync(device_t dev, mii_bitbang_ops_t ops)
92 mii_bitbang_sendbits(device_t dev, mii_bitbang_ops_t ops, uint32_t data,
118 mii_bitbang_readreg(device_t dev, mii_bitbang_ops_t ops, int phy, int reg)
122 mii_bitbang_sync(dev, ops);
124 mii_bitbang_sendbits(dev, ops, MII_COMMAND_START, 2);
125 mii_bitbang_sendbits(dev, ops, MII_COMMAND_READ, 2);
126 mii_bitbang_sendbits(dev, ops, phy, 5);
127 mii_bitbang_sendbits(dev, ops, reg, 5);
166 mii_bitbang_writereg(device_t dev, mii_bitbang_ops_t ops, int phy, int reg,
170 mii_bitbang_sync(dev, ops);
172 mii_bitbang_sendbits(dev, ops, MII_COMMAND_START, 2);
173 mii_bitbang_sendbits(dev, ops, MII_COMMAND_WRITE, 2);
174 mii_bitbang_sendbits(dev, ops, phy, 5);
175 mii_bitbang_sendbits(dev, ops, reg, 5);
176 mii_bitbang_sendbits(dev, ops, MII_COMMAND_ACK, 2);
177 mii_bitbang_sendbits(dev, ops, val, 16);