aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2006-12-07 16:57:38 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-05-08 15:36:25 -0400
commitf4e4c324a5f81f18156499d1ade3732ba1f5b523 (patch)
tree28e454e1263b220dad1f5a747dd96c295cf1fb22 /include
parent994c84ea526ea1c348f63dc3aa7cfeec931bb612 (diff)
ARM: OMAP: Sync headers with linux-omap
This patch syncs omap specific headers with linux-omap. Most of the changes needed because of bitrot caused by driver changes in linux-omap tree. Integrating this is needed for adding support for various omap drivers. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-omap/aic23.h4
-rw-r--r--include/asm-arm/arch-omap/board-apollon.h9
-rw-r--r--include/asm-arm/arch-omap/board-h4.h3
-rw-r--r--include/asm-arm/arch-omap/board.h41
-rw-r--r--include/asm-arm/arch-omap/dsp.h250
-rw-r--r--include/asm-arm/arch-omap/dsp_common.h32
-rw-r--r--include/asm-arm/arch-omap/gpio-switch.h54
-rw-r--r--include/asm-arm/arch-omap/gpmc.h2
-rw-r--r--include/asm-arm/arch-omap/hardware.h9
-rw-r--r--include/asm-arm/arch-omap/io.h11
-rw-r--r--include/asm-arm/arch-omap/irqs.h20
-rw-r--r--include/asm-arm/arch-omap/lcd_lph8923.h14
-rw-r--r--include/asm-arm/arch-omap/lcd_mipid.h24
-rw-r--r--include/asm-arm/arch-omap/led.h24
-rw-r--r--include/asm-arm/arch-omap/mcspi.h1
-rw-r--r--include/asm-arm/arch-omap/memory.h13
-rw-r--r--include/asm-arm/arch-omap/menelaus.h17
-rw-r--r--include/asm-arm/arch-omap/omap16xx.h12
-rw-r--r--include/asm-arm/arch-omap/omap24xx.h9
-rw-r--r--include/asm-arm/arch-omap/omapfb.h131
-rw-r--r--include/asm-arm/arch-omap/sram.h4
-rw-r--r--include/asm-arm/arch-omap/usb.h40
22 files changed, 335 insertions, 389 deletions
diff --git a/include/asm-arm/arch-omap/aic23.h b/include/asm-arm/arch-omap/aic23.h
index 6513065941d0..aec2d6563622 100644
--- a/include/asm-arm/arch-omap/aic23.h
+++ b/include/asm-arm/arch-omap/aic23.h
@@ -110,7 +110,7 @@
110#define TLV320AIC23ID1 (0x1a) // cs low 110#define TLV320AIC23ID1 (0x1a) // cs low
111#define TLV320AIC23ID2 (0x1b) // cs high 111#define TLV320AIC23ID2 (0x1b) // cs high
112 112
113void tlv320aic23_power_up(void); 113void aic23_power_up(void);
114void tlv320aic23_power_down(void); 114void aic23_power_down(void);
115 115
116#endif /* __ASM_ARCH_AIC23_H */ 116#endif /* __ASM_ARCH_AIC23_H */
diff --git a/include/asm-arm/arch-omap/board-apollon.h b/include/asm-arm/arch-omap/board-apollon.h
index de0c5b792c58..dcb587b311f1 100644
--- a/include/asm-arm/arch-omap/board-apollon.h
+++ b/include/asm-arm/arch-omap/board-apollon.h
@@ -30,16 +30,7 @@
30#define __ASM_ARCH_OMAP_APOLLON_H 30#define __ASM_ARCH_OMAP_APOLLON_H
31 31
32/* Placeholder for APOLLON specific defines */ 32/* Placeholder for APOLLON specific defines */
33/* GPMC CS0 */
34#define APOLLON_CS0_BASE 0x00000000
35/* GPMC CS1 */
36#define APOLLON_CS1_BASE 0x08000000
37#define APOLLON_ETHR_START (APOLLON_CS1_BASE + 0x300)
38#define APOLLON_ETHR_GPIO_IRQ 74 33#define APOLLON_ETHR_GPIO_IRQ 74
39/* GPMC CS2 - reserved for OneNAND */
40#define APOLLON_CS2_BASE 0x10000000
41/* GPMC CS3 - reserved for NOR or NAND */
42#define APOLLON_CS3_BASE 0x18000000
43 34
44#endif /* __ASM_ARCH_OMAP_APOLLON_H */ 35#endif /* __ASM_ARCH_OMAP_APOLLON_H */
45 36
diff --git a/include/asm-arm/arch-omap/board-h4.h b/include/asm-arm/arch-omap/board-h4.h
index 7ef664bc9e33..7e0efef4bb65 100644
--- a/include/asm-arm/arch-omap/board-h4.h
+++ b/include/asm-arm/arch-omap/board-h4.h
@@ -30,9 +30,6 @@
30#define __ASM_ARCH_OMAP_H4_H 30#define __ASM_ARCH_OMAP_H4_H
31 31
32/* Placeholder for H4 specific defines */ 32/* Placeholder for H4 specific defines */
33/* GPMC CS1 */
34#define OMAP24XX_ETHR_START 0x08000300
35#define OMAP24XX_ETHR_GPIO_IRQ 92 33#define OMAP24XX_ETHR_GPIO_IRQ 92
36#define H4_CS0_BASE 0x04000000
37#endif /* __ASM_ARCH_OMAP_H4_H */ 34#endif /* __ASM_ARCH_OMAP_H4_H */
38 35
diff --git a/include/asm-arm/arch-omap/board.h b/include/asm-arm/arch-omap/board.h
index edf1dc6ad919..2075f556bfe4 100644
--- a/include/asm-arm/arch-omap/board.h
+++ b/include/asm-arm/arch-omap/board.h
@@ -12,6 +12,8 @@
12 12
13#include <linux/types.h> 13#include <linux/types.h>
14 14
15#include <asm/arch/gpio-switch.h>
16
15/* Different peripheral ids */ 17/* Different peripheral ids */
16#define OMAP_TAG_CLOCK 0x4f01 18#define OMAP_TAG_CLOCK 0x4f01
17#define OMAP_TAG_MMC 0x4f02 19#define OMAP_TAG_MMC 0x4f02
@@ -99,26 +101,31 @@ struct omap_usb_config {
99struct omap_lcd_config { 101struct omap_lcd_config {
100 char panel_name[16]; 102 char panel_name[16];
101 char ctrl_name[16]; 103 char ctrl_name[16];
104 s16 nreset_gpio;
105 u8 data_lines;
106};
107
108struct device;
109struct fb_info;
110struct omap_backlight_config {
111 int default_intensity;
112 int (*set_power)(struct device *dev, int state);
113 int (*check_fb)(struct fb_info *fb);
102}; 114};
103 115
104struct omap_fbmem_config { 116struct omap_fbmem_config {
105 u32 fb_sram_start; 117 u32 start;
106 u32 fb_sram_size; 118 u32 size;
107 u32 fb_sdram_start; 119};
108 u32 fb_sdram_size; 120
109}; 121struct omap_pwm_led_platform_data {
110 122 const char *name;
111/* Cover: 123 int intensity_timer;
112 * high -> closed 124 int blink_timer;
113 * low -> open 125 void (*set_power)(struct omap_pwm_led_platform_data *self, int on_off);
114 * Connection: 126};
115 * high -> connected 127
116 * low -> disconnected 128/* See include/asm-arm/arch-omap/gpio-switch.h for definitions */
117 */
118#define OMAP_GPIO_SWITCH_TYPE_COVER 0x0000
119#define OMAP_GPIO_SWITCH_TYPE_CONNECTION 0x0001
120#define OMAP_GPIO_SWITCH_FLAG_INVERTED 0x0001
121#define OMAP_GPIO_SWITCH_FLAG_OUTPUT 0x0002
122struct omap_gpio_switch_config { 129struct omap_gpio_switch_config {
123 char name[12]; 130 char name[12];
124 u16 gpio; 131 u16 gpio;
diff --git a/include/asm-arm/arch-omap/dsp.h b/include/asm-arm/arch-omap/dsp.h
deleted file mode 100644
index 06dad83dd41f..000000000000
--- a/include/asm-arm/arch-omap/dsp.h
+++ /dev/null
@@ -1,250 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/dsp.h
3 *
4 * Header for OMAP DSP driver
5 *
6 * Copyright (C) 2002-2005 Nokia Corporation
7 *
8 * Written by Toshihiro Kobayashi <toshihiro.kobayashi@nokia.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 *
24 * 2005/06/01: DSP Gateway version 3.3
25 */
26
27#ifndef ASM_ARCH_DSP_H
28#define ASM_ARCH_DSP_H
29
30
31/*
32 * for /dev/dspctl/ctl
33 */
34#define OMAP_DSP_IOCTL_RESET 1
35#define OMAP_DSP_IOCTL_RUN 2
36#define OMAP_DSP_IOCTL_SETRSTVECT 3
37#define OMAP_DSP_IOCTL_CPU_IDLE 4
38#define OMAP_DSP_IOCTL_MPUI_WORDSWAP_ON 5
39#define OMAP_DSP_IOCTL_MPUI_WORDSWAP_OFF 6
40#define OMAP_DSP_IOCTL_MPUI_BYTESWAP_ON 7
41#define OMAP_DSP_IOCTL_MPUI_BYTESWAP_OFF 8
42#define OMAP_DSP_IOCTL_GBL_IDLE 9
43#define OMAP_DSP_IOCTL_DSPCFG 10
44#define OMAP_DSP_IOCTL_DSPUNCFG 11
45#define OMAP_DSP_IOCTL_TASKCNT 12
46#define OMAP_DSP_IOCTL_POLL 13
47#define OMAP_DSP_IOCTL_REGMEMR 40
48#define OMAP_DSP_IOCTL_REGMEMW 41
49#define OMAP_DSP_IOCTL_REGIOR 42
50#define OMAP_DSP_IOCTL_REGIOW 43
51#define OMAP_DSP_IOCTL_GETVAR 44
52#define OMAP_DSP_IOCTL_SETVAR 45
53#define OMAP_DSP_IOCTL_RUNLEVEL 50
54#define OMAP_DSP_IOCTL_SUSPEND 51
55#define OMAP_DSP_IOCTL_RESUME 52
56#define OMAP_DSP_IOCTL_FBEN 53
57#define OMAP_DSP_IOCTL_FBDIS 54
58#define OMAP_DSP_IOCTL_MBSEND 99
59
60/*
61 * for taskdev
62 * (ioctls below should be >= 0x10000)
63 */
64#define OMAP_DSP_TASK_IOCTL_BFLSH 0x10000
65#define OMAP_DSP_TASK_IOCTL_SETBSZ 0x10001
66#define OMAP_DSP_TASK_IOCTL_LOCK 0x10002
67#define OMAP_DSP_TASK_IOCTL_UNLOCK 0x10003
68#define OMAP_DSP_TASK_IOCTL_GETNAME 0x10004
69
70/*
71 * for /dev/dspctl/mem
72 */
73#define OMAP_DSP_MEM_IOCTL_EXMAP 1
74#define OMAP_DSP_MEM_IOCTL_EXUNMAP 2
75#define OMAP_DSP_MEM_IOCTL_EXMAP_FLUSH 3
76#define OMAP_DSP_MEM_IOCTL_FBEXPORT 5
77#define OMAP_DSP_MEM_IOCTL_MMUITACK 7
78#define OMAP_DSP_MEM_IOCTL_MMUINIT 9
79#define OMAP_DSP_MEM_IOCTL_KMEM_RESERVE 11
80#define OMAP_DSP_MEM_IOCTL_KMEM_RELEASE 12
81
82struct omap_dsp_mapinfo {
83 unsigned long dspadr;
84 unsigned long size;
85};
86
87/*
88 * for /dev/dspctl/twch
89 */
90#define OMAP_DSP_TWCH_IOCTL_MKDEV 1
91#define OMAP_DSP_TWCH_IOCTL_RMDEV 2
92#define OMAP_DSP_TWCH_IOCTL_TADD 11
93#define OMAP_DSP_TWCH_IOCTL_TDEL 12
94#define OMAP_DSP_TWCH_IOCTL_TKILL 13
95
96#define OMAP_DSP_DEVSTATE_NOTASK 0x00000001
97#define OMAP_DSP_DEVSTATE_ATTACHED 0x00000002
98#define OMAP_DSP_DEVSTATE_GARBAGE 0x00000004
99#define OMAP_DSP_DEVSTATE_INVALID 0x00000008
100#define OMAP_DSP_DEVSTATE_ADDREQ 0x00000100
101#define OMAP_DSP_DEVSTATE_DELREQ 0x00000200
102#define OMAP_DSP_DEVSTATE_ADDFAIL 0x00001000
103#define OMAP_DSP_DEVSTATE_ADDING 0x00010000
104#define OMAP_DSP_DEVSTATE_DELING 0x00020000
105#define OMAP_DSP_DEVSTATE_KILLING 0x00040000
106#define OMAP_DSP_DEVSTATE_STATE_MASK 0x7fffffff
107#define OMAP_DSP_DEVSTATE_STALE 0x80000000
108
109struct omap_dsp_taddinfo {
110 unsigned char minor;
111 unsigned long taskadr;
112};
113#define OMAP_DSP_TADD_ABORTADR 0xffffffff
114
115
116/*
117 * error cause definition (for error detection device)
118 */
119#define OMAP_DSP_ERRDT_WDT 0x00000001
120#define OMAP_DSP_ERRDT_MMU 0x00000002
121
122
123/*
124 * mailbox protocol definitions
125 */
126
127struct omap_dsp_mailbox_cmd {
128 unsigned short cmd;
129 unsigned short data;
130};
131
132struct omap_dsp_reginfo {
133 unsigned short adr;
134 unsigned short val;
135};
136
137struct omap_dsp_varinfo {
138 unsigned char varid;
139 unsigned short val[0];
140};
141
142#define OMAP_DSP_MBPROT_REVISION 0x0019
143
144#define OMAP_DSP_MBCMD_WDSND 0x10
145#define OMAP_DSP_MBCMD_WDREQ 0x11
146#define OMAP_DSP_MBCMD_BKSND 0x20
147#define OMAP_DSP_MBCMD_BKREQ 0x21
148#define OMAP_DSP_MBCMD_BKYLD 0x23
149#define OMAP_DSP_MBCMD_BKSNDP 0x24
150#define OMAP_DSP_MBCMD_BKREQP 0x25
151#define OMAP_DSP_MBCMD_TCTL 0x30
152#define OMAP_DSP_MBCMD_TCTLDATA 0x31
153#define OMAP_DSP_MBCMD_POLL 0x32
154#define OMAP_DSP_MBCMD_WDT 0x50 /* v3.3: obsolete */
155#define OMAP_DSP_MBCMD_RUNLEVEL 0x51
156#define OMAP_DSP_MBCMD_PM 0x52
157#define OMAP_DSP_MBCMD_SUSPEND 0x53
158#define OMAP_DSP_MBCMD_KFUNC 0x54
159#define OMAP_DSP_MBCMD_TCFG 0x60
160#define OMAP_DSP_MBCMD_TADD 0x62
161#define OMAP_DSP_MBCMD_TDEL 0x63
162#define OMAP_DSP_MBCMD_TSTOP 0x65
163#define OMAP_DSP_MBCMD_DSPCFG 0x70
164#define OMAP_DSP_MBCMD_REGRW 0x72
165#define OMAP_DSP_MBCMD_GETVAR 0x74
166#define OMAP_DSP_MBCMD_SETVAR 0x75
167#define OMAP_DSP_MBCMD_ERR 0x78
168#define OMAP_DSP_MBCMD_DBG 0x79
169
170#define OMAP_DSP_MBCMD_TCTL_TINIT 0x0000
171#define OMAP_DSP_MBCMD_TCTL_TEN 0x0001
172#define OMAP_DSP_MBCMD_TCTL_TDIS 0x0002
173#define OMAP_DSP_MBCMD_TCTL_TCLR 0x0003
174#define OMAP_DSP_MBCMD_TCTL_TCLR_FORCE 0x0004
175
176#define OMAP_DSP_MBCMD_RUNLEVEL_USER 0x01
177#define OMAP_DSP_MBCMD_RUNLEVEL_SUPER 0x0e
178#define OMAP_DSP_MBCMD_RUNLEVEL_RECOVERY 0x10
179
180#define OMAP_DSP_MBCMD_PM_DISABLE 0x00
181#define OMAP_DSP_MBCMD_PM_ENABLE 0x01
182
183#define OMAP_DSP_MBCMD_KFUNC_FBCTL 0x00
184#define OMAP_DSP_MBCMD_KFUNC_AUDIO_PWR 0x01
185
186#define OMAP_DSP_MBCMD_FBCTL_UPD 0x0000
187#define OMAP_DSP_MBCMD_FBCTL_ENABLE 0x0002
188#define OMAP_DSP_MBCMD_FBCTL_DISABLE 0x0003
189
190#define OMAP_DSP_MBCMD_AUDIO_PWR_UP 0x0000
191#define OMAP_DSP_MBCMD_AUDIO_PWR_DOWN1 0x0001
192#define OMAP_DSP_MBCMD_AUDIO_PWR_DOWN2 0x0002
193
194#define OMAP_DSP_MBCMD_TDEL_SAFE 0x0000
195#define OMAP_DSP_MBCMD_TDEL_KILL 0x0001
196
197#define OMAP_DSP_MBCMD_DSPCFG_REQ 0x00
198#define OMAP_DSP_MBCMD_DSPCFG_SYSADRH 0x28
199#define OMAP_DSP_MBCMD_DSPCFG_SYSADRL 0x29
200#define OMAP_DSP_MBCMD_DSPCFG_PROTREV 0x70
201#define OMAP_DSP_MBCMD_DSPCFG_ABORT 0x78
202#define OMAP_DSP_MBCMD_DSPCFG_LAST 0x80
203
204#define OMAP_DSP_MBCMD_REGRW_MEMR 0x00
205#define OMAP_DSP_MBCMD_REGRW_MEMW 0x01
206#define OMAP_DSP_MBCMD_REGRW_IOR 0x02
207#define OMAP_DSP_MBCMD_REGRW_IOW 0x03
208#define OMAP_DSP_MBCMD_REGRW_DATA 0x04
209
210#define OMAP_DSP_MBCMD_VARID_ICRMASK 0x00
211#define OMAP_DSP_MBCMD_VARID_LOADINFO 0x01
212
213#define OMAP_DSP_TTYP_ARCV 0x0001
214#define OMAP_DSP_TTYP_ASND 0x0002
215#define OMAP_DSP_TTYP_BKMD 0x0004
216#define OMAP_DSP_TTYP_BKDM 0x0008
217#define OMAP_DSP_TTYP_PVMD 0x0010
218#define OMAP_DSP_TTYP_PVDM 0x0020
219
220#define OMAP_DSP_EID_BADTID 0x10
221#define OMAP_DSP_EID_BADTCN 0x11
222#define OMAP_DSP_EID_BADBID 0x20
223#define OMAP_DSP_EID_BADCNT 0x21
224#define OMAP_DSP_EID_NOTLOCKED 0x22
225#define OMAP_DSP_EID_STVBUF 0x23
226#define OMAP_DSP_EID_BADADR 0x24
227#define OMAP_DSP_EID_BADTCTL 0x30
228#define OMAP_DSP_EID_BADPARAM 0x50
229#define OMAP_DSP_EID_FATAL 0x58
230#define OMAP_DSP_EID_NOMEM 0xc0
231#define OMAP_DSP_EID_NORES 0xc1
232#define OMAP_DSP_EID_IPBFULL 0xc2
233#define OMAP_DSP_EID_WDT 0xd0
234#define OMAP_DSP_EID_TASKNOTRDY 0xe0
235#define OMAP_DSP_EID_TASKBSY 0xe1
236#define OMAP_DSP_EID_TASKERR 0xef
237#define OMAP_DSP_EID_BADCFGTYP 0xf0
238#define OMAP_DSP_EID_DEBUG 0xf8
239#define OMAP_DSP_EID_BADSEQ 0xfe
240#define OMAP_DSP_EID_BADCMD 0xff
241
242#define OMAP_DSP_TNM_LEN 16
243
244#define OMAP_DSP_TID_FREE 0xff
245#define OMAP_DSP_TID_ANON 0xfe
246
247#define OMAP_DSP_BID_NULL 0xffff
248#define OMAP_DSP_BID_PVT 0xfffe
249
250#endif /* ASM_ARCH_DSP_H */
diff --git a/include/asm-arm/arch-omap/dsp_common.h b/include/asm-arm/arch-omap/dsp_common.h
index 16a459dfa714..c61f868f24ee 100644
--- a/include/asm-arm/arch-omap/dsp_common.h
+++ b/include/asm-arm/arch-omap/dsp_common.h
@@ -1,38 +1,34 @@
1/* 1/*
2 * linux/include/asm-arm/arch-omap/dsp_common.h 2 * This file is part of OMAP DSP driver (DSP Gateway version 3.3.1)
3 * 3 *
4 * Header for OMAP DSP subsystem control 4 * Copyright (C) 2004-2006 Nokia Corporation. All rights reserved.
5 * 5 *
6 * Copyright (C) 2004,2005 Nokia Corporation 6 * Contact: Toshihiro Kobayashi <toshihiro.kobayashi@nokia.com>
7 * 7 *
8 * Written by Toshihiro Kobayashi <toshihiro.kobayashi@nokia.com> 8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * version 2 as published by the Free Software Foundation.
9 * 11 *
10 * This program is free software; you can redistribute it and/or modify 12 * This program is distributed in the hope that it will be useful, but
11 * it under the terms of the GNU General Public License as published by 13 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * the Free Software Foundation; either version 2 of the License, or 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * (at your option) any later version. 15 * General Public License for more details.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 * 16 *
20 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA
23 * 21 *
24 * 2005/06/03: DSP Gateway version 3.3
25 */ 22 */
26 23
27#ifndef ASM_ARCH_DSP_COMMON_H 24#ifndef ASM_ARCH_DSP_COMMON_H
28#define ASM_ARCH_DSP_COMMON_H 25#define ASM_ARCH_DSP_COMMON_H
29 26
27#ifdef CONFIG_ARCH_OMAP1
30extern void omap_dsp_request_mpui(void); 28extern void omap_dsp_request_mpui(void);
31extern void omap_dsp_release_mpui(void); 29extern void omap_dsp_release_mpui(void);
32extern int omap_dsp_request_mem(void); 30extern int omap_dsp_request_mem(void);
33extern int omap_dsp_release_mem(void); 31extern int omap_dsp_release_mem(void);
34 32#endif
35extern void (*omap_dsp_audio_pwr_up_request)(int stage);
36extern void (*omap_dsp_audio_pwr_down_request)(int stage);
37 33
38#endif /* ASM_ARCH_DSP_COMMON_H */ 34#endif /* ASM_ARCH_DSP_COMMON_H */
diff --git a/include/asm-arm/arch-omap/gpio-switch.h b/include/asm-arm/arch-omap/gpio-switch.h
new file mode 100644
index 000000000000..10da0e07c0cf
--- /dev/null
+++ b/include/asm-arm/arch-omap/gpio-switch.h
@@ -0,0 +1,54 @@
1/*
2 * GPIO switch definitions
3 *
4 * Copyright (C) 2006 Nokia Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASM_ARCH_OMAP_GPIO_SWITCH_H
12#define __ASM_ARCH_OMAP_GPIO_SWITCH_H
13
14#include <linux/types.h>
15
16/* Cover:
17 * high -> closed
18 * low -> open
19 * Connection:
20 * high -> connected
21 * low -> disconnected
22 * Activity:
23 * high -> active
24 * low -> inactive
25 *
26 */
27#define OMAP_GPIO_SWITCH_TYPE_COVER 0x0000
28#define OMAP_GPIO_SWITCH_TYPE_CONNECTION 0x0001
29#define OMAP_GPIO_SWITCH_TYPE_ACTIVITY 0x0002
30#define OMAP_GPIO_SWITCH_FLAG_INVERTED 0x0001
31#define OMAP_GPIO_SWITCH_FLAG_OUTPUT 0x0002
32
33struct omap_gpio_switch {
34 const char *name;
35 s16 gpio;
36 unsigned flags:4;
37 unsigned type:4;
38
39 /* Time in ms to debounce when transitioning from
40 * inactive state to active state. */
41 u16 debounce_rising;
42 /* Same for transition from active to inactive state. */
43 u16 debounce_falling;
44
45 /* notify board-specific code about state changes */
46 void (* notify)(void *data, int state);
47 void *notify_data;
48};
49
50/* Call at init time only */
51extern void omap_register_gpio_switches(const struct omap_gpio_switch *tbl,
52 int count);
53
54#endif
diff --git a/include/asm-arm/arch-omap/gpmc.h b/include/asm-arm/arch-omap/gpmc.h
index 7c03ef6c14c4..fa33149f597e 100644
--- a/include/asm-arm/arch-omap/gpmc.h
+++ b/include/asm-arm/arch-omap/gpmc.h
@@ -87,5 +87,7 @@ extern int gpmc_cs_calc_divider(int cs, unsigned int sync_clk);
87extern int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t); 87extern int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t);
88extern int gpmc_cs_request(int cs, unsigned long size, unsigned long *base); 88extern int gpmc_cs_request(int cs, unsigned long size, unsigned long *base);
89extern void gpmc_cs_free(int cs); 89extern void gpmc_cs_free(int cs);
90extern void gpmc_cs_set_reserved(int cs, int reserved);
91extern int gpmc_cs_reserved(int cs);
90 92
91#endif 93#endif
diff --git a/include/asm-arm/arch-omap/hardware.h b/include/asm-arm/arch-omap/hardware.h
index 481048d65214..e225f4f39b34 100644
--- a/include/asm-arm/arch-omap/hardware.h
+++ b/include/asm-arm/arch-omap/hardware.h
@@ -267,6 +267,15 @@
267#define OMAP_LPG2_PMR (OMAP_LPG2_BASE + 0x04) 267#define OMAP_LPG2_PMR (OMAP_LPG2_BASE + 0x04)
268 268
269/* 269/*
270 * ----------------------------------------------------------------------------
271 * Pulse-Width Light
272 * ----------------------------------------------------------------------------
273 */
274#define OMAP_PWL_BASE 0xfffb5800
275#define OMAP_PWL_ENABLE (OMAP_PWL_BASE + 0x00)
276#define OMAP_PWL_CLK_ENABLE (OMAP_PWL_BASE + 0x04)
277
278/*
270 * --------------------------------------------------------------------------- 279 * ---------------------------------------------------------------------------
271 * Processor specific defines 280 * Processor specific defines
272 * --------------------------------------------------------------------------- 281 * ---------------------------------------------------------------------------
diff --git a/include/asm-arm/arch-omap/io.h b/include/asm-arm/arch-omap/io.h
index 78f68e6a4f0c..4aca7e3d7566 100644
--- a/include/asm-arm/arch-omap/io.h
+++ b/include/asm-arm/arch-omap/io.h
@@ -77,6 +77,17 @@
77#define io_p2v(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */ 77#define io_p2v(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */
78#define io_v2p(va) ((va) - IO_OFFSET) /* Works for L3 and L4 */ 78#define io_v2p(va) ((va) - IO_OFFSET) /* Works for L3 and L4 */
79 79
80/* DSP */
81#define DSP_MEM_24XX_PHYS OMAP24XX_DSP_MEM_BASE /* 0x58000000 */
82#define DSP_MEM_24XX_VIRT 0xe0000000
83#define DSP_MEM_24XX_SIZE 0x28000
84#define DSP_IPI_24XX_PHYS OMAP24XX_DSP_IPI_BASE /* 0x59000000 */
85#define DSP_IPI_24XX_VIRT 0xe1000000
86#define DSP_IPI_24XX_SIZE SZ_4K
87#define DSP_MMU_24XX_PHYS OMAP24XX_DSP_MMU_BASE /* 0x5a000000 */
88#define DSP_MMU_24XX_VIRT 0xe2000000
89#define DSP_MMU_24XX_SIZE SZ_4K
90
80#endif 91#endif
81 92
82#ifndef __ASSEMBLER__ 93#ifndef __ASSEMBLER__
diff --git a/include/asm-arm/arch-omap/irqs.h b/include/asm-arm/arch-omap/irqs.h
index c5bb05a69b81..3ede58b51db2 100644
--- a/include/asm-arm/arch-omap/irqs.h
+++ b/include/asm-arm/arch-omap/irqs.h
@@ -37,8 +37,6 @@
37#define INT_DSP_MMU_ABORT 7 37#define INT_DSP_MMU_ABORT 7
38#define INT_HOST 8 38#define INT_HOST 8
39#define INT_ABORT 9 39#define INT_ABORT 9
40#define INT_DSP_MAILBOX1 10
41#define INT_DSP_MAILBOX2 11
42#define INT_BRIDGE_PRIV 13 40#define INT_BRIDGE_PRIV 13
43#define INT_GPIO_BANK1 14 41#define INT_GPIO_BANK1 14
44#define INT_UART3 15 42#define INT_UART3 15
@@ -63,6 +61,8 @@
63#define INT_1510_RES2 2 61#define INT_1510_RES2 2
64#define INT_1510_SPI_TX 4 62#define INT_1510_SPI_TX 4
65#define INT_1510_SPI_RX 5 63#define INT_1510_SPI_RX 5
64#define INT_1510_DSP_MAILBOX1 10
65#define INT_1510_DSP_MAILBOX2 11
66#define INT_1510_RES12 12 66#define INT_1510_RES12 12
67#define INT_1510_LB_MMU 17 67#define INT_1510_LB_MMU 17
68#define INT_1510_RES18 18 68#define INT_1510_RES18 18
@@ -75,6 +75,8 @@
75#define INT_1610_IH2_FIQ 2 75#define INT_1610_IH2_FIQ 2
76#define INT_1610_McBSP2_TX 4 76#define INT_1610_McBSP2_TX 4
77#define INT_1610_McBSP2_RX 5 77#define INT_1610_McBSP2_RX 5
78#define INT_1610_DSP_MAILBOX1 10
79#define INT_1610_DSP_MAILBOX2 11
78#define INT_1610_LCD_LINE 12 80#define INT_1610_LCD_LINE 12
79#define INT_1610_GPTIMER1 17 81#define INT_1610_GPTIMER1 17
80#define INT_1610_GPTIMER2 18 82#define INT_1610_GPTIMER2 18
@@ -131,11 +133,11 @@
131#define INT_RTC_TIMER (25 + IH2_BASE) 133#define INT_RTC_TIMER (25 + IH2_BASE)
132#define INT_RTC_ALARM (26 + IH2_BASE) 134#define INT_RTC_ALARM (26 + IH2_BASE)
133#define INT_MEM_STICK (27 + IH2_BASE) 135#define INT_MEM_STICK (27 + IH2_BASE)
134#define INT_DSP_MMU (28 + IH2_BASE)
135 136
136/* 137/*
137 * OMAP-1510 specific IRQ numbers for interrupt handler 2 138 * OMAP-1510 specific IRQ numbers for interrupt handler 2
138 */ 139 */
140#define INT_1510_DSP_MMU (28 + IH2_BASE)
139#define INT_1510_COM_SPI_RO (31 + IH2_BASE) 141#define INT_1510_COM_SPI_RO (31 + IH2_BASE)
140 142
141/* 143/*
@@ -146,6 +148,7 @@
146#define INT_1610_USB_OTG (8 + IH2_BASE) 148#define INT_1610_USB_OTG (8 + IH2_BASE)
147#define INT_1610_SoSSI (9 + IH2_BASE) 149#define INT_1610_SoSSI (9 + IH2_BASE)
148#define INT_1610_SoSSI_MATCH (19 + IH2_BASE) 150#define INT_1610_SoSSI_MATCH (19 + IH2_BASE)
151#define INT_1610_DSP_MMU (28 + IH2_BASE)
149#define INT_1610_McBSP2RX_OF (31 + IH2_BASE) 152#define INT_1610_McBSP2RX_OF (31 + IH2_BASE)
150#define INT_1610_STI (32 + IH2_BASE) 153#define INT_1610_STI (32 + IH2_BASE)
151#define INT_1610_STI_WAKEUP (33 + IH2_BASE) 154#define INT_1610_STI_WAKEUP (33 + IH2_BASE)
@@ -239,10 +242,15 @@
239#define INT_24XX_SDMA_IRQ3 15 242#define INT_24XX_SDMA_IRQ3 15
240#define INT_24XX_CAM_IRQ 24 243#define INT_24XX_CAM_IRQ 24
241#define INT_24XX_DSS_IRQ 25 244#define INT_24XX_DSS_IRQ 25
245#define INT_24XX_MAIL_U0_MPU 26
246#define INT_24XX_DSP_UMA 27
247#define INT_24XX_DSP_MMU 28
242#define INT_24XX_GPIO_BANK1 29 248#define INT_24XX_GPIO_BANK1 29
243#define INT_24XX_GPIO_BANK2 30 249#define INT_24XX_GPIO_BANK2 30
244#define INT_24XX_GPIO_BANK3 31 250#define INT_24XX_GPIO_BANK3 31
245#define INT_24XX_GPIO_BANK4 32 251#define INT_24XX_GPIO_BANK4 32
252#define INT_24XX_GPIO_BANK5 33
253#define INT_24XX_MAIL_U3_MPU 34
246#define INT_24XX_GPTIMER1 37 254#define INT_24XX_GPTIMER1 37
247#define INT_24XX_GPTIMER2 38 255#define INT_24XX_GPTIMER2 38
248#define INT_24XX_GPTIMER3 39 256#define INT_24XX_GPTIMER3 39
@@ -262,6 +270,12 @@
262#define INT_24XX_UART1_IRQ 72 270#define INT_24XX_UART1_IRQ 72
263#define INT_24XX_UART2_IRQ 73 271#define INT_24XX_UART2_IRQ 73
264#define INT_24XX_UART3_IRQ 74 272#define INT_24XX_UART3_IRQ 74
273#define INT_24XX_USB_IRQ_GEN 75
274#define INT_24XX_USB_IRQ_NISO 76
275#define INT_24XX_USB_IRQ_ISO 77
276#define INT_24XX_USB_IRQ_HGEN 78
277#define INT_24XX_USB_IRQ_HSOF 79
278#define INT_24XX_USB_IRQ_OTG 80
265#define INT_24XX_MMC_IRQ 83 279#define INT_24XX_MMC_IRQ 83
266 280
267/* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730) and 281/* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730) and
diff --git a/include/asm-arm/arch-omap/lcd_lph8923.h b/include/asm-arm/arch-omap/lcd_lph8923.h
deleted file mode 100644
index 004e67e22ca7..000000000000
--- a/include/asm-arm/arch-omap/lcd_lph8923.h
+++ /dev/null
@@ -1,14 +0,0 @@
1#ifndef __LCD_LPH8923_H
2#define __LCD_LPH8923_H
3
4enum lcd_lph8923_test_num {
5 LCD_LPH8923_TEST_RGB_LINES,
6};
7
8enum lcd_lph8923_test_result {
9 LCD_LPH8923_TEST_SUCCESS,
10 LCD_LPH8923_TEST_INVALID,
11 LCD_LPH8923_TEST_FAILED,
12};
13
14#endif
diff --git a/include/asm-arm/arch-omap/lcd_mipid.h b/include/asm-arm/arch-omap/lcd_mipid.h
new file mode 100644
index 000000000000..f8fbc4801e52
--- /dev/null
+++ b/include/asm-arm/arch-omap/lcd_mipid.h
@@ -0,0 +1,24 @@
1#ifndef __LCD_MIPID_H
2#define __LCD_MIPID_H
3
4enum mipid_test_num {
5 MIPID_TEST_RGB_LINES,
6};
7
8enum mipid_test_result {
9 MIPID_TEST_SUCCESS,
10 MIPID_TEST_INVALID,
11 MIPID_TEST_FAILED,
12};
13
14#ifdef __KERNEL__
15
16struct mipid_platform_data {
17 int nreset_gpio;
18 int data_lines;
19 void (*shutdown)(struct mipid_platform_data *pdata);
20};
21
22#endif
23
24#endif
diff --git a/include/asm-arm/arch-omap/led.h b/include/asm-arm/arch-omap/led.h
new file mode 100644
index 000000000000..f3acae28e2da
--- /dev/null
+++ b/include/asm-arm/arch-omap/led.h
@@ -0,0 +1,24 @@
1/*
2 * linux/include/asm-arm/arch-omap/led.h
3 *
4 * Copyright (C) 2006 Samsung Electronics
5 * Kyungmin Park <kyungmin.park@samsung.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#ifndef ASMARM_ARCH_LED_H
12#define ASMARM_ARCH_LED_H
13
14struct omap_led_config {
15 struct led_classdev cdev;
16 s16 gpio;
17};
18
19struct omap_led_platform_data {
20 s16 nr_leds;
21 struct omap_led_config *leds;
22};
23
24#endif
diff --git a/include/asm-arm/arch-omap/mcspi.h b/include/asm-arm/arch-omap/mcspi.h
index 9e7f40a88e1b..1254e4945b6f 100644
--- a/include/asm-arm/arch-omap/mcspi.h
+++ b/include/asm-arm/arch-omap/mcspi.h
@@ -2,7 +2,6 @@
2#define _OMAP2_MCSPI_H 2#define _OMAP2_MCSPI_H
3 3
4struct omap2_mcspi_platform_config { 4struct omap2_mcspi_platform_config {
5 unsigned long base;
6 unsigned short num_cs; 5 unsigned short num_cs;
7}; 6};
8 7
diff --git a/include/asm-arm/arch-omap/memory.h b/include/asm-arm/arch-omap/memory.h
index 48fabc493163..14cba97c18ad 100644
--- a/include/asm-arm/arch-omap/memory.h
+++ b/include/asm-arm/arch-omap/memory.h
@@ -86,5 +86,18 @@
86 86
87#endif /* CONFIG_ARCH_OMAP15XX */ 87#endif /* CONFIG_ARCH_OMAP15XX */
88 88
89/* Override the ARM default */
90#ifdef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE
91
92#if (CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE == 0)
93#undef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE
94#define CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE 2
95#endif
96
97#define CONSISTENT_DMA_SIZE \
98 (((CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE + 1) & ~1) * 1024 * 1024)
99
100#endif
101
89#endif 102#endif
90 103
diff --git a/include/asm-arm/arch-omap/menelaus.h b/include/asm-arm/arch-omap/menelaus.h
index 88cd4c87f0de..82d276a6bd95 100644
--- a/include/asm-arm/arch-omap/menelaus.h
+++ b/include/asm-arm/arch-omap/menelaus.h
@@ -7,10 +7,19 @@
7#ifndef __ASM_ARCH_MENELAUS_H 7#ifndef __ASM_ARCH_MENELAUS_H
8#define __ASM_ARCH_MENELAUS_H 8#define __ASM_ARCH_MENELAUS_H
9 9
10extern void menelaus_mmc_register(void (*callback)(unsigned long data, u8 card_mask), 10extern int menelaus_register_mmc_callback(void (*callback)(void *data, u8 card_mask),
11 unsigned long data); 11 void *data);
12extern void menelaus_mmc_remove(void); 12extern void menelaus_unregister_mmc_callback(void);
13extern void menelaus_mmc_opendrain(int enable); 13extern int menelaus_set_mmc_opendrain(int slot, int enable);
14extern int menelaus_set_mmc_slot(int slot, int enable, int power, int cd_on);
15
16extern int menelaus_set_vmem(unsigned int mV);
17extern int menelaus_set_vio(unsigned int mV);
18extern int menelaus_set_vmmc(unsigned int mV);
19extern int menelaus_set_vaux(unsigned int mV);
20extern int menelaus_set_vdcdc(int dcdc, unsigned int mV);
21extern int menelaus_set_slot_sel(int enable);
22extern int menelaus_get_slot_pin_states(void);
14 23
15#if defined(CONFIG_ARCH_OMAP24XX) && defined(CONFIG_MENELAUS) 24#if defined(CONFIG_ARCH_OMAP24XX) && defined(CONFIG_MENELAUS)
16#define omap_has_menelaus() 1 25#define omap_has_menelaus() 1
diff --git a/include/asm-arm/arch-omap/omap16xx.h b/include/asm-arm/arch-omap/omap16xx.h
index f0c7f0fb4dc0..f7f5cdfdccce 100644
--- a/include/asm-arm/arch-omap/omap16xx.h
+++ b/include/asm-arm/arch-omap/omap16xx.h
@@ -159,15 +159,6 @@
159#define UART3_MVR (OMAP_UART3_BASE + 0x50) 159#define UART3_MVR (OMAP_UART3_BASE + 0x50)
160 160
161/* 161/*
162 * ----------------------------------------------------------------------------
163 * Pulse-Width Light
164 * ----------------------------------------------------------------------------
165 */
166#define OMAP16XX_PWL_BASE (0xfffb5800)
167#define OMAP16XX_PWL_ENABLE (OMAP16XX_PWL_BASE + 0x00)
168#define OMAP16XX_PWL_CLK_ENABLE (OMAP16XX_PWL_BASE + 0x04)
169
170/*
171 * --------------------------------------------------------------------------- 162 * ---------------------------------------------------------------------------
172 * Watchdog timer 163 * Watchdog timer
173 * --------------------------------------------------------------------------- 164 * ---------------------------------------------------------------------------
@@ -199,5 +190,8 @@
199#define WSPR_DISABLE_0 (0x0000aaaa) 190#define WSPR_DISABLE_0 (0x0000aaaa)
200#define WSPR_DISABLE_1 (0x00005555) 191#define WSPR_DISABLE_1 (0x00005555)
201 192
193/* Mailbox */
194#define OMAP16XX_MAILBOX_BASE (0xfffcf000)
195
202#endif /* __ASM_ARCH_OMAP16XX_H */ 196#endif /* __ASM_ARCH_OMAP16XX_H */
203 197
diff --git a/include/asm-arm/arch-omap/omap24xx.h b/include/asm-arm/arch-omap/omap24xx.h
index 6e59805fa654..708b2fac77f2 100644
--- a/include/asm-arm/arch-omap/omap24xx.h
+++ b/include/asm-arm/arch-omap/omap24xx.h
@@ -20,5 +20,14 @@
20#define OMAP24XX_PRCM_BASE (L4_24XX_BASE + 0x8000) 20#define OMAP24XX_PRCM_BASE (L4_24XX_BASE + 0x8000)
21#define OMAP24XX_SDRC_BASE (L3_24XX_BASE + 0x9000) 21#define OMAP24XX_SDRC_BASE (L3_24XX_BASE + 0x9000)
22 22
23/* DSP SS */
24#define OMAP24XX_DSP_BASE 0x58000000
25#define OMAP24XX_DSP_MEM_BASE (OMAP24XX_DSP_BASE + 0x0)
26#define OMAP24XX_DSP_IPI_BASE (OMAP24XX_DSP_BASE + 0x1000000)
27#define OMAP24XX_DSP_MMU_BASE (OMAP24XX_DSP_BASE + 0x2000000)
28
29/* Mailbox */
30#define OMAP24XX_MAILBOX_BASE (L4_24XX_BASE + 0x94000)
31
23#endif /* __ASM_ARCH_OMAP24XX_H */ 32#endif /* __ASM_ARCH_OMAP24XX_H */
24 33
diff --git a/include/asm-arm/arch-omap/omapfb.h b/include/asm-arm/arch-omap/omapfb.h
index ce80a71ce8f7..adf1d81f22d1 100644
--- a/include/asm-arm/arch-omap/omapfb.h
+++ b/include/asm-arm/arch-omap/omapfb.h
@@ -24,6 +24,9 @@
24#ifndef __OMAPFB_H 24#ifndef __OMAPFB_H
25#define __OMAPFB_H 25#define __OMAPFB_H
26 26
27#include <asm/ioctl.h>
28#include <asm/types.h>
29
27/* IOCTL commands. */ 30/* IOCTL commands. */
28 31
29#define OMAP_IOW(num, dtype) _IOW('O', num, dtype) 32#define OMAP_IOW(num, dtype) _IOW('O', num, dtype)
@@ -36,14 +39,14 @@
36#define OMAPFB_VSYNC OMAP_IO(38) 39#define OMAPFB_VSYNC OMAP_IO(38)
37#define OMAPFB_SET_UPDATE_MODE OMAP_IOW(40, int) 40#define OMAPFB_SET_UPDATE_MODE OMAP_IOW(40, int)
38#define OMAPFB_UPDATE_WINDOW_OLD OMAP_IOW(41, struct omapfb_update_window_old) 41#define OMAPFB_UPDATE_WINDOW_OLD OMAP_IOW(41, struct omapfb_update_window_old)
39#define OMAPFB_GET_CAPS OMAP_IOR(42, unsigned long)
40#define OMAPFB_GET_UPDATE_MODE OMAP_IOW(43, int) 42#define OMAPFB_GET_UPDATE_MODE OMAP_IOW(43, int)
41#define OMAPFB_LCD_TEST OMAP_IOW(45, int) 43#define OMAPFB_LCD_TEST OMAP_IOW(45, int)
42#define OMAPFB_CTRL_TEST OMAP_IOW(46, int) 44#define OMAPFB_CTRL_TEST OMAP_IOW(46, int)
43#define OMAPFB_UPDATE_WINDOW OMAP_IOW(47, struct omapfb_update_window) 45#define OMAPFB_UPDATE_WINDOW OMAP_IOW(47, struct omapfb_update_window)
44#define OMAPFB_SETUP_PLANE OMAP_IOW(48, struct omapfb_setup_plane)
45#define OMAPFB_ENABLE_PLANE OMAP_IOW(49, struct omapfb_enable_plane)
46#define OMAPFB_SET_COLOR_KEY OMAP_IOW(50, struct omapfb_color_key) 46#define OMAPFB_SET_COLOR_KEY OMAP_IOW(50, struct omapfb_color_key)
47#define OMAPFB_GET_COLOR_KEY OMAP_IOW(51, struct omapfb_color_key)
48#define OMAPFB_SETUP_PLANE OMAP_IOW(52, struct omapfb_plane_info)
49#define OMAPFB_QUERY_PLANE OMAP_IOW(53, struct omapfb_plane_info)
47 50
48#define OMAPFB_CAPS_GENERIC_MASK 0x00000fff 51#define OMAPFB_CAPS_GENERIC_MASK 0x00000fff
49#define OMAPFB_CAPS_LCDC_MASK 0x00fff000 52#define OMAPFB_CAPS_LCDC_MASK 0x00fff000
@@ -56,6 +59,9 @@
56#define OMAPFB_FORMAT_MASK 0x00ff 59#define OMAPFB_FORMAT_MASK 0x00ff
57#define OMAPFB_FORMAT_FLAG_DOUBLE 0x0100 60#define OMAPFB_FORMAT_FLAG_DOUBLE 0x0100
58 61
62#define OMAPFB_EVENT_READY 1
63#define OMAPFB_EVENT_DISABLED 2
64
59enum omapfb_color_format { 65enum omapfb_color_format {
60 OMAPFB_COLOR_RGB565 = 0, 66 OMAPFB_COLOR_RGB565 = 0,
61 OMAPFB_COLOR_YUV422, 67 OMAPFB_COLOR_YUV422,
@@ -64,6 +70,8 @@ enum omapfb_color_format {
64 OMAPFB_COLOR_CLUT_4BPP, 70 OMAPFB_COLOR_CLUT_4BPP,
65 OMAPFB_COLOR_CLUT_2BPP, 71 OMAPFB_COLOR_CLUT_2BPP,
66 OMAPFB_COLOR_CLUT_1BPP, 72 OMAPFB_COLOR_CLUT_1BPP,
73 OMAPFB_COLOR_RGB444,
74 OMAPFB_COLOR_YUY422,
67}; 75};
68 76
69struct omapfb_update_window { 77struct omapfb_update_window {
@@ -88,18 +96,16 @@ enum omapfb_channel_out {
88 OMAPFB_CHANNEL_OUT_DIGIT, 96 OMAPFB_CHANNEL_OUT_DIGIT,
89}; 97};
90 98
91struct omapfb_setup_plane { 99struct omapfb_plane_info {
92 __u8 plane; 100 __u32 pos_x;
101 __u32 pos_y;
102 __u8 enabled;
93 __u8 channel_out; 103 __u8 channel_out;
94 __u32 offset; 104 __u8 mirror;
95 __u32 pos_x, pos_y; 105 __u8 reserved1;
96 __u32 width, height; 106 __u32 out_width;
97 __u32 color_mode; 107 __u32 out_height;
98}; 108 __u32 reserved2[12];
99
100struct omapfb_enable_plane {
101 __u8 plane;
102 __u8 enable;
103}; 109};
104 110
105enum omapfb_color_key_type { 111enum omapfb_color_key_type {
@@ -141,6 +147,9 @@ enum omapfb_update_mode {
141 147
142#define OMAP_LCDC_PANEL_TFT 0x0100 148#define OMAP_LCDC_PANEL_TFT 0x0100
143 149
150#define OMAPFB_PLANE_XRES_MIN 8
151#define OMAPFB_PLANE_YRES_MIN 8
152
144#ifdef CONFIG_ARCH_OMAP1 153#ifdef CONFIG_ARCH_OMAP1
145#define OMAPFB_PLANE_NUM 1 154#define OMAPFB_PLANE_NUM 1
146#else 155#else
@@ -169,15 +178,17 @@ struct lcd_panel {
169 int pcd; /* pixel clock divider. 178 int pcd; /* pixel clock divider.
170 Obsolete use pixel_clock instead */ 179 Obsolete use pixel_clock instead */
171 180
172 int (*init) (struct omapfb_device *fbdev); 181 int (*init) (struct lcd_panel *panel,
173 void (*cleanup) (void); 182 struct omapfb_device *fbdev);
174 int (*enable) (void); 183 void (*cleanup) (struct lcd_panel *panel);
175 void (*disable) (void); 184 int (*enable) (struct lcd_panel *panel);
176 unsigned long (*get_caps) (void); 185 void (*disable) (struct lcd_panel *panel);
177 int (*set_bklight_level)(unsigned int level); 186 unsigned long (*get_caps) (struct lcd_panel *panel);
178 unsigned int (*get_bklight_level)(void); 187 int (*set_bklight_level)(struct lcd_panel *panel,
179 unsigned int (*get_bklight_max) (void); 188 unsigned int level);
180 int (*run_test) (int test_num); 189 unsigned int (*get_bklight_level)(struct lcd_panel *panel);
190 unsigned int (*get_bklight_max) (struct lcd_panel *panel);
191 int (*run_test) (struct lcd_panel *panel, int test_num);
181}; 192};
182 193
183struct omapfb_device; 194struct omapfb_device;
@@ -202,7 +213,7 @@ struct extif_timings {
202}; 213};
203 214
204struct lcd_ctrl_extif { 215struct lcd_ctrl_extif {
205 int (*init) (void); 216 int (*init) (struct omapfb_device *fbdev);
206 void (*cleanup) (void); 217 void (*cleanup) (void);
207 void (*get_clk_info) (u32 *clk_period, u32 *max_clk_div); 218 void (*get_clk_info) (u32 *clk_period, u32 *max_clk_div);
208 int (*convert_timings) (struct extif_timings *timings); 219 int (*convert_timings) (struct extif_timings *timings);
@@ -213,30 +224,41 @@ struct lcd_ctrl_extif {
213 void (*write_data) (const void *buf, unsigned int len); 224 void (*write_data) (const void *buf, unsigned int len);
214 void (*transfer_area) (int width, int height, 225 void (*transfer_area) (int width, int height,
215 void (callback)(void * data), void *data); 226 void (callback)(void * data), void *data);
227
216 unsigned long max_transmit_size; 228 unsigned long max_transmit_size;
217}; 229};
218 230
219struct omapfb_notifier_block { 231struct omapfb_notifier_block {
220 struct notifier_block nb; 232 struct notifier_block nb;
221 void *data; 233 void *data;
234 int plane_idx;
222}; 235};
223 236
224typedef int (*omapfb_notifier_callback_t)(struct omapfb_notifier_block *, 237typedef int (*omapfb_notifier_callback_t)(struct notifier_block *,
225 unsigned long event, 238 unsigned long event,
226 struct omapfb_device *fbdev); 239 void *fbi);
240
241struct omapfb_mem_region {
242 dma_addr_t paddr;
243 void *vaddr;
244 unsigned long size;
245 int alloc:1;
246};
247
248struct omapfb_mem_desc {
249 int region_cnt;
250 struct omapfb_mem_region region[OMAPFB_PLANE_NUM];
251};
227 252
228struct lcd_ctrl { 253struct lcd_ctrl {
229 const char *name; 254 const char *name;
230 void *data; 255 void *data;
231 256
232 int (*init) (struct omapfb_device *fbdev, 257 int (*init) (struct omapfb_device *fbdev,
233 int ext_mode, int req_vram_size); 258 int ext_mode,
259 struct omapfb_mem_desc *req_md);
234 void (*cleanup) (void); 260 void (*cleanup) (void);
235 void (*bind_client) (struct omapfb_notifier_block *nb); 261 void (*bind_client) (struct omapfb_notifier_block *nb);
236 void (*get_vram_layout)(unsigned long *size,
237 void **virt_base,
238 dma_addr_t *phys_base);
239 int (*mmap) (struct vm_area_struct *vma);
240 unsigned long (*get_caps) (void); 262 unsigned long (*get_caps) (void);
241 int (*set_update_mode)(enum omapfb_update_mode mode); 263 int (*set_update_mode)(enum omapfb_update_mode mode);
242 enum omapfb_update_mode (*get_update_mode)(void); 264 enum omapfb_update_mode (*get_update_mode)(void);
@@ -245,8 +267,12 @@ struct lcd_ctrl {
245 int screen_width, 267 int screen_width,
246 int pos_x, int pos_y, int width, 268 int pos_x, int pos_y, int width,
247 int height, int color_mode); 269 int height, int color_mode);
270 int (*set_scale) (int plane,
271 int orig_width, int orig_height,
272 int out_width, int out_height);
248 int (*enable_plane) (int plane, int enable); 273 int (*enable_plane) (int plane, int enable);
249 int (*update_window) (struct omapfb_update_window *win, 274 int (*update_window) (struct fb_info *fbi,
275 struct omapfb_update_window *win,
250 void (*callback)(void *), 276 void (*callback)(void *),
251 void *callback_data); 277 void *callback_data);
252 void (*sync) (void); 278 void (*sync) (void);
@@ -257,6 +283,7 @@ struct lcd_ctrl {
257 u16 blue, u16 transp, 283 u16 blue, u16 transp,
258 int update_hw_mem); 284 int update_hw_mem);
259 int (*set_color_key) (struct omapfb_color_key *ck); 285 int (*set_color_key) (struct omapfb_color_key *ck);
286 int (*get_color_key) (struct omapfb_color_key *ck);
260 287
261}; 288};
262 289
@@ -266,19 +293,20 @@ enum omapfb_state {
266 OMAPFB_ACTIVE = 100 293 OMAPFB_ACTIVE = 100
267}; 294};
268 295
296struct omapfb_plane_struct {
297 int idx;
298 struct omapfb_plane_info info;
299 enum omapfb_color_format color_mode;
300 struct omapfb_device *fbdev;
301};
302
269struct omapfb_device { 303struct omapfb_device {
270 int state; 304 int state;
271 int ext_lcdc; /* Using external 305 int ext_lcdc; /* Using external
272 LCD controller */ 306 LCD controller */
273 struct mutex rqueue_mutex; 307 struct mutex rqueue_mutex;
274 308
275 void *vram_virt_base;
276 dma_addr_t vram_phys_base;
277 unsigned long vram_size;
278
279 int color_mode;
280 int palette_size; 309 int palette_size;
281 int mirror;
282 u32 pseudo_palette[17]; 310 u32 pseudo_palette[17];
283 311
284 struct lcd_panel *panel; /* LCD panel */ 312 struct lcd_panel *panel; /* LCD panel */
@@ -286,20 +314,18 @@ struct omapfb_device {
286 struct lcd_ctrl *int_ctrl; /* internal LCD ctrl */ 314 struct lcd_ctrl *int_ctrl; /* internal LCD ctrl */
287 struct lcd_ctrl_extif *ext_if; /* LCD ctrl external 315 struct lcd_ctrl_extif *ext_if; /* LCD ctrl external
288 interface */ 316 interface */
289 struct fb_info *fb_info;
290
291 struct device *dev; 317 struct device *dev;
318
319 struct omapfb_mem_desc mem_desc;
320 struct fb_info *fb_info[OMAPFB_PLANE_NUM];
292}; 321};
293 322
294struct omapfb_platform_data { 323struct omapfb_platform_data {
295 struct omap_lcd_config lcd; 324 struct omap_lcd_config lcd;
296 struct omapfb_mem_desc mem_desc; 325 struct omapfb_mem_desc mem_desc;
297 void *ctrl_platform_data; 326 void *ctrl_platform_data;
298}; 327};
299 328
300#define OMAPFB_EVENT_READY 1
301#define OMAPFB_EVENT_DISABLED 2
302
303#ifdef CONFIG_ARCH_OMAP1 329#ifdef CONFIG_ARCH_OMAP1
304extern struct lcd_ctrl omap1_lcd_ctrl; 330extern struct lcd_ctrl omap1_lcd_ctrl;
305#else 331#else
@@ -311,12 +337,13 @@ extern void omapfb_write_first_pixel(struct omapfb_device *fbdev, u16 pixval);
311extern void omapfb_notify_clients(struct omapfb_device *fbdev, 337extern void omapfb_notify_clients(struct omapfb_device *fbdev,
312 unsigned long event); 338 unsigned long event);
313extern int omapfb_register_client(struct omapfb_notifier_block *nb, 339extern int omapfb_register_client(struct omapfb_notifier_block *nb,
314 omapfb_notifier_callback_t callback, 340 omapfb_notifier_callback_t callback,
315 void *callback_data); 341 void *callback_data);
316extern int omapfb_unregister_client(struct omapfb_notifier_block *nb); 342extern int omapfb_unregister_client(struct omapfb_notifier_block *nb);
317extern int omapfb_update_window_async(struct omapfb_update_window *win, 343extern int omapfb_update_window_async(struct fb_info *fbi,
318 void (*callback)(void *), 344 struct omapfb_update_window *win,
319 void *callback_data); 345 void (*callback)(void *),
346 void *callback_data);
320 347
321/* in arch/arm/plat-omap/fb.c */ 348/* in arch/arm/plat-omap/fb.c */
322extern void omapfb_reserve_mem(void); 349extern void omapfb_reserve_mem(void);
diff --git a/include/asm-arm/arch-omap/sram.h b/include/asm-arm/arch-omap/sram.h
index 6fc0dd57b7c3..cc6161d63988 100644
--- a/include/asm-arm/arch-omap/sram.h
+++ b/include/asm-arm/arch-omap/sram.h
@@ -20,8 +20,8 @@ extern void omap2_sram_reprogram_sdrc(u32 perf_level, u32 dll_val,
20 u32 mem_type); 20 u32 mem_type);
21extern u32 omap2_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, int bypass); 21extern u32 omap2_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, int bypass);
22 22
23extern unsigned long omap_fb_sram_start; 23extern int omap_fb_sram_plane;
24extern unsigned long omap_fb_sram_size; 24extern int omap_fb_sram_valid;
25 25
26/* Do not use these */ 26/* Do not use these */
27extern void sram_reprogram_clock(u32 ckctl, u32 dpllctl); 27extern void sram_reprogram_clock(u32 ckctl, u32 dpllctl);
diff --git a/include/asm-arm/arch-omap/usb.h b/include/asm-arm/arch-omap/usb.h
index 054fb9a8e0c6..99ae9eabaf71 100644
--- a/include/asm-arm/arch-omap/usb.h
+++ b/include/asm-arm/arch-omap/usb.h
@@ -7,9 +7,27 @@
7 7
8/*-------------------------------------------------------------------------*/ 8/*-------------------------------------------------------------------------*/
9 9
10#define OTG_BASE 0xfffb0400 10#define OMAP1_OTG_BASE 0xfffb0400
11#define UDC_BASE 0xfffb4000 11#define OMAP1_UDC_BASE 0xfffb4000
12#define OMAP_OHCI_BASE 0xfffba000 12#define OMAP1_OHCI_BASE 0xfffba000
13
14#define OMAP2_OHCI_BASE 0x4805e000
15#define OMAP2_UDC_BASE 0x4805e200
16#define OMAP2_OTG_BASE 0x4805e300
17
18#ifdef CONFIG_ARCH_OMAP1
19
20#define OTG_BASE OMAP1_OTG_BASE
21#define UDC_BASE OMAP1_UDC_BASE
22#define OMAP_OHCI_BASE OMAP1_OHCI_BASE
23
24#else
25
26#define OTG_BASE OMAP2_OTG_BASE
27#define UDC_BASE OMAP2_UDC_BASE
28#define OMAP_OHCI_BASE OMAP2_OHCI_BASE
29
30#endif
13 31
14/*-------------------------------------------------------------------------*/ 32/*-------------------------------------------------------------------------*/
15 33
@@ -28,6 +46,7 @@
28# define HST_IDLE_EN (1 << 14) 46# define HST_IDLE_EN (1 << 14)
29# define DEV_IDLE_EN (1 << 13) 47# define DEV_IDLE_EN (1 << 13)
30# define OTG_RESET_DONE (1 << 2) 48# define OTG_RESET_DONE (1 << 2)
49# define OTG_SOFT_RESET (1 << 1)
31#define OTG_SYSCON_2_REG OTG_REG32(0x08) 50#define OTG_SYSCON_2_REG OTG_REG32(0x08)
32# define OTG_EN (1 << 31) 51# define OTG_EN (1 << 31)
33# define USBX_SYNCHRO (1 << 30) 52# define USBX_SYNCHRO (1 << 30)
@@ -103,6 +122,7 @@
103 122
104/*-------------------------------------------------------------------------*/ 123/*-------------------------------------------------------------------------*/
105 124
125/* OMAP1 */
106#define USB_TRANSCEIVER_CTRL_REG __REG32(0xfffe1000 + 0x0064) 126#define USB_TRANSCEIVER_CTRL_REG __REG32(0xfffe1000 + 0x0064)
107# define CONF_USB2_UNI_R (1 << 8) 127# define CONF_USB2_UNI_R (1 << 8)
108# define CONF_USB1_UNI_R (1 << 7) 128# define CONF_USB1_UNI_R (1 << 7)
@@ -111,7 +131,17 @@
111# define CONF_USB_PWRDN_DM_R (1 << 2) 131# define CONF_USB_PWRDN_DM_R (1 << 2)
112# define CONF_USB_PWRDN_DP_R (1 << 1) 132# define CONF_USB_PWRDN_DP_R (1 << 1)
113 133
114 134/* OMAP2 */
115 135#define CONTROL_DEVCONF_REG __REG32(L4_24XX_BASE + 0x0274)
136# define USB_UNIDIR 0x0
137# define USB_UNIDIR_TLL 0x1
138# define USB_BIDIR 0x2
139# define USB_BIDIR_TLL 0x3
140# define USBT0WRMODEI(x) ((x) << 22)
141# define USBT1WRMODEI(x) ((x) << 20)
142# define USBT2WRMODEI(x) ((x) << 18)
143# define USBT2TLL5PI (1 << 17)
144# define USB0PUENACTLOI (1 << 16)
145# define USBSTANDBYCTRL (1 << 15)
116 146
117#endif /* __ASM_ARCH_OMAP_USB_H */ 147#endif /* __ASM_ARCH_OMAP_USB_H */