2005-04-17 02:20:36 +04:00
/*
* linux / drivers / video / sa1100fb . h
* - - StrongARM 1100 LCD Controller Frame Buffer Device
*
* Copyright ( C ) 1999 Eric A . Thomas
* Based on acornfb . c Copyright ( C ) Russell King .
*
* This file is subject to the terms and conditions of the GNU General Public
* License . See the file COPYING in the main directory of this archive
* for more details .
*/
/* Shadows for LCD controller registers */
struct sa1100fb_lcd_reg {
unsigned long lccr0 ;
unsigned long lccr1 ;
unsigned long lccr2 ;
unsigned long lccr3 ;
} ;
struct sa1100fb_info {
struct fb_info fb ;
struct device * dev ;
2012-01-14 14:13:30 +04:00
const struct sa1100fb_rgb * rgb [ NR_RGB ] ;
2005-04-17 02:20:36 +04:00
u_int max_bpp ;
u_int max_xres ;
u_int max_yres ;
/*
* These are the addresses we mapped
* the framebuffer memory region to .
*/
dma_addr_t map_dma ;
u_char * map_cpu ;
u_int map_size ;
u_char * screen_cpu ;
dma_addr_t screen_dma ;
u16 * palette_cpu ;
dma_addr_t palette_dma ;
u_int palette_size ;
dma_addr_t dbar1 ;
dma_addr_t dbar2 ;
u_int lccr0 ;
u_int lccr3 ;
u_int cmap_inverse : 1 ,
cmap_static : 1 ,
unused : 30 ;
u_int reg_lccr0 ;
u_int reg_lccr1 ;
u_int reg_lccr2 ;
u_int reg_lccr3 ;
volatile u_char state ;
volatile u_char task_state ;
2008-07-24 08:31:16 +04:00
struct mutex ctrlr_lock ;
2005-04-17 02:20:36 +04:00
wait_queue_head_t ctrlr_wait ;
struct work_struct task ;
# ifdef CONFIG_CPU_FREQ
struct notifier_block freq_transition ;
struct notifier_block freq_policy ;
# endif
} ;
2007-02-10 12:46:25 +03:00
# define TO_INF(ptr,member) container_of(ptr,struct sa1100fb_info,member)
2005-04-17 02:20:36 +04:00
# define SA1100_PALETTE_MODE_VAL(bpp) (((bpp) & 0x018) << 9)
/*
* These are the actions for set_ctrlr_state
*/
# define C_DISABLE (0)
# define C_ENABLE (1)
# define C_DISABLE_CLKCHANGE (2)
# define C_ENABLE_CLKCHANGE (3)
# define C_REENABLE (4)
# define C_DISABLE_PM (5)
# define C_ENABLE_PM (6)
# define C_STARTUP (7)
# define SA1100_NAME "SA1100"
/*
* Minimum X and Y resolutions
*/
# define MIN_XRES 64
# define MIN_YRES 64