iwlwifi: introduce host commands callbacks
[linux/fpc-iii.git] / drivers / video / sa1100fb.h
blob48066ef3af05fa2356171a76932e8252b62b05e5
1 /*
2 * linux/drivers/video/sa1100fb.h
3 * -- StrongARM 1100 LCD Controller Frame Buffer Device
5 * Copyright (C) 1999 Eric A. Thomas
6 * Based on acornfb.c Copyright (C) Russell King.
7 *
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file COPYING in the main directory of this archive
10 * for more details.
14 * These are the bitfields for each
15 * display depth that we support.
17 struct sa1100fb_rgb {
18 struct fb_bitfield red;
19 struct fb_bitfield green;
20 struct fb_bitfield blue;
21 struct fb_bitfield transp;
25 * This structure describes the machine which we are running on.
27 struct sa1100fb_mach_info {
28 u_long pixclock;
30 u_short xres;
31 u_short yres;
33 u_char bpp;
34 u_char hsync_len;
35 u_char left_margin;
36 u_char right_margin;
38 u_char vsync_len;
39 u_char upper_margin;
40 u_char lower_margin;
41 u_char sync;
43 u_int cmap_greyscale:1,
44 cmap_inverse:1,
45 cmap_static:1,
46 unused:29;
48 u_int lccr0;
49 u_int lccr3;
52 /* Shadows for LCD controller registers */
53 struct sa1100fb_lcd_reg {
54 unsigned long lccr0;
55 unsigned long lccr1;
56 unsigned long lccr2;
57 unsigned long lccr3;
60 #define RGB_8 (0)
61 #define RGB_16 (1)
62 #define NR_RGB 2
64 struct sa1100fb_info {
65 struct fb_info fb;
66 struct device *dev;
67 struct sa1100fb_rgb *rgb[NR_RGB];
69 u_int max_bpp;
70 u_int max_xres;
71 u_int max_yres;
74 * These are the addresses we mapped
75 * the framebuffer memory region to.
77 dma_addr_t map_dma;
78 u_char * map_cpu;
79 u_int map_size;
81 u_char * screen_cpu;
82 dma_addr_t screen_dma;
83 u16 * palette_cpu;
84 dma_addr_t palette_dma;
85 u_int palette_size;
87 dma_addr_t dbar1;
88 dma_addr_t dbar2;
90 u_int lccr0;
91 u_int lccr3;
92 u_int cmap_inverse:1,
93 cmap_static:1,
94 unused:30;
96 u_int reg_lccr0;
97 u_int reg_lccr1;
98 u_int reg_lccr2;
99 u_int reg_lccr3;
101 volatile u_char state;
102 volatile u_char task_state;
103 struct semaphore ctrlr_sem;
104 wait_queue_head_t ctrlr_wait;
105 struct work_struct task;
107 #ifdef CONFIG_CPU_FREQ
108 struct notifier_block freq_transition;
109 struct notifier_block freq_policy;
110 #endif
113 #define TO_INF(ptr,member) container_of(ptr,struct sa1100fb_info,member)
115 #define SA1100_PALETTE_MODE_VAL(bpp) (((bpp) & 0x018) << 9)
118 * These are the actions for set_ctrlr_state
120 #define C_DISABLE (0)
121 #define C_ENABLE (1)
122 #define C_DISABLE_CLKCHANGE (2)
123 #define C_ENABLE_CLKCHANGE (3)
124 #define C_REENABLE (4)
125 #define C_DISABLE_PM (5)
126 #define C_ENABLE_PM (6)
127 #define C_STARTUP (7)
129 #define SA1100_NAME "SA1100"
132 * Debug macros
134 #if DEBUG
135 # define DPRINTK(fmt, args...) printk("%s: " fmt, __FUNCTION__ , ## args)
136 #else
137 # define DPRINTK(fmt, args...)
138 #endif
141 * Minimum X and Y resolutions
143 #define MIN_XRES 64
144 #define MIN_YRES 64