aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorDavid Miller <davem@davemloft.net>2011-01-11 18:54:21 -0500
committerPaul Mundt <lethal@linux-sh.org>2011-03-22 02:47:51 -0400
commit94c322c30bd14ae6cdd369cb4a1f94c5c3809ac9 (patch)
tree4418fdf8446ea20a8e9edbcb51013ade2d0bf92c /drivers/video
parent0144a2568c7d8e58806d3f176f8454c3a3a35ba0 (diff)
s3fb: Compute VGA base iomem pointer explicitly.
This allows the driver to work in multi-domain PCI configurations. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/s3fb.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/video/s3fb.c b/drivers/video/s3fb.c
index b2286f916b5d..55a94b94a326 100644
--- a/drivers/video/s3fb.c
+++ b/drivers/video/s3fb.c
@@ -934,6 +934,8 @@ static int __devinit s3_identification(struct s3fb_info *par)
934 934
935static int __devinit s3_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) 935static int __devinit s3_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
936{ 936{
937 struct pci_bus_region bus_reg;
938 struct resource vga_res;
937 struct fb_info *info; 939 struct fb_info *info;
938 struct s3fb_info *par; 940 struct s3fb_info *par;
939 int rc; 941 int rc;
@@ -983,6 +985,15 @@ static int __devinit s3_pci_probe(struct pci_dev *dev, const struct pci_device_i
983 goto err_iomap; 985 goto err_iomap;
984 } 986 }
985 987
988 bus_reg.start = 0;
989 bus_reg.end = 64 * 1024;
990
991 vga_res.flags = IORESOURCE_IO;
992
993 pcibios_bus_to_resource(dev, &vga_res, &bus_reg);
994
995 par->state.vgabase = (void __iomem *) vga_res.start;
996
986 /* Unlock regs */ 997 /* Unlock regs */
987 cr38 = vga_rcrt(par->state.vgabase, 0x38); 998 cr38 = vga_rcrt(par->state.vgabase, 0x38);
988 cr39 = vga_rcrt(par->state.vgabase, 0x39); 999 cr39 = vga_rcrt(par->state.vgabase, 0x39);