diff options
Diffstat (limited to 'arch/ia64/sn/pci/tioca_provider.c')
-rw-r--r-- | arch/ia64/sn/pci/tioca_provider.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/arch/ia64/sn/pci/tioca_provider.c b/arch/ia64/sn/pci/tioca_provider.c index 19bced34d5f..46b646a6d34 100644 --- a/arch/ia64/sn/pci/tioca_provider.c +++ b/arch/ia64/sn/pci/tioca_provider.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/pci.h> | 11 | #include <linux/pci.h> |
12 | #include <asm/sn/sn_sal.h> | 12 | #include <asm/sn/sn_sal.h> |
13 | #include <asm/sn/addrs.h> | 13 | #include <asm/sn/addrs.h> |
14 | #include <asm/sn/io.h> | ||
14 | #include <asm/sn/pcidev.h> | 15 | #include <asm/sn/pcidev.h> |
15 | #include <asm/sn/pcibus_provider_defs.h> | 16 | #include <asm/sn/pcibus_provider_defs.h> |
16 | #include <asm/sn/tioca_provider.h> | 17 | #include <asm/sn/tioca_provider.h> |
@@ -37,7 +38,7 @@ tioca_gart_init(struct tioca_kernel *tioca_kern) | |||
37 | uint64_t offset; | 38 | uint64_t offset; |
38 | struct page *tmp; | 39 | struct page *tmp; |
39 | struct tioca_common *tioca_common; | 40 | struct tioca_common *tioca_common; |
40 | volatile struct tioca *ca_base; | 41 | struct tioca *ca_base; |
41 | 42 | ||
42 | tioca_common = tioca_kern->ca_common; | 43 | tioca_common = tioca_kern->ca_common; |
43 | ca_base = (struct tioca *)tioca_common->ca_common.bs_base; | 44 | ca_base = (struct tioca *)tioca_common->ca_common.bs_base; |
@@ -174,27 +175,29 @@ tioca_gart_init(struct tioca_kernel *tioca_kern) | |||
174 | * DISABLE GART PREFETCHING due to hw bug tracked in SGI PV930029 | 175 | * DISABLE GART PREFETCHING due to hw bug tracked in SGI PV930029 |
175 | */ | 176 | */ |
176 | 177 | ||
177 | ca_base->ca_control1 |= CA_AGPDMA_OP_ENB_COMBDELAY; /* PV895469 ? */ | 178 | __sn_setq_relaxed(&ca_base->ca_control1, |
178 | ca_base->ca_control2 &= ~(CA_GART_MEM_PARAM); | 179 | CA_AGPDMA_OP_ENB_COMBDELAY); /* PV895469 ? */ |
179 | ca_base->ca_control2 |= (0x2ull << CA_GART_MEM_PARAM_SHFT); | 180 | __sn_clrq_relaxed(&ca_base->ca_control2, CA_GART_MEM_PARAM); |
181 | __sn_setq_relaxed(&ca_base->ca_control2, | ||
182 | (0x2ull << CA_GART_MEM_PARAM_SHFT)); | ||
180 | tioca_kern->ca_gart_iscoherent = 1; | 183 | tioca_kern->ca_gart_iscoherent = 1; |
181 | ca_base->ca_control2 &= | 184 | __sn_clrq_relaxed(&ca_base->ca_control2, |
182 | ~(CA_GART_WR_PREFETCH_ENB | CA_GART_RD_PREFETCH_ENB); | 185 | (CA_GART_WR_PREFETCH_ENB | CA_GART_RD_PREFETCH_ENB)); |
183 | 186 | ||
184 | /* | 187 | /* |
185 | * Unmask GART fetch error interrupts. Clear residual errors first. | 188 | * Unmask GART fetch error interrupts. Clear residual errors first. |
186 | */ | 189 | */ |
187 | 190 | ||
188 | ca_base->ca_int_status_alias = CA_GART_FETCH_ERR; | 191 | writeq(CA_GART_FETCH_ERR, &ca_base->ca_int_status_alias); |
189 | ca_base->ca_mult_error_alias = CA_GART_FETCH_ERR; | 192 | writeq(CA_GART_FETCH_ERR, &ca_base->ca_mult_error_alias); |
190 | ca_base->ca_int_mask &= ~CA_GART_FETCH_ERR; | 193 | __sn_clrq_relaxed(&ca_base->ca_int_mask, CA_GART_FETCH_ERR); |
191 | 194 | ||
192 | /* | 195 | /* |
193 | * Program the aperature and gart registers in TIOCA | 196 | * Program the aperature and gart registers in TIOCA |
194 | */ | 197 | */ |
195 | 198 | ||
196 | ca_base->ca_gart_aperature = ap_reg; | 199 | writeq(ap_reg, &ca_base->ca_gart_aperature); |
197 | ca_base->ca_gart_ptr_table = tioca_kern->ca_gart_coretalk_addr | 1; | 200 | writeq(tioca_kern->ca_gart_coretalk_addr|1, &ca_base->ca_gart_ptr_table); |
198 | 201 | ||
199 | return 0; | 202 | return 0; |
200 | } | 203 | } |
@@ -211,7 +214,6 @@ void | |||
211 | tioca_fastwrite_enable(struct tioca_kernel *tioca_kern) | 214 | tioca_fastwrite_enable(struct tioca_kernel *tioca_kern) |
212 | { | 215 | { |
213 | int cap_ptr; | 216 | int cap_ptr; |
214 | uint64_t ca_control1; | ||
215 | uint32_t reg; | 217 | uint32_t reg; |
216 | struct tioca *tioca_base; | 218 | struct tioca *tioca_base; |
217 | struct pci_dev *pdev; | 219 | struct pci_dev *pdev; |
@@ -256,9 +258,7 @@ tioca_fastwrite_enable(struct tioca_kernel *tioca_kern) | |||
256 | */ | 258 | */ |
257 | 259 | ||
258 | tioca_base = (struct tioca *)common->ca_common.bs_base; | 260 | tioca_base = (struct tioca *)common->ca_common.bs_base; |
259 | ca_control1 = tioca_base->ca_control1; | 261 | __sn_setq_relaxed(&tioca_base->ca_control1, CA_AGP_FW_ENABLE); |
260 | ca_control1 |= CA_AGP_FW_ENABLE; | ||
261 | tioca_base->ca_control1 = ca_control1; | ||
262 | } | 262 | } |
263 | 263 | ||
264 | EXPORT_SYMBOL(tioca_fastwrite_enable); /* used by agp-sgi */ | 264 | EXPORT_SYMBOL(tioca_fastwrite_enable); /* used by agp-sgi */ |
@@ -345,7 +345,7 @@ tioca_dma_d48(struct pci_dev *pdev, uint64_t paddr) | |||
345 | return 0; | 345 | return 0; |
346 | } | 346 | } |
347 | 347 | ||
348 | agp_dma_extn = ca_base->ca_agp_dma_addr_extn; | 348 | agp_dma_extn = __sn_readq_relaxed(&ca_base->ca_agp_dma_addr_extn); |
349 | if (node_upper != (agp_dma_extn >> CA_AGP_DMA_NODE_ID_SHFT)) { | 349 | if (node_upper != (agp_dma_extn >> CA_AGP_DMA_NODE_ID_SHFT)) { |
350 | printk(KERN_ERR "%s: coretalk upper node (%u) " | 350 | printk(KERN_ERR "%s: coretalk upper node (%u) " |
351 | "mismatch with ca_agp_dma_addr_extn (%lu)\n", | 351 | "mismatch with ca_agp_dma_addr_extn (%lu)\n", |