aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/ioatdma_registers.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/ioatdma_registers.h')
-rw-r--r--drivers/dma/ioatdma_registers.h106
1 files changed, 91 insertions, 15 deletions
diff --git a/drivers/dma/ioatdma_registers.h b/drivers/dma/ioatdma_registers.h
index baaab5ea146a..9832d7ebd931 100644
--- a/drivers/dma/ioatdma_registers.h
+++ b/drivers/dma/ioatdma_registers.h
@@ -42,26 +42,25 @@
42#define IOAT_INTRCTRL_MASTER_INT_EN 0x01 /* Master Interrupt Enable */ 42#define IOAT_INTRCTRL_MASTER_INT_EN 0x01 /* Master Interrupt Enable */
43#define IOAT_INTRCTRL_INT_STATUS 0x02 /* ATTNSTATUS -or- Channel Int */ 43#define IOAT_INTRCTRL_INT_STATUS 0x02 /* ATTNSTATUS -or- Channel Int */
44#define IOAT_INTRCTRL_INT 0x04 /* INT_STATUS -and- MASTER_INT_EN */ 44#define IOAT_INTRCTRL_INT 0x04 /* INT_STATUS -and- MASTER_INT_EN */
45#define IOAT_INTRCTRL_MSIX_VECTOR_CONTROL 0x08 /* Enable all MSI-X vectors */ 45#define IOAT_INTRCTRL_MSIX_VECTOR_CONTROL 0x08 /* Enable all MSI-X vectors */
46 46
47#define IOAT_ATTNSTATUS_OFFSET 0x04 /* Each bit is a channel */ 47#define IOAT_ATTNSTATUS_OFFSET 0x04 /* Each bit is a channel */
48 48
49#define IOAT_VER_OFFSET 0x08 /* 8-bit */ 49#define IOAT_VER_OFFSET 0x08 /* 8-bit */
50#define IOAT_VER_MAJOR_MASK 0xF0 50#define IOAT_VER_MAJOR_MASK 0xF0
51#define IOAT_VER_MINOR_MASK 0x0F 51#define IOAT_VER_MINOR_MASK 0x0F
52#define GET_IOAT_VER_MAJOR(x) ((x) & IOAT_VER_MAJOR_MASK) 52#define GET_IOAT_VER_MAJOR(x) (((x) & IOAT_VER_MAJOR_MASK) >> 4)
53#define GET_IOAT_VER_MINOR(x) ((x) & IOAT_VER_MINOR_MASK) 53#define GET_IOAT_VER_MINOR(x) ((x) & IOAT_VER_MINOR_MASK)
54 54
55#define IOAT_PERPORTOFFSET_OFFSET 0x0A /* 16-bit */ 55#define IOAT_PERPORTOFFSET_OFFSET 0x0A /* 16-bit */
56 56
57#define IOAT_INTRDELAY_OFFSET 0x0C /* 16-bit */ 57#define IOAT_INTRDELAY_OFFSET 0x0C /* 16-bit */
58#define IOAT_INTRDELAY_INT_DELAY_MASK 0x3FFF /* Interrupt Delay Time */ 58#define IOAT_INTRDELAY_INT_DELAY_MASK 0x3FFF /* Interrupt Delay Time */
59#define IOAT_INTRDELAY_COALESE_SUPPORT 0x8000 /* Interrupt Coalesing Supported */ 59#define IOAT_INTRDELAY_COALESE_SUPPORT 0x8000 /* Interrupt Coalescing Supported */
60 60
61#define IOAT_DEVICE_STATUS_OFFSET 0x0E /* 16-bit */ 61#define IOAT_DEVICE_STATUS_OFFSET 0x0E /* 16-bit */
62#define IOAT_DEVICE_STATUS_DEGRADED_MODE 0x0001 62#define IOAT_DEVICE_STATUS_DEGRADED_MODE 0x0001
63 63
64
65#define IOAT_CHANNEL_MMIO_SIZE 0x80 /* Each Channel MMIO space is this size */ 64#define IOAT_CHANNEL_MMIO_SIZE 0x80 /* Each Channel MMIO space is this size */
66 65
67/* DMA Channel Registers */ 66/* DMA Channel Registers */
@@ -74,25 +73,101 @@
74#define IOAT_CHANCTRL_ERR_COMPLETION_EN 0x0004 73#define IOAT_CHANCTRL_ERR_COMPLETION_EN 0x0004
75#define IOAT_CHANCTRL_INT_DISABLE 0x0001 74#define IOAT_CHANCTRL_INT_DISABLE 0x0001
76 75
77#define IOAT_DMA_COMP_OFFSET 0x02 /* 16-bit DMA channel compatability */ 76#define IOAT_DMA_COMP_OFFSET 0x02 /* 16-bit DMA channel compatibility */
78#define IOAT_DMA_COMP_V1 0x0001 /* Compatability with DMA version 1 */ 77#define IOAT_DMA_COMP_V1 0x0001 /* Compatibility with DMA version 1 */
79 78#define IOAT_DMA_COMP_V2 0x0002 /* Compatibility with DMA version 2 */
80#define IOAT_CHANSTS_OFFSET 0x04 /* 64-bit Channel Status Register */ 79
81#define IOAT_CHANSTS_OFFSET_LOW 0x04 80
82#define IOAT_CHANSTS_OFFSET_HIGH 0x08 81#define IOAT1_CHANSTS_OFFSET 0x04 /* 64-bit Channel Status Register */
83#define IOAT_CHANSTS_COMPLETED_DESCRIPTOR_ADDR 0xFFFFFFFFFFFFFFC0UL 82#define IOAT2_CHANSTS_OFFSET 0x08 /* 64-bit Channel Status Register */
83#define IOAT_CHANSTS_OFFSET(ver) ((ver) < IOAT_VER_2_0 \
84 ? IOAT1_CHANSTS_OFFSET : IOAT2_CHANSTS_OFFSET)
85#define IOAT1_CHANSTS_OFFSET_LOW 0x04
86#define IOAT2_CHANSTS_OFFSET_LOW 0x08
87#define IOAT_CHANSTS_OFFSET_LOW(ver) ((ver) < IOAT_VER_2_0 \
88 ? IOAT1_CHANSTS_OFFSET_LOW : IOAT2_CHANSTS_OFFSET_LOW)
89#define IOAT1_CHANSTS_OFFSET_HIGH 0x08
90#define IOAT2_CHANSTS_OFFSET_HIGH 0x0C
91#define IOAT_CHANSTS_OFFSET_HIGH(ver) ((ver) < IOAT_VER_2_0 \
92 ? IOAT1_CHANSTS_OFFSET_HIGH : IOAT2_CHANSTS_OFFSET_HIGH)
93#define IOAT_CHANSTS_COMPLETED_DESCRIPTOR_ADDR ~0x3F
84#define IOAT_CHANSTS_SOFT_ERR 0x0000000000000010 94#define IOAT_CHANSTS_SOFT_ERR 0x0000000000000010
95#define IOAT_CHANSTS_UNAFFILIATED_ERR 0x0000000000000008
85#define IOAT_CHANSTS_DMA_TRANSFER_STATUS 0x0000000000000007 96#define IOAT_CHANSTS_DMA_TRANSFER_STATUS 0x0000000000000007
86#define IOAT_CHANSTS_DMA_TRANSFER_STATUS_ACTIVE 0x0 97#define IOAT_CHANSTS_DMA_TRANSFER_STATUS_ACTIVE 0x0
87#define IOAT_CHANSTS_DMA_TRANSFER_STATUS_DONE 0x1 98#define IOAT_CHANSTS_DMA_TRANSFER_STATUS_DONE 0x1
88#define IOAT_CHANSTS_DMA_TRANSFER_STATUS_SUSPENDED 0x2 99#define IOAT_CHANSTS_DMA_TRANSFER_STATUS_SUSPENDED 0x2
89#define IOAT_CHANSTS_DMA_TRANSFER_STATUS_HALTED 0x3 100#define IOAT_CHANSTS_DMA_TRANSFER_STATUS_HALTED 0x3
90 101
91#define IOAT_CHAINADDR_OFFSET 0x0C /* 64-bit Descriptor Chain Address Register */
92#define IOAT_CHAINADDR_OFFSET_LOW 0x0C
93#define IOAT_CHAINADDR_OFFSET_HIGH 0x10
94 102
95#define IOAT_CHANCMD_OFFSET 0x14 /* 8-bit DMA Channel Command Register */ 103
104#define IOAT_CHAN_DMACOUNT_OFFSET 0x06 /* 16-bit DMA Count register */
105
106#define IOAT_DCACTRL_OFFSET 0x30 /* 32 bit Direct Cache Access Control Register */
107#define IOAT_DCACTRL_CMPL_WRITE_ENABLE 0x10000
108#define IOAT_DCACTRL_TARGET_CPU_MASK 0xFFFF /* APIC ID */
109
110/* CB DCA Memory Space Registers */
111#define IOAT_DCAOFFSET_OFFSET 0x14
112/* CB_BAR + IOAT_DCAOFFSET value */
113#define IOAT_DCA_VER_OFFSET 0x00
114#define IOAT_DCA_VER_MAJOR_MASK 0xF0
115#define IOAT_DCA_VER_MINOR_MASK 0x0F
116
117#define IOAT_DCA_COMP_OFFSET 0x02
118#define IOAT_DCA_COMP_V1 0x1
119
120#define IOAT_FSB_CAPABILITY_OFFSET 0x04
121#define IOAT_FSB_CAPABILITY_PREFETCH 0x1
122
123#define IOAT_PCI_CAPABILITY_OFFSET 0x06
124#define IOAT_PCI_CAPABILITY_MEMWR 0x1
125
126#define IOAT_FSB_CAP_ENABLE_OFFSET 0x08
127#define IOAT_FSB_CAP_ENABLE_PREFETCH 0x1
128
129#define IOAT_PCI_CAP_ENABLE_OFFSET 0x0A
130#define IOAT_PCI_CAP_ENABLE_MEMWR 0x1
131
132#define IOAT_APICID_TAG_MAP_OFFSET 0x0C
133#define IOAT_APICID_TAG_MAP_TAG0 0x0000000F
134#define IOAT_APICID_TAG_MAP_TAG0_SHIFT 0
135#define IOAT_APICID_TAG_MAP_TAG1 0x000000F0
136#define IOAT_APICID_TAG_MAP_TAG1_SHIFT 4
137#define IOAT_APICID_TAG_MAP_TAG2 0x00000F00
138#define IOAT_APICID_TAG_MAP_TAG2_SHIFT 8
139#define IOAT_APICID_TAG_MAP_TAG3 0x0000F000
140#define IOAT_APICID_TAG_MAP_TAG3_SHIFT 12
141#define IOAT_APICID_TAG_MAP_TAG4 0x000F0000
142#define IOAT_APICID_TAG_MAP_TAG4_SHIFT 16
143#define IOAT_APICID_TAG_CB2_VALID 0x8080808080
144
145#define IOAT_DCA_GREQID_OFFSET 0x10
146#define IOAT_DCA_GREQID_SIZE 0x04
147#define IOAT_DCA_GREQID_MASK 0xFFFF
148#define IOAT_DCA_GREQID_IGNOREFUN 0x10000000
149#define IOAT_DCA_GREQID_VALID 0x20000000
150#define IOAT_DCA_GREQID_LASTID 0x80000000
151
152
153
154#define IOAT1_CHAINADDR_OFFSET 0x0C /* 64-bit Descriptor Chain Address Register */
155#define IOAT2_CHAINADDR_OFFSET 0x10 /* 64-bit Descriptor Chain Address Register */
156#define IOAT_CHAINADDR_OFFSET(ver) ((ver) < IOAT_VER_2_0 \
157 ? IOAT1_CHAINADDR_OFFSET : IOAT2_CHAINADDR_OFFSET)
158#define IOAT1_CHAINADDR_OFFSET_LOW 0x0C
159#define IOAT2_CHAINADDR_OFFSET_LOW 0x10
160#define IOAT_CHAINADDR_OFFSET_LOW(ver) ((ver) < IOAT_VER_2_0 \
161 ? IOAT1_CHAINADDR_OFFSET_LOW : IOAT2_CHAINADDR_OFFSET_LOW)
162#define IOAT1_CHAINADDR_OFFSET_HIGH 0x10
163#define IOAT2_CHAINADDR_OFFSET_HIGH 0x14
164#define IOAT_CHAINADDR_OFFSET_HIGH(ver) ((ver) < IOAT_VER_2_0 \
165 ? IOAT1_CHAINADDR_OFFSET_HIGH : IOAT2_CHAINADDR_OFFSET_HIGH)
166
167#define IOAT1_CHANCMD_OFFSET 0x14 /* 8-bit DMA Channel Command Register */
168#define IOAT2_CHANCMD_OFFSET 0x04 /* 8-bit DMA Channel Command Register */
169#define IOAT_CHANCMD_OFFSET(ver) ((ver) < IOAT_VER_2_0 \
170 ? IOAT1_CHANCMD_OFFSET : IOAT2_CHANCMD_OFFSET)
96#define IOAT_CHANCMD_RESET 0x20 171#define IOAT_CHANCMD_RESET 0x20
97#define IOAT_CHANCMD_RESUME 0x10 172#define IOAT_CHANCMD_RESUME 0x10
98#define IOAT_CHANCMD_ABORT 0x08 173#define IOAT_CHANCMD_ABORT 0x08
@@ -124,6 +199,7 @@
124#define IOAT_CHANERR_COMPLETION_ADDR_ERR 0x1000 199#define IOAT_CHANERR_COMPLETION_ADDR_ERR 0x1000
125#define IOAT_CHANERR_INT_CONFIGURATION_ERR 0x2000 200#define IOAT_CHANERR_INT_CONFIGURATION_ERR 0x2000
126#define IOAT_CHANERR_SOFT_ERR 0x4000 201#define IOAT_CHANERR_SOFT_ERR 0x4000
202#define IOAT_CHANERR_UNAFFILIATED_ERR 0x8000
127 203
128#define IOAT_CHANERR_MASK_OFFSET 0x2C /* 32-bit Channel Error Register */ 204#define IOAT_CHANERR_MASK_OFFSET 0x2C /* 32-bit Channel Error Register */
129 205