Commit edaa64c9 authored by Igor Grinberg's avatar Igor Grinberg Committed by Eric Miao

[ARM] pxa/cm-x300: enable USB port 2 for PXA300

Port 2 requires setting of UP2OCR register to function as USB host.
Signed-off-by: default avatarIgor Grinberg <grinberg@compulab.co.il>
Signed-off-by: default avatarMike Rapoport <mike@compulab.co.il>
Signed-off-by: default avatarEric Miao <eric.y.miao@gmail.com>
parent def8252d
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include <asm/setup.h> #include <asm/setup.h>
#include <mach/pxa300.h> #include <mach/pxa300.h>
#include <mach/pxa27x-udc.h>
#include <mach/pxafb.h> #include <mach/pxafb.h>
#include <mach/mmc.h> #include <mach/mmc.h>
#include <mach/ohci.h> #include <mach/ohci.h>
...@@ -437,9 +438,19 @@ static inline void cm_x300_init_mmc(void) {} ...@@ -437,9 +438,19 @@ static inline void cm_x300_init_mmc(void) {}
#endif #endif
#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
static int cm_x300_ohci_init(struct device *dev)
{
if (cpu_is_pxa300())
UP2OCR = UP2OCR_HXS
| UP2OCR_HXOE | UP2OCR_DMPDE | UP2OCR_DPPDE;
return 0;
}
static struct pxaohci_platform_data cm_x300_ohci_platform_data = { static struct pxaohci_platform_data cm_x300_ohci_platform_data = {
.port_mode = PMM_PERPORT_MODE, .port_mode = PMM_PERPORT_MODE,
.flags = ENABLE_PORT1 | ENABLE_PORT2 | POWER_CONTROL_LOW, .flags = ENABLE_PORT_ALL | POWER_CONTROL_LOW,
.init = cm_x300_ohci_init,
}; };
static void __init cm_x300_init_ohci(void) static void __init cm_x300_init_ohci(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment