From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ralf Baechle Subject: [PATCH] au1100fb framebuffer fixes Date: Fri, 14 Oct 2005 22:58:42 +0100 Message-ID: <20051014215842.GA3381@linux-mips.org> Reply-To: linux-fbdev-devel@lists.sourceforge.net Mime-Version: 1.0 Return-path: Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list1.sourceforge.net with esmtp (Exim 4.30) id 1ERRyB-0004Fb-1p for linux-fbdev-devel@lists.sourceforge.net; Mon, 17 Oct 2005 03:11:51 -0700 Received: from extgw-uk.mips.com ([62.254.210.129] helo=bacchus.net.dhis.org) by mail.sourceforge.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.44) id 1ERRy9-0000pm-Mg for linux-fbdev-devel@lists.sourceforge.net; Mon, 17 Oct 2005 03:11:50 -0700 Resent-Message-Id: <200510142228.j9EMS94w014111@dea.linux-mips.net> Content-Disposition: inline Resent-To: linux-fbdev-devel@lists.sourceforge.net, Andrew Morton Sender: linux-fbdev-devel-admin@lists.sourceforge.net Errors-To: linux-fbdev-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Id: List-Post: List-Help: List-Subscribe: , List-Archive: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-fbdev-devel@lists.sourceforge.net Cc: Andrew Morton For reviewing pleassure. If nobody objects I'd like to submit this one as part of my pile of MIPS patches. The au1100fb driver is the driver for the AMD Alchemy SOCs. Ralf Author: Pete Popov Date: Mon Apr 4 01:06:19 2005 +0000 Au1100 FB driver uplift for 2.6. Signed-off-by: Ralf Baechle Index: manual.git/arch/mips/au1000/common/platform.c =================================================================== --- manual.git.orig/arch/mips/au1000/common/platform.c +++ manual.git/arch/mips/au1000/common/platform.c @@ -41,8 +41,42 @@ static struct platform_device au1xxx_usb .resource = au1xxx_usb_ohci_resources, }; +/*** AU1100 LCD controller ***/ + +#ifdef CONFIG_FB_AU1100 +static struct resource au1100_lcd_resources[] = { + [0] = { + .start = LCD_PHYS_ADDR, + .end = LCD_PHYS_ADDR + 0x800 - 1, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = AU1100_LCD_INT, + .end = AU1100_LCD_INT, + .flags = IORESOURCE_IRQ, + } +}; + +static u64 au1100_lcd_dmamask = ~(u32)0; + +static struct platform_device au1100_lcd_device = { + .name = "au1100-lcd", + .id = 0, + .dev = { + .dma_mask = &au1100_lcd_dmamask, + .coherent_dma_mask = 0xffffffff, + }, + .num_resources = ARRAY_SIZE(au1100_lcd_resources), + .resource = au1100_lcd_resources, +}; +#endif + + static struct platform_device *au1xxx_platform_devices[] __initdata = { &au1xxx_usb_ohci_device, +#ifdef CONFIG_FB_AU1100 + &au1100_lcd_device, +#endif }; int au1xxx_platform_init(void) Index: manual.git/arch/mips/au1000/common/setup.c =================================================================== --- manual.git.orig/arch/mips/au1000/common/setup.c +++ manual.git/arch/mips/au1000/common/setup.c @@ -106,8 +106,6 @@ void __init plat_setup(void) /*strcat(argptr, " video=au1100fb:panel:Sharp_320x240_16");*/ #ifdef CONFIG_MIPS_HYDROGEN3 strcat(argptr, " video=au1100fb:panel:Hydrogen_3_NEC_panel_320x240,nohwcursor"); -#else - strcat(argptr, " video=au1100fb:panel:s10,nohwcursor"); #endif } #endif Index: manual.git/drivers/video/Makefile =================================================================== --- manual.git.orig/drivers/video/Makefile +++ manual.git/drivers/video/Makefile @@ -86,7 +86,7 @@ obj-$(CONFIG_FB_CIRRUS) += cirrusfb.o obj-$(CONFIG_FB_ASILIANT) += asiliantfb.o obj-$(CONFIG_FB_PXA) += pxafb.o obj-$(CONFIG_FB_W100) += w100fb.o -obj-$(CONFIG_FB_AU1100) += au1100fb.o fbgen.o +obj-$(CONFIG_FB_AU1100) += au1100fb.o obj-$(CONFIG_FB_PMAG_AA) += pmag-aa-fb.o obj-$(CONFIG_FB_PMAG_BA) += pmag-ba-fb.o obj-$(CONFIG_FB_PMAGB_B) += pmagb-b-fb.o Index: manual.git/drivers/video/au1100fb.c =================================================================== --- manual.git.orig/drivers/video/au1100fb.c +++ manual.git/drivers/video/au1100fb.c @@ -2,6 +2,11 @@ * BRIEF MODULE DESCRIPTION * Au1100 LCD Driver. * + * Rewritten for 2.6 by Embedded Alley Solutions + * , based on submissions by + * Karl Lessard + * + * * Copyright 2002 MontaVista Software * Author: MontaVista Software, Inc. * ppopov@mvista.com or source@mvista.com @@ -33,298 +38,253 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ - +#include #include #include #include #include #include -#include -#include -#include #include #include -#include +#include +#include +#include -#include -#include -#include "au1100fb.h" +#include -#include