44 for ( ; mask ; mask >>= 1 ) {
80 unsigned int phy,
unsigned int reg,
81 unsigned int data,
unsigned int cmd ) {
140 unsigned int reg,
unsigned int data ) {
struct option_descriptor read[1]
#define MII_BIT_DATA_MASK
Data mask.
struct mii_interface mdio
MII interface.
static unsigned int unsigned int reg
void init_mii_bit_basher(struct mii_bit_basher *miibit)
Initialise bit-bashing interface.
static unsigned int mii_bit_rw(struct bit_basher *basher, unsigned int phy, unsigned int reg, unsigned int data, unsigned int cmd)
Read or write via MII bit-bashing interface.
int(* read)(struct mii_interface *mdio, unsigned int phy, unsigned int reg)
Read from MII register.
#define MII_BIT_START_MASK
Start mask.
#define MII_BIT_SWITCH_MASK
Switch mask.
static unsigned int unsigned int bit
static void mdio_init(struct mii_interface *mdio, struct mii_operations *op)
Initialise MII interface.
#define MII_BIT_CMD_RW
Command read or write.
#define container_of(ptr, type, field)
Get containing structure.
static int mii_bit_write(struct mii_interface *mdio, unsigned int phy, unsigned int reg, unsigned int data)
Write to MII register.
#define MII_BIT_CMD_WRITE
Command write.
void udelay(unsigned long usecs)
Delay for a fixed number of microseconds.
MII bit-bashing interface.
#define MII_BIT_SWITCH
Switch.
#define MII_BIT_CMD_READ
Command read.
static struct mii_operations mii_bit_op
MII bit basher operations.
static uint32_t mii_bit_xfer(struct bit_basher *basher, uint32_t mask, uint32_t write)
Transfer bits over MII bit-bashing interface.
int read_bit(struct bit_basher *basher, unsigned int bit_id)
Read input bit.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
MII interface operations.
#define MII_BIT_PHY_MASK
PHY mask.
#define MII_BIT_CMD_MASK
Command mask.
struct bit_basher basher
Bit-bashing interface.
uint8_t data[48]
Additional event data.
A bit-bashing MII interface.
#define MII_BIT_START
Start.
#define MII_BIT_REG_MASK
Register mask.
static int mii_bit_read(struct mii_interface *mdio, unsigned int phy, unsigned int reg)
Read from MII register.
void write_bit(struct bit_basher *basher, unsigned int bit_id, unsigned long data)
Set/clear output bit.