From patchwork Mon May 4 20:41:56 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Helt X-Patchwork-Id: 26862 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id BF248B6F56 for ; Tue, 5 May 2009 06:56:23 +1000 (EST) Received: by ozlabs.org (Postfix) id ABFB8DDDF6; Tue, 5 May 2009 06:56:23 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 5303EDDDF3 for ; Tue, 5 May 2009 06:56:23 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754178AbZEDU4U (ORCPT ); Mon, 4 May 2009 16:56:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753946AbZEDU4U (ORCPT ); Mon, 4 May 2009 16:56:20 -0400 Received: from smtp239.poczta.interia.pl ([217.74.64.239]:46988 "EHLO smtp239.poczta.interia.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754178AbZEDU4T (ORCPT ); Mon, 4 May 2009 16:56:19 -0400 Received: by smtp239.poczta.interia.pl (INTERIA.PL, from userid 502) id 19FF23712FF; Mon, 4 May 2009 22:56:18 +0200 (CEST) Received: from poczta.interia.pl (mi01.poczta.interia.pl [10.217.12.1]) by smtp239.poczta.interia.pl (INTERIA.PL) with ESMTP id 31C2D37182B; Mon, 4 May 2009 22:37:21 +0200 (CEST) Received: by poczta.interia.pl (INTERIA.PL, from userid 502) id 839B025A5AE0; Mon, 4 May 2009 22:37:21 +0200 (CEST) Received: from krzysio.net (93-181-133-4.as.kn.pl [93.181.133.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by www.poczta.fm (INTERIA.PL) with ESMTP id 3CE2625A5B1B; Mon, 4 May 2009 22:37:20 +0200 (CEST) Date: Mon, 4 May 2009 22:41:56 +0200 From: Krzysztof Helt To: sparclinux , Linux-fbdev-devel Subject: [PATCH] leo: use standard fields for framebuffer physical address and length Message-Id: <20090504224156.058f65ea.krzysztof.h1@poczta.fm> X-Mailer: Sylpheed 2.4.3 (GTK+ 2.11.0; i686-pc-linux-gnu) Mime-Version: 1.0 X-EMID: 8c0b138 Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org From: Krzysztof Helt Use standard fields fbinfo.fix.smem_start and fbinfo.fix.smem_len for physical address and length of framebuffer. This also fixes output of the 'fbset -i' command - address and length of the framebuffer are displayed correctly. Signed-off-by: Krzysztof Helt --- ---------------------------------------------------------------------- Gotowka na koncie. Otworz konto direct i wez podwojny limit. http://link.interia.pl/f2145 -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff -urp linux-orig/drivers/video/leo.c linux-2.6.30/drivers/video/leo.c --- linux-orig/drivers/video/leo.c 2008-10-13 18:03:36.000000000 +0200 +++ linux-2.6.30/drivers/video/leo.c 2009-05-04 01:00:11.000000000 +0200 @@ -191,9 +191,7 @@ struct leo_par { u32 flags; #define LEO_FLAG_BLANKED 0x00000001 - unsigned long physbase; unsigned long which_io; - unsigned long fbsize; }; static void leo_wait(struct leo_lx_krn __iomem *lx_krn) @@ -420,16 +418,14 @@ static int leo_mmap(struct fb_info *info struct leo_par *par = (struct leo_par *)info->par; return sbusfb_mmap_helper(leo_mmap_map, - par->physbase, par->fbsize, + info->fix.smem_start, info->fix.smem_len, par->which_io, vma); } static int leo_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) { - struct leo_par *par = (struct leo_par *) info->par; - return sbusfb_ioctl_helper(cmd, arg, info, - FBTYPE_SUNLEO, 32, par->fbsize); + FBTYPE_SUNLEO, 32, info->fix.smem_len); } /* @@ -569,7 +565,7 @@ static int __devinit leo_probe(struct of spin_lock_init(&par->lock); - par->physbase = op->resource[0].start; + info->fix.smem_start = op->resource[0].start; par->which_io = op->resource[0].flags & IORESOURCE_BITS; sbusfb_fill_var(&info->var, dp, 32); @@ -577,7 +573,7 @@ static int __devinit leo_probe(struct of linebytes = of_getintprop_default(dp, "linebytes", info->var.xres); - par->fbsize = PAGE_ALIGN(linebytes * info->var.yres); + info->fix.smem_len = PAGE_ALIGN(linebytes * info->var.yres); par->lc_ss0_usr = of_ioremap(&op->resource[0], LEO_OFF_LC_SS0_USR, @@ -627,7 +623,7 @@ static int __devinit leo_probe(struct of printk(KERN_INFO "%s: leo at %lx:%lx\n", dp->full_name, - par->which_io, par->physbase); + par->which_io, info->fix.smem_start); return 0;