aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/amd64-agp.c
diff options
context:
space:
mode:
authorHans Rosenfeld <hans.rosenfeld@amd.com>2010-10-29 11:14:30 -0400
committerBorislav Petkov <borislav.petkov@amd.com>2010-11-18 09:53:04 -0500
commiteec1d4fa00c6552ae2fdf71d59f1eded7c88dd89 (patch)
treeee2c918694e1a01e0826e98c89b703916488bedd /drivers/char/agp/amd64-agp.c
parente53beacd23d9cb47590da6a7a7f6d417b941a994 (diff)
x86, amd-nb: Complete the rename of AMD NB and related code
Not only the naming of the files was confusing, it was even more so for the function and variable names. Renamed the K8 NB and NUMA stuff that is also used on other AMD platforms. This also renames the CONFIG_K8_NUMA option to CONFIG_AMD_NUMA and the related file k8topology_64.c to amdtopology_64.c. No functional changes intended. Signed-off-by: Hans Rosenfeld <hans.rosenfeld@amd.com> Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/char/agp/amd64-agp.c')
-rw-r--r--drivers/char/agp/amd64-agp.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
index 42396df55556..b1f8bb53941a 100644
--- a/drivers/char/agp/amd64-agp.c
+++ b/drivers/char/agp/amd64-agp.c
@@ -38,7 +38,7 @@ static int agp_bridges_found;
38 38
39static void amd64_tlbflush(struct agp_memory *temp) 39static void amd64_tlbflush(struct agp_memory *temp)
40{ 40{
41 k8_flush_garts(); 41 amd_flush_garts();
42} 42}
43 43
44static int amd64_insert_memory(struct agp_memory *mem, off_t pg_start, int type) 44static int amd64_insert_memory(struct agp_memory *mem, off_t pg_start, int type)
@@ -124,7 +124,7 @@ static int amd64_fetch_size(void)
124 u32 temp; 124 u32 temp;
125 struct aper_size_info_32 *values; 125 struct aper_size_info_32 *values;
126 126
127 dev = k8_northbridges.nb_misc[0]; 127 dev = amd_northbridges.nb_misc[0];
128 if (dev==NULL) 128 if (dev==NULL)
129 return 0; 129 return 0;
130 130
@@ -181,16 +181,16 @@ static int amd_8151_configure(void)
181 unsigned long gatt_bus = virt_to_phys(agp_bridge->gatt_table_real); 181 unsigned long gatt_bus = virt_to_phys(agp_bridge->gatt_table_real);
182 int i; 182 int i;
183 183
184 if (!k8_northbridges.gart_supported) 184 if (!amd_northbridges.gart_supported)
185 return 0; 185 return 0;
186 186
187 /* Configure AGP regs in each x86-64 host bridge. */ 187 /* Configure AGP regs in each x86-64 host bridge. */
188 for (i = 0; i < k8_northbridges.num; i++) { 188 for (i = 0; i < amd_northbridges.num; i++) {
189 agp_bridge->gart_bus_addr = 189 agp_bridge->gart_bus_addr =
190 amd64_configure(k8_northbridges.nb_misc[i], 190 amd64_configure(amd_northbridges.nb_misc[i],
191 gatt_bus); 191 gatt_bus);
192 } 192 }
193 k8_flush_garts(); 193 amd_flush_garts();
194 return 0; 194 return 0;
195} 195}
196 196
@@ -200,11 +200,11 @@ static void amd64_cleanup(void)
200 u32 tmp; 200 u32 tmp;
201 int i; 201 int i;
202 202
203 if (!k8_northbridges.gart_supported) 203 if (!amd_northbridges.gart_supported)
204 return; 204 return;
205 205
206 for (i = 0; i < k8_northbridges.num; i++) { 206 for (i = 0; i < amd_northbridges.num; i++) {
207 struct pci_dev *dev = k8_northbridges.nb_misc[i]; 207 struct pci_dev *dev = amd_northbridges.nb_misc[i];
208 /* disable gart translation */ 208 /* disable gart translation */
209 pci_read_config_dword(dev, AMD64_GARTAPERTURECTL, &tmp); 209 pci_read_config_dword(dev, AMD64_GARTAPERTURECTL, &tmp);
210 tmp &= ~GARTEN; 210 tmp &= ~GARTEN;
@@ -331,15 +331,15 @@ static __devinit int cache_nbs(struct pci_dev *pdev, u32 cap_ptr)
331{ 331{
332 int i; 332 int i;
333 333
334 if (cache_k8_northbridges() < 0) 334 if (cache_amd_northbridges() < 0)
335 return -ENODEV; 335 return -ENODEV;
336 336
337 if (!k8_northbridges.gart_supported) 337 if (!amd_northbridges.gart_supported)
338 return -ENODEV; 338 return -ENODEV;
339 339
340 i = 0; 340 i = 0;
341 for (i = 0; i < k8_northbridges.num; i++) { 341 for (i = 0; i < amd_northbridges.num; i++) {
342 struct pci_dev *dev = k8_northbridges.nb_misc[i]; 342 struct pci_dev *dev = amd_northbridges.nb_misc[i];
343 if (fix_northbridge(dev, pdev, cap_ptr) < 0) { 343 if (fix_northbridge(dev, pdev, cap_ptr) < 0) {
344 dev_err(&dev->dev, "no usable aperture found\n"); 344 dev_err(&dev->dev, "no usable aperture found\n");
345#ifdef __x86_64__ 345#ifdef __x86_64__
@@ -416,7 +416,7 @@ static int __devinit uli_agp_init(struct pci_dev *pdev)
416 } 416 }
417 417
418 /* shadow x86-64 registers into ULi registers */ 418 /* shadow x86-64 registers into ULi registers */
419 pci_read_config_dword (k8_northbridges.nb_misc[0], AMD64_GARTAPERTUREBASE, 419 pci_read_config_dword (amd_northbridges.nb_misc[0], AMD64_GARTAPERTUREBASE,
420 &httfea); 420 &httfea);
421 421
422 /* if x86-64 aperture base is beyond 4G, exit here */ 422 /* if x86-64 aperture base is beyond 4G, exit here */
@@ -484,7 +484,7 @@ static int nforce3_agp_init(struct pci_dev *pdev)
484 pci_write_config_dword(dev1, NVIDIA_X86_64_1_APSIZE, tmp); 484 pci_write_config_dword(dev1, NVIDIA_X86_64_1_APSIZE, tmp);
485 485
486 /* shadow x86-64 registers into NVIDIA registers */ 486 /* shadow x86-64 registers into NVIDIA registers */
487 pci_read_config_dword (k8_northbridges.nb_misc[0], AMD64_GARTAPERTUREBASE, 487 pci_read_config_dword (amd_northbridges.nb_misc[0], AMD64_GARTAPERTUREBASE,
488 &apbase); 488 &apbase);
489 489
490 /* if x86-64 aperture base is beyond 4G, exit here */ 490 /* if x86-64 aperture base is beyond 4G, exit here */
@@ -778,7 +778,7 @@ int __init agp_amd64_init(void)
778 } 778 }
779 779
780 /* First check that we have at least one AMD64 NB */ 780 /* First check that we have at least one AMD64 NB */
781 if (!pci_dev_present(k8_nb_ids)) 781 if (!pci_dev_present(amd_nb_ids))
782 return -ENODEV; 782 return -ENODEV;
783 783
784 /* Look for any AGP bridge */ 784 /* Look for any AGP bridge */