From: Jaya Kumar Subject: [PATCH 4/4 2.6.24] fbdev: platforming hecubafb and n411 v4 Date: Fri, 04 Apr 2008 08:24:57 -0400 Message-ID: <20080404122456.6404.75452.sendpatchset@hit-nxdomain.opendns.com> References: <20080404122358.6404.54652.sendpatchset@hit-nxdomain.opendns.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from sc8-sf-mx2-b.sourceforge.net ([10.3.1.92] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1Jhlsw-0004EI-8f for linux-fbdev-devel@lists.sourceforge.net; Fri, 04 Apr 2008 06:23:14 -0700 Received: from wa-out-1112.google.com ([209.85.146.182]) by mail.sourceforge.net with esmtp (Exim 4.44) id 1Jhlst-0007ye-RY for linux-fbdev-devel@lists.sourceforge.net; Fri, 04 Apr 2008 06:23:14 -0700 Received: by wa-out-1112.google.com with SMTP id k22so42798waf.18 for ; Fri, 04 Apr 2008 06:23:11 -0700 (PDT) In-Reply-To: <20080404122358.6404.54652.sendpatchset@hit-nxdomain.opendns.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-fbdev-devel-bounces@lists.sourceforge.net Errors-To: linux-fbdev-devel-bounces@lists.sourceforge.net To: linux-fbdev-devel@lists.sourceforge.net Cc: akpm@linux-foundation.org, Jaya Kumar This patch splits hecubafb into the platform independent hecubafb and the platform dependent n411. Signed-off-by: Jaya Kumar --- drivers/video/Kconfig | 17 +-- drivers/video/hecubafb.c | 250 +++++++++-------------------------------------- drivers/video/n411.c | 202 +++++++++++++++++++++++++++++++++++++ include/video/hecubafb.h | 51 +++++++++ 4 files changed, 314 insertions(+), 206 deletions(-) diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index f66e9a5..eb652c6 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -154,6 +154,11 @@ config FB_METRONOME depends on FB depends on FB_DEFERRED_IO +config FB_HECUBA + tristate + depends on FB + depends on FB_DEFERRED_IO + config FB_SVGALIB tristate depends on FB @@ -679,20 +684,18 @@ config FB_IMAC help This is the frame buffer device driver for the Intel-based Macintosh -config FB_HECUBA - tristate "Hecuba board support" +config FB_N411 + tristate "N411 Apollo/Hecuba devkit support" depends on FB && X86 && MMU select FB_SYS_FILLRECT select FB_SYS_COPYAREA select FB_SYS_IMAGEBLIT select FB_SYS_FOPS select FB_DEFERRED_IO + select FB_HECUBA help - This enables support for the Hecuba board. This driver was tested - with an E-Ink 800x600 display and x86 SBCs through a 16 bit GPIO - interface (8 bit data, 4 bit control). If you anticipate using - this driver, say Y or M; otherwise say N. You must specify the - GPIO IO address to be used for setting control and data. + This enables support for the Apollo display controller in its + Hecuba form using the n411 devkit. config FB_HGA tristate "Hercules mono graphics support" diff --git a/drivers/video/hecubafb.c b/drivers/video/hecubafb.c index b77d033..0b4bffb 100644 --- a/drivers/video/hecubafb.c +++ b/drivers/video/hecubafb.c @@ -1,5 +1,5 @@ /* - * linux/drivers/video/hecubafb.c -- FB driver for Hecuba controller + * linux/drivers/video/hecubafb.c -- FB driver for Hecuba/Apollo controller * * Copyright (C) 2006, Jaya Kumar * This work was sponsored by CIS(M) Sdn Bhd @@ -17,18 +17,13 @@ * values. There are other commands that the display is capable of, * beyond the 5 used here but they are more complex. * - * This driver is written to be used with the Hecuba display controller - * board, and tested with the EInk 800x600 display in 1 bit mode. - * The interface between Hecuba and the host is TTL based GPIO. The - * GPIO requirements are 8 writable data lines and 6 lines for control. - * Only 4 of the controls are actually used here but 6 for future use. - * The driver requires the IO addresses for data and control GPIO at - * load time. It is also possible to use this display with a standard - * PC parallel port. + * This driver is written to be used with the Hecuba display architecture. + * The actual display chip is called Apollo and the interface electronics + * it needs is called Hecuba. * - * General notes: - * - User must set hecubafb_enable=1 to enable it - * - User must set dio_addr=0xIOADDR cio_addr=0xIOADDR c2io_addr=0xIOADDR + * It is intended to be architecture independent. A board specific driver + * must be used to perform all the physical IO interactions. An example + * is provided as n411.c * */ @@ -47,34 +42,12 @@ #include #include -/* Apollo controller specific defines */ -#define APOLLO_START_NEW_IMG 0xA0 -#define APOLLO_STOP_IMG_DATA 0xA1 -#define APOLLO_DISPLAY_IMG 0xA2 -#define APOLLO_ERASE_DISPLAY 0xA3 -#define APOLLO_INIT_DISPLAY 0xA4 - -/* Hecuba interface specific defines */ -/* WUP is inverted, CD is inverted, DS is inverted */ -#define HCB_NWUP_BIT 0x01 -#define HCB_NDS_BIT 0x02 -#define HCB_RW_BIT 0x04 -#define HCB_NCD_BIT 0x08 -#define HCB_ACK_BIT 0x80 +#include