GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / arch / arm / mach-pxa / colibri-pxa270-evalboard.c
blob7406cf049d255e0cdd2b8a5616c62f190e5e249b
1 /*
2 * linux/arch/arm/mach-pxa/colibri-pxa270-evalboard.c
4 * Support for Toradex PXA270 based Colibri Evaluation Carrier Board
5 * Daniel Mack <daniel@caiaq.de>
6 * Marek Vasut <marek.vasut@gmail.com>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
13 #include <linux/init.h>
14 #include <linux/kernel.h>
15 #include <linux/platform_device.h>
16 #include <linux/sysdev.h>
17 #include <linux/interrupt.h>
18 #include <linux/gpio.h>
19 #include <asm/mach-types.h>
20 #include <mach/hardware.h>
21 #include <asm/mach/arch.h>
23 #include <mach/pxa27x.h>
24 #include <mach/colibri.h>
25 #include <mach/mmc.h>
26 #include <mach/ohci.h>
27 #include <mach/pxa27x-udc.h>
29 #include "generic.h"
30 #include "devices.h"
32 /******************************************************************************
33 * Pin configuration
34 ******************************************************************************/
35 static mfp_cfg_t colibri_pxa270_evalboard_pin_config[] __initdata = {
36 /* MMC */
37 GPIO32_MMC_CLK,
38 GPIO92_MMC_DAT_0,
39 GPIO109_MMC_DAT_1,
40 GPIO110_MMC_DAT_2,
41 GPIO111_MMC_DAT_3,
42 GPIO112_MMC_CMD,
43 GPIO0_GPIO, /* SD detect */
45 /* FFUART */
46 GPIO39_FFUART_TXD,
47 GPIO34_FFUART_RXD,
49 /* UHC */
50 GPIO88_USBH1_PWR,
51 GPIO89_USBH1_PEN,
52 GPIO119_USBH2_PWR,
53 GPIO120_USBH2_PEN,
56 /******************************************************************************
57 * SD/MMC card controller
58 ******************************************************************************/
59 #if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
60 static struct pxamci_platform_data colibri_pxa270_mci_platform_data = {
61 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
62 .gpio_power = -1,
63 .gpio_card_detect = GPIO0_COLIBRI_PXA270_SD_DETECT,
64 .gpio_card_ro = -1,
65 .detect_delay_ms = 200,
68 static void __init colibri_pxa270_mmc_init(void)
70 pxa_set_mci_info(&colibri_pxa270_mci_platform_data);
72 #else
73 static inline void colibri_pxa270_mmc_init(void) {}
74 #endif
76 /******************************************************************************
77 * USB Host
78 ******************************************************************************/
79 #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
80 static int colibri_pxa270_ohci_init(struct device *dev)
82 UP2OCR = UP2OCR_HXS | UP2OCR_HXOE | UP2OCR_DPPDE | UP2OCR_DMPDE;
83 return 0;
86 static struct pxaohci_platform_data colibri_pxa270_ohci_info = {
87 .port_mode = PMM_PERPORT_MODE,
88 .flags = ENABLE_PORT1 | ENABLE_PORT2 |
89 POWER_CONTROL_LOW | POWER_SENSE_LOW,
90 .init = colibri_pxa270_ohci_init,
93 static void __init colibri_pxa270_uhc_init(void)
95 pxa_set_ohci_info(&colibri_pxa270_ohci_info);
97 #else
98 static inline void colibri_pxa270_uhc_init(void) {}
99 #endif
101 void __init colibri_pxa270_evalboard_init(void)
103 pxa2xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa270_evalboard_pin_config));
104 pxa_set_ffuart_info(NULL);
105 pxa_set_btuart_info(NULL);
106 pxa_set_stuart_info(NULL);
108 colibri_pxa270_mmc_init();
109 colibri_pxa270_uhc_init();