Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
m68360_enet.h File Reference
#include <asm/quicc_simple.h>

Go to the source code of this file.

Data Structures

union  ETHER_ADDR
 
struct  ETHER_SPECIFIC
 
struct  ETHER_FRAME
 
struct  ETHER_MAX_FRAME
 

Macros

#define T_R   0x8000 /* ready bit */
 
#define E_T_PAD   0x4000 /* short frame padding */
 
#define T_W   0x2000 /* wrap bit */
 
#define T_I   0x1000 /* interrupt on completion */
 
#define T_L   0x0800 /* last in frame */
 
#define T_TC   0x0400 /* transmit CRC (when last) */
 
#define T_DEF   0x0200 /* defer indication */
 
#define T_HB   0x0100 /* heartbeat */
 
#define T_LC   0x0080 /* error: late collision */
 
#define T_RL   0x0040 /* error: retransmission limit */
 
#define T_RC   0x003c /* retry count */
 
#define T_UN   0x0002 /* error: underrun */
 
#define T_CSL   0x0001 /* carier sense lost */
 
#define T_ERROR   (T_HB | T_LC | T_RL | T_UN | T_CSL)
 
#define R_E   0x8000 /* buffer empty */
 
#define R_W   0x2000 /* wrap bit */
 
#define R_I   0x1000 /* interrupt on reception */
 
#define R_L   0x0800 /* last BD in frame */
 
#define R_F   0x0400 /* first BD in frame */
 
#define R_M   0x0100 /* received because of promisc. mode */
 
#define R_LG   0x0020 /* frame too long */
 
#define R_NO   0x0010 /* non-octet aligned */
 
#define R_SH   0x0008 /* short frame */
 
#define R_CR   0x0004 /* receive CRC error */
 
#define R_OV   0x0002 /* receive overrun */
 
#define R_CL   0x0001 /* collision */
 
#define ETHER_R_ERROR   (R_LG | R_NO | R_SH | R_CR | R_OV | R_CL)
 
#define ETHERNET_GRA   0x0080 /* graceful stop complete */
 
#define ETHERNET_TXE   0x0010 /* transmit error */
 
#define ETHERNET_RXF   0x0008 /* receive frame */
 
#define ETHERNET_BSY   0x0004 /* busy condition */
 
#define ETHERNET_TXB   0x0002 /* transmit buffer */
 
#define ETHERNET_RXB   0x0001 /* receive buffer */
 
#define ETHER_HBC   0x8000 /* heartbeat checking */
 
#define ETHER_FC   0x4000 /* force collision */
 
#define ETHER_RSH   0x2000 /* receive short frames */
 
#define ETHER_IAM   0x1000 /* individual address mode */
 
#define ETHER_CRC_32   (0x2<<10) /* Enable CRC */
 
#define ETHER_PRO   0x0200 /* promiscuous */
 
#define ETHER_BRO   0x0100 /* broadcast address */
 
#define ETHER_SBT   0x0080 /* stop backoff timer */
 
#define ETHER_LPB   0x0040 /* Loop Back Mode */
 
#define ETHER_SIP   0x0020 /* sample input pins */
 
#define ETHER_LCW   0x0010 /* late collision window */
 
#define ETHER_NIB_13   (0x0<<1) /* # of ignored bits 13 */
 
#define ETHER_NIB_14   (0x1<<1) /* # of ignored bits 14 */
 
#define ETHER_NIB_15   (0x2<<1) /* # of ignored bits 15 */
 
#define ETHER_NIB_16   (0x3<<1) /* # of ignored bits 16 */
 
#define ETHER_NIB_21   (0x4<<1) /* # of ignored bits 21 */
 
#define ETHER_NIB_22   (0x5<<1) /* # of ignored bits 22 */
 
#define ETHER_NIB_23   (0x6<<1) /* # of ignored bits 23 */
 
#define ETHER_NIB_24   (0x7<<1) /* # of ignored bits 24 */
 
#define CRC_WORD   4 /* Length in bytes of CRC */
 
#define C_PRES   0xffffffff /* preform 32 bit CRC */
 
#define C_MASK   0xdebb20e3 /* comply with 32 bit CRC */
 
#define CRCEC   0x00000000
 
#define ALEC   0x00000000
 
#define DISFC   0x00000000
 
#define PADS   0x00000000
 
#define RET_LIM   0x000f /* retry 15 times to send a frame before interrupt */
 
#define ETH_MFLR   0x05ee /* 1518 max frame size */
 
#define MINFLR   0x0040 /* Minimum frame size 64 */
 
#define MAXD1   0x05ee /* Max dma count 1518 */
 
#define MAXD2   0x05ee
 
#define GADDR1   0x00000000 /* Clear group address */
 
#define GADDR2   0x00000000
 
#define GADDR3   0x00000000
 
#define GADDR4   0x00000000
 
#define P_PER   0x00000000 /*not used */
 
#define IADDR1   0x00000000 /* Individual hash table not used */
 
#define IADDR2   0x00000000
 
#define IADDR3   0x00000000
 
#define IADDR4   0x00000000
 
