rc32438.h
资源名称:idt438.rar [点击查看]
上传用户:yingyi0918
上传日期:2022-06-26
资源大小:214k
文件大小:86k
源码类别:
VxWorks
开发平台:
C/C++
- /* rc32438.h - data definitions for rc32438 interface */
- /* Copyright 1984-2002 Wind River Systems, Inc. */
- #include "copyright_wrs.h"
- /*
- * This file has been developed or significantly modified by the
- * MIPS Center of Excellence Dedicated Engineering Staff.
- * This notice is as per the MIPS Center of Excellence Master Partner
- * Agreement, do not remove this notice without checking first with
- * WR/Platforms MIPS Center of Excellence engineering management.
- */
- /*
- modification history
- --------------------
- 01a,19Oct02,krao New header file for IDT RC32438 Processor.
- */
- /*
- DESCRIPTION
- This file contains constants for initialization and configuration of
- vxWorks on IDT79RC32438 processor.
- The Evaluation Board Manuals and IDT79RC32438 User Reference Manual
- contain full descriptions of the following registers and their uses.
- */
- #ifndef __INCrc32438h
- #define __INCrc32438h
- #ifdef __cplusplus
- extern "C" {
- #endif /*__cplusplus*/
- /* defines */
- /* System identification */
- #define SYSID_BASE 0xB8000018 /* system identification */
- #define SYSID 0xB8000018 /* system identification */
- #if !defined(_ASMLANGUAGE)
- typedef struct sysidstruct
- {
- unsigned int sysid; /* system identification */
- unsigned int devtype; /* Device type */
- } SYSID_STRUCT;
- #define SYSTEMID (*((volatile SYSID_STRUCT *) SYSID_BASE))
- #endif /*_ASMLANGUAGE*/
- /* Reset handler */
- #define RESET_BASE 0xB8008000 /* Reset Register */
- #define RESET 0xB8008000 /* Reset register */
- #if !defined(_ASMLANGUAGE)
- typedef struct resetstruct
- {
- unsigned int reset; /* Reset */
- unsigned int bcv; /* Boot configuration */
- unsigned int cea; /* CPU Error Address */
- } RESET_STRUCT;
- #define RESET_HANDLER (*((volatile RESET_STRUCT *) RESET_BASE))
- #endif /*_ASMLANGUAGE*/
- /* Device controller */
- #define DEVICE_BASE 0xB8010000 /* Device Controller Base */
- #if !defined(_ASMLANGUAGE)
- typedef struct devicenum
- {
- unsigned int devbase; /* Device n base */
- unsigned int devmask; /* Device n mask */
- unsigned int devc; /* Device n control */
- unsigned int devtc; /* Device n timing conf */
- } DEVICE_NUM;
- typedef struct device
- {
- DEVICE_NUM dev0; /* Device 0 */
- DEVICE_NUM dev1; /* Device 1 */
- DEVICE_NUM dev2; /* Device 2 */
- DEVICE_NUM dev3; /* Device 3 */
- DEVICE_NUM dev4; /* Device 4 */
- DEVICE_NUM dev5; /* Device 5 */
- unsigned int btcs; /* Bus timer control & status */
- unsigned int btcompare; /* Bus trans timer compare */
- unsigned int btaddr; /* Bus trans timer address */
- unsigned int devdacs; /* dev decoup ctrl status */
- unsigned int devdaa; /* dev decoup access address */
- unsigned int devdad; /* dev decoup access data */
- unsigned int devspare; /* not defined */
- } DEVICE;
- #define DEVICE (*((volatile DEVICE *) DEVICE_BASE))
- #endif /*_ASMLANGUAGE*/
- /* Device Size (DS) field in DEVxC */
- #define DEVICE_8BIT 0
- #define DEVICE_16BIT 1
- /* DEVxC register */
- #define DEVXC_DS(i) ((i&0x3)<<0) /* DS field */
- #define DEVXC_BE (1<<2) /* BE field */
- #define DEVXC_WP (1<<3) /* WP field */
- #define DEVXC_CSD(i) ((i&0xf)<<4) /* CSD field */
- #define DEVXC_OED(i) ((i&0xf)<<8) /* OED field */
- #define DEVXC_BWD(i) ((i&0xf)<<12) /* BWD field */
- #define DEVXC_RWS(i) ((i&0x3f)<<16) /* RWS field */
- #define DEVXC_WWS(i) ((i&0x3f)<<22) /* WWS field */
- #define DEVXC_BRE (1<<28) /* BRE field */
- #define DEVXC_BWE (1<<29) /* BWE field */
- #define DEVXC_WAM (1<<30) /* WAM field */
- /* DEVxTC register */
- #define DEVXTC_PRD(i) ((i&0xf)<<0) /* PRD field */
- #define DEVXTC_PWD(i) ((i&0xf)<<4) /* PWD field */
- #define DEVXTC_WDH(i) ((i&0x7)<<8) /* WDH field */
- #define DEVXTC_CSH(i) ((i&0x3)<<11) /* CSH field */
- /* BTCS Register*/
- #define BTCS_TT (1<<0) /* TT bit */
- #define BTCS_BTO (1<<1) /* BTO bit */
- #define BTCS_BTE (1<<2) /* BTE bit */
- /* DEVDACS register */
- #define DEVDACS_OP (1<<0) /* OP bit */
- #define DEVDACS_SIZE(i) ((i&0x3)<<1) /* SIZE field */
- #define DEVDACS_ERR (1<<3) /* ERR bit */
- #define DEVDACS_F (1<<4) /* F bit */
- #define DEVDACS_B (1<<5) /* B bit */
- /* DDR controller */
- #define DDR_BASE 0xB8018000 /* DDR Base address */
- #if !defined(_ASMLANGUAGE)
- typedef struct ddrstruct
- {
- unsigned int ddr0base; /* DDR 0 Base */
- unsigned int ddr0mask; /* DDR 0 Mask */
- unsigned int ddr1base; /* DDR 1 Base */
- unsigned int ddr1mask; /* DDR 1 Mask */
- unsigned int ddrc; /* DDR control */
- unsigned int ddr0abase; /* DDR 0 Alternate Base */
- unsigned int ddr0amask; /* DDR 0 Alternate Mask */
- unsigned int ddr0amap; /* DDR 0 Alternate mapping */
- unsigned int ddrcust; /* DDR 0 Custom Transaction */
- unsigned int ddrrdc; /* DDR Read Data Capture */
- unsigned int ddrspare; /* Spare. not used */
- unsigned int _u[4085];
- unsigned int ddrdqsc; /* Reserved for time being */
- unsigned int ddrdllc; /* Reserved for time being */
- unsigned int ddrdllfc; /* Reserved for time being */
- unsigned int ddrdllta; /* Reserved for time being */
- unsigned int ddrdlled; /* Reserved for time being */
- unsigned int ddrdllldf0; /* Reserved for time being */
- unsigned int ddrdllmdf0; /* Reserved for time being */
- unsigned int ddrdlludf0; /* Reserved for time being */
- unsigned int ddrdllldf1; /* Reserved for time being */
- unsigned int ddrdllmdf1; /* Reserved for time being */
- unsigned int ddrdlludf1; /* Reserved for time being */
- unsigned int ddrdllldf2; /* Reserved for time being */
- unsigned int ddrdllmdf2; /* Reserved for time being */
- unsigned int ddrdlludf2; /* Reserved for time being */
- unsigned int ddrdllldf3; /* Reserved for time being */
- unsigned int ddrdllmdf3; /* Reserved for time being */
- unsigned int ddrdlludf3; /* Reserved for time being */
- unsigned int ddrdllldf4; /* Reserved for time being */
- unsigned int ddrdllmdf4; /* Reserved for time being */
- unsigned int ddrdlludf4; /* Reserved for time being */
- unsigned int ddrdllldf5; /* Reserved for time being */
- unsigned int ddrdllmdf5; /* Reserved for time being */
- unsigned int ddrdlludf5; /* Reserved for time being */
- unsigned int ddrdllldf6; /* Reserved for time being */
- unsigned int ddrdllmdf6; /* Reserved for time being */
- unsigned int ddrdlludf6; /* Reserved for time being */
- unsigned int ddrdllldf7; /* Reserved for time being */
- unsigned int _u2; /* Reserved for time being */
- unsigned int ddrdllmdf7; /* Reserved for time being */
- unsigned int ddrdlludf7; /* Reserved for time being */
- } DDR_STRUCT;
- #define DDR (*((volatile DDR_STRUCT *) DDR_BASE))
- #endif /*_ASMLANGUAGE*/
- /* DDRC register */
- #define DDRC_ATA(i) ((i&0x7)<<5) /* Active to Active auto-rfsh */
- #define DDRC_DBW (1<<8) /* Data Bus Width */
- #define DDRC_WR(i) ((i&0x3)<<9) /* Write Recovery */
- #define DDRC_DTYPE(i) ((i&0x1f)<<11) /* DDR Device type */
- #define DDRC_RFC(i) ((i&0xf)<<16) /* Refresh clock cycles */
- #define DDRC_RP(i) ((i&0x3)<<20) /* Precharge delay */
- #define DDRC_AP (1<<22) /* Auto precharge enable */
- #define DDRC_RCD(i) ((i&0x3)<<23) /* active to rd or wr delay */
- #define DDRC_CL(i) ((i&0x3)<<25) /* CAS latency */
- #define DDRC_DBM (1<<27) /* Data Bus Multiplexing */
- #define DDRC_SDS (1<<28) /* Single Data Strobe */
- #define DDRC_ATP(i) ((i&0x3)<<29) /* Active to precharge */
- #define DDRC_RE (1<<31) /* Refresh Enable */
- /* DDR Custom Transacton register */
- #define DDRCUST_CS(i) ((i&0x3)<<0) /* DDR Chip Select */
- #define DDRCUST_WE (1<<2) /* DDR Write Enable */
- #define DDRCUST_RAS (1<<3) /* DDR RAS Status */
- #define DDRCUST_CAS (1<<4) /* DDR CAS Status */
- #define DDRCUST_CKE (1<<5) /* DDR Clock Enable */
- #define DDRCUST_BA(i) ((i&0x3)<<6) /* DDR Bank Address */
- /* DDRRDC register */
- #define DDRRDC_CES(i) ((i&0x3)<<0) /* Capture Edge Select */
- #define DDRRDC_ACE (1<<2) /* Auto Capture Enable */
- /* DDRDQSC register */
- #define DDRDQSC_DM(i) ((i&0x3)<<0)
- #define DDRDQSC_DQSBS(i) ((i&0x3f)<<2)
- /* DDRDLLC register */
- #define DDRDLLC_EAO (1<<0)
- #define DDRDLLC_EO(i) ((i&0xf)<<1)
- #define DDRDLLC_FS(i) ((i&0x3)<<5)
- #define DDRDLLC_AS(i) ((i&0x7)<<7)
- #define DDRDLLC_SP(i) ((i&0x3ff)<<10)
- /* DDRDLLFC register */
- #define DDRDLLFC_MEN (1<<0)
- #define DDRDLLFC_AEN (1<<1)
- #define DDRDLLFC_FF (1<<2)
- /* DDRDLLTA register */
- #define DDRDLLTA_ADDR(i) ((i&0x3fffffff)<<2)
- /* DDRDLLED register */
- #define DDRDLLED_DBE (1<<0)
- #define DDRDLLED_DTE (1<<1)
- #define DDRDLLED_DTW(i) ((i&0x3)<<2)
- /* DDRDLLDF register */
- #define DDRDLLDF_V (1<<0)
- #define DDRDLLDF_DQSDTBI(i) ((i&0x3f)<<1)
- #define DDRDLLDF_LSCDT(i) ((i&0x0x1ffffff)<<7)
- /* DDR type */
- #define DDR_64Mb_2Mx8 2<<11
- #define DDR_128Mb_1Mx32 4<<11
- #define DDR_128Mb_2Mx16 5<<11
- #define DDR_128Mb_4Mx8 6<<11
- #define DDR_256Mb_2Mx32 8<<11
- #define DDR_256Mb_4Mx16 9<<11
- #define DDR_256Mb_8Mx8 10<<11
- #define DDR_512Mb_4Mx32 13<<11
- #define DDR_512Mb_8Mx16 14<<11
- #define DDR_512Mb_16Mx8 15<<11
- #define DDR_1Gb_8Mx32 17<<11
- #define DDR_1Gb_16Mx16 18<<11
- #define DDR_1Gb_32Mx8 19<<11
- /* DDRAM commands */
- #if !defined(_ASMLANGUAGE)
- #define DDRAM_NOP ( DDRCUST_RAS | DDRCUST_CAS | DDRCUST_WE | DDRCUST_CKE |
- DDRCUST_CS(3))
- #define DDRAM_ACTIVE ( DDRCUST_CAS | DDRCUST_WE | DDRCUST_CKE |
- DDRCUST_CS(3))
- #define DDRAM_READ ( DDRCUST_RAS | DDRCUST_WE | DDRCUST_CKE |
- DDRCUST_CS(3))
- #define DDRAM_WRITE ( DDRCUST_RAS | DDRCUST_CKE |
- DDRCUST_CS(3))
- #define DDRAM_REFRESH ( DDRCUST_WE | DDRCUST_CKE |
- DDRCUST_CS(3))
- #define DDRAM_PRECHARGE ( DDRCUST_CAS | DDRCUST_CKE |
- DDRCUST_CS(3))
- #define DDRAM_LOAD ( DDRCUST_CKE |
- DDRCUST_CS(3))
- #endif
- /* PMBus arbiter */
- #define PMBUS_ARBITER_BASE 0xB8020000
- #if !defined(_ASMLANGUAGE)
- typedef struct pmbus_arbiter
- {
- unsigned int pmapp; /* PMBus arbiter processor priority */
- unsigned int pmasac; /* PMBus arbiter sneak access control */
- unsigned int pmaspare;
- } PMBUS_ARBITER;
- #define PMBUS_ARB (*((volatile PMBUS_ARBITER *) PMBUS_ARBITER_BASE))
- #endif /*_ASMLANGUAGE*/
- /* PMAPP register */
- #define PMAPP_P(i) ((i&0x3)<<0) /* PMBus Arbiter processor prio reg */
- /* PMAC register */
- #define PMASAC_P0 (1<<0) /* Priority 0 Sneak Trans Enable */
- #define PMASAC_P1 (1<<1) /* Priority 1 sneak Access Enable */
- #define PMASAC_P2 (1<<2) /* Priority 2 sneak trans enable */
- #define PMASAC_P3 (1<<3) /* Priority 3 sneak trans enable */
- #define PMASAC_POI (1<<4) /* Park on IPBus */
- /* counter timers */
- #define TIMER_BASE 0xB8028000
- #if !defined(_ASMLANGUAGE)
- typedef struct ct
- {
- unsigned int count; /* Count register */
- unsigned int compare; /* Compare register */
- unsigned int ctc; /* Control register */
- } CT;
- typedef struct timerstruct
- {
- CT ct0; /* Counter timer 0 */
- CT ct1; /* Counter timer 1 */
- CT ct2; /* Counter timer 2 */
- unsigned int rcount; /* Refresh timer count */
- unsigned int rcompare; /* Refresh timer compare */
- unsigned int rtc; /* Refresh timer control */
- } TIMER_STRUCT;
- #define TIMER (*((volatile TIMER_STRUCT *) TIMER_BASE))
- #endif /*_ASMLANGUAGE*/
- /* RTC */
- #define RTC_CE (1<<0) /* CE bit */
- #define RTC_TO (1<<1) /* TO bit */
- #define RTC_RQE (1<<2) /* RQE bit */
- #define RTC_EN (1<<0) /* EN bit */
- /* Counter Timer */
- #define CTC_EN (1<<0) /* EN bit */
- #define CTC_TO (1<<1) /* TO bit */
- /* System integrity features */
- #define SYSINTEG_BASE 0xB8030030
- #if !defined(_ASMLANGUAGE)
- typedef struct sysintegstruct
- {
- unsigned int errcs; /* error control and status */
- unsigned int wtcount; /* Watchdog timer count */
- unsigned int wtcompare; /* Watchdog timer compare */
- unsigned int wtc; /* Watchdog timer count */
- } SYSINTEG_STRUCT;
- #define SYSINTEG (*((volatile SYSINTEG_STRUCT *) SYSINTEG_BASE))
- #endif /*_ASMLANGUAGE*/
- /* ERRCS Register */
- #define ERRCS_WTO (1<<0) /* wto bit */
- #define ERRCS_WNE (1<<1) /* wne bit */
- #define ERRCS_UCW (1<<2) /* ucw bit */
- #define ERRCS_UCR (1<<3) /* ucr bit */
- #define ERRCS_UPW (1<<4) /* urw bit */
- #define ERRCS_URP (1<<5) /* urp bit */
- #define ERRCS_UDW (1<<6) /* udw bit */
- #define ERRCS_UDR (1<<7) /* udr bit */
- #define ERRCS_SAE (1<<8) /* sae bit */
- #define ERRCS_WRE (1<<9) /* wre bit */
- /* WTC Register */
- #define WTC_EN (1<<0) /* en bit */
- #define WTC_TO (1<<1) /* to bit */
- /* Interrupt controller */
- #define INTERRUPT_BASE 0xB8038000
- #if !defined(_ASMLANGUAGE)
- typedef struct intrstruct
- {
- unsigned int ipend; /* Interrupt pending reg */
- unsigned int itest; /* Interrupt test reg */
- unsigned int imask; /* Interrupt mask reg */
- } INTR;
- typedef struct interrupt
- {
- INTR i2; /* Interrupt grp 2 */
- INTR i3; /* Interrupt grp 3 */
- INTR i4; /* Interrupt grp 4 */
- INTR i5; /* Interrupt grp 5 */
- INTR i6; /* Interrupt grp 6 */
- unsigned int nmips;
- unsigned int perifspare;
- } INTERRUPT_STRUCT;
- #define INTERRUPT (*((volatile INTERRUPT_STRUCT *) INTERRUPT_BASE))
- #endif /*_ASMLANGUAGE*/
- /* IPEND bits */
- /* IPEND 2 Bits */
- #define IPEND2_COUNTER_TIMER_0 (1 << 0)
- #define IPEND2_COUNTER_TIMER_1 (1 << 1)
- #define IPEND2_COUNTER_TIMER_2 (1 << 2)
- #define IPEND2_REFRESH_TIMER (1 << 3)
- #define IPEND2_WATCHDOG_TIMER (1 << 4)
- #define IPEND2_UNDECODED_CPU_WRITE (1 << 5)
- #define IPEND2_UNDECODED_CPU_READ (1 << 6)
- #define IPEND2_UNDECODED_PCI_WRITE (1 << 7)
- #define IPEND2_UNDECODED_PCI_READ (1 << 8)
- #define IPEND2_UNDECODED_DMA_WRITE (1 << 9)
- #define IPEND2_UNDECODED_DMA_READ (1 << 10)
- #define IPEND2_IPBUS_SAE (1 << 11)
- #define IPEND2_IPMON_FINAL_TRIGGER (1 << 12)
- #define IPEND2_IPMON_REC_COMPLETE (1 << 13)
- #define IPEND2_EVENT_MONITOR0_TRIGGER (1 << 14)
- /* IPEND3 Bits */
- #define IPEND3_DMA_CHANNEL_0 (1 << 0)
- #define IPEND3_DMA_CHANNEL_1 (1 << 1)
- #define IPEND3_DMA_CHANNEL_2 (1 << 2)
- #define IPEND3_DMA_CHANNEL_3 (1 << 3)
- #define IPEND3_DMA_CHANNEL_4 (1 << 4)
- #define IPEND3_DMA_CHANNEL_5 (1 << 5)
- #define IPEND3_DMA_CHANNEL_6 (1 << 6)
- #define IPEND3_DMA_CHANNEL_7 (1 << 7)
- #define IPEND3_DMA_CHANNEL_8 (1 << 8)
- #define IPEND3_DMA_CHANNEL_9 (1 << 9)
- #define IPEND3_DMA_CHANNEL_10 (1 << 10)
- #define IPEND3_DMA_CHANNEL_11 (1 << 11)
- #define IPEND3_DMA_CHANNEL_12 (1 << 12)
- /* IPEND4 Bits */
- #define IPEND4_RANDOM_NUM_GEN (1 << 0)
- #define IPEND4_PUBLIC_KEY_ACC (1 << 1)
- #define IPEND4_SECURITY_ENGINE (1 << 2)
- /* IPEND5 Bits */
- #define IPEND5_UART_GENERAL_0 (1 << 0)
- #define IPEND5_UART_TXRDY_0 (1 << 1)
- #define IPEND5_UART_RXRDY_0 (1 << 2)
- #define IPEND5_UART_GENERAL_1 (1 << 3)
- #define IPEND5_UART_TXRDY_1 (1 << 4)
- #define IPEND5_UART_RXRDY_1 (1 << 5)
- #define IPEND5_PCI_INTERRUPT (1 << 6)
- #define IPEND5_PCI_DECOUPLED_ACCESS (1 << 7)
- #define IPEND5_SPI_INTERRUPT (1 << 8)
- #define IPEND5_DEVICE_DECOUPLED_OP_DONE (1 << 9)
- #define IPEND5_I2C_MASTER (1 << 10)
- #define IPEND5_I2C_SLAVE (1 << 11)
- #define IPEND5_ETHERNET0_OVERFLOW (1 << 12)
- #define IPEND5_ETHERNET0_UNDERFLOW (1 << 13)
- #define IPEND5_ETHERNET0_PAUSE_FRAME_DONE (1 << 14)
- #define IPEND5_ETHERNET1_OVERFLOW (1 << 15)
- #define IPEND5_ETHERNET1_UNDERFLOW (1 << 16)
- #define IPEND5_ETHERNET1_PAUSE_FRAME_DONE (1 << 17)
- /* IPEND6 Bits */
- #define IPEND6_GPIO_0_INTERRUPT (1 << 0)
- #define IPEND6_GPIO_1_INTERRUPT (1 << 1)
- #define IPEND6_GPIO_2_INTERRUPT (1 << 2)
- #define IPEND6_GPIO_3_INTERRUPT (1 << 3)
- #define IPEND6_GPIO_4_INTERRUPT (1 << 4)
- #define IPEND6_GPIO_5_INTERRUPT (1 << 5)
- #define IPEND6_GPIO_6_INTERRUPT (1 << 6)
- #define IPEND6_GPIO_7_INTERRUPT (1 << 7)
- #define IPEND6_GPIO_8_INTERRUPT (1 << 8)
- #define IPEND6_GPIO_9_INTERRUPT (1 << 9)
- #define IPEND6_GPIO_10_INTERRUPT (1 << 10)
- #define IPEND6_GPIO_11_INTERRUPT (1 << 11)
- #define IPEND6_GPIO_12_INTERRUPT (1 << 12)
- #define IPEND6_GPIO_13_INTERRUPT (1 << 13)
- #define IPEND6_GPIO_14_INTERRUPT (1 << 14)
- #define IPEND6_GPIO_15_INTERRUPT (1 << 15)
- #define IPEND6_GPIO_16_INTERRUPT (1 << 16)
- #define IPEND6_GPIO_17_INTERRUPT (1 << 17)
- #define IPEND6_GPIO_18_INTERRUPT (1 << 18)
- #define IPEND6_GPIO_19_INTERRUPT (1 << 19)
- #define IPEND6_GPIO_20_INTERRUPT (1 << 20)
- #define IPEND6_GPIO_21_INTERRUPT (1 << 21)
- #define IPEND6_GPIO_22_INTERRUPT (1 << 22)
- #define IPEND6_GPIO_23_INTERRUPT (1 << 23)
- #define IPEND6_GPIO_24_INTERRUPT (1 << 24)
- #define IPEND6_GPIO_25_INTERRUPT (1 << 25)
- #define IPEND6_GPIO_26_INTERRUPT (1 << 26)
- #define IPEND6_GPIO_27_INTERRUPT (1 << 27)
- #define IPEND6_GPIO_28_INTERRUPT (1 << 28)
- #define IPEND6_GPIO_29_INTERRUPT (1 << 29)
- #define IPEND6_GPIO_30_INTERRUPT (1 << 30)
- #define IPEND6_GPIO_31_INTERRUPT (1 << 31)
- /* indices for interupt vectors in ISR vector table */
- #define COUNTER_TIMER_0 (32*0 + 0)
- #define COUNTER_TIMER_1 (32*0 + 1)
- #define COUNTER_TIMER_2 (32*0 + 2)
- #define REFRESH_TIMER (32*0 + 3)
- #define WATCHDOG_TIMER (32*0 + 4)
- #define UNDECODED_CPU_WRITE (32*0 + 5)
- #define UNDECODED_CPU_READ (32*0 + 6)
- #define UNDECODED_PCI_WRITE (32*0 + 7)
- #define UNDECODED_PCI_READ (32*0 + 8)
- #define UNDECODED_DMA_WRITE (32*0 + 9)
- #define UNDECODED_DMA_READ (32*0 + 10)
- #define IPBUS_SAE (32*0 + 11)
- #define IPMON_FINAL_TRIGGER (32*0 + 12)
- #define IPMON_REC_COMPLETE (32*0 + 13)
- #define EVENT_MONITOR0_TRIGGER (32*0 + 14)
- #define DMA_CHANNEL_0 (32*1 + 0)
- #define DMA_CHANNEL_1 (32*1 + 1)
- #define DMA_CHANNEL_2 (32*1 + 2)
- #define DMA_CHANNEL_3 (32*1 + 3)
- #define DMA_CHANNEL_4 (32*1 + 4)
- #define DMA_CHANNEL_5 (32*1 + 5)
- #define DMA_CHANNEL_6 (32*1 + 6)
- #define DMA_CHANNEL_7 (32*1 + 7)
- #define DMA_CHANNEL_8 (32*1 + 8)
- #define DMA_CHANNEL_9 (32*1 + 9)
- #define DMA_CHANNEL_10 (32*1 + 10)
- #define DMA_CHANNEL_11 (32*1 + 11)
- #define DMA_CHANNEL_12 (32*1 + 12)
- #define RANDOM_NUM_GEN (32*2 + 0)
- #define PUBLIC_KEY_ACC (32*2 + 1)
- #define SECURITY_ENGINE (32*2 + 2)
- #define UART_GENERAL_0 (32*3 + 0)
- #define UART_TXRDY_0 (32*3 + 1)
- #define UART_RXRDY_0 (32*3 + 2)
- #define UART_GENERAL_1 (32*3 + 3)
- #define UART_TXRDY_1 (32*3 + 4)
- #define UART_RXRDY_1 (32*3 + 5)
- #define PCI_INTERRUPT (32*3 + 6)
- #define PCI_DECOUPLED_ACCESS (32*3 + 7)
- #define SPI_INTERRUPT (32*3 + 8)
- #define DEVICE_DECOUPLED_OP_DONE (32*3 + 9)
- #define I2C_MASTER (32*3 + 10)
- #define I2C_SLAVE (32*3 + 11)
- #define ETHERNET0_OVERFLOW (32*3 + 12)
- #define ETHERNET0_UNDERFLOW (32*3 + 13)
- #define ETHERNET0_PAUSE_FRAME_DONE (32*3 + 14)
- #define ETHERNET1_OVERFLOW (32*3 + 15)
- #define ETHERNET1_UNDERFLOW (32*3 + 16)
- #define ETHERNET1_PAUSE_FRAME_DONE (32*3 + 17)
- #define GPIO_0_INTERRUPT (32*4 + 0)
- #define GPIO_1_INTERRUPT (32*4 + 1)
- #define GPIO_2_INTERRUPT (32*4 + 2)
- #define GPIO_3_INTERRUPT (32*4 + 3)
- #define GPIO_4_INTERRUPT (32*4 + 4)
- #define GPIO_5_INTERRUPT (32*4 + 5)
- #define GPIO_6_INTERRUPT (32*4 + 6)
- #define GPIO_7_INTERRUPT (32*4 + 7)
- #define GPIO_8_INTERRUPT (32*4 + 8)
- #define GPIO_9_INTERRUPT (32*4 + 9)
- #define GPIO_10_INTERRUPT (32*4 + 10)
- #define GPIO_11_INTERRUPT (32*4 + 11)
- #define GPIO_12_INTERRUPT (32*4 + 12)
- #define GPIO_13_INTERRUPT (32*4 + 13)
- #define GPIO_14_INTERRUPT (32*4 + 14)
- #define GPIO_15_INTERRUPT (32*4 + 15)
- #define GPIO_16_INTERRUPT (32*4 + 16)
- #define GPIO_17_INTERRUPT (32*4 + 17)
- #define GPIO_18_INTERRUPT (32*4 + 18)
- #define GPIO_19_INTERRUPT (32*4 + 19)
- #define GPIO_20_INTERRUPT (32*4 + 20)
- #define GPIO_21_INTERRUPT (32*4 + 21)
- #define GPIO_22_INTERRUPT (32*4 + 22)
- #define GPIO_23_INTERRUPT (32*4 + 23)
- #define GPIO_24_INTERRUPT (32*4 + 24)
- #define GPIO_25_INTERRUPT (32*4 + 25)
- #define GPIO_26_INTERRUPT (32*4 + 26)
- #define GPIO_27_INTERRUPT (32*4 + 27)
- #define GPIO_28_INTERRUPT (32*4 + 28)
- #define GPIO_29_INTERRUPT (32*4 + 29)
- #define GPIO_30_INTERRUPT (32*4 + 30)
- #define GPIO_31_INTERRUPT (32*4 + 31)
- #define interrupt_bit(x) (1<<(x&0x1f))
- /* DMA controller */
- #define DMA_BASE 0xB8040000 /*DMA BASE REGISER */
- #define DMA0C 0xB8040000 /*DMA 0 Control */
- #define DMA0S 0xB8040004 /*DMA 0 status */
- #define DMA0SM 0xB8040008 /*DMA 0 Status Mask */
- #define DMA0DPTR 0xB804000C /*DMA 0 Descriptor Pointer */
- #define DMA0NDPTR 0xB8040010 /*DMA 0 next Descriptor Pointer*/
- #define DMA1C 0xB8040014 /*DMA 1 Control */
- #define DMA1S 0xB8040018 /*DMA 1 Status */
- #define DMA1SM 0xB804001C /*DMA 1 Status Mask */
- #define DMA1DPTR 0xB8040020 /*DMA 1 Descriptor Pointer */
- #define DMA1NDPTR 0xB8040024 /*DMA 1 Next Descriptor Pointer */
- #define DMA2C 0xB8040028 /*DMA 2 Control */
- #define DMA2S 0xB804002C /*DMA 2 Status */
- #define DMA2SM 0xB8040030 /*DMA 2 Status Mask */
- #define DMA2DPTR 0xB8040034 /*DMA 2 Descriptor Pointer */
- #define DMA2NDPTR 0xB8040038 /*DMA 2 Next Descriptor Pointer */
- #define DMA3C 0xB804003C /*DMA 3 Control */
- #define DMA3S 0xB8040040 /*DMA 3 Status */
- #define DMA3SM 0xB8040044 /*DMA 3 Status Mask */
- #define DMA3DPTR 0xB8040048 /*DMA 3 Descriptor Pointer */
- #define DMA3NDPTR 0xB804004C /*DMA 3 Next Descriptor Pointer */
- #define DMA4C 0xB8040050 /*DMA 4 Control */
- #define DMA4S 0xB8040054 /*DMA 4 Status */
- #define DMA4SM 0xB8040058 /*DMA 4 Status Mask */
- #define DMA4DPTR 0xB804005C /*DMA 4 Descriptor Pointer */
- #define DMA4NDPTR 0xB8040060 /*DMA 4 Next Descriptor Pointer */
- #define DMA5C 0xB8040064 /*DMA 5 Control */
- #define DMA5S 0xB8040068 /*DMA 5 Status */
- #define DMA5SM 0xB804006C /*DMA 5 Status Mask */
- #define DMA5DPTR 0xB8040070 /*DMA 5 Descriptor Pointer */
- #define DMA5NDPTR 0xB8040074 /*DMA 5 Next Descriptor Pointer */
- #define DMA6C 0xB8040078 /*DMA 6 Control */
- #define DMA6S 0xB804007C /*DMA 6 Status */
- #define DMA6SM 0xB8040080 /*DMA 6 Status Mask */
- #define DMA6DPTR 0xB8040084 /*DMA 6 Descriptor Pointer */
- #define DMA6NDPTR 0xB8040088 /*DMA 6 Next Descriptor Pointer */
- #define DMA7C 0xB804008C /*DMA 7 Control */
- #define DMA7S 0xB8040090 /*DMA 7 Status */
- #define DMA7SM 0xB8040094 /*DMA 7 Status Mask */
- #define DMA7DPTR 0xB8040098 /*DMA 7 Descriptor Pointer */
- #define DMA7NDPTR 0xB804009C /*DMA 7 Next Descriptor Pointer */
- #define DMA8C 0xB80400A0 /*DMA 8 Control */
- #define DMA8S 0xB80400A4 /*DMA 8 Status */
- #define DMA8SM 0xB80400A8 /*DMA 8 Status Mask */
- #define DMA8DPTR 0xB80400AC /*DMA 8 Descriptor Pointer */
- #define DMA8NDPTR 0xB80400B0 /*DMA 8 Next Descriptor Pointer */
- #define DMA9C 0xB80400B4 /*DMA 9 Control */
- #define DMA9S 0xB80400B8 /*DMA 9 Status */
- #define DMA9SM 0xB80400BC /*DMA 9 Status Mask */
- #define DMA9DPTR 0xB80400C0 /*DMA 9 Descriptor Pointer */
- #define DMA9NDPTR 0xB80400C4 /*DMA 9 Next Descriptor Pointer */
- #define DMA10C 0xB80400C8 /*DMA 10 Control */
- #define DMA10S 0xB80400CC /*DMA 10 Status */
- #define DMA10SM 0xB80400D0 /*DMA 10 Status Mask */
- #define DMA10DPTR 0xB80400D4 /*DMA 10 Descriptor Pointer */
- #define DMA10NDPTR 0xB80400D8 /*DMA 10 Next Descriptor Pointer */
- #define DMA11C 0xB80400DC /*DMA 11 Control */
- #define DMA11S 0xB80400E0 /*DMA 11 Status */
- #define DMA11SM 0xB80400E4 /*DMA 11 Status Mask */
- #define DMA11DPTR 0xB80400E8 /*DMA 11 Descriptor Pointer */
- #define DMA11NDPTR 0xB80400EC /*DMA 11 Next Descriptor Pointer */
- #define DMA12C 0xB80400F0 /*DMA 12 Control */
- #define DMA12S 0xB80400F4 /*DMA 12 Status */
- #define DMA12SM 0xB80400F8 /*DMA 12 Status Mask */
- #define DMA12DPTR 0xB80400FC /*DMA 12 Descriptor Pointer */
- #define DMA12NDPTR 0xB8040100 /*DMA 12 Next Descriptor Pointer */
- #if !defined(_ASMLANGUAGE)
- typedef struct dmachan
- {
- unsigned int dmac; /* DMA Control */
- unsigned int dmas; /* DMA Status */
- unsigned int dmasm; /* DMA Status mask */
- unsigned int dmadptr; /* DMA Descriptor ptr */
- unsigned int dmandptr; /* DMA Next Descriptor ptr */
- } DMA_CHAN;
- typedef struct dmastruct
- {
- DMA_CHAN ch0; /* DMA Channel 0 */
- DMA_CHAN ch1; /* DMA Channel 1 */
- DMA_CHAN ch2; /* DMA Channel 2 */
- DMA_CHAN ch3; /* DMA Channel 3 */
- DMA_CHAN ch4; /* DMA Channel 4 */
- DMA_CHAN ch5; /* DMA Channel 5 */
- DMA_CHAN ch6; /* DMA Channel 6 */
- DMA_CHAN ch7; /* DMA Channel 7 */
- DMA_CHAN ch8; /* DMA Channel 8 */
- DMA_CHAN ch9; /* DMA Channel 9 */
- DMA_CHAN ch10; /* DMA Channel 10 */
- DMA_CHAN ch11; /* DMA Channel 11 */
- DMA_CHAN ch12; /* DMA Channel 12 */
- unsigned int dmaspare;
- } DMA_STRUCT;
- #define DMA (*((volatile DMA *) DMA_BASE))
- #endif /*_ASMLANGUAGE*/
- /* macro to convert from virtual to physical address */
- #define PHYS_ADDR(x) (x & 0x1fffffff)
- /* DMA descriptor */
- #define DMA_FINISHED (1<<31) /* F bit */
- #define DMA_DONE (1<<30) /* D bit */
- #define DMA_TERMINATED (1<<29) /* T bit */
- #define DMA_IOD (1<<28) /* IOD bit */
- #define DMA_IOF (1<<27) /* IOF bit */
- #define DMA_COD (1<<26) /* COD bit */
- #define DMA_COF (1<<25) /* COF bit */
- #define DMA_DEVCMD(i) ((i&0x7)<<22) /* DEVCMD field */
- #define DMA_DS(i) ((i&0x3)<<20) /* DS field */
- #define DMA_COUNT(i) (i&0x3ffff) /* COUNT field */
- /* DMA Memory to Memory DMA_DEVCMD Transfer Sizes */
- #define DMA_TS_BYTE (0<<0)
- #define DMA_TS_HALFWORD (1<<0)
- #define DMA_TS_1_WORD (2<<0)
- #define DMA_TS_2_WORDS (3<<0)
- #define DMA_TS_4_WORDS (4<<0)
- #define DMA_TS_6_WORDS (5<<0)
- #define DMA_TS_8_WORDS (6<<0)
- #define DMA_TS_16_WORDS (7<<0)
- #if !defined(_ASMLANGUAGE)
- typedef volatile struct dma_descriptor
- {
- unsigned int control; /* DMA Descriptor control */
- unsigned int ca; /* DMA Current address */
- unsigned int devcs; /* DMA DEVCS */
- volatile struct dma_descriptor *link;
- } DMA_DESCRIPTOR;
- #endif
- /* DMAXC register */
- #define DMAXC_RUN (1<<0) /* RUN bit */
- #define DMAXC_DM (1<<1) /* DM bit */
- #define DMAXC_MODE(i) ((i&0x3)<<2) /* MODE field */
- #define DMAXC_ABORT (1<<4) /* ABORT bit */
- /* DMA modes */
- #define DMA_AUTO_REQUEST 0
- #define DMA_BURST_REQUEST 1
- #define DMA_TRANSFER_REQUEST 2
- /* DMAXS register */
- #define DMAXS_F (1<<0) /* F bit */
- #define DMAXS_D (1<<1) /* D bit */
- #define DMAXS_C (1<<2) /* C bit */
- #define DMAXS_E (1<<3) /* E bit */
- #define DMAXS_H (1<<4) /* H bit */
- /* IPBus Arbiter */
- #define IPARB_BASE 0xB8044000
- #if !defined(_ASMLANGUAGE)
- typedef struct iparbstruct
- {
- unsigned int ipap0c; /* IPBus arb prio 0 conf*/
- unsigned int ipap1c; /* IPBus arb prio 1 conf*/
- unsigned int ipap2c; /* IPBus arb prio 2 conf*/
- unsigned int ipap3c; /* IPBus arb prio 3 conf*/
- unsigned int ipabm0c; /* IPBus arb bus master0 conf*/
- unsigned int ipabm1c; /* IPBus arb bus master1 conf*/
- unsigned int ipabm2c; /* IPBus arb bus master2 conf*/
- unsigned int ipabm3c; /* IPBus arb bus master3 conf*/
- unsigned int ipabm4c; /* IPBus arb bus master4 conf*/
- unsigned int ipabm5c; /* IPBus arb bus master5 conf*/
- unsigned int ipabm6c; /* IPBus arb bus master6 conf*/
- unsigned int ipabm7c; /* IPBus arb bus master7 conf*/
- unsigned int ipabm8c; /* IPBus arb bus master8 conf*/
- unsigned int ipabm9c; /* IPBus arb bus master9 conf*/
- unsigned int ipabm10c; /* IPBus arb bus master10 conf*/
- unsigned int ipabm11c; /* IPBus arb bus master11 conf*/
- unsigned int ipabm12c; /* IPBus arb bus master12 conf*/
- unsigned int ipabm13c; /* IPBus arb bus master13 conf*/
- unsigned int ipabm14c; /* IPBus arb bus master14 conf*/
- unsigned int ipabm15c; /* IPBus arb bus master15 conf*/
- unsigned int ipabm16c; /* IPBus arb bus master16 conf*/
- unsigned int ipac; /* IPBus arb control */
- unsigned int ipaitcc; /* IPBus arb idle tran cycle */
- unsigned int ipaspare;
- } IPARB_STRUCT;
- #define IPARB (*((volatile IPARB_STRUCT *) IPARB_BASE))
- #endif /*_ASMLANGUAGE*/
- /* IPBus arbiter control register */
- #define IPAC_DP (1<<0)
- #define IPAC_EP (1<<1)
- #define IPAC_DRM (1<<2)
- #define IPAC_DWM (1<<3)
- #define IPAC_MSK (1<<4)
- /* IPBus aribiter priority configuration registers */
- #define IPAPXC_PTC(i) ((i&0x3fff)<<0)
- #define IPAPXC_MF (1<<14)
- #define IPAPXC_CPTC(i) ((i&0x3fff)<<16)
- /* IPBus arbiter bus master configuration registers */
- #define IPABMXC_MTC(i) ((i&0xfff)<<0)
- #define IPABMXC_P(i) ((i&0x3)<<12)
- #define IPABMXC_MSK (1<<14)
- #define IPABMXC_CMTC(i) ((i&0xfff)<<16)
- /* GPIO */
- #define GPIO_BASE 0xB8048000
- #if !defined(_ASMLANGUAGE)
- typedef struct gpiostruct
- {
- unsigned int gpiofunc; /* GPIO Function register */
- unsigned int gpiocfg; /* GPIO Config register */
- unsigned int gpiod; /* GPIO data register */
- unsigned int gpioilevel; /* GPIO Interrupt level */
- unsigned int gpioistat; /* GPIO Interrupt status reg */
- unsigned int gpionmien; /* GPIO NMI Enable */
- } GPIO_STRUCT;
- #define GPIO (*((volatile GPIO_STRUCT *) GPIO_BASE))
- #endif /*_ASMLANGUAGE*/
- /* GPIO ALTERNATE FUNCTION */
- #define GPIO_U0SOUT (1<<0)
- #define GPIO_U0SINP (1<<1)
- #define GPIO_U0RIN (1<<2)
- #define GPIO_U0DCDN (1<<3)
- #define GPIO_U0DTRN (1<<4)
- #define GPIO_U0DSRN (1<<5)
- #define GPIO_U0RTSN (1<<6)
- #define GPIO_U0CTSN (1<<7)
- #define GPIO_U1SOUT (1<<8)
- #define GPIO_U1SINP (1<<9)
- #define GPIO_U1DTRN (1<<10)
- #define GPIO_U1DSRN (1<<11)
- #define GPIO_U1RTSN (1<<12)
- #define GPIO_U1CTSN (1<<13)
- #define GPIO_DMAREQN0 (1<<14)
- #define GPIO_DMAREQN1 (1<<15)
- #define GPIO_DMADONEN0 (1<<16)
- #define GPIO_DMADONEN1 (1<<17)
- #define GPIO_DMAFINN0 (1<<18)
- #define GPIO_DMAFINN1 (1<<19)
- #define GPIO_MADDR22 (1<<20)
- #define GPIO_MADDR23 (1<<21)
- #define GPIO_MADDR24 (1<<22)
- #define GPIO_MADDR25 (1<<23)
- #define GPIO_PCIREQ4 (1<<24)
- #define GPIO_AFSPARE1 (1<<25)
- #define GPIO_PCIGNT4 (1<<26)
- #define GPIO_PCIREQ5 (1<<27)
- #define GPIO_PCIGNT5 (1<<28)
- #define GPIO_IPBM_TRIG_IN (1<<29)
- #define GPIO_PCIMUINTN (1<<30)
- #define GPIO_RNGCLK (1<<31)
- /* UART */
- #define UART_BASE 0xB8050000
- #if !defined(_ASMLANGUAGE)
- typedef struct uartstruct
- {
- unsigned int uart0rb_th_dll;
- unsigned int uart0ie_dlh;
- unsigned int uart0ii_fc;
- unsigned int uart0lc;
- unsigned int uart0mc;
- unsigned int uart0ls;
- unsigned int uart0ms;
- unsigned int uart0s;
- unsigned int uart1rb_th_dll;
- unsigned int uart1ie_dlh;
- unsigned int uart1ii_fc;
- unsigned int uart1lc;
- unsigned int uart1mc;
- unsigned int uart1ls;
- unsigned int uart1ms;
- unsigned int uart1s;
- unsigned int uart0rr;
- unsigned int uart1rr;
- } UART_STRUCT;
- #define UART (*((volatile UART_STRUCT *) UART_BASE))
- #endif /*_ASMLANGUAGE*/
- /* UART Interrupt Enable */
- #define UARTIE_RDA (1<<0) /* rda bit */
- #define UARTIE_THE (1<<1) /* the bit */
- #define UARTIE_RLS (1<<2) /* rls bit */
- #define UARTIE_EMS (1<<3) /* ems bit */
- /* UART Interrupt Identification */
- #define UARTII_PI (1<<0) /* pi bit */
- #define UARTII_IID(i) ((i&0x7)<<1) /* iid field */
- #define UARTII_FIFOEN(i) ((i&0x3)<<6) /* fifoen field */
- /* UART Fifo Control */
- #define UARTFC_EN (1<<0) /* en bit */
- #define UARTFC_RR (1<<1) /* rr bit */
- #define UARTFC_TR (1<<2) /* tr bit */
- #define UARTFC_DMS (1<<3) /* dms bit */
- #define UARTFC_RT(i) ((i&0x3)<<6) /* rt field */
- /* UART Line Control */
- #define UARTLC_WLS(i) ((i&0x3)<<0) /* wls field */
- #define UARTLC_STB (1<<2) /* stb bit */
- #define UARTLC_PEN (1<<3) /* pen bit */
- #define UARTLC_EPS (1<<4) /* eps bit */
- #define UARTLC_SP (1<<5) /* sp bit */
- #define UARTLC_SB (1<<6) /* sb bit */
- #define UARTLC_DLAB (1<<7) /* dlab bit */
- /* UART Modem control */
- #define UARTMC_DTR (1<<0) /* dtr bit */
- #define UARTMC_RTS (1<<1) /* rts bit */
- #define UARTMC_O1 (1<<2) /* o1 bit */
- #define UARTMC_O2 (1<<3) /* o2 bit */
- #define UARTMC_LP (1<<4) /* lp bit */
- /* UART Line Status */
- #define UARTLS_DR (1<<0) /* dr bit */
- #define UARTLS_OE (1<<1) /* oe bit */
- #define UARTLS_PE (1<<2) /* pe bit */
- #define UARTLS_FE (1<<3) /* fe bit */
- #define UARTLS_BI (1<<4) /* bi bit */
- #define UARTLS_THR (1<<5) /* thr bit */
- #define UARTLS_TE (1<<6) /* te bit */
- #define UARTLS_RFE (1<<7) /* rfe bit */
- /* UART modem status */
- #define UARTMS_DCTS (1<<0) /* dcts bit */
- #define UARTMS_DDSR (1<<1) /* ddsr bit */
- #define UARTMS_TERI (1<<2) /* teri bit */
- #define UARTMS_DDCD (1<<3) /* ddcd bit */
- #define UARTMS_CTS (1<<4) /* cts bit */
- #define UARTMS_DSR (1<<5) /* dsr bit */
- #define UARTMS_RI (1<<6) /* ri bit */
- #define UARTMS_DCD (1<<7) /* dcd bit */
- /* Ethernet interfaces */
- #define ETHERNET0_BASE 0xB8058000
- #if !defined(_ASMLANGUAGE)
- typedef struct ethernet0struct
- {
- unsigned int eth0intfc; /* Ether 0 interface ctrl */
- unsigned int eth0fifott; /* Ether 0 FIFO TX Threshold */
- unsigned int eth0arc; /* Ether 0 addr recog ctrl */
- unsigned int eth0hash0; /* Ether 0 hash table 0 */
- unsigned int eth0hash1; /* Ether 0 hash table 1 */
- unsigned int _u0[4];;
- unsigned int eth0pfs; /* Ether 0 pause frame stat */
- unsigned int ethmcp; /* Ether manage clk pre scalar*/
- unsigned int _u1[10];
- unsigned int eth0spare;
- unsigned int _u2[42];
- unsigned int eth0sal0; /* Ether 0 station addr 0 low */
- unsigned int eth0sah0; /* Ether 0 station addr 0 high*/
- unsigned int eth0sal1; /* Ether 0 station addr 1 low */
- unsigned int eth0sah1; /* Ether 0 station addr 1 high*/
- unsigned int eth0sal2; /* Ether 0 station addr 2 low */
- unsigned int eth0sah2; /* Ether 0 station addr 2 high*/
- unsigned int eth0sal3; /* Ether 0 station addr 3 low */
- unsigned int eth0sah3; /* Ether 0 station addr 3 high*/
- unsigned int eth0rbc; /* Ether 0 RX byte count */
- unsigned int eth0rpc; /* Ether 0 RX packet cnt */
- unsigned int eth0rupc; /* Ether 0 RX packet undersize*/
- unsigned int eth0rfc; /* Ether 0 RX Fragment count */
- unsigned int eth0tbc; /* Ether 0 TX Byte count */
- unsigned int eth0gpf; /* Ether 0 gen pause frame */
- unsigned int _u9[50];
- unsigned int eth0mac1; /* Ether 0 MAC Config 1 */
- unsigned int eth0mac2; /* Ether 0 MAC Config 2 */
- unsigned int eth0ipgt; /* Ether 0 btob inter pack gap*/
- unsigned int eth0ipgr; /* Ether 0 non btob "" "" "" */
- unsigned int eth0clrt; /* Ether 0 collison win retry */
- unsigned int eth0maxf; /* Ether 0 max frame length */
- unsigned int _u10;
- unsigned int eth0mtest; /* Ether 0 MAC Test */
- unsigned int miimcfg; /* MII Management config */
- unsigned int miimcmd; /* MII Management command */
- unsigned int miimaddr; /* MII Management address */
- unsigned int miimwtd; /* MII Management write data */
- unsigned int miimrdd; /* MII Management read data */
- unsigned int miimind; /* MII management indicators */
- unsigned int _u11;
- unsigned int _u12;
- unsigned int eth0cfsa0; /* Ether 0 ctrl frm st addr 0 */
- unsigned int eth0cfsa1; /* Ether 0 ctrl frm st addr 1 */
- unsigned int eth0cfsa2; /* Ether 0 ctrl frm st addr 2 */
- } ETHERNET0;
- #define ETH0 (*((volatile ETHERNET0 *) ETHERNET0_BASE))
- #endif /*_ASMLANGUAGE*/
- /* Ethernet interface control */
- #define ETHERINTFC_EN (1<<0)
- #define ETHERINTFC_ITS (1<<1)
- #define ETHERINTFC_RES (1<<2)
- #define ETHERINTFC_RIP (1<<2)
- #define ETHERINTFC_JAM (1<<3)
- #define ETHERINTFC_OVR (1<<4)
- #define ETHERINTFC_UND (1<<5)
- /* Ethernet FIFO transmit threshold */
- #define ETHERFIFOTT_TTH(i) ((i&0x7f)<<0)
- /* Ethernet address recognition control */
- #define ETHERARC_PRO (1<<0)
- #define ETHERARC_AM (1<<1)
- #define ETHERARC_AFM (1<<2)
- #define ETHERARC_AB (1<<3)
- /* Ethernet hash table */
- #define ETHERHASH0(i) ((i&0xffff)<<0)
- #define ETHERHASH1(i) ((i&0xffff)<<0)
- /* Ethernet station address */
- #define ETHERSAL0(i) ((i&0xffff)<<0)
- #define ETHERSAL1(i) ((i&0xffff)<<0)
- #define ETHERSAL2(i) ((i&0xffff)<<0)
- #define ETHERSAL3(i) ((i&0xffff)<<0)
- #define ETHERSAH0(i) ((i&0xff)<<0)
- #define ETHERSAH1(i) ((i&0xff)<<0)
- #define ETHERSAH2(i) ((i&0xff)<<0)
- #define ETHERSAH3(i) ((i&0xff)<<0)
- /* Statistics registers */
- #define ETHERRBC(i) ((i&0xffff)<<0)
- #define ETHERRPC(i) ((i&0xffff)<<0)
- #define ETHERRUPC(i) ((i&0xffff)<<0)
- #define ETHERRFC(i) ((i&0xffff)<<0)
- #define ETHERTBC(i) ((i&0xffff)<<0)
- /* Ethernet generate pause frame */
- #define ETHERGPF_PTV(i) ((i&0xffff)<<0)
- /*Ethernet MAC1 config register */
- #define ETHERMAC1_RE (1<<0)
- #define ETHERMAC1_PAF (1<<1)
- #define ETHERMAC1_RFC (1<<2)
- #define ETHERMAC1_TFC (1<<3)
- #define ETHERMAC1_LB (1<<4)
- #define ETHERMAC1_MR (1<<15)
- /*Ethernet MAC2 config register*/
- #define ETHERMAC2_FD (1<<0)
- #define ETHERMAC2_FLC (1<<1)
- #define ETHERMAC2_HFE (1<<2)
- #define ETHERMAC2_DC (1<<3)
- #define ETHERMAC2_CEN (1<<4)
- #define ETHERMAC2_PE (1<<5)
- #define ETHERMAC2_VPE (1<<6)
- #define ETHERMAC2_APE (1<<7)
- #define ETHERMAC2_PPE (1<<8)
- #define ETHERMAC2_LPE (1<<9)
- #define ETHERMAC2_NB (1<<12)
- #define ETHERMAC2_BP (1<<13)
- #define ETHERMAC2_ED (1<<14)
- /*Ethernet pause frame status */
- #define ETHPFS_PFD (1<<0)
- /*Ethernet back to back interpacket gap */
- #define ETHERIPGT(i) ((i&0x7f)<<0)
- /*Ethernet non back to back interpacket gap */
- #define ETHERIPGR_IPGR1(i) ((i&0x7f)<<0)
- #define ETHERIPGR_IPGR2(i) ((i&0x7f)<<8)
- /*Ethernet 0 collision window retry */
- #define ETHERCLRT_MAXRET(i) ((i&0xf)<<0)
- #define ETHERCLRT_COLWIN(i) ((i&0x3f)<<8)
- /*Ethernet maximum frame lenght */
- #define ETHERMAXF(i) ((i&0xffff)<<0)
- /*Ethernet MAC Test */
- #define ETHERMTEST_TB (1<<2)
- /* Ethernet management clock prescalar */
- #define ETHERMCP_DIV(i) ((i&0xff)<<0)
- /*MII management configuration */
- #define MIIMCFG_RSV(i) ((i&0x3)<<2)
- #define MIIMCFG_R (1<<15)
- /*MII management command */
- #define MIIMCMD_RD (1<<0)
- #define MIIMCMD_SCN (1<<1)
- /*MII management address */
- #define MIIMADDR_REGADDR(i) ((i&0x1f)<<0)
- #define MIIMADDR_PHYADDR(i) ((i&0x1f)<<8)
- /*MII management indicators */
- #define MIIMIND_BSY (1<<0)
- #define MIIMIND_SCN (1<<1)
- #define MIIMIND_NV (1<<2)
- /*DMA DEVCS IN */
- #define ETHERDMA_IN_LENGTH(i) ((i&0xffff)<<16)
- #define ETHERDMA_IN_CES (1<<14)
- #define ETHERDMA_IN_LOR (1<<13)
- #define ETHERDMA_IN_LE (1<<12)
- #define ETHERDMA_IN_DB (1<<11)
- #define ETHERDMA_IN_CV (1<<10)
- #define ETHERDMA_IN_CRC (1<<9)
- #define ETHERDMA_IN_OVR (1<<8)
- #define ETHERDMA_IN_CF (1<<7)
- #define ETHERDMA_IN_VLT (1<<6)
- #define ETHERDMA_IN_BP (1<<5)
- #define ETHERDMA_IN_MP (1<<4)
- #define ETHERDMA_IN_FM (1<<3)
- #define ETHERDMA_IN_ROK (1<<2)
- #define ETHERDMA_IN_LD (1<<1)
- #define ETHERDMA_IN_FD (1<<0)
- /*DMA DEVCS OUT */
- #define ETHERDMA_OUT_CC(i) ((i&0xf)<<17)
- #define ETHERDMA_OUT_LE (1<<16)
- #define ETHERDMA_OUT_CRC (1<<15)
- #define ETHERDMA_OUT_TD (1<<14)
- #define ETHERDMA_OUT_LC (1<<13)
- #define ETHERDMA_OUT_EC (1<<12)
- #define ETHERDMA_OUT_ED (1<<11)
- #define ETHERDMA_OUT_OF (1<<10)
- #define ETHERDMA_OUT_UND (1<<9)
- #define ETHERDMA_OUT_BP (1<<8)
- #define ETHERDMA_OUT_MP (1<<7)
- #define ETHERDMA_OUT_TOK (1<<6)
- #define ETHERDMA_OUT_HEN (1<<5)
- #define ETHERDMA_OUT_CEN (1<<4)
- #define ETHERDMA_OUT_PEN (1<<3)
- #define ETHERDMA_OUT_OEN (1<<2)
- #define ETHERDMA_OUT_LD (1<<1)
- #define ETHERDMA_OUT_FD (1<<0)
- #define ETHERNET1_BASE 0xB8060000
- #if !defined(_ASMLANGUAGE)
- typedef struct ethernet1
- {
- unsigned int eth1intfc; /* Ether 1 interface ctrl */
- unsigned int eth1fifott; /* Ether 1 FIFO TX Threshold */
- unsigned int eth1arc; /* Ether 1 addr recog logic */
- unsigned int eth1hash0; /* Ether 1 hash table 0 */
- unsigned int eth1hash1; /* Ether 1 hash table 1 */
- unsigned int _u0[4];;
- unsigned int eth1pfs; /* Ether 1 pause frame status */
- unsigned int ethmcp; /* Reserved */
- unsigned int _u1[10];
- unsigned int eth1spare; /* Reserved */
- unsigned int _u2[42];
- unsigned int eth1sal0; /* Ether 1 station addr 0 low */
- unsigned int eth1sah0; /* Ether 1 station addr 0 high*/
- unsigned int eth1sal1; /* Ether 1 station addr 1 low */
- unsigned int eth1sah1; /* Ether 1 station addr 1 high*/
- unsigned int eth1sal2; /* Ether 1 station addr 2 low */
- unsigned int eth1sah2; /* Ether 1 station addr 2 high*/
- unsigned int eth1sal3; /* Ether 1 station addr 3 low */
- unsigned int eth1sah3; /* Ether 1 station addr 3 high*/
- unsigned int eth1rbc; /* Ether 1 RX Byte count */
- unsigned int eth1rpc; /* Ether 1 RX packet count */
- unsigned int eth1rupc; /* Ether 1 RX under size pkt */
- unsigned int eth1rfc; /* Ether 1 RX fragment cnt */
- unsigned int eth1tbc; /* Ether 1 TX Byte count */
- unsigned int eth1gpf; /* Ether 1 gen pause frame */
- unsigned int _u9[50];
- unsigned int eth1mac1; /* Ether 1 MAC config 1 */
- unsigned int eth1mac2; /* Ether 2 MAC config 2 */
- unsigned int eth1ipgt; /* Ether 1 btob inter pkt gap */
- unsigned int eth1ipgr; /* Ether 1 non btob IPG */
- unsigned int eth1clrt; /* Ether 1 col win rtry */
- unsigned int eth1maxf; /* Ether 1 max frame len */
- unsigned int _u10;
- unsigned int eth1mtest; /* Ether 1 MAC test */
- unsigned int _u11[8];
- unsigned int eth1cfsa0; /* Ether 1 ctrl frm stat addr0*/
- unsigned int eth1cfsa1; /* Ether 1 ctrl frm stat addr1*/
- unsigned int eth1cfsa2; /* Ether 1 ctrl frm stat addr2*/
- } ETHERNET1;
- #define ETH1 (*((volatile ETHERNET1 *) ETHERNET1_BASE))
- #endif /*_ASMLANGUAGE*/
- /* New Combo structure for Both Eth0 AND eth1 */
- #if !defined(_ASMLANGUAGE)
- typedef struct ethernetcombo
- {
- unsigned int ethintfc; /* Ether intfc frame ctrl */
- unsigned int ethfifott; /* Ether FIFO TX Threshold */
- unsigned int etharc; /* Ether addr recog logic */
- unsigned int ethhash0; /* Ether hash table 0 */
- unsigned int ethhash1; /* Ether hash table 1 */
- unsigned int _u0[4];;
- unsigned int ethpfs; /* Ether 1 pause frame stat */
- unsigned int ethmcp; /* Reserved */
- unsigned int _u1[10];
- unsigned int ethspare; /* Reserved */
- unsigned int _u2[42];
- unsigned int ethsal0; /* Ether stat addr 0 low */
- unsigned int ethsah0; /* Ether stat addr 0 high */
- unsigned int ethsal1; /* Ether stat addr 1 low */
- unsigned int ethsah1; /* Ether stat addr 1 high */
- unsigned int ethsal2; /* Ether stat addr 2 low */
- unsigned int ethsah2; /* Ether stat addr 2 high */
- unsigned int ethsal3; /* Ether stat addr 3 low */
- unsigned int ethsah3; /* Ether stat addr 3 high */
- unsigned int ethrbc; /* Ether RX byte count */
- unsigned int ethrpc; /* Ether RX packet count */
- unsigned int ethrupc; /* Ether RX under pack cnt */
- unsigned int ethrfc; /* Ether RX fragment count */
- unsigned int ethtbc; /* Ether TX Byte count */
- unsigned int ethgpf; /* Ether generate pause frame */
- unsigned int _u9[50];
- unsigned int ethmac1; /* Ether MAC Config 1 */
- unsigned int ethmac2; /* Ether MAC Config 2 */
- unsigned int ethipgt; /* Ether btob interpacket gap */
- unsigned int ethipgr; /* Ether btob non interpkt gap*/
- unsigned int ethclrt; /* Ether collison win retry */
- unsigned int ethmaxf; /* Ether max frame length */
- unsigned int _u10;
- unsigned int ethmtest; /* Ether MAC Test */
- unsigned int miimcfg; /* MII Management config */
- unsigned int miimcmd; /* MII Management command */
- unsigned int miimaddr; /* MII Management address */
- unsigned int miimwtd; /* MII Management write data */
- unsigned int miimrdd; /* MII Management read data */
- unsigned int miimind; /* MII management indicators */
- unsigned int _u11;
- unsigned int _u12;
- unsigned int ethcfsa0; /* Ether ctrl frame stat addr */
- unsigned int ethcfsa1; /* Ether ctrl frame stat addr */
- unsigned int ethcfsa2; /* Ether ctrl frame stat addr */
- } ETHERNET_COMBO_STRUCT;
- #define ETHER0 (*((volatile ETHERNET_COMBO_STRUCT *) ETHERNET0_BASE))
- #define ETHER1 (*((volatile ETHERNET_COMBO_STRUCT *) ETHERNET1_BASE))
- #endif /*_ASMLANGUAGE*/
- /* I2C interface */
- #define I2C_BASE 0xB8070000
- #if !defined(_ASMLANGUAGE)
- typedef struct i2cstruct
- {
- unsigned int i2cc; /* I2C bus control */
- unsigned int i2cdi; /* I2C Bus data input */
- unsigned int i2cdo; /* I2C Bus data output */
- unsigned int i2ccp; /* I2C Bus clock prescalar */
- unsigned int i2cmcmd; /* I2C Bus master command */
- unsigned int i2cms; /* I2C Bus master status */
- unsigned int i2cmsm; /* I2C Bus master status mask */
- unsigned int i2css; /* I2C Bus slave status */
- unsigned int i2cssm; /* I2C Bus slave status mask */
- unsigned int i2csaddr; /* I2C Bus slave address */
- unsigned int i2csack; /* I2C Bus slave acknowledge */
- } I2C_STRUCT;
- #define I2C (*((volatile I2C_STRUCT *) I2C_BASE))
- #endif /*_ASMLANGUAGE*/
- /* I2CC register */
- #define I2CC_MEN (1<<0) /* MEN bit */
- #define I2CC_SEN (1<<1) /* SEN bit */
- #define I2CC_IOM (1<<2) /* IOM bit */
- /* I2CMCMD register */
- #define NOP 0
- #define START 1
- #define STOP 2
- #define RD 4
- #define RDACK 5
- #define WD 6
- #define WDACK 7
- #define I2CMCMD_CMD(i) ((i&0xffff)<<0) /* CMD field */
- /* I2CMS register */
- #define I2CMS_D (1<<0) /* D bit */
- #define I2CMS_NA (1<<1) /* No ACK bit */
- #define I2CMS_LA (1<<2) /* LA bit */
- #define I2CMS_ERR (1<<3) /* ERR bit */
- /* I2CSS register */
- #define I2CSS_RR (1<<0) /* RR bit */
- #define I2CSS_WR (1<<1) /* WR bit */
- #define I2CSS_SA (1<<2) /* SA bit */
- #define I2CSS_TF (1<<3) /* TF bit */
- #define I2CSS_GC (1<<4) /* GC bit */
- #define I2CSS_NA (1<<5) /* No ACK bit */
- #define I2CSS_ERR (1<<6) /* ERR bit */
- /* I2CSADDR register */
- #define I2CSADDR_ADDR(i) ((i&0x3ff)<<0) /* ADDR field */
- #define I2CSADDR_GC (1<<10) /* GC bit */
- #define I2CSADDR_A10 (1<<11) /* A10 bit */
- /*I2CSACK register */
- #define I2CSACK_ACK (1<<0) /* ACK bit */
- /*I2CCP register */
- #define I2CCP_DIV(i) ((i&0xffff)<<0) /* DIV field */
- /*I2CDI register */
- #define I2CDI_DATA(i) ((i&0xffff)<<0) /* DATA field */
- /*I2CDO register */
- #define I2CDO_DATA(i) ((i&0xffff)<<0) /* DATA field */
- /* SPI interface */
- #define SPI_BASE 0xB8078000
- #if !defined(_ASMLANGUAGE)
- typedef struct spistruct
- {
- unsigned int spcp; /* SPI Clock Prescalar */
- unsigned int spc; /* SPI control */
- unsigned int sps; /* SPI Status */
- unsigned int spd; /* SPI Data */
- unsigned int siofunc; /* Serial I/O Function */
- unsigned int siocfg; /* Serial I/O Config */
- unsigned int siod; /* Serial I/O Data */
- } SPI_STRUCT;
- #define SPI (*((volatile SPI_STRUCT *) SPI_BASE))
- #endif /*_ASMLANGUAGE*/
- /* SPI Clock PreScalar Register ( SPCP ) */
- #define SPCP_DIV ((i&0xff)<<0)
- /* SPI Control Register ( SPC ) */
- #define SPC_SPR ((i&0x3)<<0)
- #define SPC_CPHA (1<<2)
- #define SPC_CPOL (1<<3)
- #define SPC_MSTR (1<<4)
- #define SPC_SPE (1<<6)
- #define SPC_SPIE (1<<7)
- /* SPI Status Register ( SPS ) */
- #define SPS_MODF (1<<4)
- #define SPS_WCOL (1<<6)
- #define SPS_SPIF (1<<7)
- /* SPI Data Register ( SPD ) */
- #define SPD_DATA ((i&0xff)<<0)
- /* Serial IO Function Register ( SIOFUNC ) */
- #define SIOFUNC_SDO (1<<0)
- #define SIOFUNC_SDI (1<<1)
- #define SIOFUNC_SCK (1<<2)
- #define SIOFUNC_PCI (1<<3)
- /* Serial IO Config Register ( SIOCFG ) */
- #define SIOCFG_SDO (1<<0)
- #define SIOCFG_SDI (1<<1)
- #define SIOCFG_SCK (1<<2)
- #define SIOCFG_PCI (1<<3)
- /* Serial IO Data Register ( SIOD ) */
- #define SIOD_SDO (1<<0)
- #define SIOD_SDI (1<<1)
- #define SIOD_SCK (1<<2)
- #define SIOD_PCI (1<<3)
- /* PCI interface */
- #define PCI_BASE 0xB8080000
- #if !defined(_ASMLANGUAGE)
- typedef struct pcistruct
- {
- unsigned int pcic; /* PCI Control */
- unsigned int pcis; /* PCI Status */
- unsigned int pcism; /* PCI status mask */
- unsigned int pcicfga; /* PCI Config address */
- unsigned int pcicfgd; /* PCI Config Data */
- unsigned int pcilba0; /* PCI lcl base addr 0 */
- unsigned int pcilba0c; /* PCI lcl base addr 0 ctrl */
- unsigned int pcilba0m; /* PCI lcl base addr 0 mapp */
- unsigned int pcilba1; /* PCI lcl base addr 1 */
- unsigned int pcilba1c; /* PCI lcl base addr 1 ctrl */
- unsigned int pcilba1m; /* PCI lcl base addr 1 mapp */
- unsigned int pcilba2; /* PCI lcl base addr 2 */
- unsigned int pcilba2c; /* PCI lcl base addr 2 ctrl */
- unsigned int pcilba2m; /* PCI lcl base addr 2 mapp */
- unsigned int pcilba3; /* PCI lcl base addr 3 */
- unsigned int pcilba3c; /* PCI lcl base addr 2 ctrl */
- unsigned int pcilba3m; /* PCI lcl base addr 3 mapp */
- unsigned int pcidac; /* PCI decoup access ctrl */
- unsigned int pcidas; /* PCI decoup access stat */
- unsigned int pcidasm; /* PCI decoup access stat mask*/
- unsigned int pcidad; /* PCI decoup access data */
- unsigned int pcidma8c; /* PCI DMA 8 Config */
- unsigned int pcidma9c; /* PCI DMA 9 Config */
- unsigned int pcitc; /* PCI Target ctrl */
- unsigned int pcispare0;
- unsigned int pcispare1;
- } PCI_STRUCT;
- #define PCI (*((volatile PCI_STRUCT *) PCI_BASE))
- #endif /*_ASMLANGUAGE*/
- /* PCI Control Register ( PCIC ) */
- #define PCIC_EN (1<<0)
- #define PCIC_TNR (1<<1)
- #define PCIC_SCE (1<<2)
- #define PCIC_IEN (1<<3)
- #define PCIC_AAA (1<<4)
- #define PCIC_EAP (1<<5)
- #define PCIC_PCIM(i) ((i&0x7)<<6)
- #define PCIC_IGM (1<<9)
- /* PCI Status Register ( PCIS ) */
- #define PCIS_EED (1<<0)
- #define PCIS_WR (1<<1)
- #define PCIS_NMI (1<<2)
- #define PCIS_II (1<<3)
- #define PCIS_CWE (1<<4)
- #define PCIS_CRE (1<<5)
- #define PCIS_MDPE (1<<6)
- #define PCIS_STA (1<<7)
- #define PCIS_RTA (1<<8)
- #define PCIS_RMA (1<<9)
- #define PCIS_SSE (1<<10)
- #define PCIS_OSE (1<<11)
- #define PCIS_PE (1<<12)
- #define PCIS_TAE (1<<13)
- #define PCIS_RLE (1<<14)
- #define PCIS_BME (1<<15)
- #define PCIS_PRD (1<<16)
- #define PCIS_RIP (1<<17)
- /* PCI Status Mask Register ( PCISM ) */
- #define PCISM_EED (1<<0)
- #define PCISM_WR (1<<1)
- #define PCISM_NMI (1<<2)
- #define PCISM_II (1<<3)
- #define PCISM_CWE (1<<4)
- #define PCISM_CRE (1<<5)
- #define PCISM_MDPE (1<<6)
- #define PCISM_STA (1<<7)
- #define PCISM_RTA (1<<8)
- #define PCISM_RMA (1<<9)
- #define PCISM_SSE (1<<10)
- #define PCISM_OSE (1<<11)
- #define PCISM_PE (1<<12)
- #define PCISM_TAE (1<<13)
- #define PCISM_RLE (1<<14)
- #define PCISM_BME (1<<15)
- #define PCISM_PRD (1<<16)
- #define PCISM_RIP (1<<17)
- /* PCI Configuration address Register ( PCICFGA ) */
- #define PCICFGA_REG(i) ((i&0x3f)<<2)
- #define PCICFGA_FUNC(i) ((i&0x7)<<8)
- #define PCICFGA_DEV(i) ((i&0x1f)<<11)
- #define PCICFGA_BUS(i) ((i&0xff)<<16)
- #define PCICFGA_EN (1<<31)
- /* PCI Configuration data Register ( PCICFD ) */
- #define PCICFGD_DATA(i) ((i&0xffffffff)<<0)
- /* PCI Local Base Address 0/1/2/3 Register ( PCILBAx ) */
- #define PCILBAX_BADDR(i) ((i&0xffffff)<<8)
- /* PCI Local Base Address 0/1/2/3 Control Register ( PCILBAxC ) */
- #define PCILBAXC_MSI (1<<0)
- #define PCILBAXC_SIZE(i) ((i&0x1f)<<2)
- #define PCILBAXC_SB (1<<7)
- #define PCILBAXC_RT (1<<8)
- /* Local Base Address 0/1/2/3 mapping Register ( PCILBAxM ) */
- #define PCILBAXM_MADDR(i) ((i&0xffffff)<<8)
- /* PCI Decoupled Access control Register ( PCIDAC ) */
- #define PCIDAC_DEN (1<<0)
- /* PCI Decoupled Access Status Register ( PCIDAS ) */
- #define PCIDAS_D (1<<0)
- #define PCIDAS_B (1<<1)
- #define PCIDAS_E (1<<2)
- #define PCIDAS_OFE (1<<3)
- #define PCIDAS_OFF (1<<4)
- #define PCIDAS_IFE (1<<5)
- #define PCIDAS_IFF (1<<6)
- /* PCI Decoupled Access Status Mask Register ( PCIDASM ) */
- #define PCIDASM_D (1<<0)
- #define PCIDASM_B (1<<1)
- #define PCIDASM_E (1<<2)
- #define PCIDASM_OFE (1<<3)
- #define PCIDASM_OFF (1<<4)
- #define PCIDASM_IFE (1<<5)
- #define PCIDASM_IFF (1<<6)
- /* PCI Decoupled Access Data Register ( PCIDAD ) */
- #define PCIDAD_DATA(i) ((i&0xffffffff)<<0)
- /* PCI DMA Channel 8 Configuration Register ( PCIDMA8C ) */
- #define PCIDMA8C_MBS(i) ((i&0xfff)<<0)
- #define PCIDMA8C_OUR (1<<12)
- /* PCI DMA Channel 9 Configuration Register ( PCIDMA9C ) */
- #define PCIDMA9C_MBS(i) ((i&0xfff)<<0)
- /* PCI Target Control Register ( PCITC ) */
- #define PCITC_RTIMER(i) ((i&0xff)<<0)
- #define PCITC_DTIMER(i) ((i&0xff)<<8)
- #define PCITC_RDR (1<<18)
- #define PCITC_DDT (1<<19)
- /* Vendor ID Register ( VENDOR_ID ) */
- #define VENDOR_ID_ID(i) ((i&0xffff)<<0)
- /* Device ID Register ( DEVICE_ID ) */
- #define DEVICE_ID_ID(i) ((i&0xffff)<<0)
- /* Command Register ( COMMAND ) */
- #define COMMAND_IO (1<<0)
- #define COMMAND_MEM (1<<1)
- #define COMMAND_BM (1<<2)
- #define COMMAND_MWI (1<<4)
- #define COMMAND_PEN (1<<6)
- #define COMMAND_SEN (1<<8)
- #define COMMAND_FBB (1<<9)
- /* Status Register ( STATUS ) */
- #define STATUS_M66 (1<<5)
- #define STATUS_FBB (1<<7)
- #define STATUS_MDPE (1<<8)
- #define STATUS_DST(i) ((i&0x3)<<9)
- #define STATUS_STA (1<<11)
- #define STATUS_RTA (1<<12)
- #define STATUS_RMA (1<<13)
- #define STATUS_SSE (1<<14)
- #define STATUS_PE (1<<15)
- /* Revision ID Register ( REVISION_ID ) */
- #define REVISION_ID_ID(i) ((i&0xff)<<0)
- /* Class Code Register ( CLASS_CODE ) */
- #define CLASS_CODE_CCV(i) ((i&0xffffff)<<0)
- /* Cache Line Size Register ( CACHE_LINE_SIZE ) */
- #define CACHE_LINE_SIZE_CLS(i) ((i&0xff)<<0)
- /* Master Latency Register ( MASTER_LATENCY ) */
- #define MASTER_LATENCY_ML(i) ((i&0x3f)<<2)
- /* Header Type Register ( HEADER_TYPE ) */
- #define HEADER_TYPE_HT(i) ((i&0xff)<<0)
- /* Bist Register ( BIST ) */
- #define BIST_BIST(i) ((i&0xff)<<0)
- /* PCI Base Address x Register ( PBAx ) */
- #define PBAX_MSI (1<<0)
- #define PBAX_P (1<<3)
- #define PBAX_BADDR(i) ((i&0xffffff)<<8)
- /* Subsystem Vendor ID Register ( SUBSYSTEM_VENDOR_ID ) */
- #define SUBSYSTEM_VENDOR_ID_SVI(i) ((i&0xffff)<<0)
- /* Subsystem ID Register ( SUBSYSTEM_ID ) */
- #define SUBSYSTEM_ID_SI(i) ((i&0xffff)<<0)
- /* Interrupt Line Register ( INTERRUPT_LINE ) */
- #define INTERRUPT_LINE_IL(i) ((i&0xff)<<0)
- /* Interrupt Pin Register ( INTERRUPT_PIN ) */
- #define INTERRUPT_PIN_IP(i) ((i&0xff)<<0)
- /* Minimum Grant Register ( MIN_GNT ) */
- #define MIN_GNT_MIN_GNT(i) ((i&0xff)<<0)
- /* Maximum Latency Register ( MAX_LAT ) */
- #define MAX_LAT_MAX_LAT(i) ((i&0xff)<<0)
- /* Target Ready Timeout Register ( TRDY_TIMEOUT ) */
- #define TRDY_TIMEOUT_TT(i) ((i&0xff)<<0)
- /* Retry Limit Register ( RETRY_LIMIT ) */
- #define RETRY_LIMIT_RL(i) ((i&0xff)<<0)
- /* PCI Base Address x Control Register ( PBAxC ) */
- #define PBAXC_MSI (1<<0)
- #define PBAXC_P (1<<1)
- #define PBAXC_SIZE(i) ((i&0x1f)<<2)
- #define PBAXC_SB (1<<7)
- #define PBAXC_PP (1<<8)
- #define PBAXC_MR(i) ((i&0x3)<<9)
- #define PBAXC_MRL (1<<11)
- #define PBAXC_MRM (1<<12)
- #define PBAXC_TRP (1<<13)
- /* PCI Base Address x Mapping Register ( PBAxM ) */
- #define PBAXM_MADDR(i) ((i&0xffffff)<<8)
- /* PCI Management Register ( PMGT ) */
- #define PMGT_WR (1<<0)
- #define PMGT_NMI (1<<1)
- /* PCI messaging interface */
- #define PCI_MSG_BASE 0xB8088010
- #if !defined(_ASMLANGUAGE)
- typedef struct pcimsgstruct
- {
- unsigned int pciim0; /* PCI Inbound Message 0 */
- unsigned int pciim1; /* PCI Inbound Message 1 */
- unsigned int pciom0; /* PCI Outbound Message 0 */
- unsigned int pciom1; /* PCI Outbound Message 1 */
- unsigned int pciid; /* PCI Inbound Doorbell */
- unsigned int pciiic; /* PCI Inbound Interrupt Cause*/
- unsigned int pciiim; /* PCI Inbound Interrupt mask */
- unsigned int pciod; /* PCI Outbound Doorbell */
- unsigned int pcioic; /* PCI Outbound Interrupt Caus*/
- unsigned int pcioim; /* PCI Outbound Interrupt Mask*/
- } PCI_MSG_STRUCT;
- #define PCI_MSG (*((volatile PCI_MSG_STRUCT *) PCI_MSG_BASE))
- #endif /*_ASMLANGUAGE*/
- /* PCI Inbound Message 0 Register ( PCIIM0 ) */
- #define PCIIM0_MSG(i) ((i&0xffffffff)<<0)
- /* PCI Inbound Message 1 Register ( PCIIM1 ) */
- #define PCIIM1_MSG(i) ((i&0xffffffff)<<0)
- /* PCI Outbound Message 0 Register ( PCIOM0 ) */
- #define PCIOM0_MSG(i) ((i&0xffffffff)<<0)
- /* PCI Outbound Message 1 Register ( PCIOM1 ) */
- #define PCIOM1_MSG(i) ((i&0xffffffff)<<0)
- /* PCI Inbound doorbell Register ( PCIID ) */
- #define PCIID_INDOOR(i) ((i&0xffffffff)<<0)
- /* PCI Inbound Interrupt cause Register ( PCIIIC ) */
- #define PCIIIC_IM0 (1<<0)
- #define PCIIIC_IM1 (1<<1)
- #define PCIIIC_ID (1<<2)
- /* PCI Inbound Interrupt mask Register ( PCIIIM ) */
- #define PCIIIM_IM0 (1<<0)
- #define PCIIIM_IM1 (1<<1)
- #define PCIIIM_ID (1<<2)
- /* PCI Outbound doorbell Register ( PCIOD ) */
- #define PCIOD_OUTDOOR(i) ((i&0xffffffff)<<0)
- /* PCI Outbound Interrupt cause Register ( PCIOIC ) */
- #define PCIOIC_OM0 (1<<0)
- #define PCIOIC_OM1 (1<<1)
- #define PCIOIC_OD (1<<2)
- /* PCI Outbound Interrupt mask Register ( PCIOIM ) */
- #define PCIIOM_OM0 (1<<0)
- #define PCIIOM_OM1 (1<<1)
- #define PCIIOM_OD (1<<2)
- /* IPBus Monitor */
- #define IPMON_BASE 0xB8090000
- #if !defined(_ASMLANGUAGE)
- typedef struct ipmonstruct
- {
- unsigned int ipbmtcfg; /* IPBusMON trigger config */
- unsigned int ipbmts; /* IPBusMON trigger select */
- unsigned int ipbmmt; /* IPBusMON Manual trigger */
- unsigned int ipbmtc0; /* IPBusMON trigger cond 0 */
- unsigned int ipbmtc1; /* IPBusMON trigger cond 1 */
- unsigned int ipbmtc2; /* IPBusMON trigger cond 2 */
- unsigned int ipbmtc3; /* IPBusMON trigger cond 3 */
- unsigned int ipbmfs; /* IPBusMON filter select */
- unsigned int ipbmfc0; /* IPBusMON Filter control 0 */
- unsigned int ipbmfc1; /* IPBusMON Filter control 1 */
- unsigned int ipbmfc2; /* IPBusMON Filter control 2 */
- unsigned int ipbmrc; /* IPBusMON Record control */
- unsigned int ipbmtt; /* IPBusMON Trigger time */
- unsigned int ipbmtp; /* IPBusMON Trigger position */
- unsigned int emc; /* Event monitor control */
- unsigned int em0compare; /* Event monitor 0 compare */
- unsigned int em0count; /* Event monitor 0 count */
- unsigned int em1count; /* Event monitor 1 count */
- unsigned int em2count; /* Event monitor 2 count */
- unsigned int em3count; /* Event monitor 3 count */
- unsigned int em4count; /* Event monitor 4 count */
- unsigned int em5count; /* Event monitor 5 count */
- unsigned int em6count; /* Event monitor 6 count */
- unsigned int em7count; /* Event monitor 7 count */
- } IPMON_STRUCT;
- #define IPMON (*((volatile IPMON_STRUCT *) IPMON_BASE))
- #endif /*_ASMLANGUAGE*/
- /* IPBus Monitor trigger config register */
- #define IPBMTCFG_EN (1<<0)
- #define IPBMTCFG_RC (1<<1)
- #define IPBMTCFG_RA (1<<2)
- #define IPBMTCFG_FT (1<<3)
- #define IPBMTCFG_TC (1<<4)
- #define IPBMTCFG_TIP (1<<5)
- #define IPBMTCFG_TOM(i) ((i&0x3)<<6)
- #define IPBMTCFG_TCOUNT(i) ((i&0xff)<<8)
- #define IPBMTCFG_RTCOUNT(i) ((i&0xff)<<16)
- #define IPBMTCFG_DIE (1<<24)
- /* IPBus Monitor trigger select register */
- #define IPBMTS_A (1<<0)
- #define IPBMTS_OP (1<<1)
- #define IPBMTS_D (1<<2)
- #define IPBMTS_MG (1<<3)
- #define IPBMTS_MR (1<<4)
- #define IPBMTS_IR (1<<5)
- #define IPBMTS_WTO (1<<6)
- #define IPBMTS_UAE (1<<7)
- #define IPBMTS_SAE (1<<8)
- #define IPBMTS_BTO (1<<9)
- #define IPBMTS_WR (1<<10)
- #define IPBMTS_ET (1<<11)
- #define IPBMTS_TRW (1<<12)
- #define IPBMTS_EM0 (1<<13)
- #define IPBMTS_MT (1<<14)
- /* IPBus Monitor trigger condition register */
- #define IPBMTC3_MG(i) ((i&0x1f)<<0)
- #define IPBMTC3_MR(i) ((i&0x1ffff)<<5)
- #define IPBMTC3_MRM (1<<22)
- #define IPBMTC3_IR(i) ((i&0x1f)<<23)
- #define IPBMTC3_RW (1<<28)
- /* IP Bus monitor filter select register */
- #define IPBMFS_EN (1<<0)
- #define IPBMFS_FC(i) ((i&0x3)<<1)
- #define IPBMFS_A (1<<3)
- #define IPBMFS_BMS (1<<4)
- #define IPBMFS_OP (1<<5)
- /* IP Bus monitor filter control register */
- #define IPBMFC2_BMS(i) ((i&0x1ffff)<<0)
- #define IPBMFC2_RW (1<<17)
- /* IPBus monitor record control register */
- #define IPBMRC_IPBMBASE(i) ((i&0x7ff)<<0)
- #define IPBMRC_FTRL(i) ((i&0x7ff)<<11)
- #define IPBMRC_DW (1<<22)
- /* IPBus Monitor trigger position register */
- #define IPBMTP_ADDR(i) ((i&0x7ff)<<0)
- #define IPBMTP_TAE (1<<11)
- /* IPBus Monitor trigger time register */
- #define IPBMTT_TS(i) ((i&0x3ffffff)<<0)
- /* Event monitor control register */
- #define EMC_FRZ (1<<0)
- #define EMC_CLR (1<<1)
- #define EMC_ZOR (1<<2)
- /* Event monitor Control COUNT register */
- #define EMXCOUNT_COUNT(i) ((i&0xffffff)<<0)
- #define EMXCOUNT_OVR (1<<24)
- #define EMXCOUNT_SEL(i) ((i&0x3f)<<26)
- /* Event monitor compare register */
- #define EM0COMPARE_COMPARE(i) ((i&0xffffff)<<0)
- #define EM0COMPARE_DIE (1<<30)
- #define EM0COMPARE_T (1<<31)
- /* Define Event Counter Index Numbers */
- #define EC_CPU_INST_COMPLETE 0 /* CPU Inst executed */
- #define EC_CPU_ICACHE_MISS 1 /* CPU Inst cache miss */
- #define EC_CPU_DCACHE_HIT 2 /* CPU Data cache hit */
- #define EC_CPU_DCACHE_MISS 3 /* CPU Data cache Miss */
- #define EC_CPU_JOINT_TLB_MISS 4 /* CPU joint TLB miss */
- #define EC_CPU_INST_TLB_MISS 5 /* CPU Inst TLB Miss */
- #define EC_CPU_DATA_TLB_MISS 6 /* CPU Data TLB Miss */
- #define EC_MAX_IPBUS_WAIT_CYCLES 7 /* Max num WS in IPBus tran */
- #define EC_ICLKS 8 /* Rising edge of IPBus clk */
- #define EC_EVENT_MON_TRIGGERS 9 /* Event monitor trigger event*/
- #define EC_FINAL_TRIGGERS 10 /* IPMon final trigg event */
- #define EC_PM_BUS_TRANS 11 /* PMBus transaction */
- #define EC_PM_BUS_CPU_TRANS 12 /* PMBus CPU Transaction */
- #define EC_PM_BUS_IPB_TRANS 13 /* PMBus IPBus Transaction */
- #define EC_PM_BUS_SNEAK_TRANS 14 /* PMBus Sneak transaction */
- #define EC_PM_BUS_ICLK_DELAY 15 /* PMBus Delay */
- #define EC_DDR_READ_TRANS 16 /* DDR Read transaction */
- #define EC_DDR_WRITE_TRANS 17 /* DDR Write Transaction */
- #define EC_GRANT_TO_CMTC0 18 /* IPBus arb grants bus to a */
- /* Bus master with CMTC = 0 */
- #define EC_DWORDS_WRITTEN_BY_IPBM 19 /* num double words written */
- /* by on chip Mem to IPBus Mon*/
- #define EC_IP_BUS_TRANS 20 /* IPBus Transaction */
- #define EC_IP_BUS_IDLE_CYCLES 21 /* IPBus idle cycle */
- #define EC_IP_BM0_BYTES 22 /* IPBus mast ind 0 Byte tran */
- #define EC_IP_BM1_BYTES 23 /* IPBus mast ind 1 Byte tran */
- #define EC_IP_BM2_BYTES 24 /* IPBus mast ind 2 Byte tran */
- #define EC_IP_BM3_BYTES 25 /* IPBus mast ind 3 Byte tran */
- #define EC_IP_BM4_BYTES 26 /* IPBus mast ind 4 Byte tran */
- #define EC_IP_BM5_BYTES 27 /* IPBus mast ind 5 Byte tran */
- #define EC_IP_BM6_BYTES 28 /* IPBus mast ind 6 Byte tran */
- #define EC_IP_BM7_BYTES 29 /* IPBus mast ind 7 Byte tran */
- #define EC_IP_BM8_BYTES 30 /* IPBus mast ind 8 Byte tran */
- #define EC_IP_BM9_BYTES 31 /* IPBus mast ind 9 Byte tran */
- #define EC_IP_BM10_BYTES 32 /* IPBus mast ind 10 Byte tran*/
- #define EC_IP_BM11_BYTES 33 /* IPBus mast ind 11 Byte tran*/
- #define EC_IP_BM12_BYTES 34 /* IPBus mast ind 12 Byte tran*/
- #define EC_IP_BM14_BYTES 35 /* IPBus mast ind 14 Byte tran*/
- #define EC_IP_BM15_BYTES 36 /* IPBus mast ind 15 Byte tran*/
- #define EC_IP_BM16_BYTES 37 /* IPBus mast ind 16 Byte tran*/
- #define EC_MAX_IPBUS_IDLE_CYCLES 38 /* Max num of idle cyles betwn*/
- /* IPBus Transactions */
- #define EC_IP_BUS_READ_TRANS 39 /* IPBus read transactions */
- #define EC_IP_BUS_WRITE_TRANS 40 /* IPBus write transaction */
- #define EC_IP_BUS_1_TO_16_BYTES 41 /* IPBus tran that transferred*/
- /* Between 1 and 16 bytes */
- #define EC_IP_BUS_17_TO_32_BYTES 42 /* IPBus tran that transferred*/
- /* Between 17 and 32 bytes */
- #define EC_IP_BUS_33_TO_48_BYTES 43 /* IPBus tran that transferred*/
- /* Between 33 and 48 bytes */
- #define EC_IP_BUS_49_TO_64_BYTES 44 /* IPBus tran that transferred*/
- /* Between 49 and 64 bytes */
- #define EC_IP_BUS_UNALIGNED_TRANS 45 /* IPBus Unaligned trans tran */
- #define EC_IP_BUS_MERGE_TRANS 46 /* num of IPBus trans merges */
- #define EC_IP_BM0_TRANS 47 /* IPBus master index 0 trans */
- #define EC_IP_BM1_TRANS 48 /* IPBus master index 1 trans */
- #define EC_IP_BM2_TRANS 49 /* IPBus master index 2 trans */
- #define EC_IP_BM3_TRANS 50 /* IPBus master index 3 trans */
- #define EC_IP_BM4_TRANS 51 /* IPBus master index 4 trans */
- #define EC_IP_BM5_TRANS 52 /* IPBus master index 5 trans */
- #define EC_IP_BM6_TRANS 53 /* IPBus master index 6 trans */
- #define EC_IP_BM7_TRANS 54 /* IPBus master index 7 trans */
- #define EC_IP_BM8_TRANS 55 /* IPBus master index 8 trans */
- #define EC_IP_BM9_TRANS 56 /* IPBus master index 9 trans */
- #define EC_IP_BM10_TRANS 57 /* IPBus master index 10 trans*/
- #define EC_IP_BM11_TRANS 58 /* IPBus master index 11 trans*/
- #define EC_IP_BM12_TRANS 59 /* IPBus master index 12 trans*/
- #define EC_EXT_BUS_MASTER_GRANTS 60 /* Ext mem and peripheral */
- /* bus master grnt */
- #define EC_IP_BM14_TRANS 61 /* IPBus master index 13 trans*/
- #define EC_IP_BM15_TRANS 62 /* IPBus master index 14 trans*/
- #define EC_IP_BM16_TRANS 63 /* IPBus master index 15 trans*/
- /* On-Chip memory */
- #define OCM_BASE 0xB8098000
- #if !defined(_ASMLANGUAGE)
- typedef struct ocmstruct
- {
- unsigned int ocmbase; /* On chip memory base */
- unsigned int ocmmask; /* On Chip memory mask */
- } OCM_STRUCT;
- #define OCM (*((volatile OCM_STRUCT *) OCM_BASE))
- #endif /*_ASMLANGUAGE*/
- #endif /*RC32438_H */