blob: 7eb4dcd0d38663ab434919bd4d4e867788a4a6a0 [file] [log] [blame]
Hauke Mehrtens7a7a4a592012-03-13 01:04:48 +01001/*
2 * Copyright (C) 2012 Hauke Mehrtens <hauke@hauke-m.de>
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 */
18
19#ifndef __USB_CORE_EHCI_PDRIVER_H
20#define __USB_CORE_EHCI_PDRIVER_H
21
Sergei Shtylyov743fcce2013-06-02 01:33:56 +040022struct platform_device;
23struct usb_hcd;
24
Hauke Mehrtens7a7a4a592012-03-13 01:04:48 +010025/**
26 * struct usb_ehci_pdata - platform_data for generic ehci driver
27 *
28 * @caps_offset: offset of the EHCI Capability Registers to the start of
29 * the io memory region provided to the driver.
30 * @has_tt: set to 1 if TT is integrated in root hub.
31 * @port_power_on: set to 1 if the controller needs a power up after
32 * initialization.
33 * @port_power_off: set to 1 if the controller needs to be powered down
34 * after initialization.
Florian Fainelli45348742012-10-08 15:11:21 +020035 * @no_io_watchdog: set to 1 if the controller does not need the I/O
36 * watchdog to run.
Hauke Mehrtens7a7a4a592012-03-13 01:04:48 +010037 *
38 * These are general configuration options for the EHCI controller. All of
39 * these options are activating more or less workarounds for some hardware.
40 */
41struct usb_ehci_pdata {
42 int caps_offset;
43 unsigned has_tt:1;
44 unsigned has_synopsys_hc_bug:1;
45 unsigned big_endian_desc:1;
46 unsigned big_endian_mmio:1;
Florian Fainelli45348742012-10-08 15:11:21 +020047 unsigned no_io_watchdog:1;
Kuninori Morimoto04216be2012-08-06 18:08:39 -070048
49 /* Turn on all power and clocks */
50 int (*power_on)(struct platform_device *pdev);
51 /* Turn off all power and clocks */
52 void (*power_off)(struct platform_device *pdev);
53 /* Turn on only VBUS suspend power and hotplug detection,
54 * turn off everything else */
55 void (*power_suspend)(struct platform_device *pdev);
Sergei Shtylyov743fcce2013-06-02 01:33:56 +040056 int (*pre_setup)(struct usb_hcd *hcd);
Hauke Mehrtens7a7a4a592012-03-13 01:04:48 +010057};
58
59#endif /* __USB_CORE_EHCI_PDRIVER_H */