ehci_pdriver.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  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. #ifndef __USB_CORE_EHCI_PDRIVER_H
  19. #define __USB_CORE_EHCI_PDRIVER_H
  20. /**
  21. * struct usb_ehci_pdata - platform_data for generic ehci driver
  22. *
  23. * @caps_offset: offset of the EHCI Capability Registers to the start of
  24. * the io memory region provided to the driver.
  25. * @has_tt: set to 1 if TT is integrated in root hub.
  26. * @port_power_on: set to 1 if the controller needs a power up after
  27. * initialization.
  28. * @port_power_off: set to 1 if the controller needs to be powered down
  29. * after initialization.
  30. * @no_io_watchdog: set to 1 if the controller does not need the I/O
  31. * watchdog to run.
  32. *
  33. * These are general configuration options for the EHCI controller. All of
  34. * these options are activating more or less workarounds for some hardware.
  35. */
  36. struct usb_ehci_pdata {
  37. int caps_offset;
  38. unsigned has_tt:1;
  39. unsigned has_synopsys_hc_bug:1;
  40. unsigned big_endian_desc:1;
  41. unsigned big_endian_mmio:1;
  42. unsigned no_io_watchdog:1;
  43. /* Turn on all power and clocks */
  44. int (*power_on)(struct platform_device *pdev);
  45. /* Turn off all power and clocks */
  46. void (*power_off)(struct platform_device *pdev);
  47. /* Turn on only VBUS suspend power and hotplug detection,
  48. * turn off everything else */
  49. void (*power_suspend)(struct platform_device *pdev);
  50. };
  51. #endif /* __USB_CORE_EHCI_PDRIVER_H */