aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/pcm990-baseboard.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/pcm990-baseboard.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/pcm990-baseboard.c')
-rw-r--r--arch/arm/mach-pxa/pcm990-baseboard.c30
1 files changed, 2 insertions, 28 deletions
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c
index 420c9b3813f6..e9efb80bb339 100644
--- a/arch/arm/mach-pxa/pcm990-baseboard.c
+++ b/arch/arm/mach-pxa/pcm990-baseboard.c
@@ -328,36 +328,10 @@ static struct pxamci_platform_data pcm990_mci_platform_data = {
328 .exit = pcm990_mci_exit, 328 .exit = pcm990_mci_exit,
329}; 329};
330 330
331/*
332 * init OHCI hardware to work with
333 *
334 * Note: Only USB port 1 (host only) is connected
335 *
336 * GPIO88 (USBHPWR#1): overcurrent in, overcurrent when low
337 * GPIO89 (USBHPEN#1): power-on out, on when low
338 */
339static int pcm990_ohci_init(struct device *dev)
340{
341 /*
342 * disable USB port 2 and 3
343 * power sense is active low
344 */
345 UHCHR = ((UHCHR) | UHCHR_PCPL | UHCHR_PSPL | UHCHR_SSEP2 |
346 UHCHR_SSEP3) & ~(UHCHR_SSEP1 | UHCHR_SSE);
347 /*
348 * wait 10ms after Power on
349 * overcurrent per port
350 * power switch per port
351 */
352 UHCRHDA = (5<<24) | (1<<11) | (1<<8); /* FIXME: Required? */
353
354 return 0;
355}
356
357static struct pxaohci_platform_data pcm990_ohci_platform_data = { 331static struct pxaohci_platform_data pcm990_ohci_platform_data = {
358 .port_mode = PMM_PERPORT_MODE, 332 .port_mode = PMM_PERPORT_MODE,
359 .init = pcm990_ohci_init, 333 .flags = ENABLE_PORT1 | POWER_CONTROL_LOW | POWER_SENSE_LOW,
360 .exit = NULL, 334 .power_on_delay = 10,
361}; 335};
362 336
363/* 337/*