#define TADDR_H   0x00000000 /* clear this regs */
 
#define TADDR_M   0x00000000
 
#define TADDR_L   0x00000000
 
#define RFCR   0x18 /* normal operation */
 
#define TFCR   0x18 /* normal operation */
 
#define E_MRBLR   1518 /* Max ethernet frame length */
 
#define MAX_DATALEN   1500
 

Functions

void ether_interrupt (int scc_num)
 
void ethernet_init (int scc_number, alloc_routine *alloc_buffer, free_routine *free_buffer, store_rx_buffer_routine *store_rx_buffer, handle_tx_error_routine *handle_tx_error, handle_rx_error_routine *handle_rx_error, handle_lost_error_routine *handle_lost_error, ETHER_SPECIFIC *ether_spec)
 
int ethernet_tx (int scc_number, void *buf, int length)
 

Macro Definition Documentation

#define ALEC   0x00000000

Definition at line 93 of file m68360_enet.h.

#define C_MASK   0xdebb20e3 /* comply with 32 bit CRC */

Definition at line 91 of file m68360_enet.h.

#define C_PRES   0xffffffff /* preform 32 bit CRC */

Definition at line 90 of file m68360_enet.h.

#define CRC_WORD   4 /* Length in bytes of CRC */

Definition at line 89 of file m68360_enet.h.

#define CRCEC   0x00000000

Definition at line 92 of file m68360_enet.h.

#define DISFC   0x00000000

Definition at line 94 of file m68360_enet.h.

#define E_MRBLR   1518 /* Max ethernet frame length */

Definition at line 117 of file m68360_enet.h.

#define E_T_PAD   0x4000 /* short frame padding */

Definition at line 19 of file m68360_enet.h.

#define ETH_MFLR   0x05ee /* 1518 max frame size */

Definition at line 97 of file m68360_enet.h.

#define ETHER_BRO   0x0100 /* broadcast address */

Definition at line 72 of file m68360_enet.h.

#define ETHER_CRC_32   (0x2<<10) /* Enable CRC */

Definition at line 70 of file m68360_enet.h.

#define ETHER_FC   0x4000 /* force collision */

Definition at line 67 of file m68360_enet.h.

#define ETHER_HBC   0x8000 /* heartbeat checking */

Definition at line 66 of file m68360_enet.h.

#define ETHER_IAM   0x1000 /* individual address mode */

Definition at line 69 of file m68360_enet.h.

#define ETHER_LCW   0x0010 /* late collision window */

Definition at line 76 of file m68360_enet.h.

#define ETHER_LPB   0x0040 /* Loop Back Mode */

Definition at line 74 of file m68360_enet.h.

#define ETHER_NIB_13   (0x0<<1) /* # of ignored bits 13 */

Definition at line 77 of file m68360_enet.h.

#define ETHER_NIB_14   (0x1<<1) /* # of ignored bits 14 */

Definition at line 78 of file m68360_enet.h.

#define ETHER_NIB_15   (0x2<<1) /* # of ignored bits 15 */

Definition at line 79 of file m68360_enet.h.

#define ETHER_NIB_16   (0x3<<1) /* # of ignored bits 16 */

Definition at line 80 of file m68360_enet.h.

#define ETHER_NIB_21   (0x4<<1) /* # of ignored bits 21 */

Definition at line 81 of file m68360_enet.h.

#define ETHER_NIB_22   (0x5<<1) /* # of ignored bits 22 */

Definition at line 82 of file m68360_enet.h.

#define ETHER_NIB_23   (0x6<<1) /* # of ignored bits 23 */

Definition at line 83 of file m68360_enet.h.

#define ETHER_NIB_24   (0x7<<1) /* # of ignored bits 24 */

Definition at line 84 of file m68360_enet.h.

#define ETHER_PRO   0x0200 /* promiscuous */

Definition at line 71 of file m68360_enet.h.

#define ETHER_R_ERROR   (R_LG | R_NO | R_SH | R_CR | R_OV | R_CL)

Definition at line 50 of file m68360_enet.h.

#define ETHER_RSH   0x2000 /* receive short frames */

Definition at line 68 of file m68360_enet.h.

#define ETHER_SBT   0x0080 /* stop backoff timer */

Definition at line 73 of file m68360_enet.h.

#define ETHER_SIP   0x0020 /* sample input pins */

Definition at line 75 of file m68360_enet.h.

#define ETHERNET_BSY   0x0004 /* busy condition */

Definition at line 59 of file m68360_enet.h.

#define ETHERNET_GRA   0x0080 /* graceful stop complete */

Definition at line 56 of file m68360_enet.h.

#define ETHERNET_RXB   0x0001 /* receive buffer */

Definition at line 61 of file m68360_enet.h.

#define ETHERNET_RXF   0x0008 /* receive frame */

Definition at line 58 of file m68360_enet.h.

#define ETHERNET_TXB   0x0002 /* transmit buffer */

Definition at line 60 of file m68360_enet.h.

#define ETHERNET_TXE   0x0010 /* transmit error */

Definition at line 57 of file m68360_enet.h.

