From patchwork Tue Jan 11 23:55:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Miller X-Patchwork-Id: 472851 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0BNssa5010484 for ; Tue, 11 Jan 2011 23:54:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932675Ab1AKXyp (ORCPT ); Tue, 11 Jan 2011 18:54:45 -0500 Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:33266 "EHLO sunset.davemloft.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932474Ab1AKXyp (ORCPT ); Tue, 11 Jan 2011 18:54:45 -0500 Received: from localhost (localhost [127.0.0.1]) by sunset.davemloft.net (Postfix) with ESMTP id 03C8824C088; Tue, 11 Jan 2011 15:55:18 -0800 (PST) Date: Tue, 11 Jan 2011 15:55:17 -0800 (PST) Message-Id: <20110111.155517.56364809.davem@davemloft.net> To: linux-fbdev@vger.kernel.org CC: sparclinux@vger.kernel.org, alex.buell@munted.org.uk Subject: [PATCH 22/22] vt8623fb: Compute VGA base iomem pointer explicitly. From: David Miller X-Mailer: Mew version 6.3 on Emacs 23.1 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 11 Jan 2011 23:54:54 +0000 (UTC) diff --git a/drivers/video/vt8623fb.c b/drivers/video/vt8623fb.c index 6f6f049..74df7a8 100644 --- a/drivers/video/vt8623fb.c +++ b/drivers/video/vt8623fb.c @@ -661,6 +661,8 @@ static struct fb_ops vt8623fb_ops = { static int __devinit vt8623_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) { + struct pci_bus_region bus_reg; + struct resource vga_res; struct fb_info *info; struct vt8623fb_info *par; unsigned int memsize1, memsize2; @@ -719,6 +721,15 @@ static int __devinit vt8623_pci_probe(struct pci_dev *dev, const struct pci_devi goto err_iomap_2; } + bus_reg.start = 0; + bus_reg.end = 64 * 1024; + + vga_res.flags = IORESOURCE_IO; + + pcibios_bus_to_resource(dev, &vga_res, &bus_reg); + + par->state.vgabase = (void __iomem *) vga_res.start; + /* Find how many physical memory there is on card */ memsize1 = (vga_rseq(par->state.vgabase, 0x34) + 1) >> 1; memsize2 = vga_rseq(par->state.vgabase, 0x39) << 2;