aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/sworks-agp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/agp/sworks-agp.c')
-rw-r--r--drivers/char/agp/sworks-agp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/char/agp/sworks-agp.c b/drivers/char/agp/sworks-agp.c
index 07259952fc32..13acaaf64edb 100644
--- a/drivers/char/agp/sworks-agp.c
+++ b/drivers/char/agp/sworks-agp.c
@@ -155,7 +155,7 @@ static int serverworks_create_gatt_table(struct agp_bridge_data *bridge)
155 /* Create a fake scratch directory */ 155 /* Create a fake scratch directory */
156 for (i = 0; i < 1024; i++) { 156 for (i = 0; i < 1024; i++) {
157 writel(agp_bridge->scratch_page, serverworks_private.scratch_dir.remapped+i); 157 writel(agp_bridge->scratch_page, serverworks_private.scratch_dir.remapped+i);
158 writel(virt_to_gart(serverworks_private.scratch_dir.real) | 1, page_dir.remapped+i); 158 writel(virt_to_phys(serverworks_private.scratch_dir.real) | 1, page_dir.remapped+i);
159 } 159 }
160 160
161 retval = serverworks_create_gatt_pages(value->num_entries / 1024); 161 retval = serverworks_create_gatt_pages(value->num_entries / 1024);
@@ -167,7 +167,7 @@ static int serverworks_create_gatt_table(struct agp_bridge_data *bridge)
167 167
168 agp_bridge->gatt_table_real = (u32 *)page_dir.real; 168 agp_bridge->gatt_table_real = (u32 *)page_dir.real;
169 agp_bridge->gatt_table = (u32 __iomem *)page_dir.remapped; 169 agp_bridge->gatt_table = (u32 __iomem *)page_dir.remapped;
170 agp_bridge->gatt_bus_addr = virt_to_gart(page_dir.real); 170 agp_bridge->gatt_bus_addr = virt_to_phys(page_dir.real);
171 171
172 /* Get the address for the gart region. 172 /* Get the address for the gart region.
173 * This is a bus address even on the alpha, b/c its 173 * This is a bus address even on the alpha, b/c its
@@ -179,7 +179,7 @@ static int serverworks_create_gatt_table(struct agp_bridge_data *bridge)
179 179
180 /* Calculate the agp offset */ 180 /* Calculate the agp offset */
181 for (i = 0; i < value->num_entries / 1024; i++) 181 for (i = 0; i < value->num_entries / 1024; i++)
182 writel(virt_to_gart(serverworks_private.gatt_pages[i]->real)|1, page_dir.remapped+i); 182 writel(virt_to_phys(serverworks_private.gatt_pages[i]->real)|1, page_dir.remapped+i);
183 183
184 return 0; 184 return 0;
185} 185}
@@ -350,7 +350,7 @@ static int serverworks_insert_memory(struct agp_memory *mem,
350 addr = (j * PAGE_SIZE) + agp_bridge->gart_bus_addr; 350 addr = (j * PAGE_SIZE) + agp_bridge->gart_bus_addr;
351 cur_gatt = SVRWRKS_GET_GATT(addr); 351 cur_gatt = SVRWRKS_GET_GATT(addr);
352 writel(agp_bridge->driver->mask_memory(agp_bridge, 352 writel(agp_bridge->driver->mask_memory(agp_bridge,
353 phys_to_gart(page_to_phys(mem->pages[i])), mem->type), 353 page_to_phys(mem->pages[i]), mem->type),
354 cur_gatt+GET_GATT_OFF(addr)); 354 cur_gatt+GET_GATT_OFF(addr));
355 } 355 }
356 serverworks_tlbflush(mem); 356 serverworks_tlbflush(mem);