From patchwork Tue Jan 11 23:54:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Miller X-Patchwork-Id: 472831 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 p0BNrtfq009847 for ; Tue, 11 Jan 2011 23:53:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932678Ab1AKXxu (ORCPT ); Tue, 11 Jan 2011 18:53:50 -0500 Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:33259 "EHLO sunset.davemloft.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932677Ab1AKXxt (ORCPT ); Tue, 11 Jan 2011 18:53:49 -0500 Received: from localhost (localhost [127.0.0.1]) by sunset.davemloft.net (Postfix) with ESMTP id 1082A24C088; Tue, 11 Jan 2011 15:54:22 -0800 (PST) Date: Tue, 11 Jan 2011 15:54:21 -0800 (PST) Message-Id: <20110111.155421.51284798.davem@davemloft.net> To: linux-fbdev@vger.kernel.org CC: sparclinux@vger.kernel.org, alex.buell@munted.org.uk Subject: [PATCH 20/22] s3fb: 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:53:55 +0000 (UTC) diff --git a/drivers/video/s3fb.c b/drivers/video/s3fb.c index 45e1d43..64ef7b3 100644 --- a/drivers/video/s3fb.c +++ b/drivers/video/s3fb.c @@ -934,6 +934,8 @@ static int __devinit s3_identification(struct s3fb_info *par) static int __devinit s3_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 s3fb_info *par; int rc; @@ -983,6 +985,15 @@ static int __devinit s3_pci_probe(struct pci_dev *dev, const struct pci_device_i goto err_iomap; } + 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; + /* Unlock regs */ cr38 = vga_rcrt(par->state.vgabase, 0x38); cr39 = vga_rcrt(par->state.vgabase, 0x39);