^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) * metronomefb.h - definitions for the metronome framebuffer driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) * Copyright (C) 2008 by Jaya Kumar
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) * This file is subject to the terms and conditions of the GNU General Public
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) * License. See the file COPYING in the main directory of this archive for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) * more details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #ifndef _LINUX_METRONOMEFB_H_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #define _LINUX_METRONOMEFB_H_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) /* command structure used by metronome controller */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) struct metromem_cmd {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) u16 opcode;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) u16 args[((64-2)/2)];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) u16 csum;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) /* struct used by metronome. board specific stuff comes from *board */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) struct metronomefb_par {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) struct metromem_cmd *metromem_cmd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) unsigned char *metromem_wfm;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) unsigned char *metromem_img;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) u16 *metromem_img_csum;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) u16 *csum_table;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) dma_addr_t metromem_dma;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) struct fb_info *info;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) struct metronome_board *board;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) wait_queue_head_t waitq;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) u8 frame_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) int extra_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) int dt;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) /* board specific routines and data */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) struct metronome_board {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) struct module *owner; /* the platform device */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) void (*set_rst)(struct metronomefb_par *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) void (*set_stdby)(struct metronomefb_par *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) void (*cleanup)(struct metronomefb_par *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) int (*met_wait_event)(struct metronomefb_par *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) int (*met_wait_event_intr)(struct metronomefb_par *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) int (*setup_irq)(struct fb_info *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) int (*setup_fb)(struct metronomefb_par *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) int (*setup_io)(struct metronomefb_par *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) int (*get_panel_type)(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) unsigned char *metromem;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) int fw;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) int fh;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) int wfm_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) struct fb_info *host_fbinfo; /* the host LCD controller's fbi */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) #endif