diff options
author | David Miller <davem@davemloft.net> | 2011-01-11 18:54:35 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-03-22 02:47:55 -0400 |
commit | 892c24ca40ffebf6d0ca4cc1454e58db131a4f5a (patch) | |
tree | a24f08fe9aed474cf762d3b02ad60621f4077f7a /drivers/video/arkfb.c | |
parent | 94c322c30bd14ae6cdd369cb4a1f94c5c3809ac9 (diff) |
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>
Diffstat (limited to 'drivers/video/arkfb.c')
-rw-r--r-- | drivers/video/arkfb.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/video/arkfb.c b/drivers/video/arkfb.c index 1c69db310ed5..8686429cbdf0 100644 --- a/drivers/video/arkfb.c +++ b/drivers/video/arkfb.c | |||
@@ -951,6 +951,8 @@ static struct fb_ops arkfb_ops = { | |||
951 | /* PCI probe */ | 951 | /* PCI probe */ |
952 | static int __devinit ark_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) | 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 | struct fb_info *info; | 956 | struct fb_info *info; |
955 | struct arkfb_info *par; | 957 | struct arkfb_info *par; |
956 | int rc; | 958 | int rc; |
@@ -1006,6 +1008,15 @@ static int __devinit ark_pci_probe(struct pci_dev *dev, const struct pci_device_ | |||
1006 | goto err_iomap; | 1008 | goto err_iomap; |
1007 | } | 1009 | } |
1008 | 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; | ||
1019 | |||
1009 | /* FIXME get memsize */ | 1020 | /* FIXME get memsize */ |
1010 | regval = vga_rseq(par->state.vgabase, 0x10); | 1021 | regval = vga_rseq(par->state.vgabase, 0x10); |
1011 | info->screen_size = (1 << (regval >> 6)) << 20; | 1022 | info->screen_size = (1 << (regval >> 6)) << 20; |