#define GADDR1   0x00000000 /* Clear group address */

Definition at line 101 of file m68360_enet.h.

#define GADDR2   0x00000000

Definition at line 102 of file m68360_enet.h.

#define GADDR3   0x00000000

Definition at line 103 of file m68360_enet.h.

#define GADDR4   0x00000000

Definition at line 104 of file m68360_enet.h.

#define IADDR1   0x00000000 /* Individual hash table not used */

Definition at line 106 of file m68360_enet.h.

#define IADDR2   0x00000000

Definition at line 107 of file m68360_enet.h.

#define IADDR3   0x00000000

Definition at line 108 of file m68360_enet.h.

#define IADDR4   0x00000000

Definition at line 109 of file m68360_enet.h.

#define MAX_DATALEN   1500

Definition at line 145 of file m68360_enet.h.

#define MAXD1   0x05ee /* Max dma count 1518 */

Definition at line 99 of file m68360_enet.h.

#define MAXD2   0x05ee

Definition at line 100 of file m68360_enet.h.

#define MINFLR   0x0040 /* Minimum frame size 64 */

Definition at line 98 of file m68360_enet.h.

#define P_PER   0x00000000 /*not used */

Definition at line 105 of file m68360_enet.h.

#define PADS   0x00000000

Definition at line 95 of file m68360_enet.h.

#define R_CL   0x0001 /* collision */

Definition at line 49 of file m68360_enet.h.

#define R_CR   0x0004 /* receive CRC error */

Definition at line 47 of file m68360_enet.h.

#define R_E   0x8000 /* buffer empty */

Definition at line 37 of file m68360_enet.h.

#define R_F   0x0400 /* first BD in frame */

Definition at line 41 of file m68360_enet.h.

#define R_I   0x1000 /* interrupt on reception */

Definition at line 39 of file m68360_enet.h.

#define R_L   0x0800 /* last BD in frame */

Definition at line 40 of file m68360_enet.h.

#define R_LG   0x0020 /* frame too long */

Definition at line 44 of file m68360_enet.h.

#define R_M   0x0100 /* received because of promisc. mode */

Definition at line 42 of file m68360_enet.h.

#define R_NO   0x0010 /* non-octet aligned */

Definition at line 45 of file m68360_enet.h.

#define R_OV   0x0002 /* receive overrun */

Definition at line 48 of file m68360_enet.h.

#define R_SH   0x0008 /* short frame */

Definition at line 46 of file m68360_enet.h.

#define R_W   0x2000 /* wrap bit */

Definition at line 38 of file m68360_enet.h.

#define RET_LIM   0x000f /* retry 15 times to send a frame before interrupt */

Definition at line 96 of file m68360_enet.h.

#define RFCR   0x18 /* normal operation */

Definition at line 115 of file m68360_enet.h.

#define T_CSL   0x0001 /* carier sense lost */

Definition at line 31 of file m68360_enet.h.

#define T_DEF   0x0200 /* defer indication */

Definition at line 25 of file m68360_enet.h.

#define T_ERROR   (T_HB | T_LC | T_RL | T_UN | T_CSL)

Definition at line 32 of file m68360_enet.h.

#define T_HB   0x0100 /* heartbeat */

Definition at line 26 of file m68360_enet.h.

#define T_I   0x1000 /* interrupt on completion */

Definition at line 21 of file m68360_enet.h.

#define T_L   0x0800 /* last in frame */

Definition at line 22 of file m68360_enet.h.

#define T_LC   0x0080 /* error: late collision */

Definition at line 27 of file m68360_enet.h.

#define T_R   0x8000 /* ready bit */

Definition at line 18 of file m68360_enet.h.

#define T_RC   0x003c /* retry count */

Definition at line 29 of file m68360_enet.h.

#define T_RL   0x0040 /* error: retransmission limit */

Definition at line 28 of file m68360_enet.h.

#define T_TC   0x0400 /* transmit CRC (when last) */

Definition at line 23 of file m68360_enet.h.

#define T_UN   0x0002 /* error: underrun */

Definition at line 30 of file m68360_enet.h.

#define T_W   0x2000 /* wrap bit */

Definition at line 20 of file m68360_enet.h.

#define TADDR_H   0x00000000 /* clear this regs */

Definition at line 110 of file m68360_enet.h.

#define TADDR_L   0x00000000

Definition at line 112 of file m68360_enet.h.

#define TADDR_M   0x00000000

Definition at line 111 of file m68360_enet.h.

#define TFCR   0x18 /* normal operation */

Definition at line 116 of file m68360_enet.h.

Function Documentation

void ether_interrupt ( int  scc_num)
void ethernet_init ( int  scc_number,
alloc_routine alloc_buffer,
free_routine free_buffer,
store_rx_buffer_routine store_rx_buffer,
handle_tx_error_routine handle_tx_error,
handle_rx_error_routine handle_rx_error,
handle_lost_error_routine handle_lost_error,
ETHER_SPECIFIC ether_spec 
)
int ethernet_tx ( int  scc_number,
void buf,
int  length 
)