📄 mpc8260.h
字号:
/* * * File: MPC8260.H * * (C) Copyright 2002 * Gianfranco Morandi, Eurostudio s.r.l., gianfranco.morandi@euro-studio.it * See file CREDITS for list of people who contributed to this * project. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA * * * Description: * * Main Internal Memory Maps for the MPC8260 PowerQUICC 2. * * Note that different structures can be overlaid at the same offsets for the * different modes of operation. * * * History: * * 13 JUL 98 ggh initial version * 15 JAN 99 ggh updated MCC structures * **/#ifndef _MPC8260_H #define _MPC8260_H//#define _Packed __packed__#define _PackedType /****************************************************************************** * * PARAMETER RAM (PRAM) FOR EACH PERIPHERAL * * Each subsection contains protocol-specific PRAM for each peripheral, * followed by the PRAM common to all protocols for that peripheral. These * structs are used as needed in the main MPC8260 memory map structure. Note * that different modes of operation will require the use of different PRAM * structs, and that certain structs may overlay and conflict with the use of * other PRAM areas. Consult the MPC8260 VUser Manual for details as to what * is unavailable when certain protocols are run on certain peripherals. * ******************************************************************************/ /*---------------------------------------------------------------------------*//* SERIAL COMMUNICATION CONTROLLER (SCC) *//*---------------------------------------------------------------------------*//*----------*//* SCC HDLC *//*----------*/typedef struct /* 44 bytes */ { VUBYTE reserved1[4]; /* Reserved area */ VUWORD c_mask; /* CRC constant */ VUWORD c_pres; /* CRC preset */ VUHWORD disfc; /* discarded frame counter */ VUHWORD crcec; /* CRC error counter */ VUHWORD abtsc; /* abort sequence counter */ VUHWORD nmarc; /* nonmatching address rx cnt */ VUHWORD retrc; /* frame transmission counter. */ /* For FCC this area is reserved.*/ VUHWORD mflr; /* maximum frame length reg */ VUHWORD max_cnt; /* maximum length counter */ VUHWORD rfthr; /* received frames threshold */ VUHWORD rfcnt; /* received frames count */ VUHWORD hmask; /* user defined frm addr mask */ VUHWORD haddr1; /* user defined frm address 1 */ VUHWORD haddr2; /* user defined frm address 2 */ VUHWORD haddr3; /* user defined frm address 3 */ VUHWORD haddr4; /* user defined frm address 4 */ VUHWORD tmp; /* temp */ VUHWORD tmp_mb; /* temp */}/*_PackedType */ t_HdlcScc_Pram; /*--------------*//* SCC Ethernet *//*--------------*/typedef struct /* 116 bytes */ { VUWORD c_pres; /* CRC preset */ VUWORD c_mask; /* CRC constant mask*/ VUWORD crcec; /* CRC error counter */ VUWORD alec; /* alignment error counter */ VUWORD disfc; /* discarded frame counter */ VUHWORD pads; /* Short frame pad character. */ VUHWORD ret_lim; /* Retry limit threshold. */ VUHWORD ret_cnt; /* Retry limit counter. */ VUHWORD mflr; /* maximum frame length reg */ VUHWORD minflr; /* minimum frame length reg */ VUHWORD maxd1; /* max DMA1 length register. */ VUHWORD maxd2; /* max DMA2 length register. */ VUHWORD maxd; /* Rx max DMA. */ VUHWORD dma_cnt; /* Rx DMA counter. */ VUHWORD max_b; /* max buffer descriptor byte count. */ VUHWORD gaddr1; /* group address filter */ VUHWORD gaddr2; /* group address filter */ VUHWORD gaddr3; /* group address filter */ VUHWORD gaddr4; /* group address filter */ VUWORD tbuf0_data0; /* Saved area 0, current frame. */ VUWORD tbuf0_data1; /* Saved area 1, current frame. */ VUWORD tbuf0_rba0; VUWORD tbuf0_crc; VUHWORD tbuf0_bcnt; VUHWORD paddr1_h; /* physical address (MSB) */ VUHWORD paddr1_m; /* physical address */ VUHWORD paddr1_l; /* physical address (LSB) */ VUHWORD p_per; /* persistence */ VUHWORD rfbd_ptr; /* Rx first BD pointer. */ VUHWORD tfbd_ptr; /* Tx first BD pointer. */ VUHWORD tlbd_ptr; /* Tx last BD pointer. */ VUWORD tbuf1_data0; /* Saved area 0, next frame. */ VUWORD tbuf1_data1; /* Saved area 1, next frame. */ VUWORD tbuf1_rba0; VUWORD tbuf1_crc; VUHWORD tbuf1_bcnt; VUHWORD tx_len; /* tx frame length counter */ VUHWORD iaddr1; /* individual address filter. */ VUHWORD iaddr2; /* individual address filter. */ VUHWORD iaddr3; /* individual address filter. */ VUHWORD iaddr4; /* individual address filter. */ VUHWORD boff_cnt; /* back-off counter */ VUHWORD taddr_h; /* temp address (MSB) */ VUHWORD taddr_m; /* temp address */ VUHWORD taddr_l; /* temp address (LSB) */} /* _PackedType */ t_EnetScc_Pram;/*----------*//* SCC VUART *//*----------*/typedef struct /* 54 bytes */ { VUBYTE reserved1[8]; /* Reserved area */ VUHWORD max_idl; /* maximum idle characters */ VUHWORD idlc; /* rx idle counter (internal) */ VUHWORD brkcr; /* break count register */ VUHWORD parec; /* Rx parity error counter */ VUHWORD frmec; /* Rx framing error counter */ VUHWORD nosec; /* Rx noise counter */ VUHWORD brkec; /* Rx break character counter */ VUHWORD brkln; /* Receive break length */ VUHWORD uaddr1; /* address character 1 */ VUHWORD uaddr2; /* address character 2 */ VUHWORD rtemp; /* temp storage */ VUHWORD toseq; /* Tx out of sequence char */ VUHWORD cc[8]; /* Rx control characters */ VUHWORD rccm; /* Rx control char mask */ VUHWORD rccr; /* Rx control char register */ VUHWORD rlbc; /* Receive last break char */} /* _PackedType */ t_UartScc_Pram;/*-----------------*//* SCC Transparent *//*-----------------*/typedef struct /* 8 bytes */{ VUWORD c_mask; /* CRC constant */ VUWORD c_pres; /* CRC preset */} /* _PackedType */ t_TransScc_Pram;/*------------*//* SCC Bisync *//*------------*/typedef struct /* 36 bytes */{ VUBYTE reserved1[4]; /* Reserved area */ VUWORD crcc; /* CRC Constant Temp Value */ VUHWORD prcrc; /* Preset Receiver CRC-16/LRC */ VUHWORD ptcrc; /* Preset Transmitter CRC-16/LRC */ VUHWORD parec; /* Receive Parity Error Counter */ VUHWORD bsync; /* BISYNC SYNC Character */ VUHWORD bdle; /* BISYNC DLE Character */ VUHWORD cc[8]; /* Rx control characters */ VUHWORD rccm; /* Receive Control Character Mask */} /* _PackedType */ t_BisyncScc_Pram;/*-----------------*//* SCC Common PRAM *//*-----------------*/typedef struct /* 398 bytes */{ VUHWORD rbase; /* RX BD base address */ VUHWORD tbase; /* TX BD base address */ VUBYTE rfcr; /* Rx function code */ VUBYTE tfcr; /* Tx function code */ VUHWORD mrblr; /* Rx buffer length */ VUWORD rstate; /* Rx internal state */ VUWORD rptr; /* Rx internal data pointer */ VUHWORD rbptr; /* rb BD Pointer */ VUHWORD rcount; /* Rx internal byte count */ VUWORD rtemp; /* Rx temp */ VUWORD tstate; /* Tx internal state */ VUWORD tptr; /* Tx internal data pointer */ VUHWORD tbptr; /* Tx BD pointer */ VUHWORD tcount; /* Tx byte count */ VUWORD ttemp; /* Tx temp */ VUWORD rcrc; /* temp receive CRC */ VUWORD tcrc; /* temp transmit CRC */ union { t_HdlcScc_Pram h; t_EnetScc_Pram e; t_UartScc_Pram u; t_TransScc_Pram t; t_BisyncScc_Pram b; } SpecificProtocol; VUBYTE COMPLETE_SIZE_OF_DPRAM_PAGE[0x5c];} /* _PackedType */ t_Scc_Pram;/*---------------------------------------------------------------------------*//* FAST COMMUNICATION CONTROLLER (FCC) *//*---------------------------------------------------------------------------*//*----------*//* FCC HDLC *//*----------*/typedef struct /* 48 bytes */{ VUBYTE reserved1[8]; /* Reserved area */ VUWORD c_mask; /* CRC constant */ VUWORD c_pres; /* CRC preset */ VUHWORD disfc; /* discarded frame counter */ VUHWORD crcec; /* CRC error counter */ VUHWORD abtsc; /* abort sequence counter */ VUHWORD nmarc; /* nonmatching address rx cnt */ VUWORD max_cnt; /* maximum length counter */ VUHWORD mflr; /* maximum frame length reg */ VUHWORD rfthr; /* received frames threshold */ VUHWORD rfcnt; /* received frames count */ VUHWORD hmask; /* user defined frm addr mask */ VUHWORD haddr1; /* user defined frm address 1 */ VUHWORD haddr2; /* user defined frm address 2 */ VUHWORD haddr3; /* user defined frm address 3 */ VUHWORD haddr4; /* user defined frm address 4 */ VUHWORD tmp; /* temp */ VUHWORD tmp_mb; /* temp */} /* _PackedType */ t_HdlcFcc_Pram;/*--------------*//* FCC Ethernet *//*--------------*/typedef struct /* 198 bytes */{ VUWORD stat_bus; /* Internal use buffer. */ VUWORD cam_ptr; /* CAM address. */ VUWORD c_mask; /* CRC constant mask*/ VUWORD c_pres; /* CRC preset */ VUWORD crcec; /* CRC error counter */ VUWORD alec; /* alignment error counter */ VUWORD disfc; /* discarded frame counter */ VUHWORD ret_lim; /* Retry limit threshold. */ VUHWORD ret_cnt; /* Retry limit counter. */ VUHWORD p_per; /* persistence */ VUHWORD boff_cnt; /* back-off counter */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -