iPXE
Data Structures | Defines | 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...

Defines

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

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.

Detailed Description

MII bit-bashing interface.

Definition in file mii_bit.h.


Define Documentation

#define MII_BIT_START   0xffffffff

Start.

Definition at line 15 of file mii_bit.h.

Referenced by mii_bit_rw().

#define MII_BIT_START_MASK   0x80000000

Start mask.

Definition at line 16 of file mii_bit.h.

Referenced by mii_bit_rw().

#define MII_BIT_CMD_MASK   0x00000008

Command mask.

Definition at line 18 of file mii_bit.h.

Referenced by mii_bit_rw().

#define MII_BIT_CMD_READ   0x00000006

Command read.

Definition at line 19 of file mii_bit.h.

Referenced by mii_bit_read().

#define MII_BIT_CMD_WRITE   0x00000005

Command write.

Definition at line 20 of file mii_bit.h.

Referenced by mii_bit_write().

#define MII_BIT_CMD_RW   0x00000001

Command read or write.

Definition at line 21 of file mii_bit.h.

Referenced by mii_bit_rw().

#define MII_BIT_PHY_MASK   0x00000010

PHY mask.

Definition at line 23 of file mii_bit.h.

Referenced by mii_bit_rw().

#define MII_BIT_REG_MASK   0x00000010

Register mask.

Definition at line 25 of file mii_bit.h.

Referenced by mii_bit_rw().

#define MII_BIT_SWITCH   0x00000002

Switch.

Definition at line 27 of file mii_bit.h.

Referenced by mii_bit_rw().

#define MII_BIT_SWITCH_MASK   0x00000002

Switch mask.

Definition at line 28 of file mii_bit.h.

Referenced by mii_bit_rw().

#define MII_BIT_DATA_MASK   0x00008000

Data mask.

Definition at line 30 of file mii_bit.h.

Referenced by mii_bit_rw().

#define MII_BIT_UDELAY   1

Delay between MDC transitions.

Definition at line 51 of file mii_bit.h.


Enumeration Type Documentation

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.

     {
        /** MII clock */
        MII_BIT_MDC = 0,
        /** MII data */
        MII_BIT_MDIO,
        /** MII data direction */
        MII_BIT_DRIVE,
};

Function Documentation

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )
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.

References mii_bit_basher::mdio, and mdio_init().

Referenced by icplus_probe().

                                                           {
        mdio_init ( &miibit->mdio, &mii_bit_op );
};