blob: 9863f4b6d418ecc7b618d5e4257323388142ac42 [file] [log] [blame]
Jaya Kumar03c33a42008-04-28 02:15:38 -07001/*
2 * metronomefb.h - definitions for the metronome framebuffer driver
3 *
4 * Copyright (C) 2008 by Jaya Kumar
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file COPYING in the main directory of this archive for
8 * more details.
9 *
10 */
11
12#ifndef _LINUX_METRONOMEFB_H_
13#define _LINUX_METRONOMEFB_H_
14
Jaya Kumar03c33a42008-04-28 02:15:38 -070015/* command structure used by metronome controller */
16struct metromem_cmd {
17 u16 opcode;
18 u16 args[((64-2)/2)];
19 u16 csum;
20};
21
22/* struct used by metronome. board specific stuff comes from *board */
23struct metronomefb_par {
Jaya Kumar03c33a42008-04-28 02:15:38 -070024 struct metromem_cmd *metromem_cmd;
25 unsigned char *metromem_wfm;
26 unsigned char *metromem_img;
27 u16 *metromem_img_csum;
28 u16 *csum_table;
Jaya Kumar03c33a42008-04-28 02:15:38 -070029 dma_addr_t metromem_dma;
Jaya Kumar03c33a42008-04-28 02:15:38 -070030 struct fb_info *info;
31 struct metronome_board *board;
32 wait_queue_head_t waitq;
33 u8 frame_count;
Jaya Kumare9355082008-08-19 11:17:55 +010034 int extra_size;
35 int dt;
Jaya Kumar03c33a42008-04-28 02:15:38 -070036};
37
Jaya Kumare9355082008-08-19 11:17:55 +010038/* board specific routines and data */
Jaya Kumar03c33a42008-04-28 02:15:38 -070039struct metronome_board {
Jaya Kumare9355082008-08-19 11:17:55 +010040 struct module *owner; /* the platform device */
Jaya Kumar03c33a42008-04-28 02:15:38 -070041 void (*set_rst)(struct metronomefb_par *, int);
42 void (*set_stdby)(struct metronomefb_par *, int);
Jaya Kumare9355082008-08-19 11:17:55 +010043 void (*cleanup)(struct metronomefb_par *);
Jaya Kumar03c33a42008-04-28 02:15:38 -070044 int (*met_wait_event)(struct metronomefb_par *);
45 int (*met_wait_event_intr)(struct metronomefb_par *);
46 int (*setup_irq)(struct fb_info *);
Jaya Kumare9355082008-08-19 11:17:55 +010047 int (*setup_fb)(struct metronomefb_par *);
48 int (*setup_io)(struct metronomefb_par *);
49 int (*get_panel_type)(void);
50 unsigned char *metromem;
51 int fw;
52 int fh;
53 int wfm_size;
54 struct fb_info *host_fbinfo; /* the host LCD controller's fbi */
Jaya Kumar03c33a42008-04-28 02:15:38 -070055};
56
57#endif