0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #define PCILYNX_MAX_REGISTER 0xfff
0011 #define PCILYNX_MAX_MEMORY 0xffff
0012
0013 #define PCI_LATENCY_CACHELINE 0x0c
0014
0015 #define MISC_CONTROL 0x40
0016 #define MISC_CONTROL_SWRESET (1<<0)
0017
0018 #define SERIAL_EEPROM_CONTROL 0x44
0019
0020 #define PCI_INT_STATUS 0x48
0021 #define PCI_INT_ENABLE 0x4c
0022
0023 #define PCI_INT_INT_PEND (1<<31)
0024 #define PCI_INT_FRC_INT (1<<30)
0025 #define PCI_INT_SLV_ADR_PERR (1<<28)
0026 #define PCI_INT_SLV_DAT_PERR (1<<27)
0027 #define PCI_INT_MST_DAT_PERR (1<<26)
0028 #define PCI_INT_MST_DEV_TO (1<<25)
0029 #define PCI_INT_INT_SLV_TO (1<<23)
0030 #define PCI_INT_AUX_TO (1<<18)
0031 #define PCI_INT_AUX_INT (1<<17)
0032 #define PCI_INT_P1394_INT (1<<16)
0033 #define PCI_INT_DMA4_PCL (1<<9)
0034 #define PCI_INT_DMA4_HLT (1<<8)
0035 #define PCI_INT_DMA3_PCL (1<<7)
0036 #define PCI_INT_DMA3_HLT (1<<6)
0037 #define PCI_INT_DMA2_PCL (1<<5)
0038 #define PCI_INT_DMA2_HLT (1<<4)
0039 #define PCI_INT_DMA1_PCL (1<<3)
0040 #define PCI_INT_DMA1_HLT (1<<2)
0041 #define PCI_INT_DMA0_PCL (1<<1)
0042 #define PCI_INT_DMA0_HLT (1<<0)
0043
0044 #define PCI_INT_DMA_ALL 0x3ff
0045
0046 #define PCI_INT_DMA_HLT(chan) (1 << (chan * 2))
0047 #define PCI_INT_DMA_PCL(chan) (1 << (chan * 2 + 1))
0048
0049 #define LBUS_ADDR 0xb4
0050 #define LBUS_ADDR_SEL_RAM (0x0<<16)
0051 #define LBUS_ADDR_SEL_ROM (0x1<<16)
0052 #define LBUS_ADDR_SEL_AUX (0x2<<16)
0053 #define LBUS_ADDR_SEL_ZV (0x3<<16)
0054
0055 #define GPIO_CTRL_A 0xb8
0056 #define GPIO_CTRL_B 0xbc
0057 #define GPIO_DATA_BASE 0xc0
0058
0059 #define DMA_BREG(base, chan) (base + chan * 0x20)
0060 #define DMA_SREG(base, chan) (base + chan * 0x10)
0061
0062 #define PCL_NEXT_INVALID (1<<0)
0063
0064
0065 #define PCL_CMD_RCV (0x1<<24)
0066 #define PCL_CMD_RCV_AND_UPDATE (0xa<<24)
0067 #define PCL_CMD_XMT (0x2<<24)
0068 #define PCL_CMD_UNFXMT (0xc<<24)
0069 #define PCL_CMD_PCI_TO_LBUS (0x8<<24)
0070 #define PCL_CMD_LBUS_TO_PCI (0x9<<24)
0071
0072
0073 #define PCL_CMD_NOP (0x0<<24)
0074 #define PCL_CMD_LOAD (0x3<<24)
0075 #define PCL_CMD_STOREQ (0x4<<24)
0076 #define PCL_CMD_STORED (0xb<<24)
0077 #define PCL_CMD_STORE0 (0x5<<24)
0078 #define PCL_CMD_STORE1 (0x6<<24)
0079 #define PCL_CMD_COMPARE (0xe<<24)
0080 #define PCL_CMD_SWAP_COMPARE (0xf<<24)
0081 #define PCL_CMD_ADD (0xd<<24)
0082 #define PCL_CMD_BRANCH (0x7<<24)
0083
0084
0085 #define PCL_COND_DMARDY_SET (0x1<<20)
0086 #define PCL_COND_DMARDY_CLEAR (0x2<<20)
0087
0088 #define PCL_GEN_INTR (1<<19)
0089 #define PCL_LAST_BUFF (1<<18)
0090 #define PCL_LAST_CMD (PCL_LAST_BUFF)
0091 #define PCL_WAITSTAT (1<<17)
0092 #define PCL_BIGENDIAN (1<<16)
0093 #define PCL_ISOMODE (1<<12)
0094
0095 #define DMA0_PREV_PCL 0x100
0096 #define DMA1_PREV_PCL 0x120
0097 #define DMA2_PREV_PCL 0x140
0098 #define DMA3_PREV_PCL 0x160
0099 #define DMA4_PREV_PCL 0x180
0100 #define DMA_PREV_PCL(chan) (DMA_BREG(DMA0_PREV_PCL, chan))
0101
0102 #define DMA0_CURRENT_PCL 0x104
0103 #define DMA1_CURRENT_PCL 0x124
0104 #define DMA2_CURRENT_PCL 0x144
0105 #define DMA3_CURRENT_PCL 0x164
0106 #define DMA4_CURRENT_PCL 0x184
0107 #define DMA_CURRENT_PCL(chan) (DMA_BREG(DMA0_CURRENT_PCL, chan))
0108
0109 #define DMA0_CHAN_STAT 0x10c
0110 #define DMA1_CHAN_STAT 0x12c
0111 #define DMA2_CHAN_STAT 0x14c
0112 #define DMA3_CHAN_STAT 0x16c
0113 #define DMA4_CHAN_STAT 0x18c
0114 #define DMA_CHAN_STAT(chan) (DMA_BREG(DMA0_CHAN_STAT, chan))
0115
0116 #define DMA_CHAN_STAT_SELFID (1<<31)
0117 #define DMA_CHAN_STAT_ISOPKT (1<<30)
0118 #define DMA_CHAN_STAT_PCIERR (1<<29)
0119 #define DMA_CHAN_STAT_PKTERR (1<<28)
0120 #define DMA_CHAN_STAT_PKTCMPL (1<<27)
0121 #define DMA_CHAN_STAT_SPECIALACK (1<<14)
0122
0123 #define DMA0_CHAN_CTRL 0x110
0124 #define DMA1_CHAN_CTRL 0x130
0125 #define DMA2_CHAN_CTRL 0x150
0126 #define DMA3_CHAN_CTRL 0x170
0127 #define DMA4_CHAN_CTRL 0x190
0128 #define DMA_CHAN_CTRL(chan) (DMA_BREG(DMA0_CHAN_CTRL, chan))
0129
0130 #define DMA_CHAN_CTRL_ENABLE (1<<31)
0131 #define DMA_CHAN_CTRL_BUSY (1<<30)
0132 #define DMA_CHAN_CTRL_LINK (1<<29)
0133
0134 #define DMA0_READY 0x114
0135 #define DMA1_READY 0x134
0136 #define DMA2_READY 0x154
0137 #define DMA3_READY 0x174
0138 #define DMA4_READY 0x194
0139 #define DMA_READY(chan) (DMA_BREG(DMA0_READY, chan))
0140
0141 #define DMA_GLOBAL_REGISTER 0x908
0142
0143 #define FIFO_SIZES 0xa00
0144
0145 #define FIFO_CONTROL 0xa10
0146 #define FIFO_CONTROL_GRF_FLUSH (1<<4)
0147 #define FIFO_CONTROL_ITF_FLUSH (1<<3)
0148 #define FIFO_CONTROL_ATF_FLUSH (1<<2)
0149
0150 #define FIFO_XMIT_THRESHOLD 0xa14
0151
0152 #define DMA0_WORD0_CMP_VALUE 0xb00
0153 #define DMA1_WORD0_CMP_VALUE 0xb10
0154 #define DMA2_WORD0_CMP_VALUE 0xb20
0155 #define DMA3_WORD0_CMP_VALUE 0xb30
0156 #define DMA4_WORD0_CMP_VALUE 0xb40
0157 #define DMA_WORD0_CMP_VALUE(chan) (DMA_SREG(DMA0_WORD0_CMP_VALUE, chan))
0158
0159 #define DMA0_WORD0_CMP_ENABLE 0xb04
0160 #define DMA1_WORD0_CMP_ENABLE 0xb14
0161 #define DMA2_WORD0_CMP_ENABLE 0xb24
0162 #define DMA3_WORD0_CMP_ENABLE 0xb34
0163 #define DMA4_WORD0_CMP_ENABLE 0xb44
0164 #define DMA_WORD0_CMP_ENABLE(chan) (DMA_SREG(DMA0_WORD0_CMP_ENABLE, chan))
0165
0166 #define DMA0_WORD1_CMP_VALUE 0xb08
0167 #define DMA1_WORD1_CMP_VALUE 0xb18
0168 #define DMA2_WORD1_CMP_VALUE 0xb28
0169 #define DMA3_WORD1_CMP_VALUE 0xb38
0170 #define DMA4_WORD1_CMP_VALUE 0xb48
0171 #define DMA_WORD1_CMP_VALUE(chan) (DMA_SREG(DMA0_WORD1_CMP_VALUE, chan))
0172
0173 #define DMA0_WORD1_CMP_ENABLE 0xb0c
0174 #define DMA1_WORD1_CMP_ENABLE 0xb1c
0175 #define DMA2_WORD1_CMP_ENABLE 0xb2c
0176 #define DMA3_WORD1_CMP_ENABLE 0xb3c
0177 #define DMA4_WORD1_CMP_ENABLE 0xb4c
0178 #define DMA_WORD1_CMP_ENABLE(chan) (DMA_SREG(DMA0_WORD1_CMP_ENABLE, chan))
0179
0180 #define DMA_WORD1_CMP_MATCH_OTHERBUS (1<<15)
0181 #define DMA_WORD1_CMP_MATCH_BROADCAST (1<<14)
0182 #define DMA_WORD1_CMP_MATCH_BUS_BCAST (1<<13)
0183 #define DMA_WORD1_CMP_MATCH_LOCAL_NODE (1<<12)
0184 #define DMA_WORD1_CMP_MATCH_EXACT (1<<11)
0185 #define DMA_WORD1_CMP_ENABLE_SELF_ID (1<<10)
0186 #define DMA_WORD1_CMP_ENABLE_MASTER (1<<8)
0187
0188 #define LINK_ID 0xf00
0189 #define LINK_ID_BUS(id) (id<<22)
0190 #define LINK_ID_NODE(id) (id<<16)
0191
0192 #define LINK_CONTROL 0xf04
0193 #define LINK_CONTROL_BUSY (1<<29)
0194 #define LINK_CONTROL_TX_ISO_EN (1<<26)
0195 #define LINK_CONTROL_RX_ISO_EN (1<<25)
0196 #define LINK_CONTROL_TX_ASYNC_EN (1<<24)
0197 #define LINK_CONTROL_RX_ASYNC_EN (1<<23)
0198 #define LINK_CONTROL_RESET_TX (1<<21)
0199 #define LINK_CONTROL_RESET_RX (1<<20)
0200 #define LINK_CONTROL_CYCMASTER (1<<11)
0201 #define LINK_CONTROL_CYCSOURCE (1<<10)
0202 #define LINK_CONTROL_CYCTIMEREN (1<<9)
0203 #define LINK_CONTROL_RCV_CMP_VALID (1<<7)
0204 #define LINK_CONTROL_SNOOP_ENABLE (1<<6)
0205
0206 #define CYCLE_TIMER 0xf08
0207
0208 #define LINK_PHY 0xf0c
0209 #define LINK_PHY_READ (1<<31)
0210 #define LINK_PHY_WRITE (1<<30)
0211 #define LINK_PHY_ADDR(addr) (addr<<24)
0212 #define LINK_PHY_WDATA(data) (data<<16)
0213 #define LINK_PHY_RADDR(addr) (addr<<8)
0214
0215 #define LINK_INT_STATUS 0xf14
0216 #define LINK_INT_ENABLE 0xf18
0217
0218 #define LINK_INT_LINK_INT (1<<31)
0219 #define LINK_INT_PHY_TIME_OUT (1<<30)
0220 #define LINK_INT_PHY_REG_RCVD (1<<29)
0221 #define LINK_INT_PHY_BUSRESET (1<<28)
0222 #define LINK_INT_TX_RDY (1<<26)
0223 #define LINK_INT_RX_DATA_RDY (1<<25)
0224 #define LINK_INT_IT_STUCK (1<<20)
0225 #define LINK_INT_AT_STUCK (1<<19)
0226 #define LINK_INT_SNTRJ (1<<17)
0227 #define LINK_INT_HDR_ERR (1<<16)
0228 #define LINK_INT_TC_ERR (1<<15)
0229 #define LINK_INT_CYC_SEC (1<<11)
0230 #define LINK_INT_CYC_STRT (1<<10)
0231 #define LINK_INT_CYC_DONE (1<<9)
0232 #define LINK_INT_CYC_PEND (1<<8)
0233 #define LINK_INT_CYC_LOST (1<<7)
0234 #define LINK_INT_CYC_ARB_FAILED (1<<6)
0235 #define LINK_INT_GRF_OVER_FLOW (1<<5)
0236 #define LINK_INT_ITF_UNDER_FLOW (1<<4)
0237 #define LINK_INT_ATF_UNDER_FLOW (1<<3)
0238 #define LINK_INT_IARB_FAILED (1<<0)