162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * metronomefb.h - definitions for the metronome 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_METRONOMEFB_H_ 1362306a36Sopenharmony_ci#define _LINUX_METRONOMEFB_H_ 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ci/* command structure used by metronome controller */ 1662306a36Sopenharmony_cistruct metromem_cmd { 1762306a36Sopenharmony_ci u16 opcode; 1862306a36Sopenharmony_ci u16 args[((64-2)/2)]; 1962306a36Sopenharmony_ci u16 csum; 2062306a36Sopenharmony_ci}; 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ci/* struct used by metronome. board specific stuff comes from *board */ 2362306a36Sopenharmony_cistruct metronomefb_par { 2462306a36Sopenharmony_ci struct metromem_cmd *metromem_cmd; 2562306a36Sopenharmony_ci unsigned char *metromem_wfm; 2662306a36Sopenharmony_ci unsigned char *metromem_img; 2762306a36Sopenharmony_ci u16 *metromem_img_csum; 2862306a36Sopenharmony_ci u16 *csum_table; 2962306a36Sopenharmony_ci dma_addr_t metromem_dma; 3062306a36Sopenharmony_ci struct fb_info *info; 3162306a36Sopenharmony_ci struct metronome_board *board; 3262306a36Sopenharmony_ci wait_queue_head_t waitq; 3362306a36Sopenharmony_ci u8 frame_count; 3462306a36Sopenharmony_ci int extra_size; 3562306a36Sopenharmony_ci int dt; 3662306a36Sopenharmony_ci}; 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ci/* board specific routines and data */ 3962306a36Sopenharmony_cistruct metronome_board { 4062306a36Sopenharmony_ci struct module *owner; /* the platform device */ 4162306a36Sopenharmony_ci void (*set_rst)(struct metronomefb_par *, int); 4262306a36Sopenharmony_ci void (*set_stdby)(struct metronomefb_par *, int); 4362306a36Sopenharmony_ci void (*cleanup)(struct metronomefb_par *); 4462306a36Sopenharmony_ci int (*met_wait_event)(struct metronomefb_par *); 4562306a36Sopenharmony_ci int (*met_wait_event_intr)(struct metronomefb_par *); 4662306a36Sopenharmony_ci int (*setup_irq)(struct fb_info *); 4762306a36Sopenharmony_ci int (*setup_fb)(struct metronomefb_par *); 4862306a36Sopenharmony_ci int (*setup_io)(struct metronomefb_par *); 4962306a36Sopenharmony_ci int (*get_panel_type)(void); 5062306a36Sopenharmony_ci unsigned char *metromem; 5162306a36Sopenharmony_ci int fw; 5262306a36Sopenharmony_ci int fh; 5362306a36Sopenharmony_ci int wfm_size; 5462306a36Sopenharmony_ci struct fb_info *host_fbinfo; /* the host LCD controller's fbi */ 5562306a36Sopenharmony_ci}; 5662306a36Sopenharmony_ci 5762306a36Sopenharmony_ci#endif 58