iPXE
Data Structures | Macros | Enumerations | Functions
mii_bit.h File Reference

MII bit-bashing interface. More...

#include <ipxe/mii.h>
#include <ipxe/bitbash.h>

Go to the source code of this file.

Data Structures

struct  mii_bit_basher
 A bit-bashing MII interface. More...
 

Macros

#define MII_BIT_START   0xffffffff
 Start. More...
 
#define MII_BIT_START_MASK   0x80000000
 Start mask. More...
 
#define MII_BIT_CMD_MASK   0x00000008
 Command mask. More...
 
#define MII_BIT_CMD_READ   0x00000006
 Command read. More...
 
#define MII_BIT_CMD_WRITE   0x00000005
 Command write. More...
 
#define MII_BIT_CMD_RW   0x00000001
 Command read or write. More...
 
#define MII_BIT_PHY_MASK   0x00000010
 PHY mask. More...
 
#define MII_BIT_REG_MASK   0x00000010
 Register mask. More...
 
#define MII_BIT_SWITCH   0x00000002
 Switch. More...
 
#define MII_BIT_SWITCH_MASK   0x00000002
 Switch mask. More...
 
#define MII_BIT_DATA_MASK   0x00008000
 Data mask. More...
 
#define MII_BIT_UDELAY   1
 Delay between MDC transitions. More...
 

Enumerations

enum  { MII_BIT_MDC = 0, MII_BIT_MDIO, MII_BIT_DRIVE }
 Bit indices used for MII bit-bashing interface. More...
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
void init_mii_bit_basher (struct mii_bit_basher *miibit)
 Initialise bit-bashing interface. More...
 

Detailed Description

MII bit-bashing interface.

Definition in file mii_bit.h.

Macro Definition Documentation

◆ MII_BIT_START

#define MII_BIT_START   0xffffffff

Start.

Definition at line 15 of file mii_bit.h.

◆ MII_BIT_START_MASK

#define MII_BIT_START_MASK   0x80000000

Start mask.

Definition at line 16 of file mii_bit.h.

◆ MII_BIT_CMD_MASK

#define MII_BIT_CMD_MASK   0x00000008

Command mask.

Definition at line 18 of file mii_bit.h.

◆ MII_BIT_CMD_READ

#define MII_BIT_CMD_READ   0x00000006

Command read.

Definition at line 19 of file mii_bit.h.

◆ MII_BIT_CMD_WRITE

#define MII_BIT_CMD_WRITE   0x00000005

Command write.

Definition at line 20 of file mii_bit.h.

◆ MII_BIT_CMD_RW

#define MII_BIT_CMD_RW   0x00000001

Command read or write.

Definition at line 21 of file mii_bit.h.

◆ MII_BIT_PHY_MASK

#define MII_BIT_PHY_MASK   0x00000010

PHY mask.

Definition at line 23 of file mii_bit.h.

◆ MII_BIT_REG_MASK

#define MII_BIT_REG_MASK   0x00000010

Register mask.

Definition at line 25 of file mii_bit.h.

◆ MII_BIT_SWITCH

#define MII_BIT_SWITCH   0x00000002

Switch.

Definition at line 27 of file mii_bit.h.

◆ MII_BIT_SWITCH_MASK

#define MII_BIT_SWITCH_MASK   0x00000002

Switch mask.

Definition at line 28 of file mii_bit.h.

◆ MII_BIT_DATA_MASK

#define MII_BIT_DATA_MASK   0x00008000

Data mask.

Definition at line 30 of file mii_bit.h.

◆ MII_BIT_UDELAY

#define MII_BIT_UDELAY   1

Delay between MDC transitions.

Definition at line 51 of file mii_bit.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Bit indices used for MII bit-bashing interface.

Enumerator
MII_BIT_MDC 

MII clock.

MII_BIT_MDIO 

MII data.

MII_BIT_DRIVE 

MII data direction.

Definition at line 41 of file mii_bit.h.

41  {
42  /** MII clock */
43  MII_BIT_MDC = 0,
44  /** MII data */
46  /** MII data direction */
48 };
MII clock.
Definition: mii_bit.h:43
MII data direction.
Definition: mii_bit.h:47
MII data.
Definition: mii_bit.h:45

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ init_mii_bit_basher()

void init_mii_bit_basher ( struct mii_bit_basher miibit)

Initialise bit-bashing interface.

Parameters
miibitMII bit basher

Definition at line 160 of file mii_bit.c.

160  {
161  mdio_init ( &miibit->mdio, &mii_bit_op );
162 };
struct mii_interface mdio
MII interface.
Definition: mii_bit.h:35
static void mdio_init(struct mii_interface *mdio, struct mii_operations *op)
Initialise MII interface.
Definition: mii.h:63
static struct mii_operations mii_bit_op
MII bit basher operations.
Definition: mii_bit.c:150

References mii_bit_basher::mdio, mdio_init(), and mii_bit_op.

Referenced by icplus_probe().