1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * hecubafb.h - definitions for the hecuba framebuffer driver 3*4882a593Smuzhiyun * 4*4882a593Smuzhiyun * Copyright (C) 2008 by Jaya Kumar 5*4882a593Smuzhiyun * 6*4882a593Smuzhiyun * This file is subject to the terms and conditions of the GNU General Public 7*4882a593Smuzhiyun * License. See the file COPYING in the main directory of this archive for 8*4882a593Smuzhiyun * more details. 9*4882a593Smuzhiyun * 10*4882a593Smuzhiyun */ 11*4882a593Smuzhiyun 12*4882a593Smuzhiyun #ifndef _LINUX_HECUBAFB_H_ 13*4882a593Smuzhiyun #define _LINUX_HECUBAFB_H_ 14*4882a593Smuzhiyun 15*4882a593Smuzhiyun /* Apollo controller specific defines */ 16*4882a593Smuzhiyun #define APOLLO_START_NEW_IMG 0xA0 17*4882a593Smuzhiyun #define APOLLO_STOP_IMG_DATA 0xA1 18*4882a593Smuzhiyun #define APOLLO_DISPLAY_IMG 0xA2 19*4882a593Smuzhiyun #define APOLLO_ERASE_DISPLAY 0xA3 20*4882a593Smuzhiyun #define APOLLO_INIT_DISPLAY 0xA4 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun /* Hecuba interface specific defines */ 23*4882a593Smuzhiyun #define HCB_WUP_BIT 0x01 24*4882a593Smuzhiyun #define HCB_DS_BIT 0x02 25*4882a593Smuzhiyun #define HCB_RW_BIT 0x04 26*4882a593Smuzhiyun #define HCB_CD_BIT 0x08 27*4882a593Smuzhiyun #define HCB_ACK_BIT 0x80 28*4882a593Smuzhiyun 29*4882a593Smuzhiyun /* struct used by hecuba. board specific stuff comes from *board */ 30*4882a593Smuzhiyun struct hecubafb_par { 31*4882a593Smuzhiyun struct fb_info *info; 32*4882a593Smuzhiyun struct hecuba_board *board; 33*4882a593Smuzhiyun void (*send_command)(struct hecubafb_par *, unsigned char); 34*4882a593Smuzhiyun void (*send_data)(struct hecubafb_par *, unsigned char); 35*4882a593Smuzhiyun }; 36*4882a593Smuzhiyun 37*4882a593Smuzhiyun /* board specific routines 38*4882a593Smuzhiyun board drivers can implement wait_for_ack with interrupts if desired. if 39*4882a593Smuzhiyun wait_for_ack is called with clear=0, then go to sleep and return when ack 40*4882a593Smuzhiyun goes hi or if wait_for_ack with clear=1, then return when ack goes lo */ 41*4882a593Smuzhiyun struct hecuba_board { 42*4882a593Smuzhiyun struct module *owner; 43*4882a593Smuzhiyun void (*remove)(struct hecubafb_par *); 44*4882a593Smuzhiyun void (*set_ctl)(struct hecubafb_par *, unsigned char, unsigned char); 45*4882a593Smuzhiyun void (*set_data)(struct hecubafb_par *, unsigned char); 46*4882a593Smuzhiyun void (*wait_for_ack)(struct hecubafb_par *, int); 47*4882a593Smuzhiyun int (*init)(struct hecubafb_par *); 48*4882a593Smuzhiyun }; 49*4882a593Smuzhiyun 50*4882a593Smuzhiyun 51*4882a593Smuzhiyun #endif 52