162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * hecubafb.h - definitions for the hecuba framebuffer driver 362306a36Sopenharmony_ci * 462306a36Sopenharmony_ci * Copyright (C) 2008 by Jaya Kumar 562306a36Sopenharmony_ci * 662306a36Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public 762306a36Sopenharmony_ci * License. See the file COPYING in the main directory of this archive for 862306a36Sopenharmony_ci * more details. 962306a36Sopenharmony_ci * 1062306a36Sopenharmony_ci */ 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci#ifndef _LINUX_HECUBAFB_H_ 1362306a36Sopenharmony_ci#define _LINUX_HECUBAFB_H_ 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ci/* Apollo controller specific defines */ 1662306a36Sopenharmony_ci#define APOLLO_START_NEW_IMG 0xA0 1762306a36Sopenharmony_ci#define APOLLO_STOP_IMG_DATA 0xA1 1862306a36Sopenharmony_ci#define APOLLO_DISPLAY_IMG 0xA2 1962306a36Sopenharmony_ci#define APOLLO_ERASE_DISPLAY 0xA3 2062306a36Sopenharmony_ci#define APOLLO_INIT_DISPLAY 0xA4 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ci/* Hecuba interface specific defines */ 2362306a36Sopenharmony_ci#define HCB_WUP_BIT 0x01 2462306a36Sopenharmony_ci#define HCB_DS_BIT 0x02 2562306a36Sopenharmony_ci#define HCB_RW_BIT 0x04 2662306a36Sopenharmony_ci#define HCB_CD_BIT 0x08 2762306a36Sopenharmony_ci#define HCB_ACK_BIT 0x80 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ci/* struct used by hecuba. board specific stuff comes from *board */ 3062306a36Sopenharmony_cistruct hecubafb_par { 3162306a36Sopenharmony_ci struct fb_info *info; 3262306a36Sopenharmony_ci struct hecuba_board *board; 3362306a36Sopenharmony_ci void (*send_command)(struct hecubafb_par *, unsigned char); 3462306a36Sopenharmony_ci void (*send_data)(struct hecubafb_par *, unsigned char); 3562306a36Sopenharmony_ci}; 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci/* board specific routines 3862306a36Sopenharmony_ciboard drivers can implement wait_for_ack with interrupts if desired. if 3962306a36Sopenharmony_ciwait_for_ack is called with clear=0, then go to sleep and return when ack 4062306a36Sopenharmony_cigoes hi or if wait_for_ack with clear=1, then return when ack goes lo */ 4162306a36Sopenharmony_cistruct hecuba_board { 4262306a36Sopenharmony_ci struct module *owner; 4362306a36Sopenharmony_ci void (*remove)(struct hecubafb_par *); 4462306a36Sopenharmony_ci void (*set_ctl)(struct hecubafb_par *, unsigned char, unsigned char); 4562306a36Sopenharmony_ci void (*set_data)(struct hecubafb_par *, unsigned char); 4662306a36Sopenharmony_ci void (*wait_for_ack)(struct hecubafb_par *, int); 4762306a36Sopenharmony_ci int (*init)(struct hecubafb_par *); 4862306a36Sopenharmony_ci}; 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci#endif 52