blob: 0926e99f2e8fe365a51bdf9b847d34b0b0b4234b [file] [log] [blame]
Sergei Shtylyov371b53e02009-09-25 22:24:57 +04001/*
2 * USB related definitions
3 *
4 * Copyright (C) 2009 MontaVista Software, Inc. <source@mvista.com>
5 *
6 * This file is licensed under the terms of the GNU General Public License
7 * version 2. This program is licensed "as is" without any warranty of any
8 * kind, whether express or implied.
9 */
10
11#ifndef __ASM_ARCH_USB_H
12#define __ASM_ARCH_USB_H
13
Sergei Shtylyove5d3d252009-09-25 23:14:02 +040014struct da8xx_ohci_root_hub;
15
16typedef void (*da8xx_ocic_handler_t)(struct da8xx_ohci_root_hub *hub,
17 unsigned port);
18
19/* Passed as the platform data to the OHCI driver */
20struct da8xx_ohci_root_hub {
21 /* Switch the port power on/off */
22 int (*set_power)(unsigned port, int on);
23 /* Read the port power status */
24 int (*get_power)(unsigned port);
25 /* Read the port over-current indicator */
26 int (*get_oci)(unsigned port);
27 /* Over-current indicator change notification (pass NULL to disable) */
28 int (*ocic_notify)(da8xx_ocic_handler_t handler);
29
30 /* Time from power on to power good (in 2 ms units) */
31 u8 potpgt;
32};
33
Sergei Shtylyov355fb4e2009-10-30 23:46:14 +040034void davinci_setup_usb(unsigned mA, unsigned potpgt_ms);
35
Sergei Shtylyov371b53e02009-09-25 22:24:57 +040036#endif /* ifndef __ASM_ARCH_USB_H */