diff options
author | Daniel Mack <daniel@caiaq.de> | 2009-03-13 11:37:11 -0400 |
---|---|---|
committer | Eric Miao <eric.miao@marvell.com> | 2009-03-22 21:57:54 -0400 |
commit | 42e07ad7fc111bde5cd6c0e5bd7085b4cecf96b7 (patch) | |
tree | 43f22ae375860ae6123926a58f89212afefed157 | |
parent | ebc046c2a3544ba4f55512a218a4084522473bcd (diff) |
[ARM] pxa: add USB support for Colibri PXA300
This adds support for USB OHCI for Toradex' Colibri PXA300 modules as
connected on the evaluation board.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
-rw-r--r-- | arch/arm/mach-pxa/colibri-pxa300.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/colibri-pxa300.c b/arch/arm/mach-pxa/colibri-pxa300.c index 7cc4249c7701..f1f24869c03d 100644 --- a/arch/arm/mach-pxa/colibri-pxa300.c +++ b/arch/arm/mach-pxa/colibri-pxa300.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <mach/pxa300.h> | 22 | #include <mach/pxa300.h> |
23 | #include <mach/colibri.h> | 23 | #include <mach/colibri.h> |
24 | #include <mach/mmc.h> | 24 | #include <mach/mmc.h> |
25 | #include <mach/ohci.h> | ||
25 | 26 | ||
26 | #include "generic.h" | 27 | #include "generic.h" |
27 | #include "devices.h" | 28 | #include "devices.h" |
@@ -41,6 +42,11 @@ static mfp_cfg_t colibri_pxa300_pin_config[] __initdata = { | |||
41 | GPIO5_MMC1_DAT2, | 42 | GPIO5_MMC1_DAT2, |
42 | GPIO6_MMC1_DAT3, | 43 | GPIO6_MMC1_DAT3, |
43 | #endif | 44 | #endif |
45 | |||
46 | #if defined (CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) | ||
47 | GPIO0_2_USBH_PEN, | ||
48 | GPIO1_2_USBH_PWR, | ||
49 | #endif | ||
44 | }; | 50 | }; |
45 | 51 | ||
46 | #if defined(CONFIG_AX88796) | 52 | #if defined(CONFIG_AX88796) |
@@ -137,12 +143,27 @@ static void __init colibri_pxa300_init_mmc(void) | |||
137 | static inline void colibri_pxa300_init_mmc(void) {} | 143 | static inline void colibri_pxa300_init_mmc(void) {} |
138 | #endif /* CONFIG_MMC_PXA */ | 144 | #endif /* CONFIG_MMC_PXA */ |
139 | 145 | ||
146 | #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) | ||
147 | static struct pxaohci_platform_data colibri_pxa300_ohci_info = { | ||
148 | .port_mode = PMM_GLOBAL_MODE, | ||
149 | .flags = ENABLE_PORT1 | POWER_CONTROL_LOW | POWER_SENSE_LOW, | ||
150 | }; | ||
151 | |||
152 | static void __init colibri_pxa300_init_ohci(void) | ||
153 | { | ||
154 | pxa_set_ohci_info(&colibri_pxa300_ohci_info); | ||
155 | } | ||
156 | #else | ||
157 | static inline void colibri_pxa300_init_ohci(void) {} | ||
158 | #endif /* CONFIG_USB_OHCI_HCD || CONFIG_USB_OHCI_HCD_MODULE */ | ||
159 | |||
140 | static void __init colibri_pxa300_init(void) | 160 | static void __init colibri_pxa300_init(void) |
141 | { | 161 | { |
142 | set_irq_type(COLIBRI_PXA300_ETH_IRQ, IRQ_TYPE_EDGE_FALLING); | 162 | set_irq_type(COLIBRI_PXA300_ETH_IRQ, IRQ_TYPE_EDGE_FALLING); |
143 | pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa300_pin_config)); | 163 | pxa3xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa300_pin_config)); |
144 | platform_add_devices(ARRAY_AND_SIZE(colibri_pxa300_devices)); | 164 | platform_add_devices(ARRAY_AND_SIZE(colibri_pxa300_devices)); |
145 | colibri_pxa300_init_mmc(); | 165 | colibri_pxa300_init_mmc(); |
166 | colibri_pxa300_init_ohci(); | ||
146 | } | 167 | } |
147 | 168 | ||
148 | MACHINE_START(COLIBRI300, "Toradex Colibri PXA300") | 169 | MACHINE_START(COLIBRI300, "Toradex Colibri PXA300") |