📄 motcpmend.h
字号:
/* motCpmEnd.h - Motorola CPM core Ethernet interface header *//* Copyright 1996 - 2002 Wind River Systems, Inc. *//*modification history--------------------01g,24jan02,rcs removed #include "drv/netif/if_cpm.h"01f,24jan02,rcs moved General SCC Mode Register definitions, SCC Ethernet Protocol Specific Mode Register definitions, SCC Ethernet Event and Mask Register definitions, SCC Ethernet Receive Buffer Descriptor definitions, SCC Ethernet Transmit Buffer Descriptor definitions, SCC Serial Comunications Controller, SCC device descriptor, and #include "drv/multi/ppc860Cpm.h" from h/drv/netif/if_cpm.h01e,08jan02,mil Backed out last update "Remove compilation warning".01d,22dec01,g_h Remove compilation warning01c,28aug98,dat changed all motCmp names to motCpm.01b,29jun98,cn fixed compiler errors for CPUs other than CPU32 or PPC860.01a,22jun98,cn created. *//*This file contains definitions to support the end-style Network Driver for the Motorola CPM core Ethernet controller used in the M68EN360 and PPC800-series communications controllers. These definitions are compilerdependant, meaning that their values are based on the particular cpubeing used.*/#ifndef __INCmotCpmEndh#define __INCmotCpmEndh#ifdef __cplusplusextern "C" {#endif#if (CPU == PPC860)#include "drv/multi/ppc860Cpm.h"#include "drv/multi/ppc860Siu.h"#else#include "drv/multi/m68360.h" /* default: use CPU32 include file */#endif /* CPU == PPC860 *//* defines *//* * the following may be redefined in the bsp to account for the actual * number of SCC devices in the system. */#ifndef MAX_SCC_CHANNELS#define MAX_SCC_CHANNELS 4 /* max SCC number for Ethernet channels */#endif /* MAX_SCC_CHANNELS */#if (CPU == PPC860)#define CPM_DPR_SCC1(baseAddr) MPC860_DPR_SCC1 (baseAddr)#define CPM_GSMR_L1(baseAddr) GSMR_L1 (baseAddr)#define CPM_CIMR_SCC4 CIMR_SCC4#define CPM_CIMR(baseAddr) CIMR (baseAddr)#define CPM_CISR(baseAddr) CISR (baseAddr)#define CPM_CPCR(baseAddr) CPCR (baseAddr)#define END_OBJ_STRING "MPC860 Power-QUICC Enhanced Network Driver"#define MOT_DEV_NAME "cpm"#define MOT_DEV_NAME_LEN 4/* General SCC Mode Register definitions */#define SCC_GSMRL_HDLC 0x00000000 /* HDLC mode */#define SCC_GSMRL_APPLETALK 0x00000002 /* AppleTalk mode (LocalTalk) */#define SCC_GSMRL_SS7 0x00000003 /* SS7 mode (microcode) */#define SCC_GSMRL_UART 0x00000004 /* UART mode */#define SCC_GSMRL_PROFI_BUS 0x00000005 /* Profi-Bus mode (microcode) */#define SCC_GSMRL_ASYNC_HDLC 0x00000006 /* async HDLC mode (microcode)*/#define SCC_GSMRL_V14 0x00000007 /* V.14 mode */#define SCC_GSMRL_BISYNC 0x00000008 /* BISYNC mode */#define SCC_GSMRL_DDCMP 0x00000009 /* DDCMP mode (microcode) */#define SCC_GSMRL_ETHERNET 0x0000000c /* ethernet mode (SCC1 only) */#define SCC_GSMRL_ENT 0x00000010 /* enable transmitter */#define SCC_GSMRL_ENR 0x00000020 /* enable receiver */#define SCC_GSMRL_LOOPBACK 0x00000040 /* local loopback mode */#define SCC_GSMRL_ECHO 0x00000080 /* automatic echo mode */#define SCC_GSMRL_TENC 0x00000700 /* transmitter encoding method*/#define SCC_GSMRL_RENC 0x00003800 /* receiver encoding method */#define SCC_GSMRL_RDCR_X8 0x00004000 /* receive DPLL clock x8 */#define SCC_GSMRL_RDCR_X16 0x00008000 /* receive DPLL clock x16 */#define SCC_GSMRL_RDCR_X32 0x0000c000 /* receive DPLL clock x32 */#define SCC_GSMRL_TDCR_X8 0x00010000 /* transmit DPLL clock x8 */#define SCC_GSMRL_TDCR_X16 0x00020000 /* transmit DPLL clock x16 */#define SCC_GSMRL_TDCR_X32 0x00030000 /* transmit DPLL clock x32 */#define SCC_GSMRL_TEND 0x00040000 /* transmitter frame ending */#define SCC_GSMRL_TPP_00 0x00180000 /* Tx preamble pattern = 00 */#define SCC_GSMRL_TPP_10 0x00080000 /* Tx preamble pattern = 10 */#define SCC_GSMRL_TPP_01 0x00100000 /* Tx preamble pattern = 01 */#define SCC_GSMRL_TPP_11 0x00180000 /* Tx preamble pattern = 11 */#define SCC_GSMRL_TPL_NONE 0x00000000 /* no Tx preamble (default) */#define SCC_GSMRL_TPL_8 0x00200000 /* Tx preamble = 1 byte */#define SCC_GSMRL_TPL_16 0x00400000 /* Tx preamble = 2 bytes */#define SCC_GSMRL_TPL_32 0x00600000 /* Tx preamble = 4 bytes */#define SCC_GSMRL_TPL_48 0x00800000 /* Tx preamble = 6 bytes */#define SCC_GSMRL_TPL_64 0x00a00000 /* Tx preamble = 8 bytes */#define SCC_GSMRL_TPL_128 0x00c00000 /* Tx preamble = 16 bytes */#define SCC_GSMRL_TINV 0x01000000 /* DPLL transmit input invert */#define SCC_GSMRL_RINV 0x02000000 /* DPLL receive input invert */#define SCC_GSMRL_TSNC 0x0c000000 /* transmit sense */#define SCC_GSMRL_TCI 0x10000000 /* transmit clock invert */#define SCC_GSMRL_EDGE 0x60000000 /* adjustment edge +/- */ #define SCC_GSMRH_RSYN 0x00000001 /* receive sync timing*/#define SCC_GSMRH_RTSM 0x00000002 /* RTS* mode */#define SCC_GSMRH_SYNL 0x0000000c /* sync length */#define SCC_GSMRH_TXSY 0x00000010 /* transmitter/receiver sync */#define SCC_GSMRH_RFW 0x00000020 /* Rx FIFO width */#define SCC_GSMRH_TFL 0x00000040 /* transmit FIFO length */#define SCC_GSMRH_CTSS 0x00000080 /* CTS* sampling */#define SCC_GSMRH_CDS 0x00000100 /* CD* sampling */#define SCC_GSMRH_CTSP 0x00000200 /* CTS* pulse */#define SCC_GSMRH_CDP 0x00000400 /* CD* pulse */#define SCC_GSMRH_TTX 0x00000800 /* transparent transmitter */#define SCC_GSMRH_TRX 0x00001000 /* transparent receiver */#define SCC_GSMRH_REVD 0x00002000 /* reverse data */#define SCC_GSMRH_TCRC 0x0000c000 /* transparent CRC */#define SCC_GSMRH_GDE 0x00010000 /* glitch detect enable *//* CPM - Communication Processor Module *//* SCC Ethernet Protocol Specific Mode Register definitions */ #define SCC_ETHER_PSMR_NIB_13 0x0000 /* SFD 13 bits after TENA */#define SCC_ETHER_PSMR_NIB_14 0x0002 /* SFD 14 bits after TENA */#define SCC_ETHER_PSMR_NIB_15 0x0004 /* SFD 15 bits after TENA */#define SCC_ETHER_PSMR_NIB_16 0x0006 /* SFD 16 bits after TENA */#define SCC_ETHER_PSMR_NIB_21 0x0008 /* SFD 21 bits after TENA */#define SCC_ETHER_PSMR_NIB_22 0x000a /* SFD 22 bits after TENA */#define SCC_ETHER_PSMR_NIB_23 0x000c /* SFD 23 bits after TENA */#define SCC_ETHER_PSMR_NIB_24 0x000e /* SFD 24 bits after TENA */#define SCC_ETHER_PSMR_LCW 0x0100 /* late collision window */#define SCC_ETHER_PSMR_SIP 0x0200 /* sample input pins */#define SCC_ETHER_PSMR_LPB 0x0400 /* loopback operation */#define SCC_ETHER_PSMR_SBT 0x0800 /* stop backoff timer */#define SCC_ETHER_PSMR_BRO 0x0100 /* broadcast address */#define SCC_ETHER_PSMR_PRO 0x0200 /* promiscuous mode */#define SCC_ETHER_PSMR_CRC 0x0800 /* CRC selection */#define SCC_ETHER_PSMR_IAM 0x1000 /* individual address mode */#define SCC_ETHER_PSMR_RSH 0x2000 /* receive short frame */#define SCC_ETHER_PSMR_FC 0x4000 /* force collision */#define SCC_ETHER_PSMR_HBC 0x8000 /* heartbeat checking*/ /* SCC Ethernet Event and Mask Register definitions */ #define SCC_ETHER_SCCX_RXB 0x0001 /* buffer received event */#define SCC_ETHER_SCCX_TXB 0x0002 /* buffer transmitted event */#define SCC_ETHER_SCCX_BSY 0x0004 /* busy condition */#define SCC_ETHER_SCCX_RXF 0x0008 /* frame received event */#define SCC_ETHER_SCCX_TXE 0x0010 /* transmission error event */#define SCC_ETHER_SCCX_GRA 0x0080 /* graceful stop event */ /* SCC Ethernet Receive Buffer Descriptor definitions */ #define SCC_ETHER_RX_BD_CL 0x0001 /* collision condition */#define SCC_ETHER_RX_BD_OV 0x0002 /* overrun condition */#define SCC_ETHER_RX_BD_CR 0x0004 /* Rx CRC error */#define SCC_ETHER_RX_BD_SH 0x0008 /* short frame received */#define SCC_ETHER_RX_BD_NO 0x0010 /* Rx nonoctet aligned frame */#define SCC_ETHER_RX_BD_LG 0x0020 /* Rx frame length violation */#define SCC_ETHER_RX_BD_M 0x0100 /* miss bit for prom mode */#define SCC_ETHER_RX_BD_F 0x0400 /* buffer is first in frame */#define SCC_ETHER_RX_BD_L 0x0800 /* buffer is last in frame */#define SCC_ETHER_RX_BD_I 0x1000 /* interrupt on receive */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -