18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci * hecubafb.h - definitions for the hecuba framebuffer driver
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci * Copyright (C) 2008 by Jaya Kumar
58c2ecf20Sopenharmony_ci *
68c2ecf20Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public
78c2ecf20Sopenharmony_ci * License. See the file COPYING in the main directory of this archive for
88c2ecf20Sopenharmony_ci * more details.
98c2ecf20Sopenharmony_ci *
108c2ecf20Sopenharmony_ci */
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci#ifndef _LINUX_HECUBAFB_H_
138c2ecf20Sopenharmony_ci#define _LINUX_HECUBAFB_H_
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci/* Apollo controller specific defines */
168c2ecf20Sopenharmony_ci#define APOLLO_START_NEW_IMG	0xA0
178c2ecf20Sopenharmony_ci#define APOLLO_STOP_IMG_DATA	0xA1
188c2ecf20Sopenharmony_ci#define APOLLO_DISPLAY_IMG	0xA2
198c2ecf20Sopenharmony_ci#define APOLLO_ERASE_DISPLAY	0xA3
208c2ecf20Sopenharmony_ci#define APOLLO_INIT_DISPLAY	0xA4
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci/* Hecuba interface specific defines */
238c2ecf20Sopenharmony_ci#define HCB_WUP_BIT	0x01
248c2ecf20Sopenharmony_ci#define HCB_DS_BIT 	0x02
258c2ecf20Sopenharmony_ci#define HCB_RW_BIT 	0x04
268c2ecf20Sopenharmony_ci#define HCB_CD_BIT 	0x08
278c2ecf20Sopenharmony_ci#define HCB_ACK_BIT 	0x80
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ci/* struct used by hecuba. board specific stuff comes from *board */
308c2ecf20Sopenharmony_cistruct hecubafb_par {
318c2ecf20Sopenharmony_ci	struct fb_info *info;
328c2ecf20Sopenharmony_ci	struct hecuba_board *board;
338c2ecf20Sopenharmony_ci	void (*send_command)(struct hecubafb_par *, unsigned char);
348c2ecf20Sopenharmony_ci	void (*send_data)(struct hecubafb_par *, unsigned char);
358c2ecf20Sopenharmony_ci};
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci/* board specific routines
388c2ecf20Sopenharmony_ciboard drivers can implement wait_for_ack with interrupts if desired. if
398c2ecf20Sopenharmony_ciwait_for_ack is called with clear=0, then go to sleep and return when ack
408c2ecf20Sopenharmony_cigoes hi or if wait_for_ack with clear=1, then return when ack goes lo */
418c2ecf20Sopenharmony_cistruct hecuba_board {
428c2ecf20Sopenharmony_ci	struct module *owner;
438c2ecf20Sopenharmony_ci	void (*remove)(struct hecubafb_par *);
448c2ecf20Sopenharmony_ci	void (*set_ctl)(struct hecubafb_par *, unsigned char, unsigned char);
458c2ecf20Sopenharmony_ci	void (*set_data)(struct hecubafb_par *, unsigned char);
468c2ecf20Sopenharmony_ci	void (*wait_for_ack)(struct hecubafb_par *, int);
478c2ecf20Sopenharmony_ci	int (*init)(struct hecubafb_par *);
488c2ecf20Sopenharmony_ci};
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ci#endif
52