Commit 892c24ca40ffebf6d0ca4cc1454e58db131a4f5a

Authored by David Miller
Committed by Paul Mundt
1 parent 94c322c30b

arkfb: 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>

Showing 1 changed file with 11 additions and 0 deletions Side-by-side Diff

drivers/video/arkfb.c
... ... @@ -951,6 +951,8 @@
951 951 /* PCI probe */
952 952 static int __devinit ark_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
953 953 {
  954 + struct pci_bus_region bus_reg;
  955 + struct resource vga_res;
954 956 struct fb_info *info;
955 957 struct arkfb_info *par;
956 958 int rc;
... ... @@ -1005,6 +1007,15 @@
1005 1007 dev_err(info->device, "iomap for framebuffer failed\n");
1006 1008 goto err_iomap;
1007 1009 }
  1010 +
  1011 + bus_reg.start = 0;
  1012 + bus_reg.end = 64 * 1024;
  1013 +
  1014 + vga_res.flags = IORESOURCE_IO;
  1015 +
  1016 + pcibios_bus_to_resource(dev, &vga_res, &bus_reg);
  1017 +
  1018 + par->state.vgabase = (void __iomem *) vga_res.start;
1008 1019  
1009 1020 /* FIXME get memsize */
1010 1021 regval = vga_rseq(par->state.vgabase, 0x10);