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