Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuil...
[pandora-kernel.git] / arch / arm / mach-pxa / palmtreo.c
1 /*
2  * Hardware definitions 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 #include <linux/platform_device.h>
19 #include <linux/delay.h>
20 #include <linux/irq.h>
21 #include <linux/gpio_keys.h>
22 #include <linux/input.h>
23 #include <linux/pda_power.h>
24 #include <linux/pwm_backlight.h>
25 #include <linux/gpio.h>
26 #include <linux/wm97xx_batt.h>
27 #include <linux/power_supply.h>
28 #include <linux/sysdev.h>
29 #include <linux/w1-gpio.h>
30
31 #include <asm/mach-types.h>
32 #include <asm/mach/arch.h>
33 #include <asm/mach/map.h>
34
35 #include <mach/pxa27x.h>
36 #include <mach/pxa27x-udc.h>
37 #include <mach/audio.h>
38 #include <mach/palmtreo.h>
39 #include <mach/mmc.h>
40 #include <mach/pxafb.h>
41 #include <mach/irda.h>
42 #include <mach/pxa27x_keypad.h>
43 #include <mach/udc.h>
44 #include <mach/ohci.h>
45 #include <mach/pxa2xx-regs.h>
46 #include <mach/palmasoc.h>
47 #include <mach/camera.h>
48
49 #include <sound/pxa2xx-lib.h>
50
51 #include "generic.h"
52 #include "devices.h"
53
54 /******************************************************************************
55  * Pin configuration
56  ******************************************************************************/
57 static unsigned long treo_pin_config[] __initdata = {
58         /* MMC */
59         GPIO32_MMC_CLK,
60         GPIO92_MMC_DAT_0,
61         GPIO109_MMC_DAT_1,
62         GPIO110_MMC_DAT_2,
63         GPIO111_MMC_DAT_3,
64         GPIO112_MMC_CMD,
65         GPIO113_GPIO,                           /* SD detect */
66
67         /* AC97 */
68         GPIO28_AC97_BITCLK,
69         GPIO29_AC97_SDATA_IN_0,
70         GPIO30_AC97_SDATA_OUT,
71         GPIO31_AC97_SYNC,
72         GPIO89_AC97_SYSCLK,
73         GPIO95_AC97_nRESET,
74
75         /* IrDA */
76         GPIO46_FICP_RXD,
77         GPIO47_FICP_TXD,
78
79         /* PWM */
80         GPIO16_PWM0_OUT,
81
82         /* USB */
83         GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH,       /* usb detect */
84
85         /* MATRIX KEYPAD */
86         GPIO101_KP_MKIN_1,
87         GPIO102_KP_MKIN_2,
88         GPIO97_KP_MKIN_3,
89         GPIO98_KP_MKIN_4,
90         GPIO91_KP_MKIN_6,
91         GPIO13_KP_MKIN_7,
92         GPIO103_KP_MKOUT_0 | MFP_LPM_DRIVE_HIGH,
93         GPIO104_KP_MKOUT_1,
94         GPIO105_KP_MKOUT_2,
95         GPIO106_KP_MKOUT_3,
96         GPIO107_KP_MKOUT_4,
97         GPIO108_KP_MKOUT_5,
98         GPIO96_KP_MKOUT_6,
99         GPIO93_KP_DKIN_0 | WAKEUP_ON_LEVEL_HIGH,        /* Hotsync button */
100
101         /* LCD */
102         GPIOxx_LCD_TFT_16BPP,
103
104         /* Quick Capture Interface */
105         GPIO84_CIF_FV,
106         GPIO85_CIF_LV,
107         GPIO53_CIF_MCLK,
108         GPIO54_CIF_PCLK,
109         GPIO81_CIF_DD_0,
110         GPIO55_CIF_DD_1,
111         GPIO51_CIF_DD_2,
112         GPIO50_CIF_DD_3,
113         GPIO52_CIF_DD_4,
114         GPIO48_CIF_DD_5,
115         GPIO17_CIF_DD_6,
116         GPIO12_CIF_DD_7,
117
118         /* I2C */
119         GPIO117_I2C_SCL,
120         GPIO118_I2C_SDA,
121
122         /* GSM */
123         GPIO14_GPIO | WAKEUP_ON_EDGE_BOTH,      /* GSM host wake up */
124         GPIO34_FFUART_RXD,
125         GPIO35_FFUART_CTS,
126         GPIO39_FFUART_TXD,
127         GPIO41_FFUART_RTS,
128
129         /* MISC. */
130         GPIO0_GPIO | WAKEUP_ON_EDGE_BOTH,       /* external power detect */
131         GPIO15_GPIO | WAKEUP_ON_EDGE_BOTH,      /* silent switch */
132         GPIO116_GPIO,                           /* headphone detect */
133         GPIO11_GPIO | WAKEUP_ON_EDGE_BOTH,      /* bluetooth host wake up */
134 };
135
136 #ifdef CONFIG_MACH_TREO680
137 static unsigned long treo680_pin_config[] __initdata = {
138         GPIO33_GPIO,    /* SD read only */
139
140         /* MATRIX KEYPAD - different wake up source */
141         GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH,
142         GPIO99_KP_MKIN_5,
143 };
144 #endif /* CONFIG_MACH_TREO680 */
145
146 #ifdef CONFIG_MACH_CENTRO
147 static unsigned long centro685_pin_config[] __initdata = {
148         /* Bluetooth attached to BT UART*/
149         MFP_CFG_OUT(GPIO80, AF0, DRIVE_LOW),    /* power: LOW = off */
150         GPIO42_BTUART_RXD,
151         GPIO43_BTUART_TXD,
152         GPIO44_BTUART_CTS,
153         GPIO45_BTUART_RTS,
154
155         /* MATRIX KEYPAD - different wake up source */
156         GPIO100_KP_MKIN_0,
157         GPIO99_KP_MKIN_5 | WAKEUP_ON_LEVEL_HIGH,
158 };
159 #endif /* CONFIG_MACH_CENTRO */
160
161 /******************************************************************************
162  * SD/MMC card controller
163  ******************************************************************************/
164 #ifdef CONFIG_MACH_TREO680
165 static struct pxamci_platform_data treo680_mci_platform_data = {
166         .ocr_mask               = MMC_VDD_32_33 | MMC_VDD_33_34,
167         .gpio_card_detect       = GPIO_NR_TREO_SD_DETECT_N,
168         .gpio_card_ro           = GPIO_NR_TREO680_SD_READONLY,
169         .gpio_power             = GPIO_NR_TREO680_SD_POWER,
170 };
171 #endif /* CONFIG_MACH_TREO680 */
172
173 #ifdef CONFIG_MACH_CENTRO
174 static struct pxamci_platform_data centro_mci_platform_data = {
175         .ocr_mask               = MMC_VDD_32_33 | MMC_VDD_33_34,
176         .gpio_card_detect       = GPIO_NR_TREO_SD_DETECT_N,
177         .gpio_card_ro           = -1,
178         .gpio_power             = GPIO_NR_CENTRO_SD_POWER,
179         .gpio_power_invert      = 1,
180 };
181 #endif /* CONFIG_MACH_CENTRO */
182
183 /******************************************************************************
184  * GPIO keyboard
185  ******************************************************************************/
186 #ifdef CONFIG_MACH_TREO680
187 static unsigned int treo680_matrix_keys[] = {
188         KEY(0, 0, KEY_F8),              /* Red/Off/Power */
189         KEY(0, 1, KEY_LEFT),
190         KEY(0, 2, KEY_LEFTCTRL),        /* Alternate */
191         KEY(0, 3, KEY_L),
192         KEY(0, 4, KEY_A),
193         KEY(0, 5, KEY_Q),
194         KEY(0, 6, KEY_P),
195
196         KEY(1, 0, KEY_RIGHTCTRL),       /* Menu */
197         KEY(1, 1, KEY_RIGHT),
198         KEY(1, 2, KEY_LEFTSHIFT),       /* Left shift */
199         KEY(1, 3, KEY_Z),
200         KEY(1, 4, KEY_S),
201         KEY(1, 5, KEY_W),
202
203         KEY(2, 0, KEY_F1),              /* Phone */
204         KEY(2, 1, KEY_UP),
205         KEY(2, 2, KEY_0),
206         KEY(2, 3, KEY_X),
207         KEY(2, 4, KEY_D),
208         KEY(2, 5, KEY_E),
209
210         KEY(3, 0, KEY_F10),             /* Calendar */
211         KEY(3, 1, KEY_DOWN),
212         KEY(3, 2, KEY_SPACE),
213         KEY(3, 3, KEY_C),
214         KEY(3, 4, KEY_F),
215         KEY(3, 5, KEY_R),
216
217         KEY(4, 0, KEY_F12),             /* Mail */
218         KEY(4, 1, KEY_KPENTER),
219         KEY(4, 2, KEY_RIGHTALT),        /* Alt */
220         KEY(4, 3, KEY_V),
221         KEY(4, 4, KEY_G),
222         KEY(4, 5, KEY_T),
223
224         KEY(5, 0, KEY_F9),              /* Home */
225         KEY(5, 1, KEY_PAGEUP),          /* Side up */
226         KEY(5, 2, KEY_DOT),
227         KEY(5, 3, KEY_B),
228         KEY(5, 4, KEY_H),
229         KEY(5, 5, KEY_Y),
230
231         KEY(6, 0, KEY_TAB),             /* Side Activate */
232         KEY(6, 1, KEY_PAGEDOWN),        /* Side down */
233         KEY(6, 2, KEY_ENTER),
234         KEY(6, 3, KEY_N),
235         KEY(6, 4, KEY_J),
236         KEY(6, 5, KEY_U),
237
238         KEY(7, 0, KEY_F6),              /* Green/Call */
239         KEY(7, 1, KEY_O),
240         KEY(7, 2, KEY_BACKSPACE),
241         KEY(7, 3, KEY_M),
242         KEY(7, 4, KEY_K),
243         KEY(7, 5, KEY_I),
244 };
245
246 static struct pxa27x_keypad_platform_data treo680_keypad_platform_data = {
247         .matrix_key_rows        = 8,
248         .matrix_key_cols        = 7,
249         .matrix_key_map         = treo680_matrix_keys,
250         .matrix_key_map_size    = ARRAY_SIZE(treo680_matrix_keys),
251         .direct_key_map         = { KEY_CONNECT },
252         .direct_key_num         = 1,
253
254         .debounce_interval      = 30,
255 };
256 #endif /* CONFIG_MACH_TREO680 */
257
258 #ifdef CONFIG_MACH_CENTRO
259 static unsigned int centro_matrix_keys[] = {
260         KEY(0, 0, KEY_F9),              /* Home */
261         KEY(0, 1, KEY_LEFT),
262         KEY(0, 2, KEY_LEFTCTRL),        /* Alternate */
263         KEY(0, 3, KEY_L),
264         KEY(0, 4, KEY_A),
265         KEY(0, 5, KEY_Q),
266         KEY(0, 6, KEY_P),
267
268         KEY(1, 0, KEY_RIGHTCTRL),       /* Menu */
269         KEY(1, 1, KEY_RIGHT),
270         KEY(1, 2, KEY_LEFTSHIFT),       /* Left shift */
271         KEY(1, 3, KEY_Z),
272         KEY(1, 4, KEY_S),
273         KEY(1, 5, KEY_W),
274
275         KEY(2, 0, KEY_F1),              /* Phone */
276         KEY(2, 1, KEY_UP),
277         KEY(2, 2, KEY_0),
278         KEY(2, 3, KEY_X),
279         KEY(2, 4, KEY_D),
280         KEY(2, 5, KEY_E),
281
282         KEY(3, 0, KEY_F10),             /* Calendar */
283         KEY(3, 1, KEY_DOWN),
284         KEY(3, 2, KEY_SPACE),
285         KEY(3, 3, KEY_C),
286         KEY(3, 4, KEY_F),
287         KEY(3, 5, KEY_R),
288
289         KEY(4, 0, KEY_F12),             /* Mail */
290         KEY(4, 1, KEY_KPENTER),
291         KEY(4, 2, KEY_RIGHTALT),        /* Alt */
292         KEY(4, 3, KEY_V),
293         KEY(4, 4, KEY_G),
294         KEY(4, 5, KEY_T),
295
296         KEY(5, 0, KEY_F8),              /* Red/Off/Power */
297         KEY(5, 1, KEY_PAGEUP),          /* Side up */
298         KEY(5, 2, KEY_DOT),
299         KEY(5, 3, KEY_B),
300         KEY(5, 4, KEY_H),
301         KEY(5, 5, KEY_Y),
302
303         KEY(6, 0, KEY_TAB),             /* Side Activate */
304         KEY(6, 1, KEY_PAGEDOWN),        /* Side down */
305         KEY(6, 2, KEY_ENTER),
306         KEY(6, 3, KEY_N),
307         KEY(6, 4, KEY_J),
308         KEY(6, 5, KEY_U),
309
310         KEY(7, 0, KEY_F6),              /* Green/Call */
311         KEY(7, 1, KEY_O),
312         KEY(7, 2, KEY_BACKSPACE),
313         KEY(7, 3, KEY_M),
314         KEY(7, 4, KEY_K),
315         KEY(7, 5, KEY_I),
316 };
317
318 static struct pxa27x_keypad_platform_data centro_keypad_platform_data = {
319         .matrix_key_rows        = 8,
320         .matrix_key_cols        = 7,
321         .matrix_key_map         = centro_matrix_keys,
322         .matrix_key_map_size    = ARRAY_SIZE(centro_matrix_keys),
323         .direct_key_map         = { KEY_CONNECT },
324         .direct_key_num         = 1,
325
326         .debounce_interval      = 30,
327 };
328 #endif /* CONFIG_MACH_CENTRO */
329
330 /******************************************************************************
331  * aSoC audio
332  ******************************************************************************/
333
334 static pxa2xx_audio_ops_t treo_ac97_pdata = {
335         .reset_gpio     = 95,
336 };
337
338 /******************************************************************************
339  * Backlight
340  ******************************************************************************/
341 static int treo_backlight_init(struct device *dev)
342 {
343         int ret;
344
345         ret = gpio_request(GPIO_NR_TREO_BL_POWER, "BL POWER");
346         if (ret)
347                 goto err;
348         ret = gpio_direction_output(GPIO_NR_TREO_BL_POWER, 0);
349         if (ret)
350                 goto err2;
351
352         return 0;
353
354 err2:
355         gpio_free(GPIO_NR_TREO_BL_POWER);
356 err:
357         return ret;
358 }
359
360 static int treo_backlight_notify(struct device *dev, int brightness)
361 {
362         gpio_set_value(GPIO_NR_TREO_BL_POWER, brightness);
363         return TREO_MAX_INTENSITY - brightness;
364 };
365
366 static void treo_backlight_exit(struct device *dev)
367 {
368         gpio_free(GPIO_NR_TREO_BL_POWER);
369 }
370
371 static struct platform_pwm_backlight_data treo_backlight_data = {
372         .pwm_id         = 0,
373         .max_brightness = TREO_MAX_INTENSITY,
374         .dft_brightness = TREO_DEFAULT_INTENSITY,
375         .pwm_period_ns  = TREO_PERIOD_NS,
376         .init           = treo_backlight_init,
377         .notify         = treo_backlight_notify,
378         .exit           = treo_backlight_exit,
379 };
380
381 static struct platform_device treo_backlight = {
382         .name   = "pwm-backlight",
383         .dev    = {
384                 .parent         = &pxa27x_device_pwm0.dev,
385                 .platform_data  = &treo_backlight_data,
386         },
387 };
388
389 /******************************************************************************
390  * IrDA
391  ******************************************************************************/
392 static struct pxaficp_platform_data treo_ficp_info = {
393         .gpio_pwdown            = GPIO_NR_TREO_IR_EN,
394         .transceiver_cap        = IR_SIRMODE | IR_OFF,
395 };
396
397 /******************************************************************************
398  * UDC
399  ******************************************************************************/
400 static struct pxa2xx_udc_mach_info treo_udc_info __initdata = {
401         .gpio_vbus              = GPIO_NR_TREO_USB_DETECT,
402         .gpio_vbus_inverted     = 1,
403         .gpio_pullup            = GPIO_NR_TREO_USB_PULLUP,
404 };
405
406
407 /******************************************************************************
408  * USB host
409  ******************************************************************************/
410 #ifdef CONFIG_MACH_TREO680
411 static struct pxaohci_platform_data treo680_ohci_info = {
412         .port_mode    = PMM_PERPORT_MODE,
413         .flags        = ENABLE_PORT1 | ENABLE_PORT3,
414         .power_budget = 0,
415 };
416 #endif /* CONFIG_MACH_TREO680 */
417
418 /******************************************************************************
419  * Power supply
420  ******************************************************************************/
421 static int power_supply_init(struct device *dev)
422 {
423         int ret;
424
425         ret = gpio_request(GPIO_NR_TREO_POWER_DETECT, "CABLE_STATE_AC");
426         if (ret)
427                 goto err1;
428         ret = gpio_direction_input(GPIO_NR_TREO_POWER_DETECT);
429         if (ret)
430                 goto err2;
431
432         return 0;
433
434 err2:
435         gpio_free(GPIO_NR_TREO_POWER_DETECT);
436 err1:
437         return ret;
438 }
439
440 static int treo_is_ac_online(void)
441 {
442         return gpio_get_value(GPIO_NR_TREO_POWER_DETECT);
443 }
444
445 static void power_supply_exit(struct device *dev)
446 {
447         gpio_free(GPIO_NR_TREO_POWER_DETECT);
448 }
449
450 static char *treo_supplicants[] = {
451         "main-battery",
452 };
453
454 static struct pda_power_pdata power_supply_info = {
455         .init            = power_supply_init,
456         .is_ac_online    = treo_is_ac_online,
457         .exit            = power_supply_exit,
458         .supplied_to     = treo_supplicants,
459         .num_supplicants = ARRAY_SIZE(treo_supplicants),
460 };
461
462 static struct platform_device power_supply = {
463         .name = "pda-power",
464         .id   = -1,
465         .dev  = {
466                 .platform_data = &power_supply_info,
467         },
468 };
469
470 /******************************************************************************
471  * Vibra and LEDs
472  ******************************************************************************/
473 #ifdef CONFIG_MACH_TREO680
474 static struct gpio_led treo680_gpio_leds[] = {
475         {
476                 .name                   = "treo680:vibra:vibra",
477                 .default_trigger        = "none",
478                 .gpio                   = GPIO_NR_TREO680_VIBRATE_EN,
479         },
480         {
481                 .name                   = "treo680:green:led",
482                 .default_trigger        = "mmc0",
483                 .gpio                   = GPIO_NR_TREO_GREEN_LED,
484         },
485         {
486                 .name                   = "treo680:white:keybbl",
487                 .default_trigger        = "none",
488                 .gpio                   = GPIO_NR_TREO680_KEYB_BL,
489         },
490 };
491
492 static struct gpio_led_platform_data treo680_gpio_led_info = {
493         .leds           = treo680_gpio_leds,
494         .num_leds       = ARRAY_SIZE(treo680_gpio_leds),
495 };
496
497 static struct platform_device treo680_leds = {
498         .name   = "leds-gpio",
499         .id     = -1,
500         .dev    = {
501                 .platform_data  = &treo680_gpio_led_info,
502         }
503 };
504 #endif /* CONFIG_MACH_TREO680 */
505
506 #ifdef CONFIG_MACH_CENTRO
507 static struct gpio_led centro_gpio_leds[] = {
508         {
509                 .name                   = "centro:vibra:vibra",
510                 .default_trigger        = "none",
511                 .gpio                   = GPIO_NR_CENTRO_VIBRATE_EN,
512         },
513         {
514                 .name                   = "centro:green:led",
515                 .default_trigger        = "mmc0",
516                 .gpio                   = GPIO_NR_TREO_GREEN_LED,
517         },
518         {
519                 .name                   = "centro:white:keybbl",
520                 .default_trigger        = "none",
521                 .active_low             = 1,
522                 .gpio                   = GPIO_NR_CENTRO_KEYB_BL,
523         },
524 };
525
526 static struct gpio_led_platform_data centro_gpio_led_info = {
527         .leds           = centro_gpio_leds,
528         .num_leds       = ARRAY_SIZE(centro_gpio_leds),
529 };
530
531 static struct platform_device centro_leds = {
532         .name   = "leds-gpio",
533         .id     = -1,
534         .dev    = {
535                 .platform_data  = &centro_gpio_led_info,
536         }
537 };
538 #endif /* CONFIG_MACH_CENTRO */
539
540 /******************************************************************************
541  * Framebuffer
542  ******************************************************************************/
543 /* TODO: add support for 324x324 */
544 static struct pxafb_mode_info treo_lcd_modes[] = {
545 {
546         .pixclock               = 86538,
547         .xres                   = 320,
548         .yres                   = 320,
549         .bpp                    = 16,
550
551         .left_margin            = 20,
552         .right_margin           = 8,
553         .upper_margin           = 8,
554         .lower_margin           = 5,
555
556         .hsync_len              = 4,
557         .vsync_len              = 1,
558 },
559 };
560
561 static void treo_lcd_power(int on, struct fb_var_screeninfo *info)
562 {
563         gpio_set_value(GPIO_NR_TREO_BL_POWER, on);
564 }
565
566 static struct pxafb_mach_info treo_lcd_screen = {
567         .modes          = treo_lcd_modes,
568         .num_modes      = ARRAY_SIZE(treo_lcd_modes),
569         .lcd_conn       = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
570 };
571
572 /******************************************************************************
573  * Power management - standby
574  ******************************************************************************/
575 static void __init treo_pm_init(void)
576 {
577         static u32 resume[] = {
578                 0xe3a00101,     /* mov  r0,     #0x40000000 */
579                 0xe380060f,     /* orr  r0, r0, #0x00f00000 */
580                 0xe590f008,     /* ldr  pc, [r0, #0x08] */
581         };
582
583         /* this is where the bootloader jumps */
584         memcpy(phys_to_virt(TREO_STR_BASE), resume, sizeof(resume));
585 }
586
587 /******************************************************************************
588  * Machine init
589  ******************************************************************************/
590 static struct platform_device *treo_devices[] __initdata = {
591         &treo_backlight,
592         &power_supply,
593 };
594
595 #ifdef CONFIG_MACH_TREO680
596 static struct platform_device *treo680_devices[] __initdata = {
597         &treo680_leds,
598 };
599 #endif /* CONFIG_MACH_TREO680 */
600
601 #ifdef CONFIG_MACH_CENTRO
602 static struct platform_device *centro_devices[] __initdata = {
603         &centro_leds,
604 };
605 #endif /* CONFIG_MACH_CENTRO */
606
607 /* setup udc GPIOs initial state */
608 static void __init treo_udc_init(void)
609 {
610         if (!gpio_request(GPIO_NR_TREO_USB_PULLUP, "UDC Vbus")) {
611                 gpio_direction_output(GPIO_NR_TREO_USB_PULLUP, 1);
612                 gpio_free(GPIO_NR_TREO_USB_PULLUP);
613         }
614 }
615
616 static void __init treo_lcd_power_init(void)
617 {
618         int ret;
619
620         ret = gpio_request(GPIO_NR_TREO_LCD_POWER, "LCD POWER");
621         if (ret) {
622                 pr_err("Treo680: LCD power GPIO request failed!\n");
623                 return;
624         }
625
626         ret = gpio_direction_output(GPIO_NR_TREO_LCD_POWER, 0);
627         if (ret) {
628                 pr_err("Treo680: setting LCD power GPIO direction failed!\n");
629                 gpio_free(GPIO_NR_TREO_LCD_POWER);
630                 return;
631         }
632
633         treo_lcd_screen.pxafb_lcd_power = treo_lcd_power;
634 }
635
636 static void __init treo_init(void)
637 {
638         pxa_set_ffuart_info(NULL);
639         pxa_set_btuart_info(NULL);
640         pxa_set_stuart_info(NULL);
641
642         treo_pm_init();
643         pxa2xx_mfp_config(ARRAY_AND_SIZE(treo_pin_config));
644         treo_lcd_power_init();
645         set_pxa_fb_info(&treo_lcd_screen);
646         treo_udc_init();
647         pxa_set_udc_info(&treo_udc_info);
648         pxa_set_ac97_info(&treo_ac97_pdata);
649         pxa_set_ficp_info(&treo_ficp_info);
650
651         platform_add_devices(ARRAY_AND_SIZE(treo_devices));
652 }
653
654 #ifdef CONFIG_MACH_TREO680
655 static void __init treo680_init(void)
656 {
657         treo_init();
658         pxa2xx_mfp_config(ARRAY_AND_SIZE(treo680_pin_config));
659         pxa_set_mci_info(&treo680_mci_platform_data);
660         pxa_set_keypad_info(&treo680_keypad_platform_data);
661         pxa_set_ohci_info(&treo680_ohci_info);
662
663         platform_add_devices(ARRAY_AND_SIZE(treo680_devices));
664 }
665
666 MACHINE_START(TREO680, "Palm Treo 680")
667         .phys_io        = TREO_PHYS_IO_START,
668         .io_pg_offst    = io_p2v(0x40000000),
669         .boot_params    = 0xa0000100,
670         .map_io         = pxa_map_io,
671         .init_irq       = pxa27x_init_irq,
672         .timer          = &pxa_timer,
673         .init_machine   = treo680_init,
674 MACHINE_END
675 #endif /* CONFIG_MACH_TREO680 */
676
677 #ifdef CONFIG_MACH_CENTRO
678 static void __init centro_init(void)
679 {
680         treo_init();
681         pxa2xx_mfp_config(ARRAY_AND_SIZE(centro685_pin_config));
682         pxa_set_mci_info(&centro_mci_platform_data);
683
684         pxa_set_keypad_info(&centro_keypad_platform_data);
685
686         platform_add_devices(ARRAY_AND_SIZE(centro_devices));
687 }
688
689 MACHINE_START(CENTRO, "Palm Centro 685")
690         .phys_io        = TREO_PHYS_IO_START,
691         .io_pg_offst    = io_p2v(0x40000000),
692         .boot_params    = 0xa0000100,
693         .map_io         = pxa_map_io,
694         .init_irq       = pxa27x_init_irq,
695         .timer          = &pxa_timer,
696        .init_machine   = centro_init,
697 MACHINE_END
698 #endif /* CONFIG_MACH_CENTRO */