5 * linux/drivers/video/pxafb.h
6 * -- Intel PXA250/210 LCD Controller Frame Buffer Device
8 * Copyright (C) 1999 Eric A. Thomas.
9 * Copyright (C) 2004 Jean-Frederic Clere.
10 * Copyright (C) 2004 Ian Campbell.
11 * Copyright (C) 2004 Jeff Lackey.
12 * Based on sa1100fb.c Copyright (C) 1999 Eric A. Thomas
14 * Based on acornfb.c Copyright (C) Russell King.
16 * 2001-08-03: Cliff Brake <cbrake@acclent.com>
17 * - ported SA1100 code to PXA
19 * This file is subject to the terms and conditions of the GNU General Public
20 * License. See the file COPYING in the main directory of this archive
24 /* PXA LCD DMA descriptor */
25 struct pxafb_dma_descriptor {
53 /* maximum palette size - 256 entries, each 4 bytes long */
54 #define PALETTE_SIZE (256 * 4)
55 #define CMD_BUFF_SIZE (1024 * 50)
57 struct pxafb_dma_buff {
58 unsigned char palette[PAL_MAX * PALETTE_SIZE];
59 uint16_t cmd_buff[CMD_BUFF_SIZE];
60 struct pxafb_dma_descriptor pal_desc[PAL_MAX];
61 struct pxafb_dma_descriptor dma_desc[DMA_MAX];
69 void __iomem *mmio_base;
71 struct pxafb_dma_buff *dma_buff;
72 dma_addr_t dma_buff_phys;
73 dma_addr_t fdadr[DMA_MAX];
76 * These are the addresses we mapped
77 * the framebuffer memory region to.
79 /* raw memory addresses */
80 dma_addr_t map_dma; /* physical */
81 u_char * map_cpu; /* virtual */
84 /* addresses of pieces placed in raw buffer */
85 u_char * screen_cpu; /* virtual address of frame buffer */
86 dma_addr_t screen_dma; /* physical address of frame buffer */
87 u16 * palette_cpu; /* virtual address of palette memory */
105 unsigned long hsync_time;
107 volatile u_char state;
108 volatile u_char task_state;
109 struct mutex ctrlr_lock;
110 wait_queue_head_t ctrlr_wait;
111 struct work_struct task;
113 struct completion disable_done;
115 #ifdef CONFIG_FB_PXA_SMARTPANEL
116 uint16_t *smart_cmds;
118 struct completion command_done;
119 struct completion refresh_done;
120 struct task_struct *smart_thread;
123 #ifdef CONFIG_CPU_FREQ
124 struct notifier_block freq_transition;
125 struct notifier_block freq_policy;
129 #define TO_INF(ptr,member) container_of(ptr,struct pxafb_info,member)
132 * These are the actions for set_ctrlr_state
134 #define C_DISABLE (0)
136 #define C_DISABLE_CLKCHANGE (2)
137 #define C_ENABLE_CLKCHANGE (3)
138 #define C_REENABLE (4)
139 #define C_DISABLE_PM (5)
140 #define C_ENABLE_PM (6)
141 #define C_STARTUP (7)
143 #define PXA_NAME "PXA"
146 * Minimum X and Y resolutions
151 #endif /* __PXAFB_H__ */