aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/cm-x300.c
diff options
context:
space:
mode:
authorEric Miao <eric.miao@marvell.com>2008-09-27 03:49:57 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-10-07 14:12:57 -0400
commit097b53348f34a461d2b07081eae12d823cf3d729 (patch)
tree62f59bdfc0252346666158b6c236fc250850cb36 /arch/arm/mach-pxa/cm-x300.c
parent52358ba3a89012c54712c24074ceb4b1c669af52 (diff)
[ARM] ohci-pxa27x: introduce flags to avoid direct access to OHCI registers
Direct access to USB host controller registers is considered to be not portable, and is usually a bad sign for poorly abstracted interface. Introduce .flags and .power_on_delay to "struct pxaohci_platform_data" so that most platforms don't bother to write their own .init/.exit() sequences. Signed-off-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa/cm-x300.c')
-rw-r--r--arch/arm/mach-pxa/cm-x300.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c
index 7bc5679b41ba..deb46cd144bf 100644
--- a/arch/arm/mach-pxa/cm-x300.c
+++ b/arch/arm/mach-pxa/cm-x300.c
@@ -365,19 +365,11 @@ static inline void cm_x300_init_mmc(void) {}
365#endif 365#endif
366 366
367#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) 367#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
368static int cm_x300_ohci_init(struct device *dev)
369{
370 /* Set the Power Control Polarity Low */
371 UHCHR = (UHCHR | UHCHR_PCPL) &
372 ~(UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE);
373
374 return 0;
375}
376
377static struct pxaohci_platform_data cm_x300_ohci_platform_data = { 368static struct pxaohci_platform_data cm_x300_ohci_platform_data = {
378 .port_mode = PMM_PERPORT_MODE, 369 .port_mode = PMM_PERPORT_MODE,
379 .init = cm_x300_ohci_init, 370 .flags = ENABLE_PORT1 | ENABLE_PORT2 | POWER_CONTROL_LOW,
380}; 371};
372
381static void __init cm_x300_init_ohci(void) 373static void __init cm_x300_init_ohci(void)
382{ 374{
383 pxa_set_ohci_info(&cm_x300_ohci_platform_data); 375 pxa_set_ohci_info(&cm_x300_ohci_platform_data);