Jaya Kumar | 03c33a4 | 2008-04-28 02:15:38 -0700 | [diff] [blame] | 1 | /* |
| 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 | |
| 15 | /* address and control descriptors used by metronome controller */ |
| 16 | struct metromem_desc { |
| 17 | u32 mFDADR0; |
| 18 | u32 mFSADR0; |
| 19 | u32 mFIDR0; |
| 20 | u32 mLDCMD0; |
| 21 | }; |
| 22 | |
| 23 | /* command structure used by metronome controller */ |
| 24 | struct metromem_cmd { |
| 25 | u16 opcode; |
| 26 | u16 args[((64-2)/2)]; |
| 27 | u16 csum; |
| 28 | }; |
| 29 | |
| 30 | /* struct used by metronome. board specific stuff comes from *board */ |
| 31 | struct metronomefb_par { |
| 32 | unsigned char *metromem; |
| 33 | struct metromem_desc *metromem_desc; |
| 34 | struct metromem_cmd *metromem_cmd; |
| 35 | unsigned char *metromem_wfm; |
| 36 | unsigned char *metromem_img; |
| 37 | u16 *metromem_img_csum; |
| 38 | u16 *csum_table; |
| 39 | int metromemsize; |
| 40 | dma_addr_t metromem_dma; |
| 41 | dma_addr_t metromem_desc_dma; |
| 42 | struct fb_info *info; |
| 43 | struct metronome_board *board; |
| 44 | wait_queue_head_t waitq; |
| 45 | u8 frame_count; |
| 46 | }; |
| 47 | |
| 48 | /* board specific routines */ |
| 49 | struct metronome_board { |
| 50 | struct module *owner; |
| 51 | void (*free_irq)(struct fb_info *); |
| 52 | void (*init_gpio_regs)(struct metronomefb_par *); |
| 53 | void (*init_lcdc_regs)(struct metronomefb_par *); |
| 54 | void (*post_dma_setup)(struct metronomefb_par *); |
| 55 | void (*set_rst)(struct metronomefb_par *, int); |
| 56 | void (*set_stdby)(struct metronomefb_par *, int); |
| 57 | int (*met_wait_event)(struct metronomefb_par *); |
| 58 | int (*met_wait_event_intr)(struct metronomefb_par *); |
| 59 | int (*setup_irq)(struct fb_info *); |
| 60 | }; |
| 61 | |
| 62 | #endif |