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