aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2010-05-21 18:29:36 -0400
committerEric Miao <eric.y.miao@gmail.com>2010-06-18 03:07:34 -0400
commit8f146191b82889c4d47261ec801bddfab453381a (patch)
tree843aae217c9b22a2f5debc7443bb0d501dfb1c79 /arch/arm/mach-pxa
parent12d94208dbeed61ea5e00f7ba6b0b29bf960e5a9 (diff)
[ARM] pxa/colibri270: Add UHC support
Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r--arch/arm/mach-pxa/colibri-pxa270.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/colibri-pxa270.c b/arch/arm/mach-pxa/colibri-pxa270.c
index 3d19a6a25b4b..22105d63942c 100644
--- a/arch/arm/mach-pxa/colibri-pxa270.c
+++ b/arch/arm/mach-pxa/colibri-pxa270.c
@@ -34,6 +34,8 @@
34#include <mach/pxa27x.h> 34#include <mach/pxa27x.h>
35#include <mach/colibri.h> 35#include <mach/colibri.h>
36#include <mach/mmc.h> 36#include <mach/mmc.h>
37#include <mach/ohci.h>
38#include <mach/pxa27x-udc.h>
37 39
38#include "generic.h" 40#include "generic.h"
39#include "devices.h" 41#include "devices.h"
@@ -58,6 +60,12 @@ static mfp_cfg_t colibri_pxa270_pin_config[] __initdata = {
58 /* FFUART */ 60 /* FFUART */
59 GPIO39_FFUART_TXD, 61 GPIO39_FFUART_TXD,
60 GPIO34_FFUART_RXD, 62 GPIO34_FFUART_RXD,
63
64 /* UHC */
65 GPIO88_USBH1_PWR,
66 GPIO89_USBH1_PEN,
67 GPIO119_USBH2_PWR,
68 GPIO120_USBH2_PEN,
61}; 69};
62 70
63/****************************************************************************** 71/******************************************************************************
@@ -172,6 +180,31 @@ static void __init colibri_pxa270_mmc_init(void)
172static inline void colibri_pxa270_mmc_init(void) {} 180static inline void colibri_pxa270_mmc_init(void) {}
173#endif 181#endif
174 182
183/******************************************************************************
184 * USB Host
185 ******************************************************************************/
186#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
187static int colibri_pxa270_ohci_init(struct device *dev)
188{
189 UP2OCR = UP2OCR_HXS | UP2OCR_HXOE | UP2OCR_DPPDE | UP2OCR_DMPDE;
190 return 0;
191}
192
193static struct pxaohci_platform_data colibri_pxa270_ohci_info = {
194 .port_mode = PMM_PERPORT_MODE,
195 .flags = ENABLE_PORT1 | ENABLE_PORT2 |
196 POWER_CONTROL_LOW | POWER_SENSE_LOW,
197 .init = colibri_pxa270_ohci_init,
198};
199
200static void __init colibri_pxa270_uhc_init(void)
201{
202 pxa_set_ohci_info(&colibri_pxa270_ohci_info);
203}
204#else
205static inline void colibri_pxa270_uhc_init(void) {}
206#endif
207
175static void __init colibri_pxa270_init(void) 208static void __init colibri_pxa270_init(void)
176{ 209{
177 pxa2xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa270_pin_config)); 210 pxa2xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa270_pin_config));
@@ -182,6 +215,7 @@ static void __init colibri_pxa270_init(void)
182 colibri_pxa270_nor_init(); 215 colibri_pxa270_nor_init();
183 colibri_pxa270_eth_init(); 216 colibri_pxa270_eth_init();
184 colibri_pxa270_mmc_init(); 217 colibri_pxa270_mmc_init();
218 colibri_pxa270_uhc_init();
185} 219}
186 220
187MACHINE_START(COLIBRI, "Toradex Colibri PXA270") 221MACHINE_START(COLIBRI, "Toradex Colibri PXA270")