aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/agp/intel-agp.h4
-rw-r--r--drivers/char/agp/intel-gtt.c10
2 files changed, 5 insertions, 9 deletions
diff --git a/drivers/char/agp/intel-agp.h b/drivers/char/agp/intel-agp.h
index 0bf5590fd0f9..18bbaafb8509 100644
--- a/drivers/char/agp/intel-agp.h
+++ b/drivers/char/agp/intel-agp.h
@@ -56,7 +56,7 @@
56 56
57/* Intel i810 registers */ 57/* Intel i810 registers */
58#define I810_GMADR_BAR 0 58#define I810_GMADR_BAR 0
59#define I810_MMADDR 0x14 59#define I810_MMADR_BAR 1
60#define I810_PTE_BASE 0x10000 60#define I810_PTE_BASE 0x10000
61#define I810_PTE_MAIN_UNCACHED 0x00000000 61#define I810_PTE_MAIN_UNCACHED 0x00000000
62#define I810_PTE_LOCAL 0x00000002 62#define I810_PTE_LOCAL 0x00000002
@@ -114,7 +114,7 @@
114 114
115/* intel 915G registers */ 115/* intel 915G registers */
116#define I915_GMADR_BAR 2 116#define I915_GMADR_BAR 2
117#define I915_MMADDR 0x10 117#define I915_MMADR_BAR 0
118#define I915_PTEADDR 0x1C 118#define I915_PTEADDR 0x1C
119#define I915_GMCH_GMS_STOLEN_48M (0x6 << 4) 119#define I915_GMCH_GMS_STOLEN_48M (0x6 << 4)
120#define I915_GMCH_GMS_STOLEN_64M (0x7 << 4) 120#define I915_GMCH_GMS_STOLEN_64M (0x7 << 4)
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index 560f66bffebb..58916f32c0f3 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -181,8 +181,7 @@ static int i810_setup(void)
181 return -ENOMEM; 181 return -ENOMEM;
182 intel_private.i81x_gtt_table = gtt_table; 182 intel_private.i81x_gtt_table = gtt_table;
183 183
184 pci_read_config_dword(intel_private.pcidev, I810_MMADDR, &reg_addr); 184 reg_addr = pci_bus_address(intel_private.pcidev, I810_MMADR_BAR);
185 reg_addr &= 0xfff80000;
186 185
187 intel_private.registers = ioremap(reg_addr, KB(64)); 186 intel_private.registers = ioremap(reg_addr, KB(64));
188 if (!intel_private.registers) 187 if (!intel_private.registers)
@@ -785,8 +784,7 @@ static int i830_setup(void)
785{ 784{
786 u32 reg_addr; 785 u32 reg_addr;
787 786
788 pci_read_config_dword(intel_private.pcidev, I810_MMADDR, &reg_addr); 787 reg_addr = pci_bus_address(intel_private.pcidev, I810_MMADR_BAR);
789 reg_addr &= 0xfff80000;
790 788
791 intel_private.registers = ioremap(reg_addr, KB(64)); 789 intel_private.registers = ioremap(reg_addr, KB(64));
792 if (!intel_private.registers) 790 if (!intel_private.registers)
@@ -1107,9 +1105,7 @@ static int i9xx_setup(void)
1107 u32 reg_addr, gtt_addr; 1105 u32 reg_addr, gtt_addr;
1108 int size = KB(512); 1106 int size = KB(512);
1109 1107
1110 pci_read_config_dword(intel_private.pcidev, I915_MMADDR, &reg_addr); 1108 reg_addr = pci_bus_address(intel_private.pcidev, I915_MMADR_BAR);
1111
1112 reg_addr &= 0xfff80000;
1113 1109
1114 intel_private.registers = ioremap(reg_addr, size); 1110 intel_private.registers = ioremap(reg_addr, size);
1115 if (!intel_private.registers) 1111 if (!intel_private.registers)