phy-brcm-usb-init.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright (C) 2014-2017 Broadcom
  3. *
  4. * This software is licensed under the terms of the GNU General Public
  5. * License version 2, as published by the Free Software Foundation, and
  6. * may be copied, distributed, and modified under those terms.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. */
  13. #ifndef _USB_BRCM_COMMON_INIT_H
  14. #define _USB_BRCM_COMMON_INIT_H
  15. #define USB_CTLR_MODE_HOST 0
  16. #define USB_CTLR_MODE_DEVICE 1
  17. #define USB_CTLR_MODE_DRD 2
  18. #define USB_CTLR_MODE_TYPEC_PD 3
  19. struct brcm_usb_init_params;
  20. struct brcm_usb_init_params {
  21. void __iomem *ctrl_regs;
  22. void __iomem *xhci_ec_regs;
  23. int ioc;
  24. int ipp;
  25. int mode;
  26. u32 family_id;
  27. u32 product_id;
  28. int selected_family;
  29. const char *family_name;
  30. const u32 *usb_reg_bits_map;
  31. };
  32. void brcm_usb_set_family_map(struct brcm_usb_init_params *params);
  33. int brcm_usb_init_get_dual_select(struct brcm_usb_init_params *params);
  34. void brcm_usb_init_set_dual_select(struct brcm_usb_init_params *params,
  35. int mode);
  36. void brcm_usb_init_ipp(struct brcm_usb_init_params *ini);
  37. void brcm_usb_init_common(struct brcm_usb_init_params *ini);
  38. void brcm_usb_init_eohci(struct brcm_usb_init_params *ini);
  39. void brcm_usb_init_xhci(struct brcm_usb_init_params *ini);
  40. void brcm_usb_uninit_common(struct brcm_usb_init_params *ini);
  41. void brcm_usb_uninit_eohci(struct brcm_usb_init_params *ini);
  42. void brcm_usb_uninit_xhci(struct brcm_usb_init_params *ini);
  43. #endif /* _USB_BRCM_COMMON_INIT_H */