/*---------------------------------------------------------------------------*/ /* Definitions of the Bits in the registers */
/* B0_RAP 16 bit register address port */ #define RAP_RAP 0x0f /* Bit 3..0: 0 = block0, .., f = block15 */
/* B0_CTRL 8 bit control register */ #define CTRL_FDDI_CLR (1<<7) /* Bit 7: (ML) Clear FDDI Reset */ #define CTRL_FDDI_SET (1<<6) /* Bit 6: (ML) Set FDDI Reset */ #define CTRL_HPI_CLR (1<<5) /* Bit 5: Clear HPI SM reset */ #define CTRL_HPI_SET (1<<4) /* Bit 4: Set HPI SM reset */ #define CTRL_MRST_CLR (1<<3) /* Bit 3: Clear Master reset */ #define CTRL_MRST_SET (1<<2) /* Bit 2: Set Master reset */ #define CTRL_RST_CLR (1<<1) /* Bit 1: Clear Software reset */ #define CTRL_RST_SET (1<<0) /* Bit 0: Set Software reset */
/* B0_DAS 8 Bit control register (DAS) */ #define BUS_CLOCK (1<<7) /* Bit 7: (ML) Bus Clock 0/1 = 33/66MHz */ #define BUS_SLOT_SZ (1<<6) /* Bit 6: (ML) Slot Size 0/1 = 32/64 bit slot*/ /* Bit 5..4: reserved */ #define DAS_AVAIL (1<<3) /* Bit 3: 1 = DAS, 0 = SAS */ #define DAS_BYP_ST (1<<2) /* Bit 2: 1 = avail,SAS, 0 = not avail */ #define DAS_BYP_INS (1<<1) /* Bit 1: 1 = insert Bypass */ #define DAS_BYP_RMV (1<<0) /* Bit 0: 1 = remove Bypass */
/* B0_LED 8 Bit LED register */ /* Bit 7..6: reserved */ #define LED_2_ON (1<<5) /* Bit 5: 1 = switch LED_2 on (left,gn)*/ #define LED_2_OFF (1<<4) /* Bit 4: 1 = switch LED_2 off */ #define LED_1_ON (1<<3) /* Bit 3: 1 = switch LED_1 on (mid,yel)*/ #define LED_1_OFF (1<<2) /* Bit 2: 1 = switch LED_1 off */ #define LED_0_ON (1<<1) /* Bit 1: 1 = switch LED_0 on (rght,gn)*/ #define LED_0_OFF (1<<0) /* Bit 0: 1 = switch LED_0 off */ /* This hardware defines are very ugly therefore we define some others */
#define LED_GA_ON LED_2_ON /* S port = A port */ #define LED_GA_OFF LED_2_OFF /* S port = A port */ #define LED_MY_ON LED_1_ON #define LED_MY_OFF LED_1_OFF #define LED_GB_ON LED_0_ON #define LED_GB_OFF LED_0_OFF
/* B0_TST_CTRL 8 bit test control register */ #define TST_FRC_DPERR_MR (1<<7) /* Bit 7: force DATAPERR on MST RE. */ #define TST_FRC_DPERR_MW (1<<6) /* Bit 6: force DATAPERR on MST WR. */ #define TST_FRC_DPERR_TR (1<<5) /* Bit 5: force DATAPERR on TRG RE. */ #define TST_FRC_DPERR_TW (1<<4) /* Bit 4: force DATAPERR on TRG WR. */ #define TST_FRC_APERR_M (1<<3) /* Bit 3: force ADDRPERR on MST */ #define TST_FRC_APERR_T (1<<2) /* Bit 2: force ADDRPERR on TRG */ #define TST_CFG_WRITE_ON (1<<1) /* Bit 1: ena configuration reg. WR */ #define TST_CFG_WRITE_OFF (1<<0) /* Bit 0: dis configuration reg. WR */
/* B0_ISRC 32 bit Interrupt source register */ /* Bit 31..28: reserved */ #define IS_I2C_READY (1L<<27) /* Bit 27: (ML) IRQ on end of I2C tx */ #define IS_IRQ_SW (1L<<26) /* Bit 26: (ML) SW forced IRQ */ #define IS_EXT_REG (1L<<25) /* Bit 25: (ML) IRQ from external reg*/ #define IS_IRQ_STAT (1L<<24) /* Bit 24: IRQ status exception */ /* PERR, RMABORT, RTABORT DATAPERR */ #define IS_IRQ_MST_ERR (1L<<23) /* Bit 23: IRQ master error */ /* RMABORT, RTABORT, DATAPERR */ #define IS_TIMINT (1L<<22) /* Bit 22: IRQ_TIMER */ #define IS_TOKEN (1L<<21) /* Bit 21: IRQ_RTM */ /* *Note:TheDASisourFirstPort(!=PA)
*/ #define IS_PLINT1 (1L<<20) /* Bit 20: IRQ_PHY_DAS */ #define IS_PLINT2 (1L<<19) /* Bit 19: IRQ_IFCP_4 */ #define IS_MINTR3 (1L<<18) /* Bit 18: IRQ_IFCP_3/IRQ_PHY */ #define IS_MINTR2 (1L<<17) /* Bit 17: IRQ_IFCP_2/IRQ_MAC_2 */ #define IS_MINTR1 (1L<<16) /* Bit 16: IRQ_IFCP_1/IRQ_MAC_1 */ /* Receive Queue 1 */ #define IS_R1_P (1L<<15) /* Bit 15: Parity Error (q1) */ #define IS_R1_B (1L<<14) /* Bit 14: End of Buffer (q1) */ #define IS_R1_F (1L<<13) /* Bit 13: End of Frame (q1) */ #define IS_R1_C (1L<<12) /* Bit 12: Encoding Error (q1) */ /* Receive Queue 2 */ #define IS_R2_P (1L<<11) /* Bit 11: (DV) Parity Error (q2) */ #define IS_R2_B (1L<<10) /* Bit 10: (DV) End of Buffer (q2) */ #define IS_R2_F (1L<<9) /* Bit 9: (DV) End of Frame (q2) */ #define IS_R2_C (1L<<8) /* Bit 8: (DV) Encoding Error (q2) */ /* Asynchronous Transmit queue */ /* Bit 7: reserved */ #define IS_XA_B (1L<<6) /* Bit 6: End of Buffer (xa) */ #define IS_XA_F (1L<<5) /* Bit 5: End of Frame (xa) */ #define IS_XA_C (1L<<4) /* Bit 4: Encoding Error (xa) */ /* Synchronous Transmit queue */ /* Bit 3: reserved */ #define IS_XS_B (1L<<2) /* Bit 2: End of Buffer (xs) */ #define IS_XS_F (1L<<1) /* Bit 1: End of Frame (xs) */ #define IS_XS_C (1L<<0) /* Bit 0: Encoding Error (xs) */
/* B0_IMSK 32 bit Interrupt mask register */ /* *TheBitdefinnitionofthisregisterarethesameasoftheinterrupt *sourceregister.ThesedefinitionaredirectlyderivedfromtheHardware *spec.
*/ /* Bit 31..28: reserved */ #define IRQ_I2C_READY (1L<<27) /* Bit 27: (ML) IRQ on end of I2C tx */ #define IRQ_SW (1L<<26) /* Bit 26: (ML) SW forced IRQ */ #define IRQ_EXT_REG (1L<<25) /* Bit 25: (ML) IRQ from external reg*/ #define IRQ_STAT (1L<<24) /* Bit 24: IRQ status exception */ /* PERR, RMABORT, RTABORT DATAPERR */ #define IRQ_MST_ERR (1L<<23) /* Bit 23: IRQ master error */ /* RMABORT, RTABORT, DATAPERR */ #define IRQ_TIMER (1L<<22) /* Bit 22: IRQ_TIMER */ #define IRQ_RTM (1L<<21) /* Bit 21: IRQ_RTM */ #define IRQ_DAS (1L<<20) /* Bit 20: IRQ_PHY_DAS */ #define IRQ_IFCP_4 (1L<<19) /* Bit 19: IRQ_IFCP_4 */ #define IRQ_IFCP_3 (1L<<18) /* Bit 18: IRQ_IFCP_3/IRQ_PHY */ #define IRQ_IFCP_2 (1L<<17) /* Bit 17: IRQ_IFCP_2/IRQ_MAC_2 */ #define IRQ_IFCP_1 (1L<<16) /* Bit 16: IRQ_IFCP_1/IRQ_MAC_1 */ /* Receive Queue 1 */ #define IRQ_R1_P (1L<<15) /* Bit 15: Parity Error (q1) */ #define IRQ_R1_B (1L<<14) /* Bit 14: End of Buffer (q1) */ #define IRQ_R1_F (1L<<13) /* Bit 13: End of Frame (q1) */ #define IRQ_R1_C (1L<<12) /* Bit 12: Encoding Error (q1) */ /* Receive Queue 2 */ #define IRQ_R2_P (1L<<11) /* Bit 11: (DV) Parity Error (q2) */ #define IRQ_R2_B (1L<<10) /* Bit 10: (DV) End of Buffer (q2) */ #define IRQ_R2_F (1L<<9) /* Bit 9: (DV) End of Frame (q2) */ #define IRQ_R2_C (1L<<8) /* Bit 8: (DV) Encoding Error (q2) */ /* Asynchronous Transmit queue */ /* Bit 7: reserved */ #define IRQ_XA_B (1L<<6) /* Bit 6: End of Buffer (xa) */ #define IRQ_XA_F (1L<<5) /* Bit 5: End of Frame (xa) */ #define IRQ_XA_C (1L<<4) /* Bit 4: Encoding Error (xa) */ /* Synchronous Transmit queue */ /* Bit 3: reserved */ #define IRQ_XS_B (1L<<2) /* Bit 2: End of Buffer (xs) */ #define IRQ_XS_F (1L<<1) /* Bit 1: End of Frame (xs) */ #define IRQ_XS_C (1L<<0) /* Bit 0: Encoding Error (xs) */
/* 0x0010 - 0x006b: formac+ (supernet_3) fequently used registers */ /* B0_R1_CSR 32 bit BMU control/status reg (rec q 1 ) */ /* B0_R2_CSR 32 bit BMU control/status reg (rec q 2 ) */ /* B0_XA_CSR 32 bit BMU control/status reg (a xmit q ) */ /* B0_XS_CSR 32 bit BMU control/status reg (s xmit q ) */ /* The registers are the same as B4_R1_CSR, B4_R2_CSR, B5_Xa_CSR, B5_XS_CSR */
/* B2_MAC_0 8 bit MAC address Byte 0 */ /* B2_MAC_1 8 bit MAC address Byte 1 */ /* B2_MAC_2 8 bit MAC address Byte 2 */ /* B2_MAC_3 8 bit MAC address Byte 3 */ /* B2_MAC_4 8 bit MAC address Byte 4 */ /* B2_MAC_5 8 bit MAC address Byte 5 */ /* B2_MAC_6 8 bit MAC address Byte 6 (== 0) (DV) */ /* B2_MAC_7 8 bit MAC address Byte 7 (== 0) (DV) */
/* B2_CONN_TYP 8 bit Connector type */ /* B2_PMD_TYP 8 bit PMD type */ /* Values of connector and PMD type comply to SysKonnect internal std */
/* The EPROM register are currently of no use */ /* B2_E_0 8 bit EPROM Byte 0 */ /* B2_E_1 8 bit EPROM Byte 1 */ /* B2_E_2 8 bit EPROM Byte 2 */ /* B2_E_3 8 bit EPROM Byte 3 */
/* B2_FAR 32 bit Flash-Prom Address Register/Counter */ #define FAR_ADDR 0x1ffffL /* Bit 16..0: FPROM Address mask */
/* B2_FDP 8 bit Flash-Prom Data Port */
/* B2_LD_CRTL 8 bit loader control */ /* Bits are currently reserved */
/* B2_LD_TEST 8 bit loader test */ #define LD_T_ON (1<<3) /* Bit 3: Loader Testmode on */ #define LD_T_OFF (1<<2) /* Bit 2: Loader Testmode off */ #define LD_T_STEP (1<<1) /* Bit 1: Decrement FPROM addr. Counter */ #define LD_START (1<<0) /* Bit 0: Start loading FPROM */
/* B2_TI_INI 32 bit Timer init value */ /* B2_TI_VAL 32 bit Timer value */ /* B2_TI_CRTL 8 bit Timer control */ /* B2_TI_TEST 8 Bit Timer Test */ /* B2_WDOG_INI 32 bit Watchdog init value */ /* B2_WDOG_VAL 32 bit Watchdog value */ /* B2_WDOG_CRTL 8 bit Watchdog control */ /* B2_WDOG_TEST 8 Bit Watchdog Test */ /* B2_RTM_INI 32 bit RTM init value */ /* B2_RTM_VAL 32 bit RTM value */ /* B2_RTM_CRTL 8 bit RTM control */ /* B2_RTM_TEST 8 Bit RTM Test */ /* B2_<TIM>_CRTL 8 bit <TIM> control */ /* B2_IRQ_MOD_INI 32 bit IRQ Moderation Timer Init Reg. (ML) */ /* B2_IRQ_MOD_VAL 32 bit IRQ Moderation Timer Value (ML) */ /* B2_IRQ_MOD_CTRL 8 bit IRQ Moderation Timer Control (ML) */ /* B2_IRQ_MOD_TEST 8 bit IRQ Moderation Timer Test (ML) */ #define GET_TOK_CT (1<<4) /* Bit 4: Get the Token Counter (RTM) */ #define TIM_RES_TOK (1<<3) /* Bit 3: RTM Status: 1 == restricted */ #define TIM_ALARM (1<<3) /* Bit 3: Timer Alarm (WDOG) */ #define TIM_START (1<<2) /* Bit 2: Start Timer (TI,WDOG,RTM,IRQ_MOD)*/ #define TIM_STOP (1<<1) /* Bit 1: Stop Timer (TI,WDOG,RTM,IRQ_MOD) */ #define TIM_CL_IRQ (1<<0) /* Bit 0: Clear Timer IRQ (TI,WDOG,RTM) */ /* B2_<TIM>_TEST 8 Bit <TIM> Test */ #define TIM_T_ON (1<<2) /* Bit 2: Test mode on (TI,WDOG,RTM,IRQ_MOD) */ #define TIM_T_OFF (1<<1) /* Bit 1: Test mode off (TI,WDOG,RTM,IRQ_MOD) */ #define TIM_T_STEP (1<<0) /* Bit 0: Test step (TI,WDOG,RTM,IRQ_MOD) */
/* B2_TOK_COUNT 0x014c (ML) 32 bit Token Counter */ /* B2_DESC_ADDR_H 0x0150 (ML) 32 bit Desciptor Base Addr Reg High */ /* B2_CTRL_2 0x0154 (ML) 8 bit Control Register 2 */ /* Bit 7..5: reserved */ #define CTRL_CL_I2C_IRQ (1<<4) /* Bit 4: Clear I2C IRQ */ #define CTRL_ST_SW_IRQ (1<<3) /* Bit 3: Set IRQ SW Request */ #define CTRL_CL_SW_IRQ (1<<2) /* Bit 2: Clear IRQ SW Request */ #define CTRL_STOP_DONE (1<<1) /* Bit 1: Stop Master is finished */ #define CTRL_STOP_MAST (1<<0) /* Bit 0: Command Bit to stop the master*/
/* B2_IFACE_REG 0x0155 (ML) 8 bit Interface Register */ /* Bit 7..3: reserved */ #define IF_I2C_DATA_DIR (1<<2) /* Bit 2: direction of IF_I2C_DATA*/ #define IF_I2C_DATA (1<<1) /* Bit 1: I2C Data Port */ #define IF_I2C_CLK (1<<0) /* Bit 0: I2C Clock Port */
/* 0x0156: reserved */ /* B2_TST_CTRL_2 0x0157 (ML) 8 bit Test Control Register 2 */ /* Bit 7..4: reserved */ /* force the following error on */ /* the next master read/write */ #define TST_FRC_DPERR_MR64 (1<<3) /* Bit 3: DataPERR RD 64 */ #define TST_FRC_DPERR_MW64 (1<<2) /* Bit 2: DataPERR WR 64 */ #define TST_FRC_APERR_1M64 (1<<1) /* Bit 1: AddrPERR on 1. phase */ #define TST_FRC_APERR_2M64 (1<<0) /* Bit 0: AddrPERR on 2. phase */
/* B5_<xx>_F 32 bit flag register (xx) */ /* Bit 28..31: reserved */ #define F_ALM_FULL (1L<<27) /* Bit 27: (ML) FIFO almost full */ #define F_FIFO_EOF (1L<<26) /* Bit 26: (ML) Fag bit in FIFO */ #define F_WM_REACHED (1L<<25) /* Bit 25: (ML) Watermark reached */ #define F_UP_DW_USED (1L<<24) /* Bit 24: (ML) Upper Dword used (bug)*/ /* Bit 23: reserved */ #define F_FIFO_LEVEL (0x1fL<<16) /* Bit 16..22:(ML) # of Qwords in FIFO*/ /* Bit 8..15: reserved */ #define F_ML_WATER_M 0x0000ffL /* Bit 0.. 7:(ML) Watermark */ #define FLAG_WATER 0x00001fL /* Bit 4..0:(DV) Level of req data tr.*/
/* B5_<xx>_T1 32 bit Test Register 1 (xx) */ /* Holds four State Machine control Bytes */ #define SM_CRTL_SV (0xffL<<24) /* Bit 31..24: Control Supervisor SM */ #define SM_CRTL_RD (0xffL<<16) /* Bit 23..16: Control Read Desc SM */ #define SM_CRTL_WR (0xffL<<8) /* Bit 15..8: Control Write Desc SM */ #define SM_CRTL_TR (0xffL<<0) /* Bit 7..0: Control Transfer SM */
/* B4_<xx>_T1_TR 8 bit Test Register 1 TR (xx) */ /* B4_<xx>_T1_WR 8 bit Test Register 1 WR (xx) */ /* B4_<xx>_T1_RD 8 bit Test Register 1 RD (xx) */ /* B4_<xx>_T1_SV 8 bit Test Register 1 SV (xx) */ /* The control status byte of each machine looks like ... */ #define SM_STATE 0xf0 /* Bit 7..4: State which shall be loaded */ #define SM_LOAD 0x08 /* Bit 3: Load the SM with SM_STATE */ #define SM_TEST_ON 0x04 /* Bit 2: Switch on SM Test Mode */ #define SM_TEST_OFF 0x02 /* Bit 1: Go off the Test Mode */ #define SM_STEP 0x01 /* Bit 0: Step the State Machine */
/* B5_<xx>_T2 32 bit Test Register 2 (xx) */ /* Note: This register is only defined for the transmit queues */ /* Bit 31..8: reserved */ #define AC_TEST_ON (1<<7) /* Bit 7: Address Counter Test Mode on */ #define AC_TEST_OFF (1<<6) /* Bit 6: Address Counter Test Mode off*/ #define BC_TEST_ON (1<<5) /* Bit 5: Byte Counter Test Mode on */ #define BC_TEST_OFF (1<<4) /* Bit 4: Byte Counter Test Mode off */ #define TEST_STEP04 (1<<3) /* Bit 3: Inc AC/Dec BC by 4 */ #define TEST_STEP03 (1<<2) /* Bit 2: Inc AC/Dec BC by 3 */ #define TEST_STEP02 (1<<1) /* Bit 1: Inc AC/Dec BC by 2 */ #define TEST_STEP01 (1<<0) /* Bit 0: Inc AC/Dec BC by 1 */
/* B5_<xx>_T3 32 bit Test Register 3 (xx) */ /* Note: This register is only defined for the transmit queues */ /* Bit 31..8: reserved */ #define T3_MUX_2 (1<<7) /* Bit 7: (ML) Mux position MSB */ #define T3_VRAM_2 (1<<6) /* Bit 6: (ML) Virtual RAM buffer addr MSB */ #define T3_LOOP (1<<5) /* Bit 5: Set Loopback (Xmit) */ #define T3_UNLOOP (1<<4) /* Bit 4: Unset Loopback (Xmit) */ #define T3_MUX (3<<2) /* Bit 3..2: Mux position */ #define T3_VRAM (3<<0) /* Bit 1..0: Virtual RAM buffer Address */
/* Special timer macro for 82c54 */ /* timer access over data bus bit 8..15 */ #define OUT_82c54_TIMER(port,val) outpw(TI_A(port),(val)<<8) #define IN_82c54_TIMER(port) ((inpw(TI_A(port))>>8) & 0xff)
#ifdef DEBUG #define DB_MAC(mac,st) {if (debug_mac & 0x1)\
printf("M") ;\ if (debug_mac & 0x2)\
printf("\tMAC %d status 0x%08lx\n",mac,st) ;\ if (debug_mac & 0x4)\
dp_mac(mac,st) ;\
}
#define DB_PLC(p,iev) { if (debug_plc & 0x1)\
printf("P") ;\ if (debug_plc & 0x2)\
printf("\tPLC %s Int 0x%04x\n", \
(p == PA) ? "A" : "B", iev) ;\ if (debug_plc & 0x4)\
dp_plc(p,iev) ;\
}
#define DB_TIMER() { if (debug_timer & 0x1)\
printf("T") ;\ if (debug_timer & 0x2)\
printf("\tTimer ISR\n") ;\
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.