From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 4 Sep 2002 21:58:56 +0200 To: linuxppc-embedded@lists.linuxppc.org Subject: [PATCH] Xilinx TFT interface driver Message-ID: <20020904195856.GJ781@mind.be> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="7iMSBzlTiPOCCT2k" From: p2@mind.be (Peter 'p2' De Schrijver) Sender: owner-linuxppc-embedded@lists.linuxppc.org List-Id: --7iMSBzlTiPOCCT2k Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, Attached you will find a patch implementing a Linux framebuffer driver for the Xilinx TFT interface. It was tested on a Xilinx Virtex2Pro implementation. Comments welcome, Peter. --7iMSBzlTiPOCCT2k Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=xtft-patch diff -urN -x CVS -x config -x modules -x mtd -x jffs2 -x jffs linuxppc_2_4_clean/drivers/video/Config.in linuxppc_2_4_xseg2.new.clean2/drivers/video/Config.in --- linuxppc_2_4_clean/drivers/video/Config.in 2002-07-20 12:03:22.000000000 +0200 +++ linuxppc_2_4_xseg2.new.clean2/drivers/video/Config.in 2002-09-01 17:10:29.000000000 +0200 @@ -216,6 +216,10 @@ if [ "$CONFIG_NINO" = "y" ]; then bool ' TMPTX3912/PR31700 frame buffer support' CONFIG_FB_TX3912 fi + + if [ "$CONFIG_XSEG2" = "y" ]; then + bool ' Xilinx TFT core framebuffer support' CONFIG_FB_XILINX_TFT + fi if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then tristate ' Virtual Frame Buffer support (ONLY FOR TESTING!)' CONFIG_FB_VIRTUAL fi @@ -377,7 +381,8 @@ "$CONFIG_FB_FM2" = "y" -o "$CONFIG_FB_SGIVW" = "y" -o \ "$CONFIG_FB_RADEON" = "y" -o "$CONFIG_FB_PVR2" = "y" -o \ "$CONFIG_FB_3DFX" = "y" -o "$CONFIG_FB_SIS" = "y" -o \ - "$CONFIG_FB_VOODOO1" = "y" -o "$CONFIG_FB_CYBER2000" = "y" ]; then + "$CONFIG_FB_VOODOO1" = "y" -o "$CONFIG_FB_CYBER2000" = "y" -o \ + "$CONFIG_FB_XILINX_TFT" = "y" ]; then define_tristate CONFIG_FBCON_CFB32 y else if [ "$CONFIG_FB_ATARI" = "m" -o "$CONFIG_FB_ATY" = "m" -o \ diff -urN -x CVS -x config -x modules -x mtd -x jffs2 -x jffs linuxppc_2_4_clean/drivers/video/Makefile linuxppc_2_4_xseg2.new.clean2/drivers/video/Makefile --- linuxppc_2_4_clean/drivers/video/Makefile 2002-07-20 12:03:24.000000000 +0200 +++ linuxppc_2_4_xseg2.new.clean2/drivers/video/Makefile 2002-09-01 16:33:47.000000000 +0200 @@ -89,7 +89,7 @@ obj-$(CONFIG_FB_MAXINE) += maxinefb.o obj-$(CONFIG_FB_TX3912) += tx3912fb.o obj-$(CONFIG_FB_RPX) += rpxfb.o - +obj-$(CONFIG_FB_XILINX_TFT) += xilinx_tft.o subdir-$(CONFIG_FB_MATROX) += matrox ifeq ($(CONFIG_FB_MATROX),y) diff -urN -x CVS -x config -x modules -x mtd -x jffs2 -x jffs linuxppc_2_4_clean/drivers/video/fbmem.c linuxppc_2_4_xseg2.new.clean2/drivers/video/fbmem.c --- linuxppc_2_4_clean/drivers/video/fbmem.c 2002-07-20 12:03:53.000000000 +0200 +++ linuxppc_2_4_xseg2.new.clean2/drivers/video/fbmem.c 2002-09-04 21:24:39.000000000 +0200 @@ -136,6 +136,7 @@ extern int pvr2fb_setup(char*); extern int sstfb_init(void); extern int sstfb_setup(char*); +extern int xtftfb_init(void); static struct { const char *name; @@ -227,6 +228,10 @@ #ifdef CONFIG_FB_VOODOO1 { "sst", sstfb_init, sstfb_setup }, #endif +#ifdef CONFIG_FB_XILINX_TFT + { "xilinxtft", xtftfb_init, NULL }, +#endif + /* * Generic drivers that are used as fallbacks diff -urN -x CVS -x config -x modules -x mtd -x jffs2 -x jffs linuxppc_2_4_clean/drivers/video/xilinx_tft.c linuxppc_2_4_xseg2.new.clean2/drivers/video/xilinx_tft.c --- linuxppc_2_4_clean/drivers/video/xilinx_tft.c 1970-01-01 01:00:00.000000000 +0100 +++ linuxppc_2_4_xseg2.new.clean2/drivers/video/xilinx_tft.c 2002-09-04 20:43:45.000000000 +0200 @@ -0,0 +1,286 @@ +/* + * xilinx_tft.c: A driver for Xilinx TFT screen interface core + * + * Copyright 2002 Mind NV + * + * http://www.mind.be/ + * + * Author : Peter De Schrijver (p2@mind.be) + * + * This software may be used and distributed according to the terms of + * the GNU General Public License (GPL) version 2, incorporated herein by + * reference. Drivers based on or derived from this code fall under the GPL + * and must retain the authorship, copyright and this license notice. This + * file is not a complete program and may only be used when the entire + * operating system is licensed under the GPL. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include