ehci_pdriver.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright (C) 2012 Hauke Mehrtens <[email protected]>
  4. */
  5. #ifndef __USB_CORE_EHCI_PDRIVER_H
  6. #define __USB_CORE_EHCI_PDRIVER_H
  7. struct platform_device;
  8. struct usb_hcd;
  9. /**
  10. * struct usb_ehci_pdata - platform_data for generic ehci driver
  11. *
  12. * @caps_offset: offset of the EHCI Capability Registers to the start of
  13. * the io memory region provided to the driver.
  14. * @has_tt: set to 1 if TT is integrated in root hub.
  15. * @port_power_on: set to 1 if the controller needs a power up after
  16. * initialization.
  17. * @port_power_off: set to 1 if the controller needs to be powered down
  18. * after initialization.
  19. * @no_io_watchdog: set to 1 if the controller does not need the I/O
  20. * watchdog to run.
  21. * @reset_on_resume: set to 1 if the controller needs to be reset after
  22. * a suspend / resume cycle (but can't detect that itself).
  23. *
  24. * These are general configuration options for the EHCI controller. All of
  25. * these options are activating more or less workarounds for some hardware.
  26. */
  27. struct usb_ehci_pdata {
  28. int caps_offset;
  29. unsigned has_tt:1;
  30. unsigned has_synopsys_hc_bug:1;
  31. unsigned big_endian_desc:1;
  32. unsigned big_endian_mmio:1;
  33. unsigned no_io_watchdog:1;
  34. unsigned reset_on_resume:1;
  35. unsigned dma_mask_64:1;
  36. unsigned spurious_oc:1;
  37. /* Turn on all power and clocks */
  38. int (*power_on)(struct platform_device *pdev);
  39. /* Turn off all power and clocks */
  40. void (*power_off)(struct platform_device *pdev);
  41. /* Turn on only VBUS suspend power and hotplug detection,
  42. * turn off everything else */
  43. void (*power_suspend)(struct platform_device *pdev);
  44. int (*pre_setup)(struct usb_hcd *hcd);
  45. };
  46. #endif /* __USB_CORE_EHCI_PDRIVER_H */