aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-pxa
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2006-01-05 20:44:52 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-01-05 20:44:52 +0000
commit3125c68d70e3433c21234431a9df9e7336efa29f (patch)
treed4602c154d66b301982a9c2ae8c2808dc7cd9a72 /arch/arm/mach-pxa
parent4c70b926c91ba9c1ce3dc92d418f8e4670c8f16d (diff)
[ARM] 3227/1: Spitz: Add pxa27x OHCI platform specific code
Patch from Richard Purdie Add platform code to enable the ohci device on the pxa27x based Sharp Zaurus Cxx00 devices. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r--arch/arm/mach-pxa/spitz.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index 2df1b56615b..5d34abc64af 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -36,6 +36,7 @@
#include <asm/arch/irq.h>
#include <asm/arch/irda.h>
#include <asm/arch/mmc.h>
+#include <asm/arch/ohci.h>
#include <asm/arch/udc.h>
#include <asm/arch/pxafb.h>
#include <asm/arch/akita.h>
@@ -335,6 +336,35 @@ static struct pxamci_platform_data spitz_mci_platform_data = {
/*
+ * USB Host (OHCI)
+ */
+static int spitz_ohci_init(struct device *dev)
+{
+ /* Only Port 2 is connected */
+ pxa_gpio_mode(SPITZ_GPIO_USB_CONNECT | GPIO_IN);
+ pxa_gpio_mode(SPITZ_GPIO_USB_HOST | GPIO_OUT);
+ pxa_gpio_mode(SPITZ_GPIO_USB_DEVICE | GPIO_IN);
+
+ /* Setup USB Port 2 Output Control Register */
+ UP2OCR = UP2OCR_HXS | UP2OCR_HXOE | UP2OCR_DPPDE | UP2OCR_DMPDE;
+
+ GPSR(SPITZ_GPIO_USB_HOST) = GPIO_bit(SPITZ_GPIO_USB_HOST);
+
+ UHCHR = (UHCHR) &
+ ~(UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSEP3 | UHCHR_SSE);
+
+ UHCRHDA |= UHCRHDA_NOCP;
+
+ return 0;
+}
+
+static struct pxaohci_platform_data spitz_ohci_platform_data = {
+ .port_mode = PMM_NPS_MODE,
+ .init = spitz_ohci_init,
+};
+
+
+/*
* Irda
*/
static void spitz_irda_transceiver_mode(struct device *dev, int mode)
@@ -411,6 +441,7 @@ static void __init common_init(void)
platform_add_devices(devices, ARRAY_SIZE(devices));
pxa_set_mci_info(&spitz_mci_platform_data);
+ pxa_set_ohci_info(&spitz_ohci_platform_data);
pxa_set_ficp_info(&spitz_ficp_platform_data);
set_pxa_fb_parent(&spitzssp_device.dev);
set_pxa_fb_info(&spitz_pxafb_info);