aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2009-12-05 05:35:33 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-12-05 05:35:33 -0500
commit0719dc341389882cc834ed18fc9b7fc6006b2b85 (patch)
tree794480ac62c07ea8cc4e69c2cb3d2b83bb7f36b7 /arch/arm/mach-pxa
parente28edb723e64200554194da17617ee6e82de6690 (diff)
parent677f4f64e4b2336682f0e15c69b206ade6f6b131 (diff)
Merge branch 'devel-stable' into devel
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r--arch/arm/mach-pxa/Kconfig638
-rw-r--r--arch/arm/mach-pxa/Makefile90
-rw-r--r--arch/arm/mach-pxa/balloon3.c4
-rw-r--r--arch/arm/mach-pxa/cm-x2xx.c4
-rw-r--r--arch/arm/mach-pxa/cm-x300.c260
-rw-r--r--arch/arm/mach-pxa/colibri-pxa270.c3
-rw-r--r--arch/arm/mach-pxa/colibri-pxa300.c4
-rw-r--r--arch/arm/mach-pxa/colibri-pxa320.c4
-rw-r--r--arch/arm/mach-pxa/colibri-pxa3xx.c2
-rw-r--r--arch/arm/mach-pxa/corgi.c4
-rw-r--r--arch/arm/mach-pxa/corgi_pm.c4
-rw-r--r--arch/arm/mach-pxa/csb726.c3
-rw-r--r--arch/arm/mach-pxa/devices.c30
-rw-r--r--arch/arm/mach-pxa/e330.c3
-rw-r--r--arch/arm/mach-pxa/e350.c3
-rw-r--r--arch/arm/mach-pxa/e400.c3
-rw-r--r--arch/arm/mach-pxa/e740.c3
-rw-r--r--arch/arm/mach-pxa/e750.c3
-rw-r--r--arch/arm/mach-pxa/e800.c3
-rw-r--r--arch/arm/mach-pxa/em-x270.c13
-rw-r--r--arch/arm/mach-pxa/ezx.c251
-rw-r--r--arch/arm/mach-pxa/generic.h5
-rw-r--r--arch/arm/mach-pxa/gumstix.c5
-rw-r--r--arch/arm/mach-pxa/h5000.c3
-rw-r--r--arch/arm/mach-pxa/himalaya.c3
-rw-r--r--arch/arm/mach-pxa/hx4700.c5
-rw-r--r--arch/arm/mach-pxa/idp.c3
-rw-r--r--arch/arm/mach-pxa/imote2.c6
-rw-r--r--arch/arm/mach-pxa/include/mach/hardware.h7
-rw-r--r--arch/arm/mach-pxa/include/mach/palmtreo.h67
-rw-r--r--arch/arm/mach-pxa/include/mach/pxa3xx_nand.h63
-rw-r--r--arch/arm/mach-pxa/include/mach/pxafb.h3
-rw-r--r--arch/arm/mach-pxa/include/mach/regs-u2d.h199
-rw-r--r--arch/arm/mach-pxa/include/mach/treo680.h49
-rw-r--r--arch/arm/mach-pxa/littleton.c8
-rw-r--r--arch/arm/mach-pxa/lpd270.c4
-rw-r--r--arch/arm/mach-pxa/lubbock.c4
-rw-r--r--arch/arm/mach-pxa/magician.c4
-rw-r--r--arch/arm/mach-pxa/mainstone.c4
-rw-r--r--arch/arm/mach-pxa/mioa701.c3
-rw-r--r--arch/arm/mach-pxa/mp900.c3
-rw-r--r--arch/arm/mach-pxa/palmld.c4
-rw-r--r--arch/arm/mach-pxa/palmt5.c4
-rw-r--r--arch/arm/mach-pxa/palmtc.c5
-rw-r--r--arch/arm/mach-pxa/palmte2.c4
-rw-r--r--arch/arm/mach-pxa/palmtreo.c (renamed from arch/arm/mach-pxa/treo680.c)365
-rw-r--r--arch/arm/mach-pxa/palmtx.c4
-rw-r--r--arch/arm/mach-pxa/palmz72.c4
-rw-r--r--arch/arm/mach-pxa/pcm027.c4
-rw-r--r--arch/arm/mach-pxa/pcm990-baseboard.c8
-rw-r--r--arch/arm/mach-pxa/poodle.c4
-rw-r--r--arch/arm/mach-pxa/pxa25x.c7
-rw-r--r--arch/arm/mach-pxa/pxa27x.c3
-rw-r--r--arch/arm/mach-pxa/pxa3xx.c47
-rw-r--r--arch/arm/mach-pxa/saar.c105
-rw-r--r--arch/arm/mach-pxa/sharpsl.h4
-rw-r--r--arch/arm/mach-pxa/sharpsl_pm.c112
-rw-r--r--arch/arm/mach-pxa/spitz.c4
-rw-r--r--arch/arm/mach-pxa/spitz_pm.c14
-rw-r--r--arch/arm/mach-pxa/ssp.c73
-rw-r--r--arch/arm/mach-pxa/stargate2.c4
-rw-r--r--arch/arm/mach-pxa/tavorevb.c4
-rw-r--r--arch/arm/mach-pxa/tosa.c5
-rw-r--r--arch/arm/mach-pxa/trizeps4.c4
-rw-r--r--arch/arm/mach-pxa/viper.c15
-rw-r--r--arch/arm/mach-pxa/xcep.c5
-rw-r--r--arch/arm/mach-pxa/zylonite.c6
67 files changed, 1873 insertions, 725 deletions
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index a6f8eab14ba5..d89c6adbe8bc 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -2,34 +2,105 @@ if ARCH_PXA
2 2
3menu "Intel PXA2xx/PXA3xx Implementations" 3menu "Intel PXA2xx/PXA3xx Implementations"
4 4
5if PXA3xx 5comment "Intel/Marvell Dev Platforms (sorted by hardware release time)"
6 6
7menu "Supported PXA3xx Processor Variants" 7config ARCH_LUBBOCK
8 bool "Intel DBPXA250 Development Platform (aka Lubbock)"
9 select PXA25x
10 select SA1111
11 select PXA_HAVE_BOARD_IRQS
8 12
9config CPU_PXA300 13config MACH_MAINSTONE
10 bool "PXA300 (codename Monahans-L)" 14 bool "Intel HCDDBBVA0 Development Platform (aka Mainstone)"
15 select PXA27x
16 select HAVE_PWM
17 select PXA_HAVE_BOARD_IRQS
11 18
12config CPU_PXA310 19config MACH_ZYLONITE
13 bool "PXA310 (codename Monahans-LV)" 20 bool
21 select PXA3xx
22 select PXA_SSP
23 select HAVE_PWM
24 select PXA_HAVE_BOARD_IRQS
25
26config MACH_ZYLONITE300
27 bool "PXA3xx Development Platform (aka Zylonite) PXA300/310"
14 select CPU_PXA300 28 select CPU_PXA300
29 select CPU_PXA310
30 select MACH_ZYLONITE
15 31
16config CPU_PXA320 32config MACH_ZYLONITE320
17 bool "PXA320 (codename Monahans-P)" 33 bool "PXA3xx Development Platform (aka Zylonite) PXA320"
34 select CPU_PXA320
35 select MACH_ZYLONITE
18 36
19config CPU_PXA930 37config MACH_LITTLETON
20 bool "PXA930 (codename Tavor-P)" 38 bool "PXA3xx Form Factor Platform (aka Littleton)"
39 select PXA3xx
40 select PXA_SSP
21 41
22config CPU_PXA935 42config MACH_TAVOREVB
23 bool "PXA935 (codename Tavor-P65)" 43 bool "PXA930 Evaluation Board (aka TavorEVB)"
44 select PXA3xx
24 select CPU_PXA930 45 select CPU_PXA930
25 46
26config CPU_PXA950 47config MACH_SAAR
27 bool "PXA950 (codename Tavor-PV2)" 48 bool "PXA930 Handheld Platform (aka SAAR)"
49 select PXA3xx
28 select CPU_PXA930 50 select CPU_PXA930
29 51
30endmenu 52comment "Third Party Dev Platforms (sorted by vendor name)"
31 53
32endif 54config ARCH_PXA_IDP
55 bool "Accelent Xscale IDP"
56 select PXA25x
57
58config ARCH_VIPER
59 bool "Arcom/Eurotech VIPER SBC"
60 select PXA25x
61 select ISA
62 select I2C_GPIO
63 select HAVE_PWM
64 select PXA_HAVE_BOARD_IRQS
65 select PXA_HAVE_ISA_IRQS
66
67config MACH_BALLOON3
68 bool "Balloon 3 board"
69 select PXA27x
70 select IWMMXT
71 select PXA_HAVE_BOARD_IRQS
72
73config MACH_CSB726
74 bool "Enable Cogent CSB726 System On a Module"
75 select PXA27x
76 select IWMMXT
77 help
78 Say Y here if you intend to run this kernel on a Cogent
79 CSB726 System On Module.
80
81config CSB726_CSB701
82 bool "Enable support for CSB701 baseboard"
83 depends on MACH_CSB726
84
85config MACH_ARMCORE
86 bool "CompuLab CM-X255/CM-X270 modules"
87 select PXA27x
88 select IWMMXT
89 select PXA25x
90 select PXA_SSP
91
92config MACH_EM_X270
93 bool "CompuLab EM-x270 platform"
94 select PXA27x
95
96config MACH_EXEDA
97 bool "CompuLab eXeda platform"
98 select PXA27x
99
100config MACH_CM_X300
101 bool "CompuLab CM-X300 modules"
102 select PXA3xx
103 select CPU_PXA300
33 104
34config ARCH_GUMSTIX 105config ARCH_GUMSTIX
35 bool "Gumstix XScale 255 boards" 106 bool "Gumstix XScale 255 boards"
@@ -62,185 +133,24 @@ config MACH_STARGATE2
62 select IWMMXT 133 select IWMMXT
63 select PXA_HAVE_BOARD_IRQS 134 select PXA_HAVE_BOARD_IRQS
64 135
65config ARCH_LUBBOCK 136config MACH_XCEP
66 bool "Intel DBPXA250 Development Platform" 137 bool "Iskratel Electronics XCEP"
67 select PXA25x
68 select SA1111
69 select PXA_HAVE_BOARD_IRQS
70
71config MACH_LOGICPD_PXA270
72 bool "LogicPD PXA270 Card Engine Development Platform"
73 select PXA27x
74 select HAVE_PWM
75 select PXA_HAVE_BOARD_IRQS
76
77config MACH_MAINSTONE
78 bool "Intel HCDDBBVA0 Development Platform"
79 select PXA27x
80 select HAVE_PWM
81 select PXA_HAVE_BOARD_IRQS
82
83config MACH_MP900C
84 bool "Nec Mobilepro 900/c"
85 select PXA25x
86
87config MACH_BALLOON3
88 bool "Balloon 3 board"
89 select PXA27x
90 select IWMMXT
91 select PXA_HAVE_BOARD_IRQS
92
93config ARCH_PXA_IDP
94 bool "Accelent Xscale IDP"
95 select PXA25x
96
97config PXA_SHARPSL
98 bool "SHARP Zaurus SL-5600, SL-C7xx and SL-Cxx00 Models"
99 select SHARP_SCOOP
100 select SHARP_PARAM
101 help
102 Say Y here if you intend to run this kernel on a
103 Sharp Zaurus SL-5600 (Poodle), SL-C700 (Corgi),
104 SL-C750 (Shepherd), SL-C760 (Husky), SL-C1000 (Akita),
105 SL-C3000 (Spitz), SL-C3100 (Borzoi) or SL-C6000x (Tosa)
106 handheld computer.
107
108config SHARPSL_PM
109 bool
110 select APM_EMULATION
111
112config CORGI_SSP_DEPRECATED
113 bool
114 select PXA_SSP
115 help
116 This option will include corgi_ssp.c and corgi_lcd.c
117 that corgi_ts.c and other legacy drivers (corgi_bl.c
118 and sharpsl_pm.c) may depend on.
119
120config MACH_POODLE
121 bool "Enable Sharp SL-5600 (Poodle) Support"
122 depends on PXA_SHARPSL
123 select PXA25x 138 select PXA25x
124 select SHARP_LOCOMO 139 select MTD
140 select MTD_PARTITIONS
141 select MTD_PHYSMAP
142 select MTD_CFI_INTELEXT
143 select MTD_CFI
144 select MTD_CHAR
145 select SMC91X
125 select PXA_SSP 146 select PXA_SSP
126
127config MACH_CORGI
128 bool "Enable Sharp SL-C700 (Corgi) Support"
129 depends on PXA_SHARPSL
130 select PXA25x
131 select PXA_SHARP_C7xx
132
133config MACH_SHEPHERD
134 bool "Enable Sharp SL-C750 (Shepherd) Support"
135 depends on PXA_SHARPSL
136 select PXA25x
137 select PXA_SHARP_C7xx
138
139config MACH_HUSKY
140 bool "Enable Sharp SL-C760 (Husky) Support"
141 depends on PXA_SHARPSL
142 select PXA25x
143 select PXA_SHARP_C7xx
144
145config MACH_AKITA
146 bool "Enable Sharp SL-1000 (Akita) Support"
147 depends on PXA_SHARPSL
148 select PXA27x
149 select PXA_SHARP_Cxx00
150 select MACH_SPITZ
151 select I2C
152 select I2C_PXA
153
154config MACH_SPITZ
155 bool "Enable Sharp Zaurus SL-3000 (Spitz) Support"
156 depends on PXA_SHARPSL
157 select PXA27x
158 select PXA_SHARP_Cxx00
159
160config MACH_BORZOI
161 bool "Enable Sharp Zaurus SL-3100 (Borzoi) Support"
162 depends on PXA_SHARPSL
163 select PXA27x
164 select PXA_SHARP_Cxx00
165
166config MACH_TOSA
167 bool "Enable Sharp SL-6000x (Tosa) Support"
168 depends on PXA_SHARPSL
169 select PXA25x
170 select PXA_HAVE_BOARD_IRQS
171
172config ARCH_VIPER
173 bool "Arcom/Eurotech VIPER SBC"
174 select PXA25x
175 select ISA
176 select I2C_GPIO
177 select HAVE_PWM
178 select PXA_HAVE_BOARD_IRQS
179 select PXA_HAVE_ISA_IRQS
180
181config ARCH_PXA_ESERIES
182 bool "PXA based Toshiba e-series PDAs"
183 select PXA25x
184 select PXA_HAVE_BOARD_IRQS
185
186config MACH_E330
187 bool "Toshiba e330"
188 default y
189 depends on ARCH_PXA_ESERIES
190 help
191 Say Y here if you intend to run this kernel on a Toshiba
192 e330 family PDA.
193
194config MACH_E350
195 bool "Toshiba e350"
196 default y
197 depends on ARCH_PXA_ESERIES
198 help
199 Say Y here if you intend to run this kernel on a Toshiba
200 e350 family PDA.
201
202config MACH_E740
203 bool "Toshiba e740"
204 default y
205 depends on ARCH_PXA_ESERIES
206 select FB_W100
207 help
208 Say Y here if you intend to run this kernel on a Toshiba
209 e740 family PDA.
210
211config MACH_E750
212 bool "Toshiba e750"
213 default y
214 depends on ARCH_PXA_ESERIES
215 select FB_W100
216 help
217 Say Y here if you intend to run this kernel on a Toshiba
218 e750 family PDA.
219
220config MACH_E400
221 bool "Toshiba e400"
222 default y
223 depends on ARCH_PXA_ESERIES
224 help 147 help
225 Say Y here if you intend to run this kernel on a Toshiba 148 PXA255 based Single Board Computer with SMC 91C111 ethernet chip and 64 MB of flash.
226 e400 family PDA. 149 Tuned for usage in Libera instruments for particle accelerators.
227
228config MACH_E800
229 bool "Toshiba e800"
230 default y
231 depends on ARCH_PXA_ESERIES
232 select FB_W100
233 help
234 Say Y here if you intend to run this kernel on a Toshiba
235 e800 family PDA.
236 150
237config TRIZEPS_PXA 151config TRIZEPS_PXA
238 bool "PXA based Keith und Koep Trizeps DIMM-Modules" 152 bool "PXA based Keith und Koep Trizeps DIMM-Modules"
239 153
240config MACH_H5000
241 bool "HP iPAQ h5000"
242 select PXA25x
243
244config MACH_TRIZEPS4 154config MACH_TRIZEPS4
245 bool "Keith und Koep Trizeps4 DIMM-Module" 155 bool "Keith und Koep Trizeps4 DIMM-Module"
246 depends on TRIZEPS_PXA 156 depends on TRIZEPS_PXA
@@ -274,13 +184,38 @@ config TRIZEPS_PCMCIA
274 help 184 help
275 Enable PCMCIA support for Trizeps modules 185 Enable PCMCIA support for Trizeps modules
276 186
277config MACH_EM_X270 187config MACH_LOGICPD_PXA270
278 bool "CompuLab EM-x270 platform" 188 bool "LogicPD PXA270 Card Engine Development Platform"
279 select PXA27x 189 select PXA27x
190 select HAVE_PWM
191 select PXA_HAVE_BOARD_IRQS
280 192
281config MACH_EXEDA 193config MACH_PCM027
282 bool "CompuLab eXeda platform" 194 bool "Phytec phyCORE-PXA270 CPU module (PCM-027)"
283 select PXA27x 195 select PXA27x
196 select IWMMXT
197 select PXA_SSP
198 select PXA_HAVE_BOARD_IRQS
199
200config MACH_PCM990_BASEBOARD
201 bool "PHYTEC PCM-990 development board"
202 select HAVE_PWM
203 depends on MACH_PCM027
204
205choice
206 prompt "display on pcm990"
207 depends on MACH_PCM990_BASEBOARD
208
209config PCM990_DISPLAY_SHARP
210 bool "sharp lq084v1dg21 stn display"
211
212config PCM990_DISPLAY_NEC
213 bool "nec nl6448bc20_18d tft display"
214
215config PCM990_DISPLAY_NONE
216 bool "no display"
217
218endchoice
284 219
285config MACH_COLIBRI 220config MACH_COLIBRI
286 bool "Toradex Colibri PXA270" 221 bool "Toradex Colibri PXA270"
@@ -290,45 +225,15 @@ config MACH_COLIBRI300
290 bool "Toradex Colibri PXA300/310" 225 bool "Toradex Colibri PXA300/310"
291 select PXA3xx 226 select PXA3xx
292 select CPU_PXA300 227 select CPU_PXA300
228 select CPU_PXA310
229 select HAVE_PWM
293 230
294config MACH_COLIBRI320 231config MACH_COLIBRI320
295 bool "Toradex Colibri PXA320" 232 bool "Toradex Colibri PXA320"
296 select PXA3xx 233 select PXA3xx
297 select CPU_PXA320 234 select CPU_PXA320
298 235
299config MACH_ZYLONITE 236comment "End-user Products (sorted by vendor name)"
300 bool "PXA3xx Development Platform (aka Zylonite)"
301 select PXA3xx
302 select PXA_SSP
303 select HAVE_PWM
304 select PXA_HAVE_BOARD_IRQS
305
306config MACH_LITTLETON
307 bool "PXA3xx Form Factor Platform (aka Littleton)"
308 select PXA3xx
309 select PXA_SSP
310
311config MACH_TAVOREVB
312 bool "PXA930 Evaluation Board (aka TavorEVB)"
313 select PXA3xx
314 select CPU_PXA930
315
316config MACH_SAAR
317 bool "PXA930 Handheld Platform (aka SAAR)"
318 select PXA3xx
319 select CPU_PXA930
320
321config MACH_ARMCORE
322 bool "CompuLab CM-X255/CM-X270 modules"
323 select PXA27x
324 select IWMMXT
325 select PXA25x
326 select PXA_SSP
327
328config MACH_CM_X300
329 bool "CompuLab CM-X300 modules"
330 select PXA3xx
331 select CPU_PXA300
332 237
333config MACH_H4700 238config MACH_H4700
334 bool "HP iPAQ hx4700" 239 bool "HP iPAQ hx4700"
@@ -338,6 +243,15 @@ config MACH_H4700
338 select HAVE_PWM 243 select HAVE_PWM
339 select PXA_HAVE_BOARD_IRQS 244 select PXA_HAVE_BOARD_IRQS
340 245
246config MACH_H5000
247 bool "HP iPAQ h5000"
248 select PXA25x
249
250config MACH_HIMALAYA
251 bool "HTC Himalaya Support"
252 select CPU_PXA26x
253 select FB_W100
254
341config MACH_MAGICIAN 255config MACH_MAGICIAN
342 bool "Enable HTC Magician Support" 256 bool "Enable HTC Magician Support"
343 select PXA27x 257 select PXA27x
@@ -346,11 +260,6 @@ config MACH_MAGICIAN
346 select HAVE_PWM 260 select HAVE_PWM
347 select PXA_HAVE_BOARD_IRQS 261 select PXA_HAVE_BOARD_IRQS
348 262
349config MACH_HIMALAYA
350 bool "HTC Himalaya Support"
351 select CPU_PXA26x
352 select FB_W100
353
354config MACH_MIOA701 263config MACH_MIOA701
355 bool "Mitac Mio A701 Support" 264 bool "Mitac Mio A701 Support"
356 select PXA27x 265 select PXA27x
@@ -362,13 +271,47 @@ config MACH_MIOA701
362 MIO A701. Currently there is only basic support 271 MIO A701. Currently there is only basic support
363 for this PDA. 272 for this PDA.
364 273
365config MACH_PCM027 274config PXA_EZX
366 bool "Phytec phyCORE-PXA270 CPU module (PCM-027)" 275 bool "Motorola EZX Platform"
367 select PXA27x 276 select PXA27x
368 select IWMMXT 277 select IWMMXT
369 select PXA_SSP 278 select HAVE_PWM
370 select PXA_HAVE_BOARD_IRQS 279 select PXA_HAVE_BOARD_IRQS
371 280
281config MACH_EZX_A780
282 bool "Motorola EZX A780"
283 default y
284 depends on PXA_EZX
285
286config MACH_EZX_E680
287 bool "Motorola EZX E680"
288 default y
289 depends on PXA_EZX
290
291config MACH_EZX_A1200
292 bool "Motorola EZX A1200"
293 default y
294 depends on PXA_EZX
295
296config MACH_EZX_A910
297 bool "Motorola EZX A910"
298 default y
299 depends on PXA_EZX
300
301config MACH_EZX_E6
302 bool "Motorola EZX E6"
303 default y
304 depends on PXA_EZX
305
306config MACH_EZX_E2
307 bool "Motorola EZX E2"
308 default y
309 depends on PXA_EZX
310
311config MACH_MP900C
312 bool "Nec Mobilepro 900/c"
313 select PXA25x
314
372config ARCH_PXA_PALM 315config ARCH_PXA_PALM
373 bool "PXA based Palm PDAs" 316 bool "PXA based Palm PDAs"
374 select HAVE_PWM 317 select HAVE_PWM
@@ -421,109 +364,172 @@ config MACH_PALMZ72
421 Say Y here if you intend to run this kernel on Palm Zire 72 364 Say Y here if you intend to run this kernel on Palm Zire 72
422 handheld computer. 365 handheld computer.
423 366
424config MACH_TREO680 367config MACH_PALMLD
425 bool "Palm Treo 680" 368 bool "Palm LifeDrive"
426 default y 369 default y
427 depends on ARCH_PXA_PALM 370 depends on ARCH_PXA_PALM
428 select PXA27x 371 select PXA27x
429 select IWMMXT 372 select IWMMXT
430 help 373 help
431 Say Y here if you intend to run this kernel on Palm Treo 680 374 Say Y here if you intend to run this kernel on a Palm LifeDrive
375 handheld computer.
376
377config PALM_TREO
378 bool
379 depends on ARCH_PXA_PALM
380
381config MACH_CENTRO
382 bool "Palm Centro 685 (GSM)"
383 default y
384 depends on ARCH_PXA_PALM
385 select PXA27x
386 select IWMMXT
387 select PALM_TREO
388 help
389 Say Y here if you intend to run this kernel on Palm Centro 685 (GSM)
432 smartphone. 390 smartphone.
433 391
434config MACH_PALMLD 392config MACH_TREO680
435 bool "Palm LifeDrive" 393 bool "Palm Treo 680"
436 default y 394 default y
437 depends on ARCH_PXA_PALM 395 depends on ARCH_PXA_PALM
438 select PXA27x 396 select PXA27x
439 select IWMMXT 397 select IWMMXT
398 select PALM_TREO
440 help 399 help
441 Say Y here if you intend to run this kernel on a Palm LifeDrive 400 Say Y here if you intend to run this kernel on Palm Treo 680
401 smartphone.
402
403config PXA_SHARPSL
404 bool "SHARP Zaurus SL-5600, SL-C7xx and SL-Cxx00 Models"
405 select SHARP_SCOOP
406 select SHARP_PARAM
407 help
408 Say Y here if you intend to run this kernel on a
409 Sharp Zaurus SL-5600 (Poodle), SL-C700 (Corgi),
410 SL-C750 (Shepherd), SL-C760 (Husky), SL-C1000 (Akita),
411 SL-C3000 (Spitz), SL-C3100 (Borzoi) or SL-C6000x (Tosa)
442 handheld computer. 412 handheld computer.
443 413
444config MACH_PCM990_BASEBOARD 414config SHARPSL_PM
445 bool "PHYTEC PCM-990 development board" 415 bool
446 select HAVE_PWM 416 select APM_EMULATION
447 depends on MACH_PCM027
448 417
449choice 418config CORGI_SSP_DEPRECATED
450 prompt "display on pcm990" 419 bool
451 depends on MACH_PCM990_BASEBOARD 420 select PXA_SSP
421 help
422 This option will include corgi_ssp.c and corgi_lcd.c
423 that corgi_ts.c and other legacy drivers (corgi_bl.c
424 and sharpsl_pm.c) may depend on.
452 425
453config PCM990_DISPLAY_SHARP 426config MACH_POODLE
454 bool "sharp lq084v1dg21 stn display" 427 bool "Enable Sharp SL-5600 (Poodle) Support"
428 depends on PXA_SHARPSL
429 select PXA25x
430 select SHARP_LOCOMO
431 select PXA_SSP
455 432
456config PCM990_DISPLAY_NEC 433config MACH_CORGI
457 bool "nec nl6448bc20_18d tft display" 434 bool "Enable Sharp SL-C700 (Corgi) Support"
435 depends on PXA_SHARPSL
436 select PXA25x
437 select PXA_SHARP_C7xx
458 438
459config PCM990_DISPLAY_NONE 439config MACH_SHEPHERD
460 bool "no display" 440 bool "Enable Sharp SL-C750 (Shepherd) Support"
441 depends on PXA_SHARPSL
442 select PXA25x
443 select PXA_SHARP_C7xx
461 444
462endchoice 445config MACH_HUSKY
446 bool "Enable Sharp SL-C760 (Husky) Support"
447 depends on PXA_SHARPSL
448 select PXA25x
449 select PXA_SHARP_C7xx
463 450
464config MACH_CSB726 451config MACH_AKITA
465 bool "Enable Cogent CSB726 System On a Module" 452 bool "Enable Sharp SL-1000 (Akita) Support"
453 depends on PXA_SHARPSL
466 select PXA27x 454 select PXA27x
467 select IWMMXT 455 select PXA_SHARP_Cxx00
468 help 456 select MACH_SPITZ
469 Say Y here if you intend to run this kernel on a Cogent 457 select I2C
470 CSB726 System On Module. 458 select I2C_PXA
471 459
472config CSB726_CSB701 460config MACH_SPITZ
473 bool "Enable supprot for CSB701 baseboard" 461 bool "Enable Sharp Zaurus SL-3000 (Spitz) Support"
474 depends on MACH_CSB726 462 depends on PXA_SHARPSL
463 select PXA27x
464 select PXA_SHARP_Cxx00
475 465
476config PXA_EZX 466config MACH_BORZOI
477 bool "Motorola EZX Platform" 467 bool "Enable Sharp Zaurus SL-3100 (Borzoi) Support"
468 depends on PXA_SHARPSL
478 select PXA27x 469 select PXA27x
479 select IWMMXT 470 select PXA_SHARP_Cxx00
480 select HAVE_PWM 471
472config MACH_TOSA
473 bool "Enable Sharp SL-6000x (Tosa) Support"
474 depends on PXA_SHARPSL
475 select PXA25x
481 select PXA_HAVE_BOARD_IRQS 476 select PXA_HAVE_BOARD_IRQS
482 477
483config MACH_EZX_A780 478config ARCH_PXA_ESERIES
484 bool "Motorola EZX A780" 479 bool "PXA based Toshiba e-series PDAs"
485 default y 480 select PXA25x
486 depends on PXA_EZX 481 select PXA_HAVE_BOARD_IRQS
487 482
488config MACH_EZX_E680 483config MACH_E330
489 bool "Motorola EZX E680" 484 bool "Toshiba e330"
490 default y 485 default y
491 depends on PXA_EZX 486 depends on ARCH_PXA_ESERIES
487 help
488 Say Y here if you intend to run this kernel on a Toshiba
489 e330 family PDA.
492 490
493config MACH_EZX_A1200 491config MACH_E350
494 bool "Motorola EZX A1200" 492 bool "Toshiba e350"
495 default y 493 default y
496 depends on PXA_EZX 494 depends on ARCH_PXA_ESERIES
495 help
496 Say Y here if you intend to run this kernel on a Toshiba
497 e350 family PDA.
497 498
498config MACH_EZX_A910 499config MACH_E740
499 bool "Motorola EZX A910" 500 bool "Toshiba e740"
500 default y 501 default y
501 depends on PXA_EZX 502 depends on ARCH_PXA_ESERIES
503 select FB_W100
504 help
505 Say Y here if you intend to run this kernel on a Toshiba
506 e740 family PDA.
502 507
503config MACH_EZX_E6 508config MACH_E750
504 bool "Motorola EZX E6" 509 bool "Toshiba e750"
505 default y 510 default y
506 depends on PXA_EZX 511 depends on ARCH_PXA_ESERIES
512 select FB_W100
513 help
514 Say Y here if you intend to run this kernel on a Toshiba
515 e750 family PDA.
507 516
508config MACH_EZX_E2 517config MACH_E400
509 bool "Motorola EZX E2" 518 bool "Toshiba e400"
510 default y 519 default y
511 depends on PXA_EZX 520 depends on ARCH_PXA_ESERIES
521 help
522 Say Y here if you intend to run this kernel on a Toshiba
523 e400 family PDA.
512 524
513config MACH_XCEP 525config MACH_E800
514 bool "Iskratel Electronics XCEP" 526 bool "Toshiba e800"
515 select PXA25x 527 default y
516 select MTD 528 depends on ARCH_PXA_ESERIES
517 select MTD_PARTITIONS 529 select FB_W100
518 select MTD_PHYSMAP
519 select MTD_CFI_INTELEXT
520 select MTD_CFI
521 select MTD_CHAR
522 select SMC91X
523 select PXA_SSP
524 help 530 help
525 PXA255 based Single Board Computer with SMC 91C111 ethernet chip and 64 MB of flash. 531 Say Y here if you intend to run this kernel on a Toshiba
526 Tuned for usage in Libera instruments for particle accelerators. 532 e800 family PDA.
527 533
528endmenu 534endmenu
529 535
@@ -551,6 +557,42 @@ config PXA3xx
551 help 557 help
552 Select code specific to PXA3xx variants 558 Select code specific to PXA3xx variants
553 559
560config CPU_PXA300
561 bool
562 select PXA3xx
563 help
564 PXA300 (codename Monahans-L)
565
566config CPU_PXA310
567 bool
568 select CPU_PXA300
569 help
570 PXA310 (codename Monahans-LV)
571
572config CPU_PXA320
573 bool
574 select PXA3xx
575 help
576 PXA320 (codename Monahans-P)
577
578config CPU_PXA930
579 bool
580 select PXA3xx
581 help
582 PXA930 (codename Tavor-P)
583
584config CPU_PXA935
585 bool
586 select CPU_PXA930
587 help
588 PXA935 (codename Tavor-P65)
589
590config CPU_PXA950
591 bool
592 select CPU_PXA930
593 help
594 PXA950 (codename Tavor-PV2)
595
554config PXA_SHARP_C7xx 596config PXA_SHARP_C7xx
555 bool 597 bool
556 select PXA_SSP 598 select PXA_SSP
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
index f10e152bfc27..b5d29e60a341 100644
--- a/arch/arm/mach-pxa/Makefile
+++ b/arch/arm/mach-pxa/Makefile
@@ -24,33 +24,63 @@ obj-$(CONFIG_CPU_PXA300) += pxa300.o
24obj-$(CONFIG_CPU_PXA320) += pxa320.o 24obj-$(CONFIG_CPU_PXA320) += pxa320.o
25obj-$(CONFIG_CPU_PXA930) += pxa930.o 25obj-$(CONFIG_CPU_PXA930) += pxa930.o
26 26
27# Specific board support 27# NOTE: keep the order of boards in accordance to their order in Kconfig
28obj-$(CONFIG_ARCH_GUMSTIX) += gumstix.o 28
29obj-$(CONFIG_GUMSTIX_AM200EPD) += am200epd.o 29# Intel/Marvell Dev Platforms
30obj-$(CONFIG_GUMSTIX_AM300EPD) += am300epd.o
31obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o 30obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o
32obj-$(CONFIG_MACH_LOGICPD_PXA270) += lpd270.o
33obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o 31obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o
34obj-$(CONFIG_MACH_BALLOON3) += balloon3.o 32obj-$(CONFIG_MACH_ZYLONITE300) += zylonite.o zylonite_pxa300.o
35obj-$(CONFIG_MACH_MP900C) += mp900.o 33obj-$(CONFIG_MACH_ZYLONITE320) += zylonite.o zylonite_pxa320.o
34obj-$(CONFIG_MACH_LITTLETON) += littleton.o
35obj-$(CONFIG_MACH_TAVOREVB) += tavorevb.o
36obj-$(CONFIG_MACH_SAAR) += saar.o
37
38# 3rd Party Dev Platforms
36obj-$(CONFIG_ARCH_PXA_IDP) += idp.o 39obj-$(CONFIG_ARCH_PXA_IDP) += idp.o
40obj-$(CONFIG_ARCH_VIPER) += viper.o
41obj-$(CONFIG_MACH_BALLOON3) += balloon3.o
42obj-$(CONFIG_MACH_CSB726) += csb726.o
43obj-$(CONFIG_CSB726_CSB701) += csb701.o
44obj-$(CONFIG_MACH_ARMCORE) += cm-x2xx.o cm-x255.o cm-x270.o
45ifeq ($(CONFIG_PCI),y)
46obj-$(CONFIG_MACH_ARMCORE) += cm-x2xx-pci.o
47endif
48obj-$(CONFIG_MACH_EM_X270) += em-x270.o
49obj-$(CONFIG_MACH_CM_X300) += cm-x300.o
50obj-$(CONFIG_ARCH_GUMSTIX) += gumstix.o
51obj-$(CONFIG_GUMSTIX_AM200EPD) += am200epd.o
52obj-$(CONFIG_GUMSTIX_AM300EPD) += am300epd.o
53obj-$(CONFIG_MACH_INTELMOTE2) += imote2.o
54obj-$(CONFIG_MACH_STARGATE2) += stargate2.o
55obj-$(CONFIG_MACH_XCEP) += xcep.o
37obj-$(CONFIG_MACH_TRIZEPS4) += trizeps4.o 56obj-$(CONFIG_MACH_TRIZEPS4) += trizeps4.o
57obj-$(CONFIG_MACH_LOGICPD_PXA270) += lpd270.o
58obj-$(CONFIG_MACH_PCM027) += pcm027.o
59obj-$(CONFIG_MACH_PCM990_BASEBOARD) += pcm990-baseboard.o
38obj-$(CONFIG_MACH_COLIBRI) += colibri-pxa270.o 60obj-$(CONFIG_MACH_COLIBRI) += colibri-pxa270.o
39obj-$(CONFIG_MACH_COLIBRI300) += colibri-pxa3xx.o colibri-pxa300.o 61obj-$(CONFIG_MACH_COLIBRI300) += colibri-pxa3xx.o colibri-pxa300.o
40obj-$(CONFIG_MACH_COLIBRI320) += colibri-pxa3xx.o colibri-pxa320.o 62obj-$(CONFIG_MACH_COLIBRI320) += colibri-pxa3xx.o colibri-pxa320.o
63
64# End-user Products
65obj-$(CONFIG_MACH_H4700) += hx4700.o
41obj-$(CONFIG_MACH_H5000) += h5000.o 66obj-$(CONFIG_MACH_H5000) += h5000.o
67obj-$(CONFIG_MACH_HIMALAYA) += himalaya.o
68obj-$(CONFIG_MACH_MAGICIAN) += magician.o
69obj-$(CONFIG_MACH_MIOA701) += mioa701.o mioa701_bootresume.o
70obj-$(CONFIG_PXA_EZX) += ezx.o
71obj-$(CONFIG_MACH_MP900C) += mp900.o
72obj-$(CONFIG_MACH_PALMTE2) += palmte2.o
73obj-$(CONFIG_MACH_PALMTC) += palmtc.o
74obj-$(CONFIG_MACH_PALMT5) += palmt5.o
75obj-$(CONFIG_MACH_PALMTX) += palmtx.o
76obj-$(CONFIG_MACH_PALMZ72) += palmz72.o
77obj-$(CONFIG_MACH_PALMLD) += palmld.o
78obj-$(CONFIG_PALM_TREO) += palmtreo.o
42obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o sharpsl_pm.o corgi_pm.o 79obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o sharpsl_pm.o corgi_pm.o
43obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o sharpsl_pm.o spitz_pm.o 80obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o sharpsl_pm.o spitz_pm.o
44obj-$(CONFIG_CORGI_SSP_DEPRECATED) += corgi_ssp.o corgi_lcd.o 81obj-$(CONFIG_CORGI_SSP_DEPRECATED) += corgi_ssp.o corgi_lcd.o
45obj-$(CONFIG_MACH_POODLE) += poodle.o 82obj-$(CONFIG_MACH_POODLE) += poodle.o
46obj-$(CONFIG_MACH_PCM027) += pcm027.o
47obj-$(CONFIG_MACH_PCM990_BASEBOARD) += pcm990-baseboard.o
48obj-$(CONFIG_MACH_TOSA) += tosa.o 83obj-$(CONFIG_MACH_TOSA) += tosa.o
49obj-$(CONFIG_MACH_EM_X270) += em-x270.o
50obj-$(CONFIG_MACH_H4700) += hx4700.o
51obj-$(CONFIG_MACH_MAGICIAN) += magician.o
52obj-$(CONFIG_MACH_HIMALAYA) += himalaya.o
53obj-$(CONFIG_MACH_MIOA701) += mioa701.o mioa701_bootresume.o
54obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o 84obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o
55obj-$(CONFIG_MACH_E330) += e330.o 85obj-$(CONFIG_MACH_E330) += e330.o
56obj-$(CONFIG_MACH_E350) += e350.o 86obj-$(CONFIG_MACH_E350) += e350.o
@@ -58,34 +88,6 @@ obj-$(CONFIG_MACH_E740) += e740.o
58obj-$(CONFIG_MACH_E750) += e750.o 88obj-$(CONFIG_MACH_E750) += e750.o
59obj-$(CONFIG_MACH_E400) += e400.o 89obj-$(CONFIG_MACH_E400) += e400.o
60obj-$(CONFIG_MACH_E800) += e800.o 90obj-$(CONFIG_MACH_E800) += e800.o
61obj-$(CONFIG_MACH_PALMTE2) += palmte2.o
62obj-$(CONFIG_MACH_PALMTC) += palmtc.o
63obj-$(CONFIG_MACH_PALMT5) += palmt5.o
64obj-$(CONFIG_MACH_PALMTX) += palmtx.o
65obj-$(CONFIG_MACH_PALMLD) += palmld.o
66obj-$(CONFIG_MACH_PALMZ72) += palmz72.o
67obj-$(CONFIG_MACH_TREO680) += treo680.o
68obj-$(CONFIG_ARCH_VIPER) += viper.o
69
70ifeq ($(CONFIG_MACH_ZYLONITE),y)
71 obj-y += zylonite.o
72 obj-$(CONFIG_CPU_PXA300) += zylonite_pxa300.o
73 obj-$(CONFIG_CPU_PXA320) += zylonite_pxa320.o
74endif
75obj-$(CONFIG_MACH_LITTLETON) += littleton.o
76obj-$(CONFIG_MACH_TAVOREVB) += tavorevb.o
77obj-$(CONFIG_MACH_SAAR) += saar.o
78
79obj-$(CONFIG_MACH_ARMCORE) += cm-x2xx.o cm-x255.o cm-x270.o
80obj-$(CONFIG_MACH_CM_X300) += cm-x300.o
81obj-$(CONFIG_PXA_EZX) += ezx.o
82
83obj-$(CONFIG_MACH_XCEP) += xcep.o
84
85obj-$(CONFIG_MACH_INTELMOTE2) += imote2.o
86obj-$(CONFIG_MACH_STARGATE2) += stargate2.o
87obj-$(CONFIG_MACH_CSB726) += csb726.o
88obj-$(CONFIG_CSB726_CSB701) += csb701.o
89 91
90# Support for blinky lights 92# Support for blinky lights
91led-y := leds.o 93led-y := leds.o
@@ -95,8 +97,4 @@ led-$(CONFIG_ARCH_PXA_IDP) += leds-idp.o
95 97
96obj-$(CONFIG_LEDS) += $(led-y) 98obj-$(CONFIG_LEDS) += $(led-y)
97 99
98ifeq ($(CONFIG_PCI),y)
99obj-$(CONFIG_MACH_ARMCORE) += cm-x2xx-pci.o
100endif
101
102obj-$(CONFIG_TOSA_BT) += tosa-bt.o 100obj-$(CONFIG_TOSA_BT) += tosa-bt.o
diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c
index f23138b8fca3..b8cd07ca9380 100644
--- a/arch/arm/mach-pxa/balloon3.c
+++ b/arch/arm/mach-pxa/balloon3.c
@@ -306,6 +306,10 @@ static void __init balloon3_init(void)
306 */ 306 */
307 ARB_CNTRL = ARB_CORE_PARK | 0x234; 307 ARB_CNTRL = ARB_CORE_PARK | 0x234;
308 308
309 pxa_set_ffuart_info(NULL);
310 pxa_set_btuart_info(NULL);
311 pxa_set_stuart_info(NULL);
312
309 pxa_set_i2c_info(NULL); 313 pxa_set_i2c_info(NULL);
310 if (balloon3_has(BALLOON3_FEATURE_AUDIO)) 314 if (balloon3_has(BALLOON3_FEATURE_AUDIO))
311 pxa_set_ac97_info(NULL); 315 pxa_set_ac97_info(NULL);
diff --git a/arch/arm/mach-pxa/cm-x2xx.c b/arch/arm/mach-pxa/cm-x2xx.c
index b50ef39eabfc..bff6e78f033d 100644
--- a/arch/arm/mach-pxa/cm-x2xx.c
+++ b/arch/arm/mach-pxa/cm-x2xx.c
@@ -453,6 +453,10 @@ static inline void cmx2xx_init_ac97(void) {}
453 453
454static void __init cmx2xx_init(void) 454static void __init cmx2xx_init(void)
455{ 455{
456 pxa_set_ffuart_info(NULL);
457 pxa_set_btuart_info(NULL);
458 pxa_set_stuart_info(NULL);
459
456 cmx2xx_pm_init(); 460 cmx2xx_pm_init();
457 461
458 if (cpu_is_pxa25x()) 462 if (cpu_is_pxa25x())
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c
index 102916f1e465..d37cfa132a65 100644
--- a/arch/arm/mach-pxa/cm-x300.c
+++ b/arch/arm/mach-pxa/cm-x300.c
@@ -3,9 +3,10 @@
3 * 3 *
4 * Support for the CompuLab CM-X300 modules 4 * Support for the CompuLab CM-X300 modules
5 * 5 *
6 * Copyright (C) 2008 CompuLab Ltd. 6 * Copyright (C) 2008,2009 CompuLab Ltd.
7 * 7 *
8 * Mike Rapoport <mike@compulab.co.il> 8 * Mike Rapoport <mike@compulab.co.il>
9 * Igor Grinberg <grinberg@compulab.co.il>
9 * 10 *
10 * This program is free software; you can redistribute it and/or modify 11 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as 12 * it under the terms of the GNU General Public License version 2 as
@@ -16,30 +17,41 @@
16#include <linux/kernel.h> 17#include <linux/kernel.h>
17#include <linux/interrupt.h> 18#include <linux/interrupt.h>
18#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/delay.h>
19#include <linux/platform_device.h> 21#include <linux/platform_device.h>
20 22
21#include <linux/gpio.h> 23#include <linux/gpio.h>
22#include <linux/dm9000.h> 24#include <linux/dm9000.h>
23#include <linux/leds.h> 25#include <linux/leds.h>
24#include <linux/rtc-v3020.h> 26#include <linux/rtc-v3020.h>
27#include <linux/pwm_backlight.h>
25 28
26#include <linux/i2c.h> 29#include <linux/i2c.h>
27#include <linux/i2c/pca953x.h> 30#include <linux/i2c/pca953x.h>
28 31
32#include <linux/mfd/da903x.h>
33
34#include <linux/spi/spi.h>
35#include <linux/spi/spi_gpio.h>
36#include <linux/spi/tdo24m.h>
37
29#include <asm/mach-types.h> 38#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 39#include <asm/mach/arch.h>
31#include <asm/setup.h> 40#include <asm/setup.h>
32 41
33#include <mach/pxa300.h> 42#include <mach/pxa300.h>
43#include <mach/pxa27x-udc.h>
34#include <mach/pxafb.h> 44#include <mach/pxafb.h>
35#include <mach/mmc.h> 45#include <mach/mmc.h>
36#include <mach/ohci.h> 46#include <mach/ohci.h>
37#include <plat/i2c.h> 47#include <plat/i2c.h>
38#include <mach/pxa3xx_nand.h> 48#include <plat/pxa3xx_nand.h>
49#include <mach/audio.h>
39 50
40#include <asm/mach/map.h> 51#include <asm/mach/map.h>
41 52
42#include "generic.h" 53#include "generic.h"
54#include "devices.h"
43 55
44#define CM_X300_ETH_PHYS 0x08000010 56#define CM_X300_ETH_PHYS 0x08000010
45 57
@@ -53,7 +65,7 @@
53#define GPIO97_RTC_RD (97) 65#define GPIO97_RTC_RD (97)
54#define GPIO98_RTC_IO (98) 66#define GPIO98_RTC_IO (98)
55 67
56static mfp_cfg_t cm_x300_mfp_cfg[] __initdata = { 68static mfp_cfg_t cm_x3xx_mfp_cfg[] __initdata = {
57 /* LCD */ 69 /* LCD */
58 GPIO54_LCD_LDD_0, 70 GPIO54_LCD_LDD_0,
59 GPIO55_LCD_LDD_1, 71 GPIO55_LCD_LDD_1,
@@ -137,7 +149,6 @@ static mfp_cfg_t cm_x300_mfp_cfg[] __initdata = {
137 GPIO36_UART1_DTR, 149 GPIO36_UART1_DTR,
138 150
139 /* GPIOs */ 151 /* GPIOs */
140 GPIO79_GPIO, /* LED */
141 GPIO82_GPIO | MFP_PULL_HIGH, /* MMC CD */ 152 GPIO82_GPIO | MFP_PULL_HIGH, /* MMC CD */
142 GPIO85_GPIO, /* MMC WP */ 153 GPIO85_GPIO, /* MMC WP */
143 GPIO99_GPIO, /* Ethernet IRQ */ 154 GPIO99_GPIO, /* Ethernet IRQ */
@@ -151,6 +162,50 @@ static mfp_cfg_t cm_x300_mfp_cfg[] __initdata = {
151 /* Standard I2C */ 162 /* Standard I2C */
152 GPIO21_I2C_SCL, 163 GPIO21_I2C_SCL,
153 GPIO22_I2C_SDA, 164 GPIO22_I2C_SDA,
165
166 /* PWM Backlight */
167 GPIO19_PWM2_OUT,
168};
169
170static mfp_cfg_t cm_x3xx_rev_lt130_mfp_cfg[] __initdata = {
171 /* GPIOs */
172 GPIO79_GPIO, /* LED */
173 GPIO77_GPIO, /* WiFi reset */
174 GPIO78_GPIO, /* BT reset */
175};
176
177static mfp_cfg_t cm_x3xx_rev_ge130_mfp_cfg[] __initdata = {
178 /* GPIOs */
179 GPIO76_GPIO, /* LED */
180 GPIO71_GPIO, /* WiFi reset */
181 GPIO70_GPIO, /* BT reset */
182};
183
184static mfp_cfg_t cm_x310_mfp_cfg[] __initdata = {
185 /* USB PORT 2 */
186 ULPI_STP,
187 ULPI_NXT,
188 ULPI_DIR,
189 GPIO30_ULPI_DATA_OUT_0,
190 GPIO31_ULPI_DATA_OUT_1,
191 GPIO32_ULPI_DATA_OUT_2,
192 GPIO33_ULPI_DATA_OUT_3,
193 GPIO34_ULPI_DATA_OUT_4,
194 GPIO35_ULPI_DATA_OUT_5,
195 GPIO36_ULPI_DATA_OUT_6,
196 GPIO37_ULPI_DATA_OUT_7,
197 GPIO38_ULPI_CLK,
198 /* external PHY reset pin */
199 GPIO127_GPIO,
200
201 /* USB PORT 3 */
202 GPIO77_USB_P3_1,
203 GPIO78_USB_P3_2,
204 GPIO79_USB_P3_3,
205 GPIO80_USB_P3_4,
206 GPIO81_USB_P3_5,
207 GPIO82_USB_P3_6,
208 GPIO0_2_USBH_PEN,
154}; 209};
155 210
156#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) 211#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
@@ -195,17 +250,18 @@ static void __init cm_x300_init_dm9000(void)
195static inline void cm_x300_init_dm9000(void) {} 250static inline void cm_x300_init_dm9000(void) {}
196#endif 251#endif
197 252
253/* LCD */
198#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) 254#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
199static struct pxafb_mode_info cm_x300_lcd_modes[] = { 255static struct pxafb_mode_info cm_x300_lcd_modes[] = {
200 [0] = { 256 [0] = {
201 .pixclock = 38000, 257 .pixclock = 38250,
202 .bpp = 16, 258 .bpp = 16,
203 .xres = 480, 259 .xres = 480,
204 .yres = 640, 260 .yres = 640,
205 .hsync_len = 8, 261 .hsync_len = 8,
206 .vsync_len = 2, 262 .vsync_len = 2,
207 .left_margin = 8, 263 .left_margin = 8,
208 .upper_margin = 0, 264 .upper_margin = 2,
209 .right_margin = 24, 265 .right_margin = 24,
210 .lower_margin = 4, 266 .lower_margin = 4,
211 .cmap_greyscale = 0, 267 .cmap_greyscale = 0,
@@ -227,7 +283,7 @@ static struct pxafb_mode_info cm_x300_lcd_modes[] = {
227 283
228static struct pxafb_mach_info cm_x300_lcd = { 284static struct pxafb_mach_info cm_x300_lcd = {
229 .modes = cm_x300_lcd_modes, 285 .modes = cm_x300_lcd_modes,
230 .num_modes = 2, 286 .num_modes = ARRAY_SIZE(cm_x300_lcd_modes),
231 .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL, 287 .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
232}; 288};
233 289
@@ -239,6 +295,87 @@ static void __init cm_x300_init_lcd(void)
239static inline void cm_x300_init_lcd(void) {} 295static inline void cm_x300_init_lcd(void) {}
240#endif 296#endif
241 297
298#if defined(CONFIG_BACKLIGHT_PWM) || defined(CONFIG_BACKLIGHT_PWM_MODULE)
299static struct platform_pwm_backlight_data cm_x300_backlight_data = {
300 .pwm_id = 2,
301 .max_brightness = 100,
302 .dft_brightness = 100,
303 .pwm_period_ns = 10000,
304};
305
306static struct platform_device cm_x300_backlight_device = {
307 .name = "pwm-backlight",
308 .dev = {
309 .parent = &pxa27x_device_pwm0.dev,
310 .platform_data = &cm_x300_backlight_data,
311 },
312};
313
314static void cm_x300_init_bl(void)
315{
316 platform_device_register(&cm_x300_backlight_device);
317}
318#else
319static inline void cm_x300_init_bl(void) {}
320#endif
321
322#if defined(CONFIG_SPI_GPIO) || defined(CONFIG_SPI_GPIO_MODULE)
323#define GPIO_LCD_BASE (144)
324#define GPIO_LCD_DIN (GPIO_LCD_BASE + 8) /* aux_gpio3_0 */
325#define GPIO_LCD_DOUT (GPIO_LCD_BASE + 9) /* aux_gpio3_1 */
326#define GPIO_LCD_SCL (GPIO_LCD_BASE + 10) /* aux_gpio3_2 */
327#define GPIO_LCD_CS (GPIO_LCD_BASE + 11) /* aux_gpio3_3 */
328#define LCD_SPI_BUS_NUM (1)
329
330static struct spi_gpio_platform_data cm_x300_spi_gpio_pdata = {
331 .sck = GPIO_LCD_SCL,
332 .mosi = GPIO_LCD_DIN,
333 .miso = GPIO_LCD_DOUT,
334 .num_chipselect = 1,
335};
336
337static struct platform_device cm_x300_spi_gpio = {
338 .name = "spi_gpio",
339 .id = LCD_SPI_BUS_NUM,
340 .dev = {
341 .platform_data = &cm_x300_spi_gpio_pdata,
342 },
343};
344
345static struct tdo24m_platform_data cm_x300_tdo24m_pdata = {
346 .model = TDO35S,
347};
348
349static struct spi_board_info cm_x300_spi_devices[] __initdata = {
350 {
351 .modalias = "tdo24m",
352 .max_speed_hz = 1000000,
353 .bus_num = LCD_SPI_BUS_NUM,
354 .chip_select = 0,
355 .controller_data = (void *) GPIO_LCD_CS,
356 .platform_data = &cm_x300_tdo24m_pdata,
357 },
358};
359
360static void __init cm_x300_init_spi(void)
361{
362 spi_register_board_info(cm_x300_spi_devices,
363 ARRAY_SIZE(cm_x300_spi_devices));
364 platform_device_register(&cm_x300_spi_gpio);
365}
366#else
367static inline void cm_x300_init_spi(void) {}
368#endif
369
370#if defined(CONFIG_SND_PXA2XX_LIB_AC97)
371static void __init cm_x300_init_ac97(void)
372{
373 pxa_set_ac97_info(NULL);
374}
375#else
376static inline void cm_x300_init_ac97(void) {}
377#endif
378
242#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE) 379#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
243static struct mtd_partition cm_x300_nand_partitions[] = { 380static struct mtd_partition cm_x300_nand_partitions[] = {
244 [0] = { 381 [0] = {
@@ -333,9 +470,19 @@ static inline void cm_x300_init_mmc(void) {}
333#endif 470#endif
334 471
335#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) 472#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
473static int cm_x300_ohci_init(struct device *dev)
474{
475 if (cpu_is_pxa300())
476 UP2OCR = UP2OCR_HXS
477 | UP2OCR_HXOE | UP2OCR_DMPDE | UP2OCR_DPPDE;
478
479 return 0;
480}
481
336static struct pxaohci_platform_data cm_x300_ohci_platform_data = { 482static struct pxaohci_platform_data cm_x300_ohci_platform_data = {
337 .port_mode = PMM_PERPORT_MODE, 483 .port_mode = PMM_PERPORT_MODE,
338 .flags = ENABLE_PORT1 | ENABLE_PORT2 | POWER_CONTROL_LOW, 484 .flags = ENABLE_PORT_ALL | POWER_CONTROL_LOW,
485 .init = cm_x300_ohci_init,
339}; 486};
340 487
341static void __init cm_x300_init_ohci(void) 488static void __init cm_x300_init_ohci(void)
@@ -351,7 +498,6 @@ static struct gpio_led cm_x300_leds[] = {
351 [0] = { 498 [0] = {
352 .name = "cm-x300:green", 499 .name = "cm-x300:green",
353 .default_trigger = "heartbeat", 500 .default_trigger = "heartbeat",
354 .gpio = 79,
355 .active_low = 1, 501 .active_low = 1,
356 }, 502 },
357}; 503};
@@ -371,6 +517,11 @@ static struct platform_device cm_x300_led_device = {
371 517
372static void __init cm_x300_init_leds(void) 518static void __init cm_x300_init_leds(void)
373{ 519{
520 if (system_rev < 130)
521 cm_x300_leds[0].gpio = 79;
522 else
523 cm_x300_leds[0].gpio = 76;
524
374 platform_device_register(&cm_x300_led_device); 525 platform_device_register(&cm_x300_led_device);
375} 526}
376#else 527#else
@@ -433,11 +584,94 @@ static void __init cm_x300_init_rtc(void)
433static inline void cm_x300_init_rtc(void) {} 584static inline void cm_x300_init_rtc(void) {}
434#endif 585#endif
435 586
436static void __init cm_x300_init(void) 587/* DA9030 */
588struct da903x_subdev_info cm_x300_da9030_subdevs[] = {
589 {
590 .name = "da903x-backlight",
591 .id = DA9030_ID_WLED,
592 }
593};
594
595static struct da903x_platform_data cm_x300_da9030_info = {
596 .num_subdevs = ARRAY_SIZE(cm_x300_da9030_subdevs),
597 .subdevs = cm_x300_da9030_subdevs,
598};
599
600static struct i2c_board_info cm_x300_pmic_info = {
601 I2C_BOARD_INFO("da9030", 0x49),
602 .irq = IRQ_GPIO(0),
603 .platform_data = &cm_x300_da9030_info,
604};
605
606static struct i2c_pxa_platform_data cm_x300_pwr_i2c_info = {
607 .use_pio = 1,
608};
609
610static void __init cm_x300_init_da9030(void)
611{
612 pxa3xx_set_i2c_power_info(&cm_x300_pwr_i2c_info);
613 i2c_register_board_info(1, &cm_x300_pmic_info, 1);
614}
615
616static void __init cm_x300_init_wi2wi(void)
617{
618 int bt_reset, wlan_en;
619 int err;
620
621 if (system_rev < 130) {
622 wlan_en = 77;
623 bt_reset = 78;
624 } else {
625 wlan_en = 71;
626 bt_reset = 70;
627 }
628
629 /* Libertas and CSR reset */
630 err = gpio_request(wlan_en, "wlan en");
631 if (err) {
632 pr_err("CM-X300: failed to request wlan en gpio: %d\n", err);
633 } else {
634 gpio_direction_output(wlan_en, 1);
635 gpio_free(wlan_en);
636 }
637
638 err = gpio_request(bt_reset, "bt reset");
639 if (err) {
640 pr_err("CM-X300: failed to request bt reset gpio: %d\n", err);
641 } else {
642 gpio_direction_output(bt_reset, 1);
643 udelay(10);
644 gpio_set_value(bt_reset, 0);
645 udelay(10);
646 gpio_set_value(bt_reset, 1);
647 gpio_free(bt_reset);
648 }
649}
650
651/* MFP */
652static void __init cm_x300_init_mfp(void)
437{ 653{
438 /* board-processor specific GPIO initialization */ 654 /* board-processor specific GPIO initialization */
439 pxa3xx_mfp_config(ARRAY_AND_SIZE(cm_x300_mfp_cfg)); 655 pxa3xx_mfp_config(ARRAY_AND_SIZE(cm_x3xx_mfp_cfg));
656
657 if (system_rev < 130)
658 pxa3xx_mfp_config(ARRAY_AND_SIZE(cm_x3xx_rev_lt130_mfp_cfg));
659 else
660 pxa3xx_mfp_config(ARRAY_AND_SIZE(cm_x3xx_rev_ge130_mfp_cfg));
661
662 if (cpu_is_pxa310())
663 pxa3xx_mfp_config(ARRAY_AND_SIZE(cm_x310_mfp_cfg));
664}
665
666static void __init cm_x300_init(void)
667{
668 cm_x300_init_mfp();
669
670 pxa_set_ffuart_info(NULL);
671 pxa_set_btuart_info(NULL);
672 pxa_set_stuart_info(NULL);
440 673
674 cm_x300_init_da9030();
441 cm_x300_init_dm9000(); 675 cm_x300_init_dm9000();
442 cm_x300_init_lcd(); 676 cm_x300_init_lcd();
443 cm_x300_init_ohci(); 677 cm_x300_init_ohci();
@@ -445,7 +679,11 @@ static void __init cm_x300_init(void)
445 cm_x300_init_nand(); 679 cm_x300_init_nand();
446 cm_x300_init_leds(); 680 cm_x300_init_leds();
447 cm_x300_init_i2c(); 681 cm_x300_init_i2c();
682 cm_x300_init_spi();
448 cm_x300_init_rtc(); 683 cm_x300_init_rtc();
684 cm_x300_init_ac97();
685 cm_x300_init_wi2wi();
686 cm_x300_init_bl();
449} 687}
450 688
451static void __init cm_x300_fixup(struct machine_desc *mdesc, struct tag *tags, 689static void __init cm_x300_fixup(struct machine_desc *mdesc, struct tag *tags,
diff --git a/arch/arm/mach-pxa/colibri-pxa270.c b/arch/arm/mach-pxa/colibri-pxa270.c
index 01bcfaae75bc..061c45316de8 100644
--- a/arch/arm/mach-pxa/colibri-pxa270.c
+++ b/arch/arm/mach-pxa/colibri-pxa270.c
@@ -130,6 +130,9 @@ static struct platform_device *colibri_pxa270_devices[] __initdata = {
130static void __init colibri_pxa270_init(void) 130static void __init colibri_pxa270_init(void)
131{ 131{
132 pxa2xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa270_pin_config)); 132 pxa2xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa270_pin_config));
133 pxa_set_ffuart_info(NULL);
134 pxa_set_btuart_info(NULL);
135 pxa_set_stuart_info(NULL);
133 platform_add_devices(ARRAY_AND_SIZE(colibri_pxa270_devices)); 136 platform_add_devices(ARRAY_AND_SIZE(colibri_pxa270_devices));
134} 137}
135 138
diff --git a/arch/arm/mach-pxa/colibri-pxa300.c b/arch/arm/mach-pxa/colibri-pxa300.c
index 37c239c56568..45c23fd6df31 100644
--- a/arch/arm/mach-pxa/colibri-pxa300.c
+++ b/arch/arm/mach-pxa/colibri-pxa300.c
@@ -170,6 +170,10 @@ static inline void colibri_pxa310_init_ac97(void) {}
170 170
171void __init colibri_pxa300_init(void) 171void __init colibri_pxa300_init(void)
172{ 172{
173 pxa_set_ffuart_info(NULL);
174 pxa_set_btuart_info(NULL);
175 pxa_set_stuart_info(NULL);
176
173 colibri_pxa300_init_eth(); 177 colibri_pxa300_init_eth();
174 colibri_pxa300_init_ohci(); 178 colibri_pxa300_init_ohci();
175 colibri_pxa3xx_init_nand(); 179 colibri_pxa3xx_init_nand();
diff --git a/arch/arm/mach-pxa/colibri-pxa320.c b/arch/arm/mach-pxa/colibri-pxa320.c
index ec0e14b96682..ae835fad7d10 100644
--- a/arch/arm/mach-pxa/colibri-pxa320.c
+++ b/arch/arm/mach-pxa/colibri-pxa320.c
@@ -199,6 +199,10 @@ static void __init colibri_pxa320_init_uart(void)
199 199
200void __init colibri_pxa320_init(void) 200void __init colibri_pxa320_init(void)
201{ 201{
202 pxa_set_ffuart_info(NULL);
203 pxa_set_btuart_info(NULL);
204 pxa_set_stuart_info(NULL);
205
202 colibri_pxa320_init_eth(); 206 colibri_pxa320_init_eth();
203 colibri_pxa320_init_ohci(); 207 colibri_pxa320_init_ohci();
204 colibri_pxa3xx_init_nand(); 208 colibri_pxa3xx_init_nand();
diff --git a/arch/arm/mach-pxa/colibri-pxa3xx.c b/arch/arm/mach-pxa/colibri-pxa3xx.c
index efebaf4d734d..e6c0a2287eb8 100644
--- a/arch/arm/mach-pxa/colibri-pxa3xx.c
+++ b/arch/arm/mach-pxa/colibri-pxa3xx.c
@@ -25,7 +25,7 @@
25#include <mach/colibri.h> 25#include <mach/colibri.h>
26#include <mach/mmc.h> 26#include <mach/mmc.h>
27#include <mach/pxafb.h> 27#include <mach/pxafb.h>
28#include <mach/pxa3xx_nand.h> 28#include <plat/pxa3xx_nand.h>
29 29
30#include "generic.h" 30#include "generic.h"
31#include "devices.h" 31#include "devices.h"
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
index b536b5a5a10d..74446cf8ae69 100644
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@ -671,6 +671,10 @@ static void __init corgi_init(void)
671 671
672 pxa2xx_mfp_config(ARRAY_AND_SIZE(corgi_pin_config)); 672 pxa2xx_mfp_config(ARRAY_AND_SIZE(corgi_pin_config));
673 673
674 pxa_set_ffuart_info(NULL);
675 pxa_set_btuart_info(NULL);
676 pxa_set_stuart_info(NULL);
677
674 corgi_init_spi(); 678 corgi_init_spi();
675 679
676 pxa_set_udc_info(&udc_info); 680 pxa_set_udc_info(&udc_info);
diff --git a/arch/arm/mach-pxa/corgi_pm.c b/arch/arm/mach-pxa/corgi_pm.c
index a093282fe4db..d4a0733e905b 100644
--- a/arch/arm/mach-pxa/corgi_pm.c
+++ b/arch/arm/mach-pxa/corgi_pm.c
@@ -214,8 +214,8 @@ static struct sharpsl_charger_machinfo corgi_pm_machinfo = {
214 .fatal_acin_volt = SHARPSL_FATAL_ACIN_VOLT, 214 .fatal_acin_volt = SHARPSL_FATAL_ACIN_VOLT,
215 .fatal_noacin_volt= SHARPSL_FATAL_NOACIN_VOLT, 215 .fatal_noacin_volt= SHARPSL_FATAL_NOACIN_VOLT,
216 .bat_levels = 40, 216 .bat_levels = 40,
217 .bat_levels_noac = spitz_battery_levels_noac, 217 .bat_levels_noac = sharpsl_battery_levels_noac,
218 .bat_levels_acin = spitz_battery_levels_acin, 218 .bat_levels_acin = sharpsl_battery_levels_acin,
219 .status_high_acin = 188, 219 .status_high_acin = 188,
220 .status_low_acin = 178, 220 .status_low_acin = 178,
221 .status_high_noac = 185, 221 .status_high_noac = 185,
diff --git a/arch/arm/mach-pxa/csb726.c b/arch/arm/mach-pxa/csb726.c
index 965480eb4fe6..88575b87bd33 100644
--- a/arch/arm/mach-pxa/csb726.c
+++ b/arch/arm/mach-pxa/csb726.c
@@ -268,6 +268,9 @@ static void __init csb726_init(void)
268/* MSC2 = 0x06697ff4; *//* none/SM501 */ 268/* MSC2 = 0x06697ff4; *//* none/SM501 */
269 MSC2 = (MSC2 & ~0xffff) | 0x7ff4; /* SM501 */ 269 MSC2 = (MSC2 & ~0xffff) | 0x7ff4; /* SM501 */
270 270
271 pxa_set_ffuart_info(NULL);
272 pxa_set_btuart_info(NULL);
273 pxa_set_stuart_info(NULL);
271 pxa_set_i2c_info(NULL); 274 pxa_set_i2c_info(NULL);
272 pxa27x_set_i2c_power_info(NULL); 275 pxa27x_set_i2c_power_info(NULL);
273 pxa_set_mci_info(&csb726_mci); 276 pxa_set_mci_info(&csb726_mci);
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c
index 46fabe1cca11..3395463bb5a6 100644
--- a/arch/arm/mach-pxa/devices.c
+++ b/arch/arm/mach-pxa/devices.c
@@ -4,17 +4,18 @@
4#include <linux/platform_device.h> 4#include <linux/platform_device.h>
5#include <linux/dma-mapping.h> 5#include <linux/dma-mapping.h>
6 6
7#include <mach/hardware.h>
7#include <mach/udc.h> 8#include <mach/udc.h>
8#include <mach/pxafb.h> 9#include <mach/pxafb.h>
9#include <mach/mmc.h> 10#include <mach/mmc.h>
10#include <mach/irda.h> 11#include <mach/irda.h>
11#include <plat/i2c.h>
12#include <mach/ohci.h> 12#include <mach/ohci.h>
13#include <mach/pxa27x_keypad.h> 13#include <mach/pxa27x_keypad.h>
14#include <mach/pxa2xx_spi.h> 14#include <mach/pxa2xx_spi.h>
15#include <mach/camera.h> 15#include <mach/camera.h>
16#include <mach/audio.h> 16#include <mach/audio.h>
17#include <mach/pxa3xx_nand.h> 17#include <plat/i2c.h>
18#include <plat/pxa3xx_nand.h>
18 19
19#include "devices.h" 20#include "devices.h"
20#include "generic.h" 21#include "generic.h"
@@ -167,13 +168,18 @@ static struct resource pxa_resource_ffuart[] = {
167 } 168 }
168}; 169};
169 170
170struct platform_device pxa_device_ffuart= { 171struct platform_device pxa_device_ffuart = {
171 .name = "pxa2xx-uart", 172 .name = "pxa2xx-uart",
172 .id = 0, 173 .id = 0,
173 .resource = pxa_resource_ffuart, 174 .resource = pxa_resource_ffuart,
174 .num_resources = ARRAY_SIZE(pxa_resource_ffuart), 175 .num_resources = ARRAY_SIZE(pxa_resource_ffuart),
175}; 176};
176 177
178void __init pxa_set_ffuart_info(void *info)
179{
180 pxa_register_device(&pxa_device_ffuart, info);
181}
182
177static struct resource pxa_resource_btuart[] = { 183static struct resource pxa_resource_btuart[] = {
178 { 184 {
179 .start = 0x40200000, 185 .start = 0x40200000,
@@ -193,6 +199,11 @@ struct platform_device pxa_device_btuart = {
193 .num_resources = ARRAY_SIZE(pxa_resource_btuart), 199 .num_resources = ARRAY_SIZE(pxa_resource_btuart),
194}; 200};
195 201
202void __init pxa_set_btuart_info(void *info)
203{
204 pxa_register_device(&pxa_device_btuart, info);
205}
206
196static struct resource pxa_resource_stuart[] = { 207static struct resource pxa_resource_stuart[] = {
197 { 208 {
198 .start = 0x40700000, 209 .start = 0x40700000,
@@ -212,6 +223,11 @@ struct platform_device pxa_device_stuart = {
212 .num_resources = ARRAY_SIZE(pxa_resource_stuart), 223 .num_resources = ARRAY_SIZE(pxa_resource_stuart),
213}; 224};
214 225
226void __init pxa_set_stuart_info(void *info)
227{
228 pxa_register_device(&pxa_device_stuart, info);
229}
230
215static struct resource pxa_resource_hwuart[] = { 231static struct resource pxa_resource_hwuart[] = {
216 { 232 {
217 .start = 0x41600000, 233 .start = 0x41600000,
@@ -231,6 +247,14 @@ struct platform_device pxa_device_hwuart = {
231 .num_resources = ARRAY_SIZE(pxa_resource_hwuart), 247 .num_resources = ARRAY_SIZE(pxa_resource_hwuart),
232}; 248};
233 249
250void __init pxa_set_hwuart_info(void *info)
251{
252 if (cpu_is_pxa255())
253 pxa_register_device(&pxa_device_hwuart, info);
254 else
255 pr_info("UART: Ignoring attempt to register HWUART on non-PXA255 hardware");
256}
257
234static struct resource pxai2c_resources[] = { 258static struct resource pxai2c_resources[] = {
235 { 259 {
236 .start = 0x40301680, 260 .start = 0x40301680,
diff --git a/arch/arm/mach-pxa/e330.c b/arch/arm/mach-pxa/e330.c
index 74d3f8987c5c..8fde3387279d 100644
--- a/arch/arm/mach-pxa/e330.c
+++ b/arch/arm/mach-pxa/e330.c
@@ -55,6 +55,9 @@ static struct platform_device *devices[] __initdata = {
55 55
56static void __init e330_init(void) 56static void __init e330_init(void)
57{ 57{
58 pxa_set_ffuart_info(NULL);
59 pxa_set_btuart_info(NULL);
60 pxa_set_stuart_info(NULL);
58 eseries_register_clks(); 61 eseries_register_clks();
59 eseries_get_tmio_gpios(); 62 eseries_get_tmio_gpios();
60 platform_add_devices(devices, ARRAY_SIZE(devices)); 63 platform_add_devices(devices, ARRAY_SIZE(devices));
diff --git a/arch/arm/mach-pxa/e350.c b/arch/arm/mach-pxa/e350.c
index 080036272131..f50f055f5720 100644
--- a/arch/arm/mach-pxa/e350.c
+++ b/arch/arm/mach-pxa/e350.c
@@ -56,6 +56,9 @@ static struct platform_device *devices[] __initdata = {
56 56
57static void __init e350_init(void) 57static void __init e350_init(void)
58{ 58{
59 pxa_set_ffuart_info(NULL);
60 pxa_set_btuart_info(NULL);
61 pxa_set_stuart_info(NULL);
59 eseries_register_clks(); 62 eseries_register_clks();
60 eseries_get_tmio_gpios(); 63 eseries_get_tmio_gpios();
61 platform_add_devices(devices, ARRAY_SIZE(devices)); 64 platform_add_devices(devices, ARRAY_SIZE(devices));
diff --git a/arch/arm/mach-pxa/e400.c b/arch/arm/mach-pxa/e400.c
index ed9c0c3f64a2..55b950f12844 100644
--- a/arch/arm/mach-pxa/e400.c
+++ b/arch/arm/mach-pxa/e400.c
@@ -130,6 +130,9 @@ static struct platform_device *devices[] __initdata = {
130static void __init e400_init(void) 130static void __init e400_init(void)
131{ 131{
132 pxa2xx_mfp_config(ARRAY_AND_SIZE(e400_pin_config)); 132 pxa2xx_mfp_config(ARRAY_AND_SIZE(e400_pin_config));
133 pxa_set_ffuart_info(NULL);
134 pxa_set_btuart_info(NULL);
135 pxa_set_stuart_info(NULL);
133 /* Fixme - e400 may have a switched clock */ 136 /* Fixme - e400 may have a switched clock */
134 eseries_register_clks(); 137 eseries_register_clks();
135 eseries_get_tmio_gpios(); 138 eseries_get_tmio_gpios();
diff --git a/arch/arm/mach-pxa/e740.c b/arch/arm/mach-pxa/e740.c
index 49acdfa6650d..94b23a9e3877 100644
--- a/arch/arm/mach-pxa/e740.c
+++ b/arch/arm/mach-pxa/e740.c
@@ -192,6 +192,9 @@ static struct platform_device *devices[] __initdata = {
192static void __init e740_init(void) 192static void __init e740_init(void)
193{ 193{
194 pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config)); 194 pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config));
195 pxa_set_ffuart_info(NULL);
196 pxa_set_btuart_info(NULL);
197 pxa_set_stuart_info(NULL);
195 eseries_register_clks(); 198 eseries_register_clks();
196 clk_add_alias("CLK_CK48M", e740_t7l66xb_device.name, 199 clk_add_alias("CLK_CK48M", e740_t7l66xb_device.name,
197 "UDCCLK", &pxa25x_device_udc.dev), 200 "UDCCLK", &pxa25x_device_udc.dev),
diff --git a/arch/arm/mach-pxa/e750.c b/arch/arm/mach-pxa/e750.c
index 4052ece3ef49..5eccbce73a33 100644
--- a/arch/arm/mach-pxa/e750.c
+++ b/arch/arm/mach-pxa/e750.c
@@ -194,6 +194,9 @@ static struct platform_device *devices[] __initdata = {
194static void __init e750_init(void) 194static void __init e750_init(void)
195{ 195{
196 pxa2xx_mfp_config(ARRAY_AND_SIZE(e750_pin_config)); 196 pxa2xx_mfp_config(ARRAY_AND_SIZE(e750_pin_config));
197 pxa_set_ffuart_info(NULL);
198 pxa_set_btuart_info(NULL);
199 pxa_set_stuart_info(NULL);
197 clk_add_alias("CLK_CK3P6MI", e750_tc6393xb_device.name, 200 clk_add_alias("CLK_CK3P6MI", e750_tc6393xb_device.name,
198 "GPIO11_CLK", NULL), 201 "GPIO11_CLK", NULL),
199 eseries_get_tmio_gpios(); 202 eseries_get_tmio_gpios();
diff --git a/arch/arm/mach-pxa/e800.c b/arch/arm/mach-pxa/e800.c
index 9866c7b9e784..aad129bed199 100644
--- a/arch/arm/mach-pxa/e800.c
+++ b/arch/arm/mach-pxa/e800.c
@@ -195,6 +195,9 @@ static struct platform_device *devices[] __initdata = {
195 195
196static void __init e800_init(void) 196static void __init e800_init(void)
197{ 197{
198 pxa_set_ffuart_info(NULL);
199 pxa_set_btuart_info(NULL);
200 pxa_set_stuart_info(NULL);
198 clk_add_alias("CLK_CK3P6MI", e800_tc6393xb_device.name, 201 clk_add_alias("CLK_CK3P6MI", e800_tc6393xb_device.name,
199 "GPIO11_CLK", NULL), 202 "GPIO11_CLK", NULL),
200 eseries_get_tmio_gpios(); 203 eseries_get_tmio_gpios();
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c
index aec7f4214b14..1c0de808b54d 100644
--- a/arch/arm/mach-pxa/em-x270.c
+++ b/arch/arm/mach-pxa/em-x270.c
@@ -967,7 +967,7 @@ static inline void em_x270_init_gpio_keys(void) {}
967#if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE) 967#if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE)
968static struct regulator *em_x270_camera_ldo; 968static struct regulator *em_x270_camera_ldo;
969 969
970static int em_x270_sensor_init(struct device *dev) 970static int em_x270_sensor_init(void)
971{ 971{
972 int ret; 972 int ret;
973 973
@@ -996,7 +996,6 @@ static int em_x270_sensor_init(struct device *dev)
996} 996}
997 997
998struct pxacamera_platform_data em_x270_camera_platform_data = { 998struct pxacamera_platform_data em_x270_camera_platform_data = {
999 .init = em_x270_sensor_init,
1000 .flags = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 | 999 .flags = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 |
1001 PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN, 1000 PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN,
1002 .mclk_10khz = 2600, 1001 .mclk_10khz = 2600,
@@ -1049,8 +1048,10 @@ static struct platform_device em_x270_camera = {
1049 1048
1050static void __init em_x270_init_camera(void) 1049static void __init em_x270_init_camera(void)
1051{ 1050{
1052 pxa_set_camera_info(&em_x270_camera_platform_data); 1051 if (em_x270_sensor_init() == 0) {
1053 platform_device_register(&em_x270_camera); 1052 pxa_set_camera_info(&em_x270_camera_platform_data);
1053 platform_device_register(&em_x270_camera);
1054 }
1054} 1055}
1055#else 1056#else
1056static inline void em_x270_init_camera(void) {} 1057static inline void em_x270_init_camera(void) {}
@@ -1286,6 +1287,10 @@ static void __init em_x270_init(void)
1286{ 1287{
1287 pxa2xx_mfp_config(ARRAY_AND_SIZE(common_pin_config)); 1288 pxa2xx_mfp_config(ARRAY_AND_SIZE(common_pin_config));
1288 1289
1290 pxa_set_ffuart_info(NULL);
1291 pxa_set_btuart_info(NULL);
1292 pxa_set_stuart_info(NULL);
1293
1289#ifdef CONFIG_PM 1294#ifdef CONFIG_PM
1290 pxa27x_set_pwrmode(PWRMODE_DEEPSLEEP); 1295 pxa27x_set_pwrmode(PWRMODE_DEEPSLEEP);
1291#endif 1296#endif
diff --git a/arch/arm/mach-pxa/ezx.c b/arch/arm/mach-pxa/ezx.c
index 588b265e5755..626c82b13970 100644
--- a/arch/arm/mach-pxa/ezx.c
+++ b/arch/arm/mach-pxa/ezx.c
@@ -17,7 +17,11 @@
17#include <linux/delay.h> 17#include <linux/delay.h>
18#include <linux/pwm_backlight.h> 18#include <linux/pwm_backlight.h>
19#include <linux/input.h> 19#include <linux/input.h>
20#include <linux/gpio.h>
20#include <linux/gpio_keys.h> 21#include <linux/gpio_keys.h>
22#include <linux/leds-lp3944.h>
23
24#include <media/soc_camera.h>
21 25
22#include <asm/setup.h> 26#include <asm/setup.h>
23#include <asm/mach-types.h> 27#include <asm/mach-types.h>
@@ -29,6 +33,7 @@
29#include <plat/i2c.h> 33#include <plat/i2c.h>
30#include <mach/hardware.h> 34#include <mach/hardware.h>
31#include <mach/pxa27x_keypad.h> 35#include <mach/pxa27x_keypad.h>
36#include <mach/camera.h>
32 37
33#include "devices.h" 38#include "devices.h"
34#include "generic.h" 39#include "generic.h"
@@ -38,6 +43,9 @@
38#define GPIO15_A910_FLIP_LID 15 43#define GPIO15_A910_FLIP_LID 15
39#define GPIO12_E680_LOCK_SWITCH 12 44#define GPIO12_E680_LOCK_SWITCH 12
40#define GPIO15_E6_LOCK_SWITCH 15 45#define GPIO15_E6_LOCK_SWITCH 15
46#define GPIO50_nCAM_EN 50
47#define GPIO19_GEN1_CAM_RST 19
48#define GPIO28_GEN2_CAM_RST 28
41 49
42static struct platform_pwm_backlight_data ezx_backlight_data = { 50static struct platform_pwm_backlight_data ezx_backlight_data = {
43 .pwm_id = 0, 51 .pwm_id = 0,
@@ -191,8 +199,8 @@ static unsigned long gen1_pin_config[] __initdata = {
191 GPIO94_CIF_DD_5, 199 GPIO94_CIF_DD_5,
192 GPIO17_CIF_DD_6, 200 GPIO17_CIF_DD_6,
193 GPIO108_CIF_DD_7, 201 GPIO108_CIF_DD_7,
194 GPIO50_GPIO, /* CAM_EN */ 202 GPIO50_GPIO | MFP_LPM_DRIVE_HIGH, /* CAM_EN */
195 GPIO19_GPIO, /* CAM_RST */ 203 GPIO19_GPIO | MFP_LPM_DRIVE_HIGH, /* CAM_RST */
196 204
197 /* EMU */ 205 /* EMU */
198 GPIO120_GPIO, /* EMU_MUX1 */ 206 GPIO120_GPIO, /* EMU_MUX1 */
@@ -248,8 +256,8 @@ static unsigned long gen2_pin_config[] __initdata = {
248 GPIO48_CIF_DD_5, 256 GPIO48_CIF_DD_5,
249 GPIO93_CIF_DD_6, 257 GPIO93_CIF_DD_6,
250 GPIO12_CIF_DD_7, 258 GPIO12_CIF_DD_7,
251 GPIO50_GPIO, /* CAM_EN */ 259 GPIO50_GPIO | MFP_LPM_DRIVE_HIGH, /* CAM_EN */
252 GPIO28_GPIO, /* CAM_RST */ 260 GPIO28_GPIO | MFP_LPM_DRIVE_HIGH, /* CAM_RST */
253 GPIO17_GPIO, /* CAM_FLASH */ 261 GPIO17_GPIO, /* CAM_FLASH */
254}; 262};
255#endif 263#endif
@@ -683,6 +691,81 @@ static struct platform_device a780_gpio_keys = {
683 }, 691 },
684}; 692};
685 693
694/* camera */
695static int a780_camera_init(void)
696{
697 int err;
698
699 /*
700 * GPIO50_nCAM_EN is active low
701 * GPIO19_GEN1_CAM_RST is active on rising edge
702 */
703 err = gpio_request(GPIO50_nCAM_EN, "nCAM_EN");
704 if (err) {
705 pr_err("%s: Failed to request nCAM_EN\n", __func__);
706 goto fail;
707 }
708
709 err = gpio_request(GPIO19_GEN1_CAM_RST, "CAM_RST");
710 if (err) {
711 pr_err("%s: Failed to request CAM_RST\n", __func__);
712 goto fail_gpio_cam_rst;
713 }
714
715 gpio_direction_output(GPIO50_nCAM_EN, 1);
716 gpio_direction_output(GPIO19_GEN1_CAM_RST, 0);
717
718 return 0;
719
720fail_gpio_cam_rst:
721 gpio_free(GPIO50_nCAM_EN);
722fail:
723 return err;
724}
725
726static int a780_camera_power(struct device *dev, int on)
727{
728 gpio_set_value(GPIO50_nCAM_EN, !on);
729 return 0;
730}
731
732static int a780_camera_reset(struct device *dev)
733{
734 gpio_set_value(GPIO19_GEN1_CAM_RST, 0);
735 msleep(10);
736 gpio_set_value(GPIO19_GEN1_CAM_RST, 1);
737
738 return 0;
739}
740
741struct pxacamera_platform_data a780_pxacamera_platform_data = {
742 .flags = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 |
743 PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN,
744 .mclk_10khz = 5000,
745};
746
747static struct i2c_board_info a780_camera_i2c_board_info = {
748 I2C_BOARD_INFO("mt9m111", 0x5d),
749};
750
751static struct soc_camera_link a780_iclink = {
752 .bus_id = 0,
753 .flags = SOCAM_SENSOR_INVERT_PCLK,
754 .i2c_adapter_id = 0,
755 .board_info = &a780_camera_i2c_board_info,
756 .module_name = "mt9m111",
757 .power = a780_camera_power,
758 .reset = a780_camera_reset,
759};
760
761static struct platform_device a780_camera = {
762 .name = "soc-camera-pdrv",
763 .id = 0,
764 .dev = {
765 .platform_data = &a780_iclink,
766 },
767};
768
686static struct platform_device *a780_devices[] __initdata = { 769static struct platform_device *a780_devices[] __initdata = {
687 &a780_gpio_keys, 770 &a780_gpio_keys,
688}; 771};
@@ -693,12 +776,21 @@ static void __init a780_init(void)
693 pxa2xx_mfp_config(ARRAY_AND_SIZE(gen1_pin_config)); 776 pxa2xx_mfp_config(ARRAY_AND_SIZE(gen1_pin_config));
694 pxa2xx_mfp_config(ARRAY_AND_SIZE(a780_pin_config)); 777 pxa2xx_mfp_config(ARRAY_AND_SIZE(a780_pin_config));
695 778
779 pxa_set_ffuart_info(NULL);
780 pxa_set_btuart_info(NULL);
781 pxa_set_stuart_info(NULL);
782
696 pxa_set_i2c_info(NULL); 783 pxa_set_i2c_info(NULL);
697 784
698 set_pxa_fb_info(&ezx_fb_info_1); 785 set_pxa_fb_info(&ezx_fb_info_1);
699 786
700 pxa_set_keypad_info(&a780_keypad_platform_data); 787 pxa_set_keypad_info(&a780_keypad_platform_data);
701 788
789 if (a780_camera_init() == 0) {
790 pxa_set_camera_info(&a780_pxacamera_platform_data);
791 platform_device_register(&a780_camera);
792 }
793
702 platform_add_devices(ARRAY_AND_SIZE(ezx_devices)); 794 platform_add_devices(ARRAY_AND_SIZE(ezx_devices));
703 platform_add_devices(ARRAY_AND_SIZE(a780_devices)); 795 platform_add_devices(ARRAY_AND_SIZE(a780_devices));
704} 796}
@@ -754,6 +846,10 @@ static void __init e680_init(void)
754 pxa2xx_mfp_config(ARRAY_AND_SIZE(gen1_pin_config)); 846 pxa2xx_mfp_config(ARRAY_AND_SIZE(gen1_pin_config));
755 pxa2xx_mfp_config(ARRAY_AND_SIZE(e680_pin_config)); 847 pxa2xx_mfp_config(ARRAY_AND_SIZE(e680_pin_config));
756 848
849 pxa_set_ffuart_info(NULL);
850 pxa_set_btuart_info(NULL);
851 pxa_set_stuart_info(NULL);
852
757 pxa_set_i2c_info(NULL); 853 pxa_set_i2c_info(NULL);
758 i2c_register_board_info(0, ARRAY_AND_SIZE(e680_i2c_board_info)); 854 i2c_register_board_info(0, ARRAY_AND_SIZE(e680_i2c_board_info));
759 855
@@ -816,6 +912,10 @@ static void __init a1200_init(void)
816 pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config)); 912 pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config));
817 pxa2xx_mfp_config(ARRAY_AND_SIZE(a1200_pin_config)); 913 pxa2xx_mfp_config(ARRAY_AND_SIZE(a1200_pin_config));
818 914
915 pxa_set_ffuart_info(NULL);
916 pxa_set_btuart_info(NULL);
917 pxa_set_stuart_info(NULL);
918
819 pxa_set_i2c_info(NULL); 919 pxa_set_i2c_info(NULL);
820 i2c_register_board_info(0, ARRAY_AND_SIZE(a1200_i2c_board_info)); 920 i2c_register_board_info(0, ARRAY_AND_SIZE(a1200_i2c_board_info));
821 921
@@ -864,6 +964,131 @@ static struct platform_device a910_gpio_keys = {
864 }, 964 },
865}; 965};
866 966
967/* camera */
968static int a910_camera_init(void)
969{
970 int err;
971
972 /*
973 * GPIO50_nCAM_EN is active low
974 * GPIO28_GEN2_CAM_RST is active on rising edge
975 */
976 err = gpio_request(GPIO50_nCAM_EN, "nCAM_EN");
977 if (err) {
978 pr_err("%s: Failed to request nCAM_EN\n", __func__);
979 goto fail;
980 }
981
982 err = gpio_request(GPIO28_GEN2_CAM_RST, "CAM_RST");
983 if (err) {
984 pr_err("%s: Failed to request CAM_RST\n", __func__);
985 goto fail_gpio_cam_rst;
986 }
987
988 gpio_direction_output(GPIO50_nCAM_EN, 1);
989 gpio_direction_output(GPIO28_GEN2_CAM_RST, 0);
990
991 return 0;
992
993fail_gpio_cam_rst:
994 gpio_free(GPIO50_nCAM_EN);
995fail:
996 return err;
997}
998
999static int a910_camera_power(struct device *dev, int on)
1000{
1001 gpio_set_value(GPIO50_nCAM_EN, !on);
1002 return 0;
1003}
1004
1005static int a910_camera_reset(struct device *dev)
1006{
1007 gpio_set_value(GPIO28_GEN2_CAM_RST, 0);
1008 msleep(10);
1009 gpio_set_value(GPIO28_GEN2_CAM_RST, 1);
1010
1011 return 0;
1012}
1013
1014struct pxacamera_platform_data a910_pxacamera_platform_data = {
1015 .flags = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 |
1016 PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN,
1017 .mclk_10khz = 5000,
1018};
1019
1020static struct i2c_board_info a910_camera_i2c_board_info = {
1021 I2C_BOARD_INFO("mt9m111", 0x5d),
1022};
1023
1024static struct soc_camera_link a910_iclink = {
1025 .bus_id = 0,
1026 .i2c_adapter_id = 0,
1027 .board_info = &a910_camera_i2c_board_info,
1028 .module_name = "mt9m111",
1029 .power = a910_camera_power,
1030 .reset = a910_camera_reset,
1031};
1032
1033static struct platform_device a910_camera = {
1034 .name = "soc-camera-pdrv",
1035 .id = 0,
1036 .dev = {
1037 .platform_data = &a910_iclink,
1038 },
1039};
1040
1041/* leds-lp3944 */
1042static struct lp3944_platform_data a910_lp3944_leds = {
1043 .leds_size = LP3944_LEDS_MAX,
1044 .leds = {
1045 [0] = {
1046 .name = "a910:red:",
1047 .status = LP3944_LED_STATUS_OFF,
1048 .type = LP3944_LED_TYPE_LED,
1049 },
1050 [1] = {
1051 .name = "a910:green:",
1052 .status = LP3944_LED_STATUS_OFF,
1053 .type = LP3944_LED_TYPE_LED,
1054 },
1055 [2] {
1056 .name = "a910:blue:",
1057 .status = LP3944_LED_STATUS_OFF,
1058 .type = LP3944_LED_TYPE_LED,
1059 },
1060 /* Leds 3 and 4 are used as display power switches */
1061 [3] = {
1062 .name = "a910::cli_display",
1063 .status = LP3944_LED_STATUS_OFF,
1064 .type = LP3944_LED_TYPE_LED_INVERTED
1065 },
1066 [4] = {
1067 .name = "a910::main_display",
1068 .status = LP3944_LED_STATUS_ON,
1069 .type = LP3944_LED_TYPE_LED_INVERTED
1070 },
1071 [5] = { .type = LP3944_LED_TYPE_NONE },
1072 [6] = {
1073 .name = "a910::torch",
1074 .status = LP3944_LED_STATUS_OFF,
1075 .type = LP3944_LED_TYPE_LED,
1076 },
1077 [7] = {
1078 .name = "a910::flash",
1079 .status = LP3944_LED_STATUS_OFF,
1080 .type = LP3944_LED_TYPE_LED_INVERTED,
1081 },
1082 },
1083};
1084
1085static struct i2c_board_info __initdata a910_i2c_board_info[] = {
1086 {
1087 I2C_BOARD_INFO("lp3944", 0x60),
1088 .platform_data = &a910_lp3944_leds,
1089 },
1090};
1091
867static struct platform_device *a910_devices[] __initdata = { 1092static struct platform_device *a910_devices[] __initdata = {
868 &a910_gpio_keys, 1093 &a910_gpio_keys,
869}; 1094};
@@ -874,12 +1099,22 @@ static void __init a910_init(void)
874 pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config)); 1099 pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config));
875 pxa2xx_mfp_config(ARRAY_AND_SIZE(a910_pin_config)); 1100 pxa2xx_mfp_config(ARRAY_AND_SIZE(a910_pin_config));
876 1101
1102 pxa_set_ffuart_info(NULL);
1103 pxa_set_btuart_info(NULL);
1104 pxa_set_stuart_info(NULL);
1105
877 pxa_set_i2c_info(NULL); 1106 pxa_set_i2c_info(NULL);
1107 i2c_register_board_info(0, ARRAY_AND_SIZE(a910_i2c_board_info));
878 1108
879 set_pxa_fb_info(&ezx_fb_info_2); 1109 set_pxa_fb_info(&ezx_fb_info_2);
880 1110
881 pxa_set_keypad_info(&a910_keypad_platform_data); 1111 pxa_set_keypad_info(&a910_keypad_platform_data);
882 1112
1113 if (a910_camera_init() == 0) {
1114 pxa_set_camera_info(&a910_pxacamera_platform_data);
1115 platform_device_register(&a910_camera);
1116 }
1117
883 platform_add_devices(ARRAY_AND_SIZE(ezx_devices)); 1118 platform_add_devices(ARRAY_AND_SIZE(ezx_devices));
884 platform_add_devices(ARRAY_AND_SIZE(a910_devices)); 1119 platform_add_devices(ARRAY_AND_SIZE(a910_devices));
885} 1120}
@@ -935,6 +1170,10 @@ static void __init e6_init(void)
935 pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config)); 1170 pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config));
936 pxa2xx_mfp_config(ARRAY_AND_SIZE(e6_pin_config)); 1171 pxa2xx_mfp_config(ARRAY_AND_SIZE(e6_pin_config));
937 1172
1173 pxa_set_ffuart_info(NULL);
1174 pxa_set_btuart_info(NULL);
1175 pxa_set_stuart_info(NULL);
1176
938 pxa_set_i2c_info(NULL); 1177 pxa_set_i2c_info(NULL);
939 i2c_register_board_info(0, ARRAY_AND_SIZE(e6_i2c_board_info)); 1178 i2c_register_board_info(0, ARRAY_AND_SIZE(e6_i2c_board_info));
940 1179
@@ -971,6 +1210,10 @@ static void __init e2_init(void)
971 pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config)); 1210 pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config));
972 pxa2xx_mfp_config(ARRAY_AND_SIZE(e2_pin_config)); 1211 pxa2xx_mfp_config(ARRAY_AND_SIZE(e2_pin_config));
973 1212
1213 pxa_set_ffuart_info(NULL);
1214 pxa_set_btuart_info(NULL);
1215 pxa_set_stuart_info(NULL);
1216
974 pxa_set_i2c_info(NULL); 1217 pxa_set_i2c_info(NULL);
975 i2c_register_board_info(0, ARRAY_AND_SIZE(e2_i2c_board_info)); 1218 i2c_register_board_info(0, ARRAY_AND_SIZE(e2_i2c_board_info));
976 1219
diff --git a/arch/arm/mach-pxa/generic.h b/arch/arm/mach-pxa/generic.h
index 485fede83d97..890fb90a672f 100644
--- a/arch/arm/mach-pxa/generic.h
+++ b/arch/arm/mach-pxa/generic.h
@@ -67,3 +67,8 @@ extern struct sysdev_class pxa_irq_sysclass;
67extern struct sysdev_class pxa_gpio_sysclass; 67extern struct sysdev_class pxa_gpio_sysclass;
68extern struct sysdev_class pxa2xx_mfp_sysclass; 68extern struct sysdev_class pxa2xx_mfp_sysclass;
69extern struct sysdev_class pxa3xx_mfp_sysclass; 69extern struct sysdev_class pxa3xx_mfp_sysclass;
70
71void __init pxa_set_ffuart_info(void *info);
72void __init pxa_set_btuart_info(void *info);
73void __init pxa_set_stuart_info(void *info);
74void __init pxa_set_hwuart_info(void *info);
diff --git a/arch/arm/mach-pxa/gumstix.c b/arch/arm/mach-pxa/gumstix.c
index 1708c0109844..96c345129135 100644
--- a/arch/arm/mach-pxa/gumstix.c
+++ b/arch/arm/mach-pxa/gumstix.c
@@ -211,6 +211,11 @@ static void __init gumstix_init(void)
211{ 211{
212 pxa2xx_mfp_config(ARRAY_AND_SIZE(gumstix_pin_config)); 212 pxa2xx_mfp_config(ARRAY_AND_SIZE(gumstix_pin_config));
213 213
214 pxa_set_ffuart_info(NULL);
215 pxa_set_btuart_info(NULL);
216 pxa_set_stuart_info(NULL);
217 pxa_set_hwuart_info(NULL);
218
214 gumstix_bluetooth_init(); 219 gumstix_bluetooth_init();
215 gumstix_udc_init(); 220 gumstix_udc_init();
216 gumstix_mmc_init(); 221 gumstix_mmc_init();
diff --git a/arch/arm/mach-pxa/h5000.c b/arch/arm/mach-pxa/h5000.c
index f3d220c32e07..c1cab0871c99 100644
--- a/arch/arm/mach-pxa/h5000.c
+++ b/arch/arm/mach-pxa/h5000.c
@@ -193,6 +193,9 @@ static void __init h5000_init(void)
193 fix_msc(); 193 fix_msc();
194 194
195 pxa2xx_mfp_config(ARRAY_AND_SIZE(h5000_pin_config)); 195 pxa2xx_mfp_config(ARRAY_AND_SIZE(h5000_pin_config));
196 pxa_set_ffuart_info(NULL);
197 pxa_set_btuart_info(NULL);
198 pxa_set_stuart_info(NULL);
196 pxa_set_udc_info(&h5000_udc_mach_info); 199 pxa_set_udc_info(&h5000_udc_mach_info);
197 platform_add_devices(ARRAY_AND_SIZE(devices)); 200 platform_add_devices(ARRAY_AND_SIZE(devices));
198} 201}
diff --git a/arch/arm/mach-pxa/himalaya.c b/arch/arm/mach-pxa/himalaya.c
index cea99fe65b97..f9a2e4b0f090 100644
--- a/arch/arm/mach-pxa/himalaya.c
+++ b/arch/arm/mach-pxa/himalaya.c
@@ -150,6 +150,9 @@ static void __init himalaya_lcd_init(void)
150 150
151static void __init himalaya_init(void) 151static void __init himalaya_init(void)
152{ 152{
153 pxa_set_ffuart_info(NULL);
154 pxa_set_btuart_info(NULL);
155 pxa_set_stuart_info(NULL);
153 himalaya_lcd_init(); 156 himalaya_lcd_init();
154 platform_add_devices(devices, ARRAY_SIZE(devices)); 157 platform_add_devices(devices, ARRAY_SIZE(devices));
155} 158}
diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c
index 83bd3c6e3884..848c861dd23f 100644
--- a/arch/arm/mach-pxa/hx4700.c
+++ b/arch/arm/mach-pxa/hx4700.c
@@ -820,6 +820,7 @@ static struct platform_device *devices[] __initdata = {
820 &gpio_keys, 820 &gpio_keys,
821 &backlight, 821 &backlight,
822 &w3220, 822 &w3220,
823 &hx4700_lcd,
823 &egpio, 824 &egpio,
824 &bq24022, 825 &bq24022,
825 &gpio_vbus, 826 &gpio_vbus,
@@ -849,6 +850,10 @@ static void __init hx4700_init(void)
849 pxa2xx_mfp_config(ARRAY_AND_SIZE(hx4700_pin_config)); 850 pxa2xx_mfp_config(ARRAY_AND_SIZE(hx4700_pin_config));
850 hx4700_gpio_request(ARRAY_AND_SIZE(global_gpios)); 851 hx4700_gpio_request(ARRAY_AND_SIZE(global_gpios));
851 852
853 pxa_set_ffuart_info(NULL);
854 pxa_set_btuart_info(NULL);
855 pxa_set_stuart_info(NULL);
856
852 platform_add_devices(devices, ARRAY_SIZE(devices)); 857 platform_add_devices(devices, ARRAY_SIZE(devices));
853 858
854 pxa_set_ficp_info(&ficp_info); 859 pxa_set_ficp_info(&ficp_info);
diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c
index b6486ef20b17..5c9e11d74f49 100644
--- a/arch/arm/mach-pxa/idp.c
+++ b/arch/arm/mach-pxa/idp.c
@@ -179,6 +179,9 @@ static void __init idp_init(void)
179 printk("idp_init()\n"); 179 printk("idp_init()\n");
180 180
181 pxa2xx_mfp_config(ARRAY_AND_SIZE(idp_pin_config)); 181 pxa2xx_mfp_config(ARRAY_AND_SIZE(idp_pin_config));
182 pxa_set_ffuart_info(NULL);
183 pxa_set_btuart_info(NULL);
184 pxa_set_stuart_info(NULL);
182 185
183 platform_device_register(&smc91x_device); 186 platform_device_register(&smc91x_device);
184 //platform_device_register(&mst_audio_device); 187 //platform_device_register(&mst_audio_device);
diff --git a/arch/arm/mach-pxa/imote2.c b/arch/arm/mach-pxa/imote2.c
index 2a4945db31c5..5b0862df61ab 100644
--- a/arch/arm/mach-pxa/imote2.c
+++ b/arch/arm/mach-pxa/imote2.c
@@ -554,8 +554,12 @@ static struct i2c_pxa_platform_data i2c_pdata = {
554 554
555static void __init imote2_init(void) 555static void __init imote2_init(void)
556{ 556{
557
558 pxa2xx_mfp_config(ARRAY_AND_SIZE(imote2_pin_config)); 557 pxa2xx_mfp_config(ARRAY_AND_SIZE(imote2_pin_config));
558
559 pxa_set_ffuart_info(NULL);
560 pxa_set_btuart_info(NULL);
561 pxa_set_stuart_info(NULL);
562
559 /* SPI chip select directions - all other directions should 563 /* SPI chip select directions - all other directions should
560 * be handled by drivers.*/ 564 * be handled by drivers.*/
561 gpio_direction_output(37, 0); 565 gpio_direction_output(37, 0);
diff --git a/arch/arm/mach-pxa/include/mach/hardware.h b/arch/arm/mach-pxa/include/mach/hardware.h
index aa3d9f70a08a..50f1297bf5ac 100644
--- a/arch/arm/mach-pxa/include/mach/hardware.h
+++ b/arch/arm/mach-pxa/include/mach/hardware.h
@@ -105,6 +105,7 @@
105 * 105 *
106 * PXA935 A0 0x56056931 0x1E653013 106 * PXA935 A0 0x56056931 0x1E653013
107 * PXA935 B0 0x56056936 0x6E653013 107 * PXA935 B0 0x56056936 0x6E653013
108 * PXA935 B1 0x56056938 0x8E653013
108 */ 109 */
109#ifdef CONFIG_PXA25x 110#ifdef CONFIG_PXA25x
110#define __cpu_is_pxa210(id) \ 111#define __cpu_is_pxa210(id) \
@@ -283,7 +284,7 @@
283 _id == 0x3; \ 284 _id == 0x3; \
284 }) 285 })
285 286
286#define __cpu_is_pxa9xx(id) \ 287#define __cpu_is_pxa93x(id) \
287 ({ \ 288 ({ \
288 unsigned int _id = (id) >> 4 & 0xfff; \ 289 unsigned int _id = (id) >> 4 & 0xfff; \
289 _id == 0x683 || _id == 0x693; \ 290 _id == 0x683 || _id == 0x693; \
@@ -299,9 +300,9 @@
299 __cpu_is_pxa3xx(read_cpuid_id()); \ 300 __cpu_is_pxa3xx(read_cpuid_id()); \
300 }) 301 })
301 302
302#define cpu_is_pxa9xx() \ 303#define cpu_is_pxa93x() \
303 ({ \ 304 ({ \
304 __cpu_is_pxa9xx(read_cpuid_id()); \ 305 __cpu_is_pxa93x(read_cpuid_id()); \
305 }) 306 })
306/* 307/*
307 * return current memory and LCD clock frequency in units of 10kHz 308 * return current memory and LCD clock frequency in units of 10kHz
diff --git a/arch/arm/mach-pxa/include/mach/palmtreo.h b/arch/arm/mach-pxa/include/mach/palmtreo.h
new file mode 100644
index 000000000000..2d3f14e3be29
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/palmtreo.h
@@ -0,0 +1,67 @@
1/*
2 * GPIOs and interrupts for Palm Treo smartphones
3 *
4 * currently supported:
5 * Palm Treo 680 (GSM)
6 * Palm Centro 685 (GSM)
7 *
8 * Author: Tomas Cech <sleep_walker@suse.cz>
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 version 2 as
12 * published by the Free Software Foundation.
13 *
14 * find more info at www.hackndev.com
15 *
16 */
17
18#ifndef _INCLUDE_TREO_H_
19#define _INCLUDE_TREO_H_
20
21/* GPIOs */
22#define GPIO_NR_TREO_POWER_DETECT 0
23#define GPIO_NR_TREO_AMP_EN 27
24#define GPIO_NR_TREO_GREEN_LED 20
25#define GPIO_NR_TREO_RED_LED 79
26#define GPIO_NR_TREO_SD_DETECT_N 113
27#define GPIO_NR_TREO_EP_DETECT_N 116
28#define GPIO_NR_TREO_USB_DETECT 1
29#define GPIO_NR_TREO_USB_PULLUP 114
30#define GPIO_NR_TREO_GSM_POWER 40
31#define GPIO_NR_TREO_GSM_RESET 87
32#define GPIO_NR_TREO_GSM_WAKE 57
33#define GPIO_NR_TREO_GSM_HOST_WAKE 14
34#define GPIO_NR_TREO_GSM_TRIGGER 10
35#define GPIO_NR_TREO_IR_EN 115
36#define GPIO_NR_TREO_IR_TXD 47
37#define GPIO_NR_TREO_BL_POWER 38
38#define GPIO_NR_TREO_LCD_POWER 25
39
40/* Treo680 specific GPIOs */
41#ifdef CONFIG_MACH_TREO680
42#define GPIO_NR_TREO680_SD_READONLY 33
43#define GPIO_NR_TREO680_SD_POWER 42
44#define GPIO_NR_TREO680_VIBRATE_EN 44
45#define GPIO_NR_TREO680_KEYB_BL 24
46#define GPIO_NR_TREO680_BT_EN 43
47#endif /* CONFIG_MACH_TREO680 */
48
49/* Centro685 specific GPIOs */
50#define GPIO_NR_CENTRO_SD_POWER 21
51#define GPIO_NR_CENTRO_VIBRATE_EN 22
52#define GPIO_NR_CENTRO_KEYB_BL 33
53#define GPIO_NR_CENTRO_BT_EN 80
54
55/* Various addresses */
56#define TREO_PHYS_RAM_START 0xa0000000
57#define TREO_PHYS_IO_START 0x40000000
58#define TREO_STR_BASE 0xa2000000
59
60/* BACKLIGHT */
61#define TREO_MAX_INTENSITY 254
62#define TREO_DEFAULT_INTENSITY 160
63#define TREO_LIMIT_MASK 0x7F
64#define TREO_PRESCALER 63
65#define TREO_PERIOD_NS 3500
66
67#endif
diff --git a/arch/arm/mach-pxa/include/mach/pxa3xx_nand.h b/arch/arm/mach-pxa/include/mach/pxa3xx_nand.h
deleted file mode 100644
index 3478eae32d8a..000000000000
--- a/arch/arm/mach-pxa/include/mach/pxa3xx_nand.h
+++ /dev/null
@@ -1,63 +0,0 @@
1#ifndef __ASM_ARCH_PXA3XX_NAND_H
2#define __ASM_ARCH_PXA3XX_NAND_H
3
4#include <linux/mtd/mtd.h>
5#include <linux/mtd/partitions.h>
6
7struct pxa3xx_nand_timing {
8 unsigned int tCH; /* Enable signal hold time */
9 unsigned int tCS; /* Enable signal setup time */
10 unsigned int tWH; /* ND_nWE high duration */
11 unsigned int tWP; /* ND_nWE pulse time */
12 unsigned int tRH; /* ND_nRE high duration */
13 unsigned int tRP; /* ND_nRE pulse width */
14 unsigned int tR; /* ND_nWE high to ND_nRE low for read */
15 unsigned int tWHR; /* ND_nWE high to ND_nRE low for status read */
16 unsigned int tAR; /* ND_ALE low to ND_nRE low delay */
17};
18
19struct pxa3xx_nand_cmdset {
20 uint16_t read1;
21 uint16_t read2;
22 uint16_t program;
23 uint16_t read_status;
24 uint16_t read_id;
25 uint16_t erase;
26 uint16_t reset;
27 uint16_t lock;
28 uint16_t unlock;
29 uint16_t lock_status;
30};
31
32struct pxa3xx_nand_flash {
33 const struct pxa3xx_nand_timing *timing; /* NAND Flash timing */
34 const struct pxa3xx_nand_cmdset *cmdset;
35
36 uint32_t page_per_block;/* Pages per block (PG_PER_BLK) */
37 uint32_t page_size; /* Page size in bytes (PAGE_SZ) */
38 uint32_t flash_width; /* Width of Flash memory (DWIDTH_M) */
39 uint32_t dfc_width; /* Width of flash controller(DWIDTH_C) */
40 uint32_t num_blocks; /* Number of physical blocks in Flash */
41 uint32_t chip_id;
42};
43
44struct pxa3xx_nand_platform_data {
45
46 /* the data flash bus is shared between the Static Memory
47 * Controller and the Data Flash Controller, the arbiter
48 * controls the ownership of the bus
49 */
50 int enable_arbiter;
51
52 /* allow platform code to keep OBM/bootloader defined NFC config */
53 int keep_config;
54
55 const struct mtd_partition *parts;
56 unsigned int nr_parts;
57
58 const struct pxa3xx_nand_flash * flash;
59 size_t num_flash;
60};
61
62extern void pxa3xx_set_nand_info(struct pxa3xx_nand_platform_data *info);
63#endif /* __ASM_ARCH_PXA3XX_NAND_H */
diff --git a/arch/arm/mach-pxa/include/mach/pxafb.h b/arch/arm/mach-pxa/include/mach/pxafb.h
index f73061c90b5e..160ec83f51a6 100644
--- a/arch/arm/mach-pxa/include/mach/pxafb.h
+++ b/arch/arm/mach-pxa/include/mach/pxafb.h
@@ -76,7 +76,8 @@ struct pxafb_mode_info {
76 u_char bpp; 76 u_char bpp;
77 u_int cmap_greyscale:1, 77 u_int cmap_greyscale:1,
78 depth:8, 78 depth:8,
79 unused:23; 79 transparency:1,
80 unused:22;
80 81
81 /* Parallel Mode Timing */ 82 /* Parallel Mode Timing */
82 u_char hsync_len; 83 u_char hsync_len;
diff --git a/arch/arm/mach-pxa/include/mach/regs-u2d.h b/arch/arm/mach-pxa/include/mach/regs-u2d.h
new file mode 100644
index 000000000000..44b0b20b69a4
--- /dev/null
+++ b/arch/arm/mach-pxa/include/mach/regs-u2d.h
@@ -0,0 +1,199 @@
1#ifndef __ASM_ARCH_PXA3xx_U2D_H
2#define __ASM_ARCH_PXA3xx_U2D_H
3
4#include <mach/bitfield.h>
5
6/*
7 * USB2 device controller registers and bits definitions
8 */
9#define U2DCR (0x0000) /* U2D Control Register */
10#define U2DCR_NDC (1 << 31) /* NAK During Config */
11#define U2DCR_HSTC (0x7 << 28) /* High Speed Timeout Calibration */
12#define U2DCR_SPEOREN (1 << 27) /* Short Packet EOR INTR generation Enable */
13#define U2DCR_FSTC (0x7 << 24) /* Full Speed Timeout Calibration */
14#define U2DCR_UCLKOVR (1 << 22) /* UTM Clock Override */
15#define U2DCR_ABP (1 << 21) /* Application Bus Power */
16#define U2DCR_ADD (1 << 20) /* Application Device Disconnect */
17#define U2DCR_CC (1 << 19) /* Configuration Change */
18#define U2DCR_HS (1 << 18) /* High Speed USB Detection */
19#define U2DCR_SMAC (1 << 17) /* Switch Endpoint Memory to Active Configuration */
20#define U2DCR_DWRE (1 << 16) /* Device Remote Wake-up Feature */
21#define U2DCR_ACN (0xf << 12) /* Active U2D Configuration Number */
22#define U2DCR_AIN (0xf << 8) /* Active U2D Interface Number */
23#define U2DCR_AAISN (0xf << 4) /* Active U2D Alternate Interface Setting Number */
24#define U2DCR_EMCE (1 << 3) /* Endpoint Memory Configuration Error */
25#define U2DCR_UDR (1 << 2) /* U2D Resume */
26#define U2DCR_UDA (1 << 1) /* U2D Active */
27#define U2DCR_UDE (1 << 0) /* U2D Enable */
28
29#define U2DICR (0x0004) /* U2D Interrupt Control Register */
30#define U2DISR (0x000C) /* U2D Interrupt Status Register */
31#define U2DINT_CC (1 << 31) /* Interrupt - Configuration Change */
32#define U2DINT_SOF (1 << 30) /* Interrupt - SOF */
33#define U2DINT_USOF (1 << 29) /* Interrupt - micro SOF */
34#define U2DINT_RU (1 << 28) /* Interrupt - Resume */
35#define U2DINT_SU (1 << 27) /* Interrupt - Suspend */
36#define U2DINT_RS (1 << 26) /* Interrupt - Reset */
37#define U2DINT_DPE (1 << 25) /* Interrupt - Data Packet Error */
38#define U2DINT_FIFOERR (0x4) /* Interrupt - endpoint FIFO error */
39#define U2DINT_PACKETCMP (0x2) /* Interrupt - endpoint packet complete */
40#define U2DINT_SPACKETCMP (0x1) /* Interrupt - endpoint short packet complete */
41
42#define U2DFNR (0x0014) /* U2D Frame Number Register */
43
44#define U2DINT(n, intr) (((intr) & 0x07) << (((n) & 0x07) * 3))
45#define U2DICR2 (0x0008) /* U2D Interrupt Control Register 2 */
46#define U2DISR2 (0x0010) /* U2D Interrupt Status Register 2 */
47
48#define U2DOTGCR (0x0020) /* U2D OTG Control Register */
49#define U2DOTGCR_OTGEN (1 << 31) /* On-The-Go Enable */
50#define U2DOTGCR_AALTHNP (1 << 30) /* A-device Alternate Host Negotiation Protocal Port Support */
51#define U2DOTGCR_AHNP (1 << 29) /* A-device Host Negotiation Protocal Support */
52#define U2DOTGCR_BHNP (1 << 28) /* B-device Host Negotiation Protocal Enable */
53
54#ifdef CONFIG_CPU_PXA930
55#define U2DOTGCR_LPA (1 << 15) /* ULPI low power mode active */
56#define U2DOTGCR_IESI (1 << 13) /* OTG interrupt Enable */
57#define U2DOTGCR_ISSI (1 << 12) /* OTG interrupt status */
58#endif
59
60#define U2DOTGCR_CKAF (1 << 5) /* Carkit Mode Alternate Function Select */
61#define U2DOTGCR_UTMID (1 << 4) /* UTMI Interface Disable */
62#define U2DOTGCR_ULAF (1 << 3) /* ULPI Mode Alternate Function Select */
63#define U2DOTGCR_SMAF (1 << 2) /* Serial Mode Alternate Function Select */
64#define U2DOTGCR_RTSM (1 << 1) /* Return to Synchronous Mode (ULPI Mode) */
65#define U2DOTGCR_ULE (1 << 0) /* ULPI Wrapper Enable */
66
67#define U2DOTGICR (0x0024) /* U2D OTG Interrupt Control Register */
68#define U2DOTGISR (0x0028) /* U2D OTG Interrupt Status Register */
69
70#define U2DOTGINT_SF (1 << 17) /* OTG Set Feature Command Received */
71#define U2DOTGINT_SI (1 << 16) /* OTG Interrupt */
72#define U2DOTGINT_RLS1 (1 << 14) /* RXCMD Linestate[1] Change Interrupt Rise */
73#define U2DOTGINT_RLS0 (1 << 13) /* RXCMD Linestate[0] Change Interrupt Rise */
74#define U2DOTGINT_RID (1 << 12) /* RXCMD OTG ID Change Interrupt Rise */
75#define U2DOTGINT_RSE (1 << 11) /* RXCMD OTG Session End Interrupt Rise */
76#define U2DOTGINT_RSV (1 << 10) /* RXCMD OTG Session Valid Interrupt Rise */
77#define U2DOTGINT_RVV (1 << 9) /* RXCMD OTG Vbus Valid Interrupt Rise */
78#define U2DOTGINT_RCK (1 << 8) /* RXCMD Carkit Interrupt Rise */
79#define U2DOTGINT_FLS1 (1 << 6) /* RXCMD Linestate[1] Change Interrupt Fall */
80#define U2DOTGINT_FLS0 (1 << 5) /* RXCMD Linestate[0] Change Interrupt Fall */
81#define U2DOTGINT_FID (1 << 4) /* RXCMD OTG ID Change Interrupt Fall */
82#define U2DOTGINT_FSE (1 << 3) /* RXCMD OTG Session End Interrupt Fall */
83#define U2DOTGINT_FSV (1 << 2) /* RXCMD OTG Session Valid Interrupt Fall */
84#define U2DOTGINT_FVV (1 << 1) /* RXCMD OTG Vbus Valid Interrupt Fall */
85#define U2DOTGINT_FCK (1 << 0) /* RXCMD Carkit Interrupt Fall */
86
87#define U2DOTGUSR (0x002C) /* U2D OTG ULPI Status Register */
88#define U2DOTGUSR_LPA (1 << 31) /* ULPI Low Power Mode Active */
89#define U2DOTGUSR_S6A (1 << 30) /* ULPI Serial Mode (6-pin) Active */
90#define U2DOTGUSR_S3A (1 << 29) /* ULPI Serial Mode (3-pin) Active */
91#define U2DOTGUSR_CKA (1 << 28) /* ULPI Car Kit Mode Active */
92#define U2DOTGUSR_LS1 (1 << 6) /* RXCMD Linestate 1 Status */
93#define U2DOTGUSR_LS0 (1 << 5) /* RXCMD Linestate 0 Status */
94#define U2DOTGUSR_ID (1 << 4) /* OTG IDGnd Status */
95#define U2DOTGUSR_SE (1 << 3) /* OTG Session End Status */
96#define U2DOTGUSR_SV (1 << 2) /* OTG Session Valid Status */
97#define U2DOTGUSR_VV (1 << 1) /* OTG Vbus Valid Status */
98#define U2DOTGUSR_CK (1 << 0) /* Carkit Interrupt Status */
99
100#define U2DOTGUCR (0x0030) /* U2D OTG ULPI Control Register */
101#define U2DOTGUCR_RUN (1 << 25) /* RUN */
102#define U2DOTGUCR_RNW (1 << 24) /* Read or Write operation */
103#define U2DOTGUCR_ADDR (0x3f << 16) /* Address of the ULPI PHY register */
104#define U2DOTGUCR_WDATA (0xff << 8) /* The data for a WRITE command */
105#define U2DOTGUCR_RDATA (0xff << 0) /* The data for a READ command */
106
107#define U2DP3CR (0x0034) /* U2D Port 3 Control Register */
108#define U2DP3CR_P2SS (0x3 << 8) /* Host Port 2 Serial Mode Select */
109#define U2DP3CR_P3SS (0x7 << 4) /* Host Port 3 Serial Mode Select */
110#define U2DP3CR_VPVMBEN (0x1 << 2) /* Host Port 3 Vp/Vm Block Enable */
111#define U2DP3CR_CFG (0x3 << 0) /* Host Port 3 Configuration */
112
113#define U2DCSR0 (0x0100) /* U2D Control/Status Register - Endpoint 0 */
114#define U2DCSR0_IPA (1 << 8) /* IN Packet Adjusted */
115#define U2DCSR0_SA (1 << 7) /* SETUP Active */
116#define U2DCSR0_RNE (1 << 6) /* Receive FIFO Not Empty */
117#define U2DCSR0_FST (1 << 5) /* Force Stall */
118#define U2DCSR0_SST (1 << 4) /* Send Stall */
119#define U2DCSR0_DME (1 << 3) /* DMA Enable */
120#define U2DCSR0_FTF (1 << 2) /* Flush Transmit FIFO */
121#define U2DCSR0_IPR (1 << 1) /* IN Packet Ready */
122#define U2DCSR0_OPC (1 << 0) /* OUT Packet Complete */
123
124#define U2DCSR(x) (0x0100 + ((x) << 2)) /* U2D Control/Status Register - Endpoint x */
125#define U2DCSR_BF (1 << 10) /* Buffer Full, for OUT eps */
126#define U2DCSR_BE (1 << 10) /* Buffer Empty, for IN eps */
127#define U2DCSR_DPE (1 << 9) /* Data Packet Error, for ISO eps only */
128#define U2DCSR_FEF (1 << 8) /* Flush Endpoint FIFO */
129#define U2DCSR_SP (1 << 7) /* Short Packet Control/Status, for OUT eps only, readonly */
130#define U2DCSR_BNE (1 << 6) /* Buffer Not Empty, for OUT eps */
131#define U2DCSR_BNF (1 << 6) /* Buffer Not Full, for IN eps */
132#define U2DCSR_FST (1 << 5) /* Force STALL, write 1 set */
133#define U2DCSR_SST (1 << 4) /* Sent STALL, write 1 clear */
134#define U2DCSR_DME (1 << 3) /* DMA Enable */
135#define U2DCSR_TRN (1 << 2) /* Tx/Rx NAK, write 1 clear */
136#define U2DCSR_PC (1 << 1) /* Packet Complete, write 1 clear */
137#define U2DCSR_FS (1 << 0) /* FIFO needs Service */
138
139#define U2DBCR0 (0x0200) /* U2D Byte Count Register - Endpoint 0 */
140#define U2DBCR(x) (0x0200 + ((x) << 2)) /* U2D Byte Count Register - Endpoint x */
141
142#define U2DDR0 (0x0300) /* U2D Data Register - Endpoint 0 */
143
144#define U2DEPCR(x) (0x0400 + ((x) << 2)) /* U2D Configuration Register - Endpoint x */
145#define U2DEPCR_EE (1 << 0) /* Endpoint Enable */
146#define U2DEPCR_BS_MASK (0x3FE) /* Buffer Size, BS*8=FIFO size, max 8184B = 8KB */
147
148#define U2DSCA (0x0500) /* U2D Setup Command Address */
149#define U2DSCA_VALUE (0x0120)
150
151#define U2DEN0 (0x0504) /* U2D Endpoint Information Register - Endpoint 0 */
152#define U2DEN(x) (0x0504 + ((x) << 2)) /* U2D Endpoint Information Register - Endpoint x */
153
154/* U2DMA registers */
155#define U2DMACSR0 (0x1000) /* U2DMA Control/Status Register - Channel 0 */
156#define U2DMACSR(x) (0x1000 + ((x) << 2)) /* U2DMA Control/Status Register - Channel x */
157#define U2DMACSR_RUN (1 << 31) /* Run Bit (read / write) */
158#define U2DMACSR_STOPIRQEN (1 << 29) /* Stop Interrupt Enable (read / write) */
159#define U2DMACSR_EORIRQEN (1 << 28) /* End of Receive Interrupt Enable (R/W) */
160#define U2DMACSR_EORJMPEN (1 << 27) /* Jump to next descriptor on EOR */
161#define U2DMACSR_EORSTOPEN (1 << 26) /* STOP on an EOR */
162#define U2DMACSR_RASIRQEN (1 << 23) /* Request After Cnannel Stopped Interrupt Enable */
163#define U2DMACSR_MASKRUN (1 << 22) /* Mask Run */
164#define U2DMACSR_SCEMC (3 << 18) /* System Bus Split Completion Error Message Class */
165#define U2DMACSR_SCEMI (0x1f << 13) /* System Bus Split Completion Error Message Index */
166#define U2DMACSR_BUSERRTYPE (7 << 10) /* PX Bus Error Type */
167#define U2DMACSR_EORINTR (1 << 9) /* End Of Receive */
168#define U2DMACSR_REQPEND (1 << 8) /* Request Pending */
169#define U2DMACSR_RASINTR (1 << 4) /* Request After Channel Stopped (read / write 1 clear) */#define U2DMACSR_STOPINTR (1 << 3) /* Stop Interrupt (read only) */
170#define U2DMACSR_ENDINTR (1 << 2) /* End Interrupt (read / write 1 clear) */
171#define U2DMACSR_STARTINTR (1 << 1) /* Start Interrupt (read / write 1 clear) */
172#define U2DMACSR_BUSERRINTR (1 << 0) /* Bus Error Interrupt (read / write 1 clear) */
173
174#define U2DMACR (0x1080) /* U2DMA Control Register */
175#define U2DMAINT (0x10F0) /* U2DMA Interrupt Register */
176
177#define U2DMABR0 (0x1100) /* U2DMA Branch Register - Channel 0 */
178#define U2DMABR(x) (0x1100 + (x) << 2) /* U2DMA Branch Register - Channel x */
179
180#define U2DMADADR0 (0x1200) /* U2DMA Descriptor Address Register - Channel 0 */
181#define U2DMADADR(x) (0x1200 + (x) * 0x10) /* U2DMA Descriptor Address Register - Channel x */
182
183#define U2DMADADR_STOP (1U << 0)
184
185#define U2DMASADR0 (0x1204) /* U2DMA Source Address Register - Channel 0 */
186#define U2DMASADR(x) (0x1204 + (x) * 0x10) /* U2DMA Source Address Register - Channel x */
187#define U2DMATADR0 (0x1208) /* U2DMA Target Address Register - Channel 0 */
188#define U2DMATADR(x) (0x1208 + (x) * 0x10) /* U2DMA Target Address Register - Channel x */
189
190#define U2DMACMDR0 (0x120C) /* U2DMA Command Address Register - Channel 0 */
191#define U2DMACMDR(x) (0x120C + (x) * 0x10) /* U2DMA Command Address Register - Channel x */
192
193#define U2DMACMDR_XFRDIS (1 << 31) /* Transfer Direction */
194#define U2DMACMDR_STARTIRQEN (1 << 22) /* Start Interrupt Enable */
195#define U2DMACMDR_ENDIRQEN (1 << 21) /* End Interrupt Enable */
196#define U2DMACMDR_PACKCOMP (1 << 13) /* Packet Complete */
197#define U2DMACMDR_LEN (0x07ff) /* length mask (max = 2K - 1) */
198
199#endif /* __ASM_ARCH_PXA3xx_U2D_H */
diff --git a/arch/arm/mach-pxa/include/mach/treo680.h b/arch/arm/mach-pxa/include/mach/treo680.h
deleted file mode 100644
index af443b24d99a..000000000000
--- a/arch/arm/mach-pxa/include/mach/treo680.h
+++ /dev/null
@@ -1,49 +0,0 @@
1/*
2 * GPIOs and interrupts for Palm Treo 680 smartphone
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 */
9
10#ifndef _INCLUDE_TREO680_H_
11#define _INCLUDE_TREO680_H_
12
13/* GPIOs */
14#define GPIO_NR_TREO680_POWER_DETECT 0
15#define GPIO_NR_TREO680_AMP_EN 27
16#define GPIO_NR_TREO680_KEYB_BL 24
17#define GPIO_NR_TREO680_VIBRATE_EN 44
18#define GPIO_NR_TREO680_GREEN_LED 20
19#define GPIO_NR_TREO680_RED_LED 79
20#define GPIO_NR_TREO680_SD_DETECT_N 113
21#define GPIO_NR_TREO680_SD_READONLY 33
22#define GPIO_NR_TREO680_EP_DETECT_N 116
23#define GPIO_NR_TREO680_SD_POWER 42
24#define GPIO_NR_TREO680_USB_DETECT 1
25#define GPIO_NR_TREO680_USB_PULLUP 114
26#define GPIO_NR_TREO680_GSM_POWER 40
27#define GPIO_NR_TREO680_GSM_RESET 87
28#define GPIO_NR_TREO680_GSM_WAKE 57
29#define GPIO_NR_TREO680_GSM_HOST_WAKE 14
30#define GPIO_NR_TREO680_GSM_TRIGGER 10
31#define GPIO_NR_TREO680_BT_EN 43
32#define GPIO_NR_TREO680_IR_EN 115
33#define GPIO_NR_TREO680_IR_TXD 47
34#define GPIO_NR_TREO680_BL_POWER 38
35#define GPIO_NR_TREO680_LCD_POWER 25
36
37/* Various addresses */
38#define TREO680_PHYS_RAM_START 0xa0000000
39#define TREO680_PHYS_IO_START 0x40000000
40#define TREO680_STR_BASE 0xa2000000
41
42/* BACKLIGHT */
43#define TREO680_MAX_INTENSITY 254
44#define TREO680_DEFAULT_INTENSITY 160
45#define TREO680_LIMIT_MASK 0x7F
46#define TREO680_PRESCALER 63
47#define TREO680_PERIOD_NS 3500
48
49#endif
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c
index 13848955d133..f28c1715b910 100644
--- a/arch/arm/mach-pxa/littleton.c
+++ b/arch/arm/mach-pxa/littleton.c
@@ -44,10 +44,10 @@
44#include <mach/ssp.h> 44#include <mach/ssp.h>
45#include <mach/mmc.h> 45#include <mach/mmc.h>
46#include <mach/pxa2xx_spi.h> 46#include <mach/pxa2xx_spi.h>
47#include <plat/i2c.h>
48#include <mach/pxa27x_keypad.h> 47#include <mach/pxa27x_keypad.h>
49#include <mach/pxa3xx_nand.h>
50#include <mach/littleton.h> 48#include <mach/littleton.h>
49#include <plat/i2c.h>
50#include <plat/pxa3xx_nand.h>
51 51
52#include "generic.h" 52#include "generic.h"
53 53
@@ -413,6 +413,10 @@ static void __init littleton_init(void)
413 /* initialize MFP configurations */ 413 /* initialize MFP configurations */
414 pxa3xx_mfp_config(ARRAY_AND_SIZE(littleton_mfp_cfg)); 414 pxa3xx_mfp_config(ARRAY_AND_SIZE(littleton_mfp_cfg));
415 415
416 pxa_set_ffuart_info(NULL);
417 pxa_set_btuart_info(NULL);
418 pxa_set_stuart_info(NULL);
419
416 /* 420 /*
417 * Note: we depend bootloader set the correct 421 * Note: we depend bootloader set the correct
418 * value to MSC register for SMC91x. 422 * value to MSC register for SMC91x.
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c
index d64395f26a3e..1373c22dbb83 100644
--- a/arch/arm/mach-pxa/lpd270.c
+++ b/arch/arm/mach-pxa/lpd270.c
@@ -455,6 +455,10 @@ static void __init lpd270_init(void)
455{ 455{
456 pxa2xx_mfp_config(ARRAY_AND_SIZE(lpd270_pin_config)); 456 pxa2xx_mfp_config(ARRAY_AND_SIZE(lpd270_pin_config));
457 457
458 pxa_set_ffuart_info(NULL);
459 pxa_set_btuart_info(NULL);
460 pxa_set_stuart_info(NULL);
461
458 lpd270_flash_data[0].width = (BOOT_DEF & 1) ? 2 : 4; 462 lpd270_flash_data[0].width = (BOOT_DEF & 1) ? 2 : 4;
459 lpd270_flash_data[1].width = 4; 463 lpd270_flash_data[1].width = 4;
460 464
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c
index c6a94d3fdd61..98ee7e590299 100644
--- a/arch/arm/mach-pxa/lubbock.c
+++ b/arch/arm/mach-pxa/lubbock.c
@@ -518,6 +518,10 @@ static void __init lubbock_init(void)
518 518
519 pxa2xx_mfp_config(ARRAY_AND_SIZE(lubbock_pin_config)); 519 pxa2xx_mfp_config(ARRAY_AND_SIZE(lubbock_pin_config));
520 520
521 pxa_set_ffuart_info(NULL);
522 pxa_set_btuart_info(NULL);
523 pxa_set_stuart_info(NULL);
524
521 clk_add_alias("SA1111_CLK", NULL, "GPIO11_CLK", NULL); 525 clk_add_alias("SA1111_CLK", NULL, "GPIO11_CLK", NULL);
522 pxa_set_udc_info(&udc_info); 526 pxa_set_udc_info(&udc_info);
523 set_pxa_fb_info(&sharp_lm8v31); 527 set_pxa_fb_info(&sharp_lm8v31);
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c
index 5360c07f5138..8a38d604dc77 100644
--- a/arch/arm/mach-pxa/magician.c
+++ b/arch/arm/mach-pxa/magician.c
@@ -742,6 +742,10 @@ static void __init magician_init(void)
742 742
743 pxa2xx_mfp_config(ARRAY_AND_SIZE(magician_pin_config)); 743 pxa2xx_mfp_config(ARRAY_AND_SIZE(magician_pin_config));
744 744
745 pxa_set_ffuart_info(NULL);
746 pxa_set_btuart_info(NULL);
747 pxa_set_stuart_info(NULL);
748
745 platform_add_devices(ARRAY_AND_SIZE(devices)); 749 platform_add_devices(ARRAY_AND_SIZE(devices));
746 750
747 err = gpio_request(GPIO83_MAGICIAN_nIR_EN, "nIR_EN"); 751 err = gpio_request(GPIO83_MAGICIAN_nIR_EN, "nIR_EN");
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c
index a4eeae345e64..851ee0fc32e2 100644
--- a/arch/arm/mach-pxa/mainstone.c
+++ b/arch/arm/mach-pxa/mainstone.c
@@ -576,6 +576,10 @@ static void __init mainstone_init(void)
576 576
577 pxa2xx_mfp_config(ARRAY_AND_SIZE(mainstone_pin_config)); 577 pxa2xx_mfp_config(ARRAY_AND_SIZE(mainstone_pin_config));
578 578
579 pxa_set_ffuart_info(NULL);
580 pxa_set_btuart_info(NULL);
581 pxa_set_stuart_info(NULL);
582
579 mst_flash_data[0].width = (BOOT_DEF & 1) ? 2 : 4; 583 mst_flash_data[0].width = (BOOT_DEF & 1) ? 2 : 4;
580 mst_flash_data[1].width = 4; 584 mst_flash_data[1].width = 4;
581 585
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c
index 3cab452e5567..2466a44d8fda 100644
--- a/arch/arm/mach-pxa/mioa701.c
+++ b/arch/arm/mach-pxa/mioa701.c
@@ -798,6 +798,9 @@ static void __init mioa701_machine_init(void)
798 UP2OCR = UP2OCR_HXOE; 798 UP2OCR = UP2OCR_HXOE;
799 799
800 pxa2xx_mfp_config(ARRAY_AND_SIZE(mioa701_pin_config)); 800 pxa2xx_mfp_config(ARRAY_AND_SIZE(mioa701_pin_config));
801 pxa_set_ffuart_info(NULL);
802 pxa_set_btuart_info(NULL);
803 pxa_set_stuart_info(NULL);
801 mio_gpio_request(ARRAY_AND_SIZE(global_gpios)); 804 mio_gpio_request(ARRAY_AND_SIZE(global_gpios));
802 bootstrap_init(); 805 bootstrap_init();
803 set_pxa_fb_info(&mioa701_pxafb_info); 806 set_pxa_fb_info(&mioa701_pxafb_info);
diff --git a/arch/arm/mach-pxa/mp900.c b/arch/arm/mach-pxa/mp900.c
index a65713ce019e..6d4503927a76 100644
--- a/arch/arm/mach-pxa/mp900.c
+++ b/arch/arm/mach-pxa/mp900.c
@@ -84,6 +84,9 @@ static struct platform_device *devices[] __initdata = {
84static void __init mp900c_init(void) 84static void __init mp900c_init(void)
85{ 85{
86 printk(KERN_INFO "MobilePro 900/C machine init\n"); 86 printk(KERN_INFO "MobilePro 900/C machine init\n");
87 pxa_set_ffuart_info(NULL);
88 pxa_set_btuart_info(NULL);
89 pxa_set_stuart_info(NULL);
87 platform_add_devices(devices, ARRAY_SIZE(devices)); 90 platform_add_devices(devices, ARRAY_SIZE(devices));
88} 91}
89 92
diff --git a/arch/arm/mach-pxa/palmld.c b/arch/arm/mach-pxa/palmld.c
index 1ad029dd4438..59140217890a 100644
--- a/arch/arm/mach-pxa/palmld.c
+++ b/arch/arm/mach-pxa/palmld.c
@@ -530,6 +530,10 @@ static void __init palmld_init(void)
530{ 530{
531 pxa2xx_mfp_config(ARRAY_AND_SIZE(palmld_pin_config)); 531 pxa2xx_mfp_config(ARRAY_AND_SIZE(palmld_pin_config));
532 532
533 pxa_set_ffuart_info(NULL);
534 pxa_set_btuart_info(NULL);
535 pxa_set_stuart_info(NULL);
536
533 palmld_pm_init(); 537 palmld_pm_init();
534 set_pxa_fb_info(&palmld_lcd_screen); 538 set_pxa_fb_info(&palmld_lcd_screen);
535 pxa_set_mci_info(&palmld_mci_platform_data); 539 pxa_set_mci_info(&palmld_mci_platform_data);
diff --git a/arch/arm/mach-pxa/palmt5.c b/arch/arm/mach-pxa/palmt5.c
index 2dd7ce28556b..7f89ca20f13a 100644
--- a/arch/arm/mach-pxa/palmt5.c
+++ b/arch/arm/mach-pxa/palmt5.c
@@ -419,6 +419,10 @@ static void __init palmt5_init(void)
419{ 419{
420 pxa2xx_mfp_config(ARRAY_AND_SIZE(palmt5_pin_config)); 420 pxa2xx_mfp_config(ARRAY_AND_SIZE(palmt5_pin_config));
421 421
422 pxa_set_ffuart_info(NULL);
423 pxa_set_btuart_info(NULL);
424 pxa_set_stuart_info(NULL);
425
422 palmt5_pm_init(); 426 palmt5_pm_init();
423 set_pxa_fb_info(&palmt5_lcd_screen); 427 set_pxa_fb_info(&palmt5_lcd_screen);
424 pxa_set_mci_info(&palmt5_mci_platform_data); 428 pxa_set_mci_info(&palmt5_mci_platform_data);
diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c
index 0b92291a58f6..308417592007 100644
--- a/arch/arm/mach-pxa/palmtc.c
+++ b/arch/arm/mach-pxa/palmtc.c
@@ -416,6 +416,11 @@ static void __init palmtc_init(void)
416{ 416{
417 pxa2xx_mfp_config(ARRAY_AND_SIZE(palmtc_pin_config)); 417 pxa2xx_mfp_config(ARRAY_AND_SIZE(palmtc_pin_config));
418 418
419 pxa_set_ffuart_info(NULL);
420 pxa_set_btuart_info(NULL);
421 pxa_set_stuart_info(NULL);
422 pxa_set_hwuart_info(NULL);
423
419 set_pxa_fb_info(&palmtc_lcd_screen); 424 set_pxa_fb_info(&palmtc_lcd_screen);
420 pxa_set_mci_info(&palmtc_mci_platform_data); 425 pxa_set_mci_info(&palmtc_mci_platform_data);
421 pxa_set_udc_info(&palmtc_udc_info); 426 pxa_set_udc_info(&palmtc_udc_info);
diff --git a/arch/arm/mach-pxa/palmte2.c b/arch/arm/mach-pxa/palmte2.c
index 277c4062e3c6..265d62bae7de 100644
--- a/arch/arm/mach-pxa/palmte2.c
+++ b/arch/arm/mach-pxa/palmte2.c
@@ -373,6 +373,10 @@ static void __init palmte2_init(void)
373{ 373{
374 pxa2xx_mfp_config(ARRAY_AND_SIZE(palmte2_pin_config)); 374 pxa2xx_mfp_config(ARRAY_AND_SIZE(palmte2_pin_config));
375 375
376 pxa_set_ffuart_info(NULL);
377 pxa_set_btuart_info(NULL);
378 pxa_set_stuart_info(NULL);
379
376 set_pxa_fb_info(&palmte2_lcd_screen); 380 set_pxa_fb_info(&palmte2_lcd_screen);
377 pxa_set_mci_info(&palmte2_mci_platform_data); 381 pxa_set_mci_info(&palmte2_mci_platform_data);
378 palmte2_udc_init(); 382 palmte2_udc_init();
diff --git a/arch/arm/mach-pxa/treo680.c b/arch/arm/mach-pxa/palmtreo.c
index fe085076fbf2..606eb7e8a17e 100644
--- a/arch/arm/mach-pxa/treo680.c
+++ b/arch/arm/mach-pxa/palmtreo.c
@@ -1,5 +1,9 @@
1/* 1/*
2 * Hardware definitions for Palm Treo 680 2 * Hardware definitions for Palm Treo smartphones
3 *
4 * currently supported:
5 * Palm Treo 680 (GSM)
6 * Palm Centro 685 (GSM)
3 * 7 *
4 * Author: Tomas Cech <sleep_walker@suse.cz> 8 * Author: Tomas Cech <sleep_walker@suse.cz>
5 * 9 *
@@ -31,7 +35,7 @@
31#include <mach/pxa27x.h> 35#include <mach/pxa27x.h>
32#include <mach/pxa27x-udc.h> 36#include <mach/pxa27x-udc.h>
33#include <mach/audio.h> 37#include <mach/audio.h>
34#include <mach/treo680.h> 38#include <mach/palmtreo.h>
35#include <mach/mmc.h> 39#include <mach/mmc.h>
36#include <mach/pxafb.h> 40#include <mach/pxafb.h>
37#include <mach/irda.h> 41#include <mach/irda.h>
@@ -50,7 +54,7 @@
50/****************************************************************************** 54/******************************************************************************
51 * Pin configuration 55 * Pin configuration
52 ******************************************************************************/ 56 ******************************************************************************/
53static unsigned long treo680_pin_config[] __initdata = { 57static unsigned long treo_pin_config[] __initdata = {
54 /* MMC */ 58 /* MMC */
55 GPIO32_MMC_CLK, 59 GPIO32_MMC_CLK,
56 GPIO92_MMC_DAT_0, 60 GPIO92_MMC_DAT_0,
@@ -58,7 +62,6 @@ static unsigned long treo680_pin_config[] __initdata = {
58 GPIO110_MMC_DAT_2, 62 GPIO110_MMC_DAT_2,
59 GPIO111_MMC_DAT_3, 63 GPIO111_MMC_DAT_3,
60 GPIO112_MMC_CMD, 64 GPIO112_MMC_CMD,
61 GPIO33_GPIO, /* SD read only */
62 GPIO113_GPIO, /* SD detect */ 65 GPIO113_GPIO, /* SD detect */
63 66
64 /* AC97 */ 67 /* AC97 */
@@ -80,12 +83,10 @@ static unsigned long treo680_pin_config[] __initdata = {
80 GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH, /* usb detect */ 83 GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH, /* usb detect */
81 84
82 /* MATRIX KEYPAD */ 85 /* MATRIX KEYPAD */
83 GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH,
84 GPIO101_KP_MKIN_1, 86 GPIO101_KP_MKIN_1,
85 GPIO102_KP_MKIN_2, 87 GPIO102_KP_MKIN_2,
86 GPIO97_KP_MKIN_3, 88 GPIO97_KP_MKIN_3,
87 GPIO98_KP_MKIN_4, 89 GPIO98_KP_MKIN_4,
88 GPIO99_KP_MKIN_5,
89 GPIO91_KP_MKIN_6, 90 GPIO91_KP_MKIN_6,
90 GPIO13_KP_MKIN_7, 91 GPIO13_KP_MKIN_7,
91 GPIO103_KP_MKOUT_0 | MFP_LPM_DRIVE_HIGH, 92 GPIO103_KP_MKOUT_0 | MFP_LPM_DRIVE_HIGH,
@@ -150,19 +151,57 @@ static unsigned long treo680_pin_config[] __initdata = {
150 GPIO11_GPIO | WAKEUP_ON_EDGE_BOTH, /* bluetooth host wake up */ 151 GPIO11_GPIO | WAKEUP_ON_EDGE_BOTH, /* bluetooth host wake up */
151}; 152};
152 153
154#ifdef CONFIG_MACH_TREO680
155static unsigned long treo680_pin_config[] __initdata = {
156 GPIO33_GPIO, /* SD read only */
157
158 /* MATRIX KEYPAD - different wake up source */
159 GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH,
160 GPIO99_KP_MKIN_5,
161};
162#endif /* CONFIG_MACH_TREO680 */
163
164#ifdef CONFIG_MACH_CENTRO
165static unsigned long centro685_pin_config[] __initdata = {
166 /* Bluetooth attached to BT UART*/
167 MFP_CFG_OUT(GPIO80, AF0, DRIVE_LOW), /* power: LOW = off */
168 GPIO42_BTUART_RXD,
169 GPIO43_BTUART_TXD,
170 GPIO44_BTUART_CTS,
171 GPIO45_BTUART_RTS,
172
173 /* MATRIX KEYPAD - different wake up source */
174 GPIO100_KP_MKIN_0,
175 GPIO99_KP_MKIN_5 | WAKEUP_ON_LEVEL_HIGH,
176};
177#endif /* CONFIG_MACH_CENTRO */
178
153/****************************************************************************** 179/******************************************************************************
154 * SD/MMC card controller 180 * SD/MMC card controller
155 ******************************************************************************/ 181 ******************************************************************************/
182#ifdef CONFIG_MACH_TREO680
156static struct pxamci_platform_data treo680_mci_platform_data = { 183static struct pxamci_platform_data treo680_mci_platform_data = {
157 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, 184 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
158 .gpio_card_detect = GPIO_NR_TREO680_SD_DETECT_N, 185 .gpio_card_detect = GPIO_NR_TREO_SD_DETECT_N,
159 .gpio_card_ro = GPIO_NR_TREO680_SD_READONLY, 186 .gpio_card_ro = GPIO_NR_TREO680_SD_READONLY,
160 .gpio_power = GPIO_NR_TREO680_SD_POWER, 187 .gpio_power = GPIO_NR_TREO680_SD_POWER,
161}; 188};
189#endif /* CONFIG_MACH_TREO680 */
190
191#ifdef CONFIG_MACH_CENTRO
192static struct pxamci_platform_data centro_mci_platform_data = {
193 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
194 .gpio_card_detect = GPIO_NR_TREO_SD_DETECT_N,
195 .gpio_card_ro = -1,
196 .gpio_power = GPIO_NR_CENTRO_SD_POWER,
197 .gpio_power_invert = 1,
198};
199#endif /* CONFIG_MACH_CENTRO */
162 200
163/****************************************************************************** 201/******************************************************************************
164 * GPIO keyboard 202 * GPIO keyboard
165 ******************************************************************************/ 203 ******************************************************************************/
204#ifdef CONFIG_MACH_TREO680
166static unsigned int treo680_matrix_keys[] = { 205static unsigned int treo680_matrix_keys[] = {
167 KEY(0, 0, KEY_F8), /* Red/Off/Power */ 206 KEY(0, 0, KEY_F8), /* Red/Off/Power */
168 KEY(0, 1, KEY_LEFT), 207 KEY(0, 1, KEY_LEFT),
@@ -232,92 +271,167 @@ static struct pxa27x_keypad_platform_data treo680_keypad_platform_data = {
232 271
233 .debounce_interval = 30, 272 .debounce_interval = 30,
234}; 273};
274#endif /* CONFIG_MACH_TREO680 */
275
276#ifdef CONFIG_MACH_CENTRO
277static unsigned int centro_matrix_keys[] = {
278 KEY(0, 0, KEY_F9), /* Home */
279 KEY(0, 1, KEY_LEFT),
280 KEY(0, 2, KEY_LEFTCTRL), /* Alternate */
281 KEY(0, 3, KEY_L),
282 KEY(0, 4, KEY_A),
283 KEY(0, 5, KEY_Q),
284 KEY(0, 6, KEY_P),
285
286 KEY(1, 0, KEY_RIGHTCTRL), /* Menu */
287 KEY(1, 1, KEY_RIGHT),
288 KEY(1, 2, KEY_LEFTSHIFT), /* Left shift */
289 KEY(1, 3, KEY_Z),
290 KEY(1, 4, KEY_S),
291 KEY(1, 5, KEY_W),
292
293 KEY(2, 0, KEY_F1), /* Phone */
294 KEY(2, 1, KEY_UP),
295 KEY(2, 2, KEY_0),
296 KEY(2, 3, KEY_X),
297 KEY(2, 4, KEY_D),
298 KEY(2, 5, KEY_E),
299
300 KEY(3, 0, KEY_F10), /* Calendar */
301 KEY(3, 1, KEY_DOWN),
302 KEY(3, 2, KEY_SPACE),
303 KEY(3, 3, KEY_C),
304 KEY(3, 4, KEY_F),
305 KEY(3, 5, KEY_R),
306
307 KEY(4, 0, KEY_F12), /* Mail */
308 KEY(4, 1, KEY_KPENTER),
309 KEY(4, 2, KEY_RIGHTALT), /* Alt */
310 KEY(4, 3, KEY_V),
311 KEY(4, 4, KEY_G),
312 KEY(4, 5, KEY_T),
313
314 KEY(5, 0, KEY_F8), /* Red/Off/Power */
315 KEY(5, 1, KEY_PAGEUP), /* Side up */
316 KEY(5, 2, KEY_DOT),
317 KEY(5, 3, KEY_B),
318 KEY(5, 4, KEY_H),
319 KEY(5, 5, KEY_Y),
320
321 KEY(6, 0, KEY_TAB), /* Side Activate */
322 KEY(6, 1, KEY_PAGEDOWN), /* Side down */
323 KEY(6, 2, KEY_ENTER),
324 KEY(6, 3, KEY_N),
325 KEY(6, 4, KEY_J),
326 KEY(6, 5, KEY_U),
327
328 KEY(7, 0, KEY_F6), /* Green/Call */
329 KEY(7, 1, KEY_O),
330 KEY(7, 2, KEY_BACKSPACE),
331 KEY(7, 3, KEY_M),
332 KEY(7, 4, KEY_K),
333 KEY(7, 5, KEY_I),
334};
335
336static struct pxa27x_keypad_platform_data centro_keypad_platform_data = {
337 .matrix_key_rows = 8,
338 .matrix_key_cols = 7,
339 .matrix_key_map = centro_matrix_keys,
340 .matrix_key_map_size = ARRAY_SIZE(centro_matrix_keys),
341 .direct_key_map = { KEY_CONNECT },
342 .direct_key_num = 1,
343
344 .debounce_interval = 30,
345};
346#endif /* CONFIG_MACH_CENTRO */
235 347
236/****************************************************************************** 348/******************************************************************************
237 * aSoC audio 349 * aSoC audio
238 ******************************************************************************/ 350 ******************************************************************************/
239 351
240static pxa2xx_audio_ops_t treo680_ac97_pdata = { 352static pxa2xx_audio_ops_t treo_ac97_pdata = {
241 .reset_gpio = 95, 353 .reset_gpio = 95,
242}; 354};
243 355
244/****************************************************************************** 356/******************************************************************************
245 * Backlight 357 * Backlight
246 ******************************************************************************/ 358 ******************************************************************************/
247static int treo680_backlight_init(struct device *dev) 359static int treo_backlight_init(struct device *dev)
248{ 360{
249 int ret; 361 int ret;
250 362
251 ret = gpio_request(GPIO_NR_TREO680_BL_POWER, "BL POWER"); 363 ret = gpio_request(GPIO_NR_TREO_BL_POWER, "BL POWER");
252 if (ret) 364 if (ret)
253 goto err; 365 goto err;
254 ret = gpio_direction_output(GPIO_NR_TREO680_BL_POWER, 0); 366 ret = gpio_direction_output(GPIO_NR_TREO_BL_POWER, 0);
255 if (ret) 367 if (ret)
256 goto err2; 368 goto err2;
257 369
258 return 0; 370 return 0;
259 371
260err2: 372err2:
261 gpio_free(GPIO_NR_TREO680_BL_POWER); 373 gpio_free(GPIO_NR_TREO_BL_POWER);
262err: 374err:
263 return ret; 375 return ret;
264} 376}
265 377
266static int treo680_backlight_notify(int brightness) 378static int treo_backlight_notify(int brightness)
267{ 379{
268 gpio_set_value(GPIO_NR_TREO680_BL_POWER, brightness); 380 gpio_set_value(GPIO_NR_TREO_BL_POWER, brightness);
269 return TREO680_MAX_INTENSITY - brightness; 381 return TREO_MAX_INTENSITY - brightness;
270}; 382};
271 383
272static void treo680_backlight_exit(struct device *dev) 384static void treo_backlight_exit(struct device *dev)
273{ 385{
274 gpio_free(GPIO_NR_TREO680_BL_POWER); 386 gpio_free(GPIO_NR_TREO_BL_POWER);
275} 387}
276 388
277static struct platform_pwm_backlight_data treo680_backlight_data = { 389static struct platform_pwm_backlight_data treo_backlight_data = {
278 .pwm_id = 0, 390 .pwm_id = 0,
279 .max_brightness = TREO680_MAX_INTENSITY, 391 .max_brightness = TREO_MAX_INTENSITY,
280 .dft_brightness = TREO680_DEFAULT_INTENSITY, 392 .dft_brightness = TREO_DEFAULT_INTENSITY,
281 .pwm_period_ns = TREO680_PERIOD_NS, 393 .pwm_period_ns = TREO_PERIOD_NS,
282 .init = treo680_backlight_init, 394 .init = treo_backlight_init,
283 .notify = treo680_backlight_notify, 395 .notify = treo_backlight_notify,
284 .exit = treo680_backlight_exit, 396 .exit = treo_backlight_exit,
285}; 397};
286 398
287static struct platform_device treo680_backlight = { 399static struct platform_device treo_backlight = {
288 .name = "pwm-backlight", 400 .name = "pwm-backlight",
289 .dev = { 401 .dev = {
290 .parent = &pxa27x_device_pwm0.dev, 402 .parent = &pxa27x_device_pwm0.dev,
291 .platform_data = &treo680_backlight_data, 403 .platform_data = &treo_backlight_data,
292 }, 404 },
293}; 405};
294 406
295/****************************************************************************** 407/******************************************************************************
296 * IrDA 408 * IrDA
297 ******************************************************************************/ 409 ******************************************************************************/
298static struct pxaficp_platform_data treo680_ficp_info = { 410static struct pxaficp_platform_data treo_ficp_info = {
299 .gpio_pwdown = GPIO_NR_TREO680_IR_EN, 411 .gpio_pwdown = GPIO_NR_TREO_IR_EN,
300 .transceiver_cap = IR_SIRMODE | IR_OFF, 412 .transceiver_cap = IR_SIRMODE | IR_OFF,
301}; 413};
302 414
303/****************************************************************************** 415/******************************************************************************
304 * UDC 416 * UDC
305 ******************************************************************************/ 417 ******************************************************************************/
306static struct pxa2xx_udc_mach_info treo680_udc_info __initdata = { 418static struct pxa2xx_udc_mach_info treo_udc_info __initdata = {
307 .gpio_vbus = GPIO_NR_TREO680_USB_DETECT, 419 .gpio_vbus = GPIO_NR_TREO_USB_DETECT,
308 .gpio_vbus_inverted = 1, 420 .gpio_vbus_inverted = 1,
309 .gpio_pullup = GPIO_NR_TREO680_USB_PULLUP, 421 .gpio_pullup = GPIO_NR_TREO_USB_PULLUP,
310}; 422};
311 423
312 424
313/****************************************************************************** 425/******************************************************************************
314 * USB host 426 * USB host
315 ******************************************************************************/ 427 ******************************************************************************/
428#ifdef CONFIG_MACH_TREO680
316static struct pxaohci_platform_data treo680_ohci_info = { 429static struct pxaohci_platform_data treo680_ohci_info = {
317 .port_mode = PMM_PERPORT_MODE, 430 .port_mode = PMM_PERPORT_MODE,
318 .flags = ENABLE_PORT1 | ENABLE_PORT3, 431 .flags = ENABLE_PORT1 | ENABLE_PORT3,
319 .power_budget = 0, 432 .power_budget = 0,
320}; 433};
434#endif /* CONFIG_MACH_TREO680 */
321 435
322/****************************************************************************** 436/******************************************************************************
323 * Power supply 437 * Power supply
@@ -326,41 +440,41 @@ static int power_supply_init(struct device *dev)
326{ 440{
327 int ret; 441 int ret;
328 442
329 ret = gpio_request(GPIO_NR_TREO680_POWER_DETECT, "CABLE_STATE_AC"); 443 ret = gpio_request(GPIO_NR_TREO_POWER_DETECT, "CABLE_STATE_AC");
330 if (ret) 444 if (ret)
331 goto err1; 445 goto err1;
332 ret = gpio_direction_input(GPIO_NR_TREO680_POWER_DETECT); 446 ret = gpio_direction_input(GPIO_NR_TREO_POWER_DETECT);
333 if (ret) 447 if (ret)
334 goto err2; 448 goto err2;
335 449
336 return 0; 450 return 0;
337 451
338err2: 452err2:
339 gpio_free(GPIO_NR_TREO680_POWER_DETECT); 453 gpio_free(GPIO_NR_TREO_POWER_DETECT);
340err1: 454err1:
341 return ret; 455 return ret;
342} 456}
343 457
344static int treo680_is_ac_online(void) 458static int treo_is_ac_online(void)
345{ 459{
346 return gpio_get_value(GPIO_NR_TREO680_POWER_DETECT); 460 return gpio_get_value(GPIO_NR_TREO_POWER_DETECT);
347} 461}
348 462
349static void power_supply_exit(struct device *dev) 463static void power_supply_exit(struct device *dev)
350{ 464{
351 gpio_free(GPIO_NR_TREO680_POWER_DETECT); 465 gpio_free(GPIO_NR_TREO_POWER_DETECT);
352} 466}
353 467
354static char *treo680_supplicants[] = { 468static char *treo_supplicants[] = {
355 "main-battery", 469 "main-battery",
356}; 470};
357 471
358static struct pda_power_pdata power_supply_info = { 472static struct pda_power_pdata power_supply_info = {
359 .init = power_supply_init, 473 .init = power_supply_init,
360 .is_ac_online = treo680_is_ac_online, 474 .is_ac_online = treo_is_ac_online,
361 .exit = power_supply_exit, 475 .exit = power_supply_exit,
362 .supplied_to = treo680_supplicants, 476 .supplied_to = treo_supplicants,
363 .num_supplicants = ARRAY_SIZE(treo680_supplicants), 477 .num_supplicants = ARRAY_SIZE(treo_supplicants),
364}; 478};
365 479
366static struct platform_device power_supply = { 480static struct platform_device power_supply = {
@@ -374,7 +488,8 @@ static struct platform_device power_supply = {
374/****************************************************************************** 488/******************************************************************************
375 * Vibra and LEDs 489 * Vibra and LEDs
376 ******************************************************************************/ 490 ******************************************************************************/
377static struct gpio_led gpio_leds[] = { 491#ifdef CONFIG_MACH_TREO680
492static struct gpio_led treo680_gpio_leds[] = {
378 { 493 {
379 .name = "treo680:vibra:vibra", 494 .name = "treo680:vibra:vibra",
380 .default_trigger = "none", 495 .default_trigger = "none",
@@ -383,34 +498,68 @@ static struct gpio_led gpio_leds[] = {
383 { 498 {
384 .name = "treo680:green:led", 499 .name = "treo680:green:led",
385 .default_trigger = "mmc0", 500 .default_trigger = "mmc0",
386 .gpio = GPIO_NR_TREO680_GREEN_LED, 501 .gpio = GPIO_NR_TREO_GREEN_LED,
387 }, 502 },
388 { 503 {
389 .name = "treo680:keybbl:keybbl", 504 .name = "treo680:white:keybbl",
390 .default_trigger = "none", 505 .default_trigger = "none",
391 .gpio = GPIO_NR_TREO680_KEYB_BL, 506 .gpio = GPIO_NR_TREO680_KEYB_BL,
392 }, 507 },
393}; 508};
394 509
395static struct gpio_led_platform_data gpio_led_info = { 510static struct gpio_led_platform_data treo680_gpio_led_info = {
396 .leds = gpio_leds, 511 .leds = treo680_gpio_leds,
397 .num_leds = ARRAY_SIZE(gpio_leds), 512 .num_leds = ARRAY_SIZE(treo680_gpio_leds),
398}; 513};
399 514
400static struct platform_device treo680_leds = { 515static struct platform_device treo680_leds = {
401 .name = "leds-gpio", 516 .name = "leds-gpio",
402 .id = -1, 517 .id = -1,
403 .dev = { 518 .dev = {
404 .platform_data = &gpio_led_info, 519 .platform_data = &treo680_gpio_led_info,
405 } 520 }
406}; 521};
522#endif /* CONFIG_MACH_TREO680 */
407 523
524#ifdef CONFIG_MACH_CENTRO
525static struct gpio_led centro_gpio_leds[] = {
526 {
527 .name = "centro:vibra:vibra",
528 .default_trigger = "none",
529 .gpio = GPIO_NR_CENTRO_VIBRATE_EN,
530 },
531 {
532 .name = "centro:green:led",
533 .default_trigger = "mmc0",
534 .gpio = GPIO_NR_TREO_GREEN_LED,
535 },
536 {
537 .name = "centro:white:keybbl",
538 .default_trigger = "none",
539 .active_low = 1,
540 .gpio = GPIO_NR_CENTRO_KEYB_BL,
541 },
542};
543
544static struct gpio_led_platform_data centro_gpio_led_info = {
545 .leds = centro_gpio_leds,
546 .num_leds = ARRAY_SIZE(centro_gpio_leds),
547};
548
549static struct platform_device centro_leds = {
550 .name = "leds-gpio",
551 .id = -1,
552 .dev = {
553 .platform_data = &centro_gpio_led_info,
554 }
555};
556#endif /* CONFIG_MACH_CENTRO */
408 557
409/****************************************************************************** 558/******************************************************************************
410 * Framebuffer 559 * Framebuffer
411 ******************************************************************************/ 560 ******************************************************************************/
412/* TODO: add support for 324x324 */ 561/* TODO: add support for 324x324 */
413static struct pxafb_mode_info treo680_lcd_modes[] = { 562static struct pxafb_mode_info treo_lcd_modes[] = {
414{ 563{
415 .pixclock = 86538, 564 .pixclock = 86538,
416 .xres = 320, 565 .xres = 320,
@@ -427,21 +576,21 @@ static struct pxafb_mode_info treo680_lcd_modes[] = {
427}, 576},
428}; 577};
429 578
430static void treo680_lcd_power(int on, struct fb_var_screeninfo *info) 579static void treo_lcd_power(int on, struct fb_var_screeninfo *info)
431{ 580{
432 gpio_set_value(GPIO_NR_TREO680_BL_POWER, on); 581 gpio_set_value(GPIO_NR_TREO_BL_POWER, on);
433} 582}
434 583
435static struct pxafb_mach_info treo680_lcd_screen = { 584static struct pxafb_mach_info treo_lcd_screen = {
436 .modes = treo680_lcd_modes, 585 .modes = treo_lcd_modes,
437 .num_modes = ARRAY_SIZE(treo680_lcd_modes), 586 .num_modes = ARRAY_SIZE(treo_lcd_modes),
438 .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL, 587 .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
439}; 588};
440 589
441/****************************************************************************** 590/******************************************************************************
442 * Power management - standby 591 * Power management - standby
443 ******************************************************************************/ 592 ******************************************************************************/
444static void __init treo680_pm_init(void) 593static void __init treo_pm_init(void)
445{ 594{
446 static u32 resume[] = { 595 static u32 resume[] = {
447 0xe3a00101, /* mov r0, #0x40000000 */ 596 0xe3a00101, /* mov r0, #0x40000000 */
@@ -450,70 +599,118 @@ static void __init treo680_pm_init(void)
450 }; 599 };
451 600
452 /* this is where the bootloader jumps */ 601 /* this is where the bootloader jumps */
453 memcpy(phys_to_virt(TREO680_STR_BASE), resume, sizeof(resume)); 602 memcpy(phys_to_virt(TREO_STR_BASE), resume, sizeof(resume));
454} 603}
455 604
456/****************************************************************************** 605/******************************************************************************
457 * Machine init 606 * Machine init
458 ******************************************************************************/ 607 ******************************************************************************/
459static struct platform_device *devices[] __initdata = { 608static struct platform_device *treo_devices[] __initdata = {
460 &treo680_backlight, 609 &treo_backlight,
461 &treo680_leds,
462 &power_supply, 610 &power_supply,
463}; 611};
464 612
613#ifdef CONFIG_MACH_TREO680
614static struct platform_device *treo680_devices[] __initdata = {
615 &treo680_leds,
616};
617#endif /* CONFIG_MACH_TREO680 */
618
619#ifdef CONFIG_MACH_CENTRO
620static struct platform_device *centro_devices[] __initdata = {
621 &centro_leds,
622};
623#endif /* CONFIG_MACH_CENTRO */
624
465/* setup udc GPIOs initial state */ 625/* setup udc GPIOs initial state */
466static void __init treo680_udc_init(void) 626static void __init treo_udc_init(void)
467{ 627{
468 if (!gpio_request(GPIO_NR_TREO680_USB_PULLUP, "UDC Vbus")) { 628 if (!gpio_request(GPIO_NR_TREO_USB_PULLUP, "UDC Vbus")) {
469 gpio_direction_output(GPIO_NR_TREO680_USB_PULLUP, 1); 629 gpio_direction_output(GPIO_NR_TREO_USB_PULLUP, 1);
470 gpio_free(GPIO_NR_TREO680_USB_PULLUP); 630 gpio_free(GPIO_NR_TREO_USB_PULLUP);
471 } 631 }
472} 632}
473 633
474static void __init treo680_lcd_power_init(void) 634static void __init treo_lcd_power_init(void)
475{ 635{
476 int ret; 636 int ret;
477 637
478 ret = gpio_request(GPIO_NR_TREO680_LCD_POWER, "LCD POWER"); 638 ret = gpio_request(GPIO_NR_TREO_LCD_POWER, "LCD POWER");
479 if (ret) { 639 if (ret) {
480 pr_err("Treo680: LCD power GPIO request failed!\n"); 640 pr_err("Treo680: LCD power GPIO request failed!\n");
481 return; 641 return;
482 } 642 }
483 643
484 ret = gpio_direction_output(GPIO_NR_TREO680_LCD_POWER, 0); 644 ret = gpio_direction_output(GPIO_NR_TREO_LCD_POWER, 0);
485 if (ret) { 645 if (ret) {
486 pr_err("Treo680: setting LCD power GPIO direction failed!\n"); 646 pr_err("Treo680: setting LCD power GPIO direction failed!\n");
487 gpio_free(GPIO_NR_TREO680_LCD_POWER); 647 gpio_free(GPIO_NR_TREO_LCD_POWER);
488 return; 648 return;
489 } 649 }
490 650
491 treo680_lcd_screen.pxafb_lcd_power = treo680_lcd_power; 651 treo_lcd_screen.pxafb_lcd_power = treo_lcd_power;
492} 652}
493 653
654static void __init treo_init(void)
655{
656 pxa_set_ffuart_info(NULL);
657 pxa_set_btuart_info(NULL);
658 pxa_set_stuart_info(NULL);
659
660 treo_pm_init();
661 pxa2xx_mfp_config(ARRAY_AND_SIZE(treo_pin_config));
662 treo_lcd_power_init();
663 set_pxa_fb_info(&treo_lcd_screen);
664 treo_udc_init();
665 pxa_set_udc_info(&treo_udc_info);
666 pxa_set_ac97_info(&treo_ac97_pdata);
667 pxa_set_ficp_info(&treo_ficp_info);
668
669 platform_add_devices(ARRAY_AND_SIZE(treo_devices));
670}
671
672#ifdef CONFIG_MACH_TREO680
494static void __init treo680_init(void) 673static void __init treo680_init(void)
495{ 674{
496 treo680_pm_init(); 675 treo_init();
497 pxa2xx_mfp_config(ARRAY_AND_SIZE(treo680_pin_config)); 676 pxa2xx_mfp_config(ARRAY_AND_SIZE(treo680_pin_config));
498 pxa_set_keypad_info(&treo680_keypad_platform_data);
499 treo680_lcd_power_init();
500 set_pxa_fb_info(&treo680_lcd_screen);
501 pxa_set_mci_info(&treo680_mci_platform_data); 677 pxa_set_mci_info(&treo680_mci_platform_data);
502 treo680_udc_init(); 678 pxa_set_keypad_info(&treo680_keypad_platform_data);
503 pxa_set_udc_info(&treo680_udc_info);
504 pxa_set_ac97_info(&treo680_ac97_pdata);
505 pxa_set_ficp_info(&treo680_ficp_info);
506 pxa_set_ohci_info(&treo680_ohci_info); 679 pxa_set_ohci_info(&treo680_ohci_info);
507 680
508 platform_add_devices(devices, ARRAY_SIZE(devices)); 681 platform_add_devices(ARRAY_AND_SIZE(treo680_devices));
509} 682}
510 683
511MACHINE_START(TREO680, "Palm Treo 680") 684MACHINE_START(TREO680, "Palm Treo 680")
512 .phys_io = TREO680_PHYS_IO_START, 685 .phys_io = TREO_PHYS_IO_START,
513 .io_pg_offst = io_p2v(0x40000000), 686 .io_pg_offst = io_p2v(0x40000000),
514 .boot_params = 0xa0000100, 687 .boot_params = 0xa0000100,
515 .map_io = pxa_map_io, 688 .map_io = pxa_map_io,
516 .init_irq = pxa27x_init_irq, 689 .init_irq = pxa27x_init_irq,
517 .timer = &pxa_timer, 690 .timer = &pxa_timer,
518 .init_machine = treo680_init, 691 .init_machine = treo680_init,
692MACHINE_END
693#endif /* CONFIG_MACH_TREO680 */
694
695#ifdef CONFIG_MACH_CENTRO
696static void __init centro_init(void)
697{
698 treo_init();
699 pxa2xx_mfp_config(ARRAY_AND_SIZE(centro685_pin_config));
700 pxa_set_mci_info(&centro_mci_platform_data);
701
702 pxa_set_keypad_info(&centro_keypad_platform_data);
703
704 platform_add_devices(ARRAY_AND_SIZE(centro_devices));
705}
706
707MACHINE_START(CENTRO, "Palm Centro 685")
708 .phys_io = TREO_PHYS_IO_START,
709 .io_pg_offst = io_p2v(0x40000000),
710 .boot_params = 0xa0000100,
711 .map_io = pxa_map_io,
712 .init_irq = pxa27x_init_irq,
713 .timer = &pxa_timer,
714 .init_machine = centro_init,
519MACHINE_END 715MACHINE_END
716#endif /* CONFIG_MACH_CENTRO */
diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c
index 76a2b37eaf30..7bf18c2f002f 100644
--- a/arch/arm/mach-pxa/palmtx.c
+++ b/arch/arm/mach-pxa/palmtx.c
@@ -570,6 +570,10 @@ static void __init palmtx_init(void)
570{ 570{
571 pxa2xx_mfp_config(ARRAY_AND_SIZE(palmtx_pin_config)); 571 pxa2xx_mfp_config(ARRAY_AND_SIZE(palmtx_pin_config));
572 572
573 pxa_set_ffuart_info(NULL);
574 pxa_set_btuart_info(NULL);
575 pxa_set_stuart_info(NULL);
576
573 palmtx_pm_init(); 577 palmtx_pm_init();
574 set_pxa_fb_info(&palmtx_lcd_screen); 578 set_pxa_fb_info(&palmtx_lcd_screen);
575 pxa_set_mci_info(&palmtx_mci_platform_data); 579 pxa_set_mci_info(&palmtx_mci_platform_data);
diff --git a/arch/arm/mach-pxa/palmz72.c b/arch/arm/mach-pxa/palmz72.c
index c2bf493c5f53..d787ac7cfdd8 100644
--- a/arch/arm/mach-pxa/palmz72.c
+++ b/arch/arm/mach-pxa/palmz72.c
@@ -491,6 +491,10 @@ static void __init palmz72_init(void)
491{ 491{
492 pxa2xx_mfp_config(ARRAY_AND_SIZE(palmz72_pin_config)); 492 pxa2xx_mfp_config(ARRAY_AND_SIZE(palmz72_pin_config));
493 493
494 pxa_set_ffuart_info(NULL);
495 pxa_set_btuart_info(NULL);
496 pxa_set_stuart_info(NULL);
497
494 set_pxa_fb_info(&palmz72_lcd_screen); 498 set_pxa_fb_info(&palmz72_lcd_screen);
495 pxa_set_mci_info(&palmz72_mci_platform_data); 499 pxa_set_mci_info(&palmz72_mci_platform_data);
496 palmz72_udc_init(); 500 palmz72_udc_init();
diff --git a/arch/arm/mach-pxa/pcm027.c b/arch/arm/mach-pxa/pcm027.c
index 6abfa2979c61..2190af066470 100644
--- a/arch/arm/mach-pxa/pcm027.c
+++ b/arch/arm/mach-pxa/pcm027.c
@@ -227,6 +227,10 @@ static void __init pcm027_init(void)
227 227
228 pxa2xx_mfp_config(pcm027_pin_config, ARRAY_SIZE(pcm027_pin_config)); 228 pxa2xx_mfp_config(pcm027_pin_config, ARRAY_SIZE(pcm027_pin_config));
229 229
230 pxa_set_ffuart_info(NULL);
231 pxa_set_btuart_info(NULL);
232 pxa_set_stuart_info(NULL);
233
230 platform_add_devices(devices, ARRAY_SIZE(devices)); 234 platform_add_devices(devices, ARRAY_SIZE(devices));
231 235
232 /* at last call the baseboard to initialize itself */ 236 /* at last call the baseboard to initialize itself */
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c
index bbda57078e0f..d5255ae74fe3 100644
--- a/arch/arm/mach-pxa/pcm990-baseboard.c
+++ b/arch/arm/mach-pxa/pcm990-baseboard.c
@@ -359,19 +359,12 @@ static unsigned long pcm990_camera_pin_config[] = {
359 GPIO44_CIF_LV, 359 GPIO44_CIF_LV,
360}; 360};
361 361
362static int pcm990_pxacamera_init(struct device *dev)
363{
364 pxa2xx_mfp_config(ARRAY_AND_SIZE(pcm990_camera_pin_config));
365 return 0;
366}
367
368/* 362/*
369 * CICR4: PCLK_EN: Pixel clock is supplied by the sensor 363 * CICR4: PCLK_EN: Pixel clock is supplied by the sensor
370 * MCLK_EN: Master clock is generated by PXA 364 * MCLK_EN: Master clock is generated by PXA
371 * PCP: Data sampled on the falling edge of pixel clock 365 * PCP: Data sampled on the falling edge of pixel clock
372 */ 366 */
373struct pxacamera_platform_data pcm990_pxacamera_platform_data = { 367struct pxacamera_platform_data pcm990_pxacamera_platform_data = {
374 .init = pcm990_pxacamera_init,
375 .flags = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 | PXA_CAMERA_DATAWIDTH_10 | 368 .flags = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 | PXA_CAMERA_DATAWIDTH_10 |
376 PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN/* | PXA_CAMERA_PCP*/, 369 PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN/* | PXA_CAMERA_PCP*/,
377 .mclk_10khz = 1000, 370 .mclk_10khz = 1000,
@@ -532,6 +525,7 @@ void __init pcm990_baseboard_init(void)
532 pxa_set_ac97_info(NULL); 525 pxa_set_ac97_info(NULL);
533 526
534#if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE) 527#if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE)
528 pxa2xx_mfp_config(ARRAY_AND_SIZE(pcm990_camera_pin_config));
535 pxa_set_camera_info(&pcm990_pxacamera_platform_data); 529 pxa_set_camera_info(&pcm990_pxacamera_platform_data);
536 530
537 i2c_register_board_info(0, ARRAY_AND_SIZE(pcm990_i2c_devices)); 531 i2c_register_board_info(0, ARRAY_AND_SIZE(pcm990_i2c_devices));
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
index a186994f77fb..e5eeb3a62d01 100644
--- a/arch/arm/mach-pxa/poodle.c
+++ b/arch/arm/mach-pxa/poodle.c
@@ -449,6 +449,10 @@ static void __init poodle_init(void)
449 449
450 pxa2xx_mfp_config(ARRAY_AND_SIZE(poodle_pin_config)); 450 pxa2xx_mfp_config(ARRAY_AND_SIZE(poodle_pin_config));
451 451
452 pxa_set_ffuart_info(NULL);
453 pxa_set_btuart_info(NULL);
454 pxa_set_stuart_info(NULL);
455
452 platform_scoop_config = &poodle_pcmcia_config; 456 platform_scoop_config = &poodle_pcmcia_config;
453 457
454 ret = platform_add_devices(devices, ARRAY_SIZE(devices)); 458 ret = platform_add_devices(devices, ARRAY_SIZE(devices));
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
index 77c2693cfeef..2c1b0b70d01d 100644
--- a/arch/arm/mach-pxa/pxa25x.c
+++ b/arch/arm/mach-pxa/pxa25x.c
@@ -322,9 +322,6 @@ void __init pxa26x_init_irq(void)
322 322
323static struct platform_device *pxa25x_devices[] __initdata = { 323static struct platform_device *pxa25x_devices[] __initdata = {
324 &pxa25x_device_udc, 324 &pxa25x_device_udc,
325 &pxa_device_ffuart,
326 &pxa_device_btuart,
327 &pxa_device_stuart,
328 &pxa_device_i2s, 325 &pxa_device_i2s,
329 &sa1100_device_rtc, 326 &sa1100_device_rtc,
330 &pxa25x_device_ssp, 327 &pxa25x_device_ssp,
@@ -372,10 +369,8 @@ static int __init pxa25x_init(void)
372 } 369 }
373 370
374 /* Only add HWUART for PXA255/26x; PXA210/250 do not have it. */ 371 /* Only add HWUART for PXA255/26x; PXA210/250 do not have it. */
375 if (cpu_is_pxa255()) { 372 if (cpu_is_pxa255())
376 clks_register(&pxa25x_hwuart_clkreg, 1); 373 clks_register(&pxa25x_hwuart_clkreg, 1);
377 ret = platform_device_register(&pxa_device_hwuart);
378 }
379 374
380 return ret; 375 return ret;
381} 376}
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
index ec68cc16b4e3..6a0b73167e03 100644
--- a/arch/arm/mach-pxa/pxa27x.c
+++ b/arch/arm/mach-pxa/pxa27x.c
@@ -364,9 +364,6 @@ void __init pxa27x_set_i2c_power_info(struct i2c_pxa_platform_data *info)
364 364
365static struct platform_device *devices[] __initdata = { 365static struct platform_device *devices[] __initdata = {
366 &pxa27x_device_udc, 366 &pxa27x_device_udc,
367 &pxa_device_ffuart,
368 &pxa_device_btuart,
369 &pxa_device_stuart,
370 &pxa_device_i2s, 367 &pxa_device_i2s,
371 &sa1100_device_rtc, 368 &sa1100_device_rtc,
372 &pxa_device_rtc, 369 &pxa_device_rtc,
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index 09b7b1a10cad..fcb0721f4669 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -30,6 +30,7 @@
30#include <mach/pm.h> 30#include <mach/pm.h>
31#include <mach/dma.h> 31#include <mach/dma.h>
32#include <mach/ssp.h> 32#include <mach/ssp.h>
33#include <mach/regs-intc.h>
33#include <plat/i2c.h> 34#include <plat/i2c.h>
34 35
35#include "generic.h" 36#include "generic.h"
@@ -45,6 +46,9 @@
45#define ACCR_D0CS (1 << 26) 46#define ACCR_D0CS (1 << 26)
46#define ACCR_PCCE (1 << 11) 47#define ACCR_PCCE (1 << 11)
47 48
49#define PECR_IE(n) ((1 << ((n) * 2)) << 28)
50#define PECR_IS(n) ((1 << ((n) * 2)) << 29)
51
48/* crystal frequency to static memory controller multiplier (SMCFS) */ 52/* crystal frequency to static memory controller multiplier (SMCFS) */
49static unsigned char smcfs_mult[8] = { 6, 0, 8, 0, 0, 16, }; 53static unsigned char smcfs_mult[8] = { 6, 0, 8, 0, 0, 16, };
50 54
@@ -237,6 +241,7 @@ static DEFINE_PXA3_CKEN(pxa3xx_stuart, STUART, 14857000, 1);
237static DEFINE_PXA3_CKEN(pxa3xx_i2c, I2C, 32842000, 0); 241static DEFINE_PXA3_CKEN(pxa3xx_i2c, I2C, 32842000, 0);
238static DEFINE_PXA3_CKEN(pxa3xx_udc, UDC, 48000000, 5); 242static DEFINE_PXA3_CKEN(pxa3xx_udc, UDC, 48000000, 5);
239static DEFINE_PXA3_CKEN(pxa3xx_usbh, USBH, 48000000, 0); 243static DEFINE_PXA3_CKEN(pxa3xx_usbh, USBH, 48000000, 0);
244static DEFINE_PXA3_CKEN(pxa3xx_u2d, USB2, 48000000, 0);
240static DEFINE_PXA3_CKEN(pxa3xx_keypad, KEYPAD, 32768, 0); 245static DEFINE_PXA3_CKEN(pxa3xx_keypad, KEYPAD, 32768, 0);
241static DEFINE_PXA3_CKEN(pxa3xx_ssp1, SSP1, 13000000, 0); 246static DEFINE_PXA3_CKEN(pxa3xx_ssp1, SSP1, 13000000, 0);
242static DEFINE_PXA3_CKEN(pxa3xx_ssp2, SSP2, 13000000, 0); 247static DEFINE_PXA3_CKEN(pxa3xx_ssp2, SSP2, 13000000, 0);
@@ -261,6 +266,7 @@ static struct clk_lookup pxa3xx_clkregs[] = {
261 INIT_CLKREG(&clk_pxa3xx_i2c, "pxa2xx-i2c.0", NULL), 266 INIT_CLKREG(&clk_pxa3xx_i2c, "pxa2xx-i2c.0", NULL),
262 INIT_CLKREG(&clk_pxa3xx_udc, "pxa27x-udc", NULL), 267 INIT_CLKREG(&clk_pxa3xx_udc, "pxa27x-udc", NULL),
263 INIT_CLKREG(&clk_pxa3xx_usbh, "pxa27x-ohci", NULL), 268 INIT_CLKREG(&clk_pxa3xx_usbh, "pxa27x-ohci", NULL),
269 INIT_CLKREG(&clk_pxa3xx_u2d, NULL, "U2DCLK"),
264 INIT_CLKREG(&clk_pxa3xx_keypad, "pxa27x-keypad", NULL), 270 INIT_CLKREG(&clk_pxa3xx_keypad, "pxa27x-keypad", NULL),
265 INIT_CLKREG(&clk_pxa3xx_ssp1, "pxa27x-ssp.0", NULL), 271 INIT_CLKREG(&clk_pxa3xx_ssp1, "pxa27x-ssp.0", NULL),
266 INIT_CLKREG(&clk_pxa3xx_ssp2, "pxa27x-ssp.1", NULL), 272 INIT_CLKREG(&clk_pxa3xx_ssp2, "pxa27x-ssp.1", NULL),
@@ -530,6 +536,43 @@ static inline void pxa3xx_init_pm(void) {}
530#define pxa3xx_set_wake NULL 536#define pxa3xx_set_wake NULL
531#endif 537#endif
532 538
539static void pxa_ack_ext_wakeup(unsigned int irq)
540{
541 PECR |= PECR_IS(irq - IRQ_WAKEUP0);
542}
543
544static void pxa_mask_ext_wakeup(unsigned int irq)
545{
546 ICMR2 &= ~(1 << ((irq - PXA_IRQ(0)) & 0x1f));
547 PECR &= ~PECR_IE(irq - IRQ_WAKEUP0);
548}
549
550static void pxa_unmask_ext_wakeup(unsigned int irq)
551{
552 ICMR2 |= 1 << ((irq - PXA_IRQ(0)) & 0x1f);
553 PECR |= PECR_IE(irq - IRQ_WAKEUP0);
554}
555
556static struct irq_chip pxa_ext_wakeup_chip = {
557 .name = "WAKEUP",
558 .ack = pxa_ack_ext_wakeup,
559 .mask = pxa_mask_ext_wakeup,
560 .unmask = pxa_unmask_ext_wakeup,
561};
562
563static void __init pxa_init_ext_wakeup_irq(set_wake_t fn)
564{
565 int irq;
566
567 for (irq = IRQ_WAKEUP0; irq <= IRQ_WAKEUP1; irq++) {
568 set_irq_chip(irq, &pxa_ext_wakeup_chip);
569 set_irq_handler(irq, handle_edge_irq);
570 set_irq_flags(irq, IRQF_VALID);
571 }
572
573 pxa_ext_wakeup_chip.set_wake = fn;
574}
575
533void __init pxa3xx_init_irq(void) 576void __init pxa3xx_init_irq(void)
534{ 577{
535 /* enable CP6 access */ 578 /* enable CP6 access */
@@ -539,6 +582,7 @@ void __init pxa3xx_init_irq(void)
539 __asm__ __volatile__("mcr p15, 0, %0, c15, c1, 0\n": :"r"(value)); 582 __asm__ __volatile__("mcr p15, 0, %0, c15, c1, 0\n": :"r"(value));
540 583
541 pxa_init_irq(56, pxa3xx_set_wake); 584 pxa_init_irq(56, pxa3xx_set_wake);
585 pxa_init_ext_wakeup_irq(pxa3xx_set_wake);
542 pxa_init_gpio(IRQ_GPIO_2_x, 2, 127, NULL); 586 pxa_init_gpio(IRQ_GPIO_2_x, 2, 127, NULL);
543} 587}
544 588
@@ -553,9 +597,6 @@ void __init pxa3xx_set_i2c_power_info(struct i2c_pxa_platform_data *info)
553 597
554static struct platform_device *devices[] __initdata = { 598static struct platform_device *devices[] __initdata = {
555 &pxa27x_device_udc, 599 &pxa27x_device_udc,
556 &pxa_device_ffuart,
557 &pxa_device_btuart,
558 &pxa_device_stuart,
559 &pxa_device_i2s, 600 &pxa_device_i2s,
560 &sa1100_device_rtc, 601 &sa1100_device_rtc,
561 &pxa_device_rtc, 602 &pxa_device_rtc,
diff --git a/arch/arm/mach-pxa/saar.c b/arch/arm/mach-pxa/saar.c
index 8241a63ea589..115b6f234bdd 100644
--- a/arch/arm/mach-pxa/saar.c
+++ b/arch/arm/mach-pxa/saar.c
@@ -22,9 +22,13 @@
22#include <linux/i2c.h> 22#include <linux/i2c.h>
23#include <linux/smc91x.h> 23#include <linux/smc91x.h>
24#include <linux/mfd/da903x.h> 24#include <linux/mfd/da903x.h>
25#include <linux/mtd/mtd.h>
26#include <linux/mtd/partitions.h>
27#include <linux/mtd/onenand.h>
25 28
26#include <asm/mach-types.h> 29#include <asm/mach-types.h>
27#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
31#include <asm/mach/flash.h>
28 32
29#include <mach/pxa930.h> 33#include <mach/pxa930.h>
30#include <plat/i2c.h> 34#include <plat/i2c.h>
@@ -33,7 +37,7 @@
33#include "devices.h" 37#include "devices.h"
34#include "generic.h" 38#include "generic.h"
35 39
36#define GPIO_LCD_RESET (16) 40#define GPIO_LCD_RESET (16)
37 41
38/* SAAR MFP configurations */ 42/* SAAR MFP configurations */
39static mfp_cfg_t saar_mfp_cfg[] __initdata = { 43static mfp_cfg_t saar_mfp_cfg[] __initdata = {
@@ -56,6 +60,31 @@ static mfp_cfg_t saar_mfp_cfg[] __initdata = {
56 /* Ethernet */ 60 /* Ethernet */
57 DF_nCS1_nCS3, 61 DF_nCS1_nCS3,
58 GPIO97_GPIO, 62 GPIO97_GPIO,
63
64 /* DFI */
65 DF_INT_RnB_ND_INT_RnB,
66 DF_nRE_nOE_ND_nRE,
67 DF_nWE_ND_nWE,
68 DF_CLE_nOE_ND_CLE,
69 DF_nADV1_ALE_ND_ALE,
70 DF_nADV2_ALE_nCS3,
71 DF_nCS0_ND_nCS0,
72 DF_IO0_ND_IO0,
73 DF_IO1_ND_IO1,
74 DF_IO2_ND_IO2,
75 DF_IO3_ND_IO3,
76 DF_IO4_ND_IO4,
77 DF_IO5_ND_IO5,
78 DF_IO6_ND_IO6,
79 DF_IO7_ND_IO7,
80 DF_IO8_ND_IO8,
81 DF_IO9_ND_IO9,
82 DF_IO10_ND_IO10,
83 DF_IO11_ND_IO11,
84 DF_IO12_ND_IO12,
85 DF_IO13_ND_IO13,
86 DF_IO14_ND_IO14,
87 DF_IO15_ND_IO15,
59}; 88};
60 89
61#define SAAR_ETH_PHYS (0x14000000) 90#define SAAR_ETH_PHYS (0x14000000)
@@ -451,10 +480,15 @@ static inline void saar_init_lcd(void) {}
451#endif 480#endif
452 481
453#if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE) 482#if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE)
483static struct da9034_backlight_pdata saar_da9034_backlight = {
484 .output_current = 4, /* 4mA */
485};
486
454static struct da903x_subdev_info saar_da9034_subdevs[] = { 487static struct da903x_subdev_info saar_da9034_subdevs[] = {
455 [0] = { 488 [0] = {
456 .name = "da903x-backlight", 489 .name = "da903x-backlight",
457 .id = DA9034_ID_WLED, 490 .id = DA9034_ID_WLED,
491 .platform_data = &saar_da9034_backlight,
458 }, 492 },
459}; 493};
460 494
@@ -480,12 +514,81 @@ static void __init saar_init_i2c(void)
480#else 514#else
481static inline void saar_init_i2c(void) {} 515static inline void saar_init_i2c(void) {}
482#endif 516#endif
517
518#if defined(CONFIG_MTD_ONENAND) || defined(CONFIG_MTD_ONENAND_MODULE)
519static struct mtd_partition saar_onenand_partitions[] = {
520 {
521 .name = "bootloader",
522 .offset = 0,
523 .size = SZ_1M,
524 .mask_flags = MTD_WRITEABLE,
525 }, {
526 .name = "reserved",
527 .offset = MTDPART_OFS_APPEND,
528 .size = SZ_128K,
529 .mask_flags = MTD_WRITEABLE,
530 }, {
531 .name = "reserved",
532 .offset = MTDPART_OFS_APPEND,
533 .size = SZ_8M,
534 .mask_flags = MTD_WRITEABLE,
535 }, {
536 .name = "kernel",
537 .offset = MTDPART_OFS_APPEND,
538 .size = (SZ_2M + SZ_1M),
539 .mask_flags = 0,
540 }, {
541 .name = "filesystem",
542 .offset = MTDPART_OFS_APPEND,
543 .size = SZ_48M,
544 .mask_flags = 0,
545 }
546};
547
548static struct onenand_platform_data saar_onenand_info = {
549 .parts = saar_onenand_partitions,
550 .nr_parts = ARRAY_SIZE(saar_onenand_partitions),
551};
552
553#define SMC_CS0_PHYS_BASE (0x10000000)
554
555static struct resource saar_resource_onenand[] = {
556 [0] = {
557 .start = SMC_CS0_PHYS_BASE,
558 .end = SMC_CS0_PHYS_BASE + SZ_1M,
559 .flags = IORESOURCE_MEM,
560 },
561};
562
563static struct platform_device saar_device_onenand = {
564 .name = "onenand-flash",
565 .id = -1,
566 .dev = {
567 .platform_data = &saar_onenand_info,
568 },
569 .resource = saar_resource_onenand,
570 .num_resources = ARRAY_SIZE(saar_resource_onenand),
571};
572
573static void __init saar_init_onenand(void)
574{
575 platform_device_register(&saar_device_onenand);
576}
577#else
578static void __init saar_init_onenand(void) {}
579#endif
580
483static void __init saar_init(void) 581static void __init saar_init(void)
484{ 582{
485 /* initialize MFP configurations */ 583 /* initialize MFP configurations */
486 pxa3xx_mfp_config(ARRAY_AND_SIZE(saar_mfp_cfg)); 584 pxa3xx_mfp_config(ARRAY_AND_SIZE(saar_mfp_cfg));
487 585
586 pxa_set_ffuart_info(NULL);
587 pxa_set_btuart_info(NULL);
588 pxa_set_stuart_info(NULL);
589
488 platform_device_register(&smc91x_device); 590 platform_device_register(&smc91x_device);
591 saar_init_onenand();
489 592
490 saar_init_i2c(); 593 saar_init_i2c();
491 saar_init_lcd(); 594 saar_init_lcd();
diff --git a/arch/arm/mach-pxa/sharpsl.h b/arch/arm/mach-pxa/sharpsl.h
index 55259f4756c8..1439785d3979 100644
--- a/arch/arm/mach-pxa/sharpsl.h
+++ b/arch/arm/mach-pxa/sharpsl.h
@@ -42,8 +42,8 @@ void corgi_lcdtg_hw_init(int mode);
42#define MAX1111_BATT_TEMP 2u 42#define MAX1111_BATT_TEMP 2u
43#define MAX1111_ACIN_VOLT 6u 43#define MAX1111_ACIN_VOLT 6u
44 44
45extern struct battery_thresh spitz_battery_levels_acin[]; 45extern struct battery_thresh sharpsl_battery_levels_acin[];
46extern struct battery_thresh spitz_battery_levels_noac[]; 46extern struct battery_thresh sharpsl_battery_levels_noac[];
47int sharpsl_pm_pxa_read_max1111(int channel); 47int sharpsl_pm_pxa_read_max1111(int channel);
48 48
49 49
diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c
index 629e05d1196e..67229a1ef55c 100644
--- a/arch/arm/mach-pxa/sharpsl_pm.c
+++ b/arch/arm/mach-pxa/sharpsl_pm.c
@@ -78,7 +78,7 @@ DEFINE_LED_TRIGGER(sharpsl_charge_led_trigger);
78 78
79 79
80 80
81struct battery_thresh spitz_battery_levels_acin[] = { 81struct battery_thresh sharpsl_battery_levels_acin[] = {
82 { 213, 100}, 82 { 213, 100},
83 { 212, 98}, 83 { 212, 98},
84 { 211, 95}, 84 { 211, 95},
@@ -121,7 +121,7 @@ struct battery_thresh spitz_battery_levels_acin[] = {
121 { 0, 0}, 121 { 0, 0},
122}; 122};
123 123
124struct battery_thresh spitz_battery_levels_noac[] = { 124struct battery_thresh sharpsl_battery_levels_noac[] = {
125 { 213, 100}, 125 { 213, 100},
126 { 212, 98}, 126 { 212, 98},
127 { 211, 95}, 127 { 211, 95},
@@ -165,19 +165,20 @@ struct battery_thresh spitz_battery_levels_noac[] = {
165}; 165};
166 166
167/* MAX1111 Commands */ 167/* MAX1111 Commands */
168#define MAXCTRL_PD0 1u << 0 168#define MAXCTRL_PD0 (1u << 0)
169#define MAXCTRL_PD1 1u << 1 169#define MAXCTRL_PD1 (1u << 1)
170#define MAXCTRL_SGL 1u << 2 170#define MAXCTRL_SGL (1u << 2)
171#define MAXCTRL_UNI 1u << 3 171#define MAXCTRL_UNI (1u << 3)
172#define MAXCTRL_SEL_SH 4 172#define MAXCTRL_SEL_SH 4
173#define MAXCTRL_STR 1u << 7 173#define MAXCTRL_STR (1u << 7)
174 174
175/* 175/*
176 * Read MAX1111 ADC 176 * Read MAX1111 ADC
177 */ 177 */
178int sharpsl_pm_pxa_read_max1111(int channel) 178int sharpsl_pm_pxa_read_max1111(int channel)
179{ 179{
180 if (machine_is_tosa()) // Ugly, better move this function into another module 180 /* Ugly, better move this function into another module */
181 if (machine_is_tosa())
181 return 0; 182 return 0;
182 183
183#ifdef CONFIG_CORGI_SSP_DEPRECATED 184#ifdef CONFIG_CORGI_SSP_DEPRECATED
@@ -238,7 +239,7 @@ EXPORT_SYMBOL(sharpsl_battery_kick);
238 239
239static void sharpsl_battery_thread(struct work_struct *private_) 240static void sharpsl_battery_thread(struct work_struct *private_)
240{ 241{
241 int voltage, percent, apm_status, i = 0; 242 int voltage, percent, apm_status, i;
242 243
243 if (!sharpsl_pm.machinfo) 244 if (!sharpsl_pm.machinfo)
244 return; 245 return;
@@ -250,15 +251,14 @@ static void sharpsl_battery_thread(struct work_struct *private_)
250 && time_after(jiffies, sharpsl_pm.charge_start_time + SHARPSL_CHARGE_ON_TIME_INTERVAL)) 251 && time_after(jiffies, sharpsl_pm.charge_start_time + SHARPSL_CHARGE_ON_TIME_INTERVAL))
251 schedule_delayed_work(&toggle_charger, 0); 252 schedule_delayed_work(&toggle_charger, 0);
252 253
253 while(1) { 254 for (i = 0; i < 5; i++) {
254 voltage = sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT); 255 voltage = sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT);
255 256 if (voltage > 0)
256 if (voltage > 0) break;
257 if (i++ > 5) {
258 voltage = sharpsl_pm.machinfo->bat_levels_noac[0].voltage;
259 dev_warn(sharpsl_pm.dev, "Warning: Cannot read main battery!\n");
260 break; 257 break;
261 } 258 }
259 if (voltage <= 0) {
260 voltage = sharpsl_pm.machinfo->bat_levels_noac[0].voltage;
261 dev_warn(sharpsl_pm.dev, "Warning: Cannot read main battery!\n");
262 } 262 }
263 263
264 voltage = sharpsl_average_value(voltage); 264 voltage = sharpsl_average_value(voltage);
@@ -266,8 +266,10 @@ static void sharpsl_battery_thread(struct work_struct *private_)
266 percent = get_percentage(voltage); 266 percent = get_percentage(voltage);
267 267
268 /* At low battery voltages, the voltage has a tendency to start 268 /* At low battery voltages, the voltage has a tendency to start
269 creeping back up so we try to avoid this here */ 269 creeping back up so we try to avoid this here */
270 if ((sharpsl_pm.battstat.ac_status == APM_AC_ONLINE) || (apm_status == APM_BATTERY_STATUS_HIGH) || percent <= sharpsl_pm.battstat.mainbat_percent) { 270 if ((sharpsl_pm.battstat.ac_status == APM_AC_ONLINE)
271 || (apm_status == APM_BATTERY_STATUS_HIGH)
272 || percent <= sharpsl_pm.battstat.mainbat_percent) {
271 sharpsl_pm.battstat.mainbat_voltage = voltage; 273 sharpsl_pm.battstat.mainbat_voltage = voltage;
272 sharpsl_pm.battstat.mainbat_status = apm_status; 274 sharpsl_pm.battstat.mainbat_status = apm_status;
273 sharpsl_pm.battstat.mainbat_percent = percent; 275 sharpsl_pm.battstat.mainbat_percent = percent;
@@ -279,8 +281,8 @@ static void sharpsl_battery_thread(struct work_struct *private_)
279#ifdef CONFIG_BACKLIGHT_CORGI 281#ifdef CONFIG_BACKLIGHT_CORGI
280 /* If battery is low. limit backlight intensity to save power. */ 282 /* If battery is low. limit backlight intensity to save power. */
281 if ((sharpsl_pm.battstat.ac_status != APM_AC_ONLINE) 283 if ((sharpsl_pm.battstat.ac_status != APM_AC_ONLINE)
282 && ((sharpsl_pm.battstat.mainbat_status == APM_BATTERY_STATUS_LOW) || 284 && ((sharpsl_pm.battstat.mainbat_status == APM_BATTERY_STATUS_LOW)
283 (sharpsl_pm.battstat.mainbat_status == APM_BATTERY_STATUS_CRITICAL))) { 285 || (sharpsl_pm.battstat.mainbat_status == APM_BATTERY_STATUS_CRITICAL))) {
284 if (!(sharpsl_pm.flags & SHARPSL_BL_LIMIT)) { 286 if (!(sharpsl_pm.flags & SHARPSL_BL_LIMIT)) {
285 sharpsl_pm.machinfo->backlight_limit(1); 287 sharpsl_pm.machinfo->backlight_limit(1);
286 sharpsl_pm.flags |= SHARPSL_BL_LIMIT; 288 sharpsl_pm.flags |= SHARPSL_BL_LIMIT;
@@ -293,8 +295,8 @@ static void sharpsl_battery_thread(struct work_struct *private_)
293 295
294 /* Suspend if critical battery level */ 296 /* Suspend if critical battery level */
295 if ((sharpsl_pm.battstat.ac_status != APM_AC_ONLINE) 297 if ((sharpsl_pm.battstat.ac_status != APM_AC_ONLINE)
296 && (sharpsl_pm.battstat.mainbat_status == APM_BATTERY_STATUS_CRITICAL) 298 && (sharpsl_pm.battstat.mainbat_status == APM_BATTERY_STATUS_CRITICAL)
297 && !(sharpsl_pm.flags & SHARPSL_APM_QUEUED)) { 299 && !(sharpsl_pm.flags & SHARPSL_APM_QUEUED)) {
298 sharpsl_pm.flags |= SHARPSL_APM_QUEUED; 300 sharpsl_pm.flags |= SHARPSL_APM_QUEUED;
299 dev_err(sharpsl_pm.dev, "Fatal Off\n"); 301 dev_err(sharpsl_pm.dev, "Fatal Off\n");
300 apm_queue_event(APM_CRITICAL_SUSPEND); 302 apm_queue_event(APM_CRITICAL_SUSPEND);
@@ -346,7 +348,7 @@ static void sharpsl_charge_error(void)
346 348
347static void sharpsl_charge_toggle(struct work_struct *private_) 349static void sharpsl_charge_toggle(struct work_struct *private_)
348{ 350{
349 dev_dbg(sharpsl_pm.dev, "Toogling Charger at time: %lx\n", jiffies); 351 dev_dbg(sharpsl_pm.dev, "Toggling Charger at time: %lx\n", jiffies);
350 352
351 if (!sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN)) { 353 if (!sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN)) {
352 sharpsl_charge_off(); 354 sharpsl_charge_off();
@@ -368,7 +370,7 @@ static void sharpsl_ac_timer(unsigned long data)
368{ 370{
369 int acin = sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN); 371 int acin = sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN);
370 372
371 dev_dbg(sharpsl_pm.dev, "AC Status: %d\n",acin); 373 dev_dbg(sharpsl_pm.dev, "AC Status: %d\n", acin);
372 374
373 sharpsl_average_clear(); 375 sharpsl_average_clear();
374 if (acin && (sharpsl_pm.charge_mode != CHRG_ON)) 376 if (acin && (sharpsl_pm.charge_mode != CHRG_ON))
@@ -472,14 +474,14 @@ static int sharpsl_average_value(int ad)
472 sharpsl_ad[sharpsl_ad_index] = ad; 474 sharpsl_ad[sharpsl_ad_index] = ad;
473 sharpsl_ad_index++; 475 sharpsl_ad_index++;
474 if (sharpsl_ad_index >= SHARPSL_CNV_VALUE_NUM) { 476 if (sharpsl_ad_index >= SHARPSL_CNV_VALUE_NUM) {
475 for (i=0; i < (SHARPSL_CNV_VALUE_NUM-1); i++) 477 for (i = 0; i < (SHARPSL_CNV_VALUE_NUM-1); i++)
476 sharpsl_ad[i] = sharpsl_ad[i+1]; 478 sharpsl_ad[i] = sharpsl_ad[i+1];
477 sharpsl_ad_index = SHARPSL_CNV_VALUE_NUM - 1; 479 sharpsl_ad_index = SHARPSL_CNV_VALUE_NUM - 1;
478 } 480 }
479 for (i=0; i < sharpsl_ad_index; i++) 481 for (i = 0; i < sharpsl_ad_index; i++)
480 ad_val += sharpsl_ad[i]; 482 ad_val += sharpsl_ad[i];
481 483
482 return (ad_val / sharpsl_ad_index); 484 return ad_val / sharpsl_ad_index;
483} 485}
484 486
485/* 487/*
@@ -492,8 +494,8 @@ static int get_select_val(int *val)
492 494
493 /* Find MAX val */ 495 /* Find MAX val */
494 temp = val[0]; 496 temp = val[0];
495 j=0; 497 j = 0;
496 for (i=1; i<5; i++) { 498 for (i = 1; i < 5; i++) {
497 if (temp < val[i]) { 499 if (temp < val[i]) {
498 temp = val[i]; 500 temp = val[i];
499 j = i; 501 j = i;
@@ -502,21 +504,21 @@ static int get_select_val(int *val)
502 504
503 /* Find MIN val */ 505 /* Find MIN val */
504 temp = val[4]; 506 temp = val[4];
505 k=4; 507 k = 4;
506 for (i=3; i>=0; i--) { 508 for (i = 3; i >= 0; i--) {
507 if (temp > val[i]) { 509 if (temp > val[i]) {
508 temp = val[i]; 510 temp = val[i];
509 k = i; 511 k = i;
510 } 512 }
511 } 513 }
512 514
513 for (i=0; i<5; i++) 515 for (i = 0; i < 5; i++)
514 if (i != j && i != k ) 516 if (i != j && i != k)
515 sum += val[i]; 517 sum += val[i];
516 518
517 dev_dbg(sharpsl_pm.dev, "Average: %d from values: %d, %d, %d, %d, %d\n", sum/3, val[0], val[1], val[2], val[3], val[4]); 519 dev_dbg(sharpsl_pm.dev, "Average: %d from values: %d, %d, %d, %d, %d\n", sum/3, val[0], val[1], val[2], val[3], val[4]);
518 520
519 return (sum/3); 521 return sum/3;
520} 522}
521 523
522static int sharpsl_check_battery_temp(void) 524static int sharpsl_check_battery_temp(void)
@@ -524,7 +526,7 @@ static int sharpsl_check_battery_temp(void)
524 int val, i, buff[5]; 526 int val, i, buff[5];
525 527
526 /* Check battery temperature */ 528 /* Check battery temperature */
527 for (i=0; i<5; i++) { 529 for (i = 0; i < 5; i++) {
528 mdelay(SHARPSL_CHECK_BATTERY_WAIT_TIME_TEMP); 530 mdelay(SHARPSL_CHECK_BATTERY_WAIT_TIME_TEMP);
529 sharpsl_pm.machinfo->measure_temp(1); 531 sharpsl_pm.machinfo->measure_temp(1);
530 mdelay(SHARPSL_CHECK_BATTERY_WAIT_TIME_TEMP); 532 mdelay(SHARPSL_CHECK_BATTERY_WAIT_TIME_TEMP);
@@ -557,7 +559,7 @@ static int sharpsl_check_battery_voltage(void)
557 sharpsl_pm.machinfo->discharge1(1); 559 sharpsl_pm.machinfo->discharge1(1);
558 560
559 /* Check battery voltage */ 561 /* Check battery voltage */
560 for (i=0; i<5; i++) { 562 for (i = 0; i < 5; i++) {
561 buff[i] = sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT); 563 buff[i] = sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT);
562 mdelay(SHARPSL_CHECK_BATTERY_WAIT_TIME_VOLT); 564 mdelay(SHARPSL_CHECK_BATTERY_WAIT_TIME_VOLT);
563 } 565 }
@@ -581,16 +583,16 @@ static int sharpsl_ac_check(void)
581{ 583{
582 int temp, i, buff[5]; 584 int temp, i, buff[5];
583 585
584 for (i=0; i<5; i++) { 586 for (i = 0; i < 5; i++) {
585 buff[i] = sharpsl_pm.machinfo->read_devdata(SHARPSL_ACIN_VOLT); 587 buff[i] = sharpsl_pm.machinfo->read_devdata(SHARPSL_ACIN_VOLT);
586 mdelay(SHARPSL_CHECK_BATTERY_WAIT_TIME_ACIN); 588 mdelay(SHARPSL_CHECK_BATTERY_WAIT_TIME_ACIN);
587 } 589 }
588 590
589 temp = get_select_val(buff); 591 temp = get_select_val(buff);
590 dev_dbg(sharpsl_pm.dev, "AC Voltage: %d\n",temp); 592 dev_dbg(sharpsl_pm.dev, "AC Voltage: %d\n", temp);
591 593
592 if ((temp > sharpsl_pm.machinfo->charge_acin_high) || (temp < sharpsl_pm.machinfo->charge_acin_low)) { 594 if ((temp > sharpsl_pm.machinfo->charge_acin_high) || (temp < sharpsl_pm.machinfo->charge_acin_low)) {
593 dev_err(sharpsl_pm.dev, "Error: AC check failed.\n"); 595 dev_err(sharpsl_pm.dev, "Error: AC check failed: voltage %d.\n", temp);
594 return -1; 596 return -1;
595 } 597 }
596 598
@@ -624,9 +626,9 @@ static int sharpsl_pm_resume(struct platform_device *pdev)
624 626
625static void corgi_goto_sleep(unsigned long alarm_time, unsigned int alarm_enable, suspend_state_t state) 627static void corgi_goto_sleep(unsigned long alarm_time, unsigned int alarm_enable, suspend_state_t state)
626{ 628{
627 dev_dbg(sharpsl_pm.dev, "Time is: %08x\n",RCNR); 629 dev_dbg(sharpsl_pm.dev, "Time is: %08x\n", RCNR);
628 630
629 dev_dbg(sharpsl_pm.dev, "Offline Charge Activate = %d\n",sharpsl_pm.flags & SHARPSL_DO_OFFLINE_CHRG); 631 dev_dbg(sharpsl_pm.dev, "Offline Charge Activate = %d\n", sharpsl_pm.flags & SHARPSL_DO_OFFLINE_CHRG);
630 /* not charging and AC-IN! */ 632 /* not charging and AC-IN! */
631 633
632 if ((sharpsl_pm.flags & SHARPSL_DO_OFFLINE_CHRG) && (sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN))) { 634 if ((sharpsl_pm.flags & SHARPSL_DO_OFFLINE_CHRG) && (sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN))) {
@@ -644,12 +646,12 @@ static void corgi_goto_sleep(unsigned long alarm_time, unsigned int alarm_enable
644 if ((sharpsl_pm.charge_mode == CHRG_ON) && ((alarm_enable && ((alarm_time - RCNR) > (SHARPSL_BATCHK_TIME_SUSPEND + 30))) || !alarm_enable)) { 646 if ((sharpsl_pm.charge_mode == CHRG_ON) && ((alarm_enable && ((alarm_time - RCNR) > (SHARPSL_BATCHK_TIME_SUSPEND + 30))) || !alarm_enable)) {
645 RTSR &= RTSR_ALE; 647 RTSR &= RTSR_ALE;
646 RTAR = RCNR + SHARPSL_BATCHK_TIME_SUSPEND; 648 RTAR = RCNR + SHARPSL_BATCHK_TIME_SUSPEND;
647 dev_dbg(sharpsl_pm.dev, "Charging alarm at: %08x\n",RTAR); 649 dev_dbg(sharpsl_pm.dev, "Charging alarm at: %08x\n", RTAR);
648 sharpsl_pm.flags |= SHARPSL_ALARM_ACTIVE; 650 sharpsl_pm.flags |= SHARPSL_ALARM_ACTIVE;
649 } else if (alarm_enable) { 651 } else if (alarm_enable) {
650 RTSR &= RTSR_ALE; 652 RTSR &= RTSR_ALE;
651 RTAR = alarm_time; 653 RTAR = alarm_time;
652 dev_dbg(sharpsl_pm.dev, "User alarm at: %08x\n",RTAR); 654 dev_dbg(sharpsl_pm.dev, "User alarm at: %08x\n", RTAR);
653 } else { 655 } else {
654 dev_dbg(sharpsl_pm.dev, "No alarms set.\n"); 656 dev_dbg(sharpsl_pm.dev, "No alarms set.\n");
655 } 657 }
@@ -658,19 +660,18 @@ static void corgi_goto_sleep(unsigned long alarm_time, unsigned int alarm_enable
658 660
659 sharpsl_pm.machinfo->postsuspend(); 661 sharpsl_pm.machinfo->postsuspend();
660 662
661 dev_dbg(sharpsl_pm.dev, "Corgi woken up from suspend: %08x\n",PEDR); 663 dev_dbg(sharpsl_pm.dev, "Corgi woken up from suspend: %08x\n", PEDR);
662} 664}
663 665
664static int corgi_enter_suspend(unsigned long alarm_time, unsigned int alarm_enable, suspend_state_t state) 666static int corgi_enter_suspend(unsigned long alarm_time, unsigned int alarm_enable, suspend_state_t state)
665{ 667{
666 if (!sharpsl_pm.machinfo->should_wakeup(!(sharpsl_pm.flags & SHARPSL_ALARM_ACTIVE) && alarm_enable) ) 668 if (!sharpsl_pm.machinfo->should_wakeup(!(sharpsl_pm.flags & SHARPSL_ALARM_ACTIVE) && alarm_enable)) {
667 {
668 if (!(sharpsl_pm.flags & SHARPSL_ALARM_ACTIVE)) { 669 if (!(sharpsl_pm.flags & SHARPSL_ALARM_ACTIVE)) {
669 dev_dbg(sharpsl_pm.dev, "No user triggered wakeup events and not charging. Strange. Suspend.\n"); 670 dev_dbg(sharpsl_pm.dev, "No user triggered wakeup events and not charging. Strange. Suspend.\n");
670 corgi_goto_sleep(alarm_time, alarm_enable, state); 671 corgi_goto_sleep(alarm_time, alarm_enable, state);
671 return 1; 672 return 1;
672 } 673 }
673 if(sharpsl_off_charge_battery()) { 674 if (sharpsl_off_charge_battery()) {
674 dev_dbg(sharpsl_pm.dev, "Charging. Suspend...\n"); 675 dev_dbg(sharpsl_pm.dev, "Charging. Suspend...\n");
675 corgi_goto_sleep(alarm_time, alarm_enable, state); 676 corgi_goto_sleep(alarm_time, alarm_enable, state);
676 return 1; 677 return 1;
@@ -697,7 +698,7 @@ static int corgi_pxa_pm_enter(suspend_state_t state)
697 698
698 corgi_goto_sleep(alarm_time, alarm_status, state); 699 corgi_goto_sleep(alarm_time, alarm_status, state);
699 700
700 while (corgi_enter_suspend(alarm_time,alarm_status,state)) 701 while (corgi_enter_suspend(alarm_time, alarm_status, state))
701 {} 702 {}
702 703
703 if (sharpsl_pm.machinfo->earlyresume) 704 if (sharpsl_pm.machinfo->earlyresume)
@@ -732,7 +733,7 @@ static int sharpsl_fatal_check(void)
732 sharpsl_pm.machinfo->discharge1(1); 733 sharpsl_pm.machinfo->discharge1(1);
733 734
734 /* Check battery : check inserting battery ? */ 735 /* Check battery : check inserting battery ? */
735 for (i=0; i<5; i++) { 736 for (i = 0; i < 5; i++) {
736 buff[i] = sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT); 737 buff[i] = sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT);
737 mdelay(SHARPSL_CHECK_BATTERY_WAIT_TIME_VOLT); 738 mdelay(SHARPSL_CHECK_BATTERY_WAIT_TIME_VOLT);
738 } 739 }
@@ -812,7 +813,7 @@ static int sharpsl_off_charge_battery(void)
812 mdelay(SHARPSL_CHARGE_CO_CHECK_TIME); 813 mdelay(SHARPSL_CHARGE_CO_CHECK_TIME);
813 814
814 time = RCNR; 815 time = RCNR;
815 while(1) { 816 while (1) {
816 /* Check if any wakeup event had occurred */ 817 /* Check if any wakeup event had occurred */
817 if (sharpsl_pm.machinfo->charger_wakeup() != 0) 818 if (sharpsl_pm.machinfo->charger_wakeup() != 0)
818 return 0; 819 return 0;
@@ -835,9 +836,9 @@ static int sharpsl_off_charge_battery(void)
835 mdelay(SHARPSL_CHARGE_CO_CHECK_TIME); 836 mdelay(SHARPSL_CHARGE_CO_CHECK_TIME);
836 837
837 time = RCNR; 838 time = RCNR;
838 while(1) { 839 while (1) {
839 /* Check if any wakeup event had occurred */ 840 /* Check if any wakeup event had occurred */
840 if (sharpsl_pm.machinfo->charger_wakeup() != 0) 841 if (sharpsl_pm.machinfo->charger_wakeup())
841 return 0; 842 return 0;
842 /* Check for timeout */ 843 /* Check for timeout */
843 if ((RCNR-time) > SHARPSL_WAIT_CO_TIME) { 844 if ((RCNR-time) > SHARPSL_WAIT_CO_TIME) {
@@ -864,12 +865,12 @@ static int sharpsl_off_charge_battery(void)
864 865
865static ssize_t battery_percentage_show(struct device *dev, struct device_attribute *attr, char *buf) 866static ssize_t battery_percentage_show(struct device *dev, struct device_attribute *attr, char *buf)
866{ 867{
867 return sprintf(buf, "%d\n",sharpsl_pm.battstat.mainbat_percent); 868 return sprintf(buf, "%d\n", sharpsl_pm.battstat.mainbat_percent);
868} 869}
869 870
870static ssize_t battery_voltage_show(struct device *dev, struct device_attribute *attr, char *buf) 871static ssize_t battery_voltage_show(struct device *dev, struct device_attribute *attr, char *buf)
871{ 872{
872 return sprintf(buf, "%d\n",sharpsl_pm.battstat.mainbat_voltage); 873 return sprintf(buf, "%d\n", sharpsl_pm.battstat.mainbat_voltage);
873} 874}
874 875
875static DEVICE_ATTR(battery_percentage, 0444, battery_percentage_show, NULL); 876static DEVICE_ATTR(battery_percentage, 0444, battery_percentage_show, NULL);
@@ -943,8 +944,7 @@ static int __init sharpsl_pm_probe(struct platform_device *pdev)
943 } 944 }
944 } 945 }
945 946
946 if (sharpsl_pm.machinfo->batfull_irq) 947 if (sharpsl_pm.machinfo->batfull_irq) {
947 {
948 /* Register interrupt handler. */ 948 /* Register interrupt handler. */
949 if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull), sharpsl_chrg_full_isr, IRQF_DISABLED | IRQF_TRIGGER_RISING, "CO", sharpsl_chrg_full_isr)) { 949 if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull), sharpsl_chrg_full_isr, IRQF_DISABLED | IRQF_TRIGGER_RISING, "CO", sharpsl_chrg_full_isr)) {
950 dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull)); 950 dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull));
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index d98023f55503..4b50f144fa48 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -768,6 +768,10 @@ static void __init common_init(void)
768 768
769 pxa2xx_mfp_config(ARRAY_AND_SIZE(spitz_pin_config)); 769 pxa2xx_mfp_config(ARRAY_AND_SIZE(spitz_pin_config));
770 770
771 pxa_set_ffuart_info(NULL);
772 pxa_set_btuart_info(NULL);
773 pxa_set_stuart_info(NULL);
774
771 spitz_init_spi(); 775 spitz_init_spi();
772 776
773 platform_add_devices(devices, ARRAY_SIZE(devices)); 777 platform_add_devices(devices, ARRAY_SIZE(devices));
diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c
index 724ffb030317..fc5a70c40358 100644
--- a/arch/arm/mach-pxa/spitz_pm.c
+++ b/arch/arm/mach-pxa/spitz_pm.c
@@ -103,7 +103,7 @@ static void spitz_presuspend(void)
103 PFER = GPIO_bit(SPITZ_GPIO_KEY_INT) | GPIO_bit(SPITZ_GPIO_RESET); 103 PFER = GPIO_bit(SPITZ_GPIO_KEY_INT) | GPIO_bit(SPITZ_GPIO_RESET);
104 PWER = GPIO_bit(SPITZ_GPIO_KEY_INT) | GPIO_bit(SPITZ_GPIO_RESET) | PWER_RTC; 104 PWER = GPIO_bit(SPITZ_GPIO_KEY_INT) | GPIO_bit(SPITZ_GPIO_RESET) | PWER_RTC;
105 PKWR = GPIO_bit(SPITZ_GPIO_SYNC) | GPIO_bit(SPITZ_GPIO_KEY_INT) | GPIO_bit(SPITZ_GPIO_RESET); 105 PKWR = GPIO_bit(SPITZ_GPIO_SYNC) | GPIO_bit(SPITZ_GPIO_KEY_INT) | GPIO_bit(SPITZ_GPIO_RESET);
106 PKSR = 0xffffffff; // clear 106 PKSR = 0xffffffff; /* clear */
107 107
108 /* nRESET_OUT Disable */ 108 /* nRESET_OUT Disable */
109 PSLR |= PSLR_SL_ROD; 109 PSLR |= PSLR_SL_ROD;
@@ -149,7 +149,7 @@ static int spitz_should_wakeup(unsigned int resume_on_alarm)
149 if (resume_on_alarm && (PEDR & PWER_RTC)) 149 if (resume_on_alarm && (PEDR & PWER_RTC))
150 is_resume |= PWER_RTC; 150 is_resume |= PWER_RTC;
151 151
152 dev_dbg(sharpsl_pm.dev, "is_resume: %x\n",is_resume); 152 dev_dbg(sharpsl_pm.dev, "is_resume: %x\n", is_resume);
153 return is_resume; 153 return is_resume;
154} 154}
155 155
@@ -160,7 +160,7 @@ static unsigned long spitz_charger_wakeup(void)
160 160
161unsigned long spitzpm_read_devdata(int type) 161unsigned long spitzpm_read_devdata(int type)
162{ 162{
163 switch(type) { 163 switch (type) {
164 case SHARPSL_STATUS_ACIN: 164 case SHARPSL_STATUS_ACIN:
165 return (((~GPLR(SPITZ_GPIO_AC_IN)) & GPIO_bit(SPITZ_GPIO_AC_IN)) != 0); 165 return (((~GPLR(SPITZ_GPIO_AC_IN)) & GPIO_bit(SPITZ_GPIO_AC_IN)) != 0);
166 case SHARPSL_STATUS_LOCK: 166 case SHARPSL_STATUS_LOCK:
@@ -199,7 +199,7 @@ struct sharpsl_charger_machinfo spitz_pm_machinfo = {
199#if defined(CONFIG_LCD_CORGI) 199#if defined(CONFIG_LCD_CORGI)
200 .backlight_limit = corgi_lcd_limit_intensity, 200 .backlight_limit = corgi_lcd_limit_intensity,
201#elif defined(CONFIG_BACKLIGHT_CORGI) 201#elif defined(CONFIG_BACKLIGHT_CORGI)
202 .backlight_limit = corgibl_limit_intensity, 202 .backlight_limit = corgibl_limit_intensity,
203#endif 203#endif
204 .charge_on_volt = SHARPSL_CHARGE_ON_VOLT, 204 .charge_on_volt = SHARPSL_CHARGE_ON_VOLT,
205 .charge_on_temp = SHARPSL_CHARGE_ON_TEMP, 205 .charge_on_temp = SHARPSL_CHARGE_ON_TEMP,
@@ -208,8 +208,8 @@ struct sharpsl_charger_machinfo spitz_pm_machinfo = {
208 .fatal_acin_volt = SHARPSL_FATAL_ACIN_VOLT, 208 .fatal_acin_volt = SHARPSL_FATAL_ACIN_VOLT,
209 .fatal_noacin_volt= SHARPSL_FATAL_NOACIN_VOLT, 209 .fatal_noacin_volt= SHARPSL_FATAL_NOACIN_VOLT,
210 .bat_levels = 40, 210 .bat_levels = 40,
211 .bat_levels_noac = spitz_battery_levels_noac, 211 .bat_levels_noac = sharpsl_battery_levels_noac,
212 .bat_levels_acin = spitz_battery_levels_acin, 212 .bat_levels_acin = sharpsl_battery_levels_acin,
213 .status_high_acin = 188, 213 .status_high_acin = 188,
214 .status_low_acin = 178, 214 .status_low_acin = 178,
215 .status_high_noac = 185, 215 .status_high_noac = 185,
@@ -241,7 +241,7 @@ static int __devinit spitzpm_init(void)
241 241
242static void spitzpm_exit(void) 242static void spitzpm_exit(void)
243{ 243{
244 platform_device_unregister(spitzpm_device); 244 platform_device_unregister(spitzpm_device);
245} 245}
246 246
247module_init(spitzpm_init); 247module_init(spitzpm_init);
diff --git a/arch/arm/mach-pxa/ssp.c b/arch/arm/mach-pxa/ssp.c
index 965e38c6bafe..9ebe658590fa 100644
--- a/arch/arm/mach-pxa/ssp.c
+++ b/arch/arm/mach-pxa/ssp.c
@@ -342,8 +342,9 @@ void ssp_free(struct ssp_device *ssp)
342} 342}
343EXPORT_SYMBOL(ssp_free); 343EXPORT_SYMBOL(ssp_free);
344 344
345static int __devinit ssp_probe(struct platform_device *pdev, int type) 345static int __devinit ssp_probe(struct platform_device *pdev)
346{ 346{
347 const struct platform_device_id *id = platform_get_device_id(pdev);
347 struct resource *res; 348 struct resource *res;
348 struct ssp_device *ssp; 349 struct ssp_device *ssp;
349 int ret = 0; 350 int ret = 0;
@@ -413,7 +414,7 @@ static int __devinit ssp_probe(struct platform_device *pdev, int type)
413 */ 414 */
414 ssp->port_id = pdev->id + 1; 415 ssp->port_id = pdev->id + 1;
415 ssp->use_count = 0; 416 ssp->use_count = 0;
416 ssp->type = type; 417 ssp->type = (int)id->driver_data;
417 418
418 mutex_lock(&ssp_lock); 419 mutex_lock(&ssp_lock);
419 list_add(&ssp->node, &ssp_list); 420 list_add(&ssp->node, &ssp_list);
@@ -457,75 +458,31 @@ static int __devexit ssp_remove(struct platform_device *pdev)
457 return 0; 458 return 0;
458} 459}
459 460
460static int __devinit pxa25x_ssp_probe(struct platform_device *pdev) 461static const struct platform_device_id ssp_id_table[] = {
461{ 462 { "pxa25x-ssp", PXA25x_SSP },
462 return ssp_probe(pdev, PXA25x_SSP); 463 { "pxa25x-nssp", PXA25x_NSSP },
463} 464 { "pxa27x-ssp", PXA27x_SSP },
464 465 { },
465static int __devinit pxa25x_nssp_probe(struct platform_device *pdev)
466{
467 return ssp_probe(pdev, PXA25x_NSSP);
468}
469
470static int __devinit pxa27x_ssp_probe(struct platform_device *pdev)
471{
472 return ssp_probe(pdev, PXA27x_SSP);
473}
474
475static struct platform_driver pxa25x_ssp_driver = {
476 .driver = {
477 .name = "pxa25x-ssp",
478 },
479 .probe = pxa25x_ssp_probe,
480 .remove = __devexit_p(ssp_remove),
481}; 466};
482 467
483static struct platform_driver pxa25x_nssp_driver = { 468static struct platform_driver ssp_driver = {
484 .driver = { 469 .probe = ssp_probe,
485 .name = "pxa25x-nssp",
486 },
487 .probe = pxa25x_nssp_probe,
488 .remove = __devexit_p(ssp_remove), 470 .remove = __devexit_p(ssp_remove),
489};
490
491static struct platform_driver pxa27x_ssp_driver = {
492 .driver = { 471 .driver = {
493 .name = "pxa27x-ssp", 472 .owner = THIS_MODULE,
473 .name = "pxa2xx-ssp",
494 }, 474 },
495 .probe = pxa27x_ssp_probe, 475 .id_table = ssp_id_table,
496 .remove = __devexit_p(ssp_remove),
497}; 476};
498 477
499static int __init pxa_ssp_init(void) 478static int __init pxa_ssp_init(void)
500{ 479{
501 int ret = 0; 480 return platform_driver_register(&ssp_driver);
502
503 ret = platform_driver_register(&pxa25x_ssp_driver);
504 if (ret) {
505 printk(KERN_ERR "failed to register pxa25x_ssp_driver");
506 return ret;
507 }
508
509 ret = platform_driver_register(&pxa25x_nssp_driver);
510 if (ret) {
511 printk(KERN_ERR "failed to register pxa25x_nssp_driver");
512 return ret;
513 }
514
515 ret = platform_driver_register(&pxa27x_ssp_driver);
516 if (ret) {
517 printk(KERN_ERR "failed to register pxa27x_ssp_driver");
518 return ret;
519 }
520
521 return ret;
522} 481}
523 482
524static void __exit pxa_ssp_exit(void) 483static void __exit pxa_ssp_exit(void)
525{ 484{
526 platform_driver_unregister(&pxa25x_ssp_driver); 485 platform_driver_unregister(&ssp_driver);
527 platform_driver_unregister(&pxa25x_nssp_driver);
528 platform_driver_unregister(&pxa27x_ssp_driver);
529} 486}
530 487
531arch_initcall(pxa_ssp_init); 488arch_initcall(pxa_ssp_init);
diff --git a/arch/arm/mach-pxa/stargate2.c b/arch/arm/mach-pxa/stargate2.c
index 3b205b69f3fb..a98a434f0111 100644
--- a/arch/arm/mach-pxa/stargate2.c
+++ b/arch/arm/mach-pxa/stargate2.c
@@ -760,6 +760,10 @@ static void __init stargate2_init(void)
760 760
761 pxa2xx_mfp_config(ARRAY_AND_SIZE(stargate2_pin_config)); 761 pxa2xx_mfp_config(ARRAY_AND_SIZE(stargate2_pin_config));
762 762
763 pxa_set_ffuart_info(NULL);
764 pxa_set_btuart_info(NULL);
765 pxa_set_stuart_info(NULL);
766
763 /* spi chip selects */ 767 /* spi chip selects */
764 gpio_direction_output(37, 0); 768 gpio_direction_output(37, 0);
765 gpio_direction_output(24, 0); 769 gpio_direction_output(24, 0);
diff --git a/arch/arm/mach-pxa/tavorevb.c b/arch/arm/mach-pxa/tavorevb.c
index b75353a2ec75..f02dcb5b4e97 100644
--- a/arch/arm/mach-pxa/tavorevb.c
+++ b/arch/arm/mach-pxa/tavorevb.c
@@ -477,6 +477,10 @@ static void __init tavorevb_init(void)
477 /* initialize MFP configurations */ 477 /* initialize MFP configurations */
478 pxa3xx_mfp_config(ARRAY_AND_SIZE(tavorevb_mfp_cfg)); 478 pxa3xx_mfp_config(ARRAY_AND_SIZE(tavorevb_mfp_cfg));
479 479
480 pxa_set_ffuart_info(NULL);
481 pxa_set_btuart_info(NULL);
482 pxa_set_stuart_info(NULL);
483
480 platform_device_register(&smc91x_device); 484 platform_device_register(&smc91x_device);
481 485
482 tavorevb_init_lcd(); 486 tavorevb_init_lcd();
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
index e81a52673d49..c854c168a451 100644
--- a/arch/arm/mach-pxa/tosa.c
+++ b/arch/arm/mach-pxa/tosa.c
@@ -825,6 +825,11 @@ static void __init tosa_init(void)
825 int dummy; 825 int dummy;
826 826
827 pxa2xx_mfp_config(ARRAY_AND_SIZE(tosa_pin_config)); 827 pxa2xx_mfp_config(ARRAY_AND_SIZE(tosa_pin_config));
828
829 pxa_set_ffuart_info(NULL);
830 pxa_set_btuart_info(NULL);
831 pxa_set_stuart_info(NULL);
832
828 gpio_set_wake(MFP_PIN_GPIO1, 1); 833 gpio_set_wake(MFP_PIN_GPIO1, 1);
829 /* We can't pass to gpio-keys since it will drop the Reset altfunc */ 834 /* We can't pass to gpio-keys since it will drop the Reset altfunc */
830 835
diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c
index 3981e0356d12..0aa858ebc573 100644
--- a/arch/arm/mach-pxa/trizeps4.c
+++ b/arch/arm/mach-pxa/trizeps4.c
@@ -524,6 +524,10 @@ static void __init trizeps4_init(void)
524 ARRAY_SIZE(trizeps4_devices)); 524 ARRAY_SIZE(trizeps4_devices));
525 } 525 }
526 526
527 pxa_set_ffuart_info(NULL);
528 pxa_set_btuart_info(NULL);
529 pxa_set_stuart_info(NULL);
530
527 if (0) /* dont know how to determine LCD */ 531 if (0) /* dont know how to determine LCD */
528 set_pxa_fb_info(&sharp_lcd); 532 set_pxa_fb_info(&sharp_lcd);
529 else 533 else
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c
index d33c232b686c..cf0d71b7797e 100644
--- a/arch/arm/mach-pxa/viper.c
+++ b/arch/arm/mach-pxa/viper.c
@@ -301,15 +301,6 @@ static void __init viper_init_irq(void)
301 set_irq_chained_handler(gpio_to_irq(VIPER_CPLD_GPIO), 301 set_irq_chained_handler(gpio_to_irq(VIPER_CPLD_GPIO),
302 viper_irq_handler); 302 viper_irq_handler);
303 set_irq_type(gpio_to_irq(VIPER_CPLD_GPIO), IRQ_TYPE_EDGE_BOTH); 303 set_irq_type(gpio_to_irq(VIPER_CPLD_GPIO), IRQ_TYPE_EDGE_BOTH);
304
305#ifndef CONFIG_SERIAL_PXA
306 /*
307 * 8250 doesn't support IRQ_TYPE being passed as part
308 * of the plat_serial8250_port structure...
309 */
310 set_irq_type(gpio_to_irq(VIPER_UARTA_GPIO), IRQ_TYPE_EDGE_RISING);
311 set_irq_type(gpio_to_irq(VIPER_UARTB_GPIO), IRQ_TYPE_EDGE_RISING);
312#endif
313} 304}
314 305
315/* Flat Panel */ 306/* Flat Panel */
@@ -539,6 +530,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
539 { 530 {
540 .mapbase = VIPER_UARTA_PHYS, 531 .mapbase = VIPER_UARTA_PHYS,
541 .irq = gpio_to_irq(VIPER_UARTA_GPIO), 532 .irq = gpio_to_irq(VIPER_UARTA_GPIO),
533 .irqflags = IRQF_TRIGGER_RISING,
542 .uartclk = 1843200, 534 .uartclk = 1843200,
543 .regshift = 1, 535 .regshift = 1,
544 .iotype = UPIO_MEM, 536 .iotype = UPIO_MEM,
@@ -548,6 +540,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
548 { 540 {
549 .mapbase = VIPER_UARTB_PHYS, 541 .mapbase = VIPER_UARTB_PHYS,
550 .irq = gpio_to_irq(VIPER_UARTB_GPIO), 542 .irq = gpio_to_irq(VIPER_UARTB_GPIO),
543 .irqflags = IRQF_TRIGGER_RISING,
551 .uartclk = 1843200, 544 .uartclk = 1843200,
552 .regshift = 1, 545 .regshift = 1,
553 .iotype = UPIO_MEM, 546 .iotype = UPIO_MEM,
@@ -908,6 +901,10 @@ static void __init viper_init(void)
908 901
909 pxa2xx_mfp_config(ARRAY_AND_SIZE(viper_pin_config)); 902 pxa2xx_mfp_config(ARRAY_AND_SIZE(viper_pin_config));
910 903
904 pxa_set_ffuart_info(NULL);
905 pxa_set_btuart_info(NULL);
906 pxa_set_stuart_info(NULL);
907
911 /* Wake-up serial console */ 908 /* Wake-up serial console */
912 viper_init_serial_gpio(); 909 viper_init_serial_gpio();
913 910
diff --git a/arch/arm/mach-pxa/xcep.c b/arch/arm/mach-pxa/xcep.c
index 3fd79cbb36c8..d3b4e3f2e033 100644
--- a/arch/arm/mach-pxa/xcep.c
+++ b/arch/arm/mach-pxa/xcep.c
@@ -165,6 +165,11 @@ static void __init xcep_init(void)
165{ 165{
166 pxa2xx_mfp_config(ARRAY_AND_SIZE(xcep_pin_config)); 166 pxa2xx_mfp_config(ARRAY_AND_SIZE(xcep_pin_config));
167 167
168 pxa_set_ffuart_info(NULL);
169 pxa_set_btuart_info(NULL);
170 pxa_set_stuart_info(NULL);
171 pxa_set_hwuart_info(NULL);
172
168 /* See Intel XScale Developer's Guide for details */ 173 /* See Intel XScale Developer's Guide for details */
169 /* Set RDF and RDN to appropriate values (chip select 3 (smc91x)) */ 174 /* Set RDF and RDN to appropriate values (chip select 3 (smc91x)) */
170 MSC1 = (MSC1 & 0xffff) | 0xD5540000; 175 MSC1 = (MSC1 & 0xffff) | 0xD5540000;
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
index 09784d3954e4..b66e9e2d06e7 100644
--- a/arch/arm/mach-pxa/zylonite.c
+++ b/arch/arm/mach-pxa/zylonite.c
@@ -31,7 +31,7 @@
31#include <mach/mmc.h> 31#include <mach/mmc.h>
32#include <mach/ohci.h> 32#include <mach/ohci.h>
33#include <mach/pxa27x_keypad.h> 33#include <mach/pxa27x_keypad.h>
34#include <mach/pxa3xx_nand.h> 34#include <plat/pxa3xx_nand.h>
35 35
36#include "devices.h" 36#include "devices.h"
37#include "generic.h" 37#include "generic.h"
@@ -444,6 +444,10 @@ static inline void zylonite_init_ohci(void) {}
444 444
445static void __init zylonite_init(void) 445static void __init zylonite_init(void)
446{ 446{
447 pxa_set_ffuart_info(NULL);
448 pxa_set_btuart_info(NULL);
449 pxa_set_stuart_info(NULL);
450
447 /* board-processor specific initialization */ 451 /* board-processor specific initialization */
448 zylonite_pxa300_init(); 452 zylonite_pxa300_init();
449 zylonite_pxa320_init(); 453 zylonite_pxa320_init();