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 10c23302dd84..a9fb12c20eb7 100644
--- a/drivers/char/agp/sworks-agp.c
+++ b/drivers/char/agp/sworks-agp.c
@@ -51,7 +51,7 @@ static int serverworks_create_page_map(struct serverworks_page_map *page_map)
51 } 51 }
52 SetPageReserved(virt_to_page(page_map->real)); 52 SetPageReserved(virt_to_page(page_map->real));
53 global_cache_flush(); 53 global_cache_flush();
54 page_map->remapped = ioremap_nocache(virt_to_phys(page_map->real), 54 page_map->remapped = ioremap_nocache(virt_to_gart(page_map->real),
55 PAGE_SIZE); 55 PAGE_SIZE);
56 if (page_map->remapped == NULL) { 56 if (page_map->remapped == NULL) {
57 ClearPageReserved(virt_to_page(page_map->real)); 57 ClearPageReserved(virt_to_page(page_map->real));
@@ -162,7 +162,7 @@ static int serverworks_create_gatt_table(struct agp_bridge_data *bridge)
162 /* Create a fake scratch directory */ 162 /* Create a fake scratch directory */
163 for(i = 0; i < 1024; i++) { 163 for(i = 0; i < 1024; i++) {
164 writel(agp_bridge->scratch_page, serverworks_private.scratch_dir.remapped+i); 164 writel(agp_bridge->scratch_page, serverworks_private.scratch_dir.remapped+i);
165 writel(virt_to_phys(serverworks_private.scratch_dir.real) | 1, page_dir.remapped+i); 165 writel(virt_to_gart(serverworks_private.scratch_dir.real) | 1, page_dir.remapped+i);
166 } 166 }
167 167
168 retval = serverworks_create_gatt_pages(value->num_entries / 1024); 168 retval = serverworks_create_gatt_pages(value->num_entries / 1024);
@@ -174,7 +174,7 @@ static int serverworks_create_gatt_table(struct agp_bridge_data *bridge)
174 174
175 agp_bridge->gatt_table_real = (u32 *)page_dir.real; 175 agp_bridge->gatt_table_real = (u32 *)page_dir.real;
176 agp_bridge->gatt_table = (u32 __iomem *)page_dir.remapped; 176 agp_bridge->gatt_table = (u32 __iomem *)page_dir.remapped;
177 agp_bridge->gatt_bus_addr = virt_to_phys(page_dir.real); 177 agp_bridge->gatt_bus_addr = virt_to_gart(page_dir.real);
178 178
179 /* Get the address for the gart region. 179 /* Get the address for the gart region.
180 * This is a bus address even on the alpha, b/c its 180 * This is a bus address even on the alpha, b/c its
@@ -187,7 +187,7 @@ static int serverworks_create_gatt_table(struct agp_bridge_data *bridge)
187 /* Calculate the agp offset */ 187 /* Calculate the agp offset */
188 188
189 for(i = 0; i < value->num_entries / 1024; i++) 189 for(i = 0; i < value->num_entries / 1024; i++)
190 writel(virt_to_phys(serverworks_private.gatt_pages[i]->real)|1, page_dir.remapped+i); 190 writel(virt_to_gart(serverworks_private.gatt_pages[i]->real)|1, page_dir.remapped+i);
191 191
192 return 0; 192 return 0;
193} 193}