1 #ifndef _ARM_IMX_IMXUSBVAR_H 2 #define _ARM_IMX_IMXUSBVAR_H 3 4 struct imxehci_softc; 5 6 enum imx_usb_role { 7 IMXUSB_HOST, 8 IMXUSB_DEVICE 9 }; 10 11 struct imxusbc_softc { 12 device_t sc_dev; 13 bus_space_tag_t sc_iot; 14 bus_space_handle_t sc_ioh; 15 16 /* filled in by platform dependent routine */ 17 void (* sc_init_md_hook)(struct imxehci_softc *); 18 void (* sc_setup_md_hook)(struct imxehci_softc *, enum imx_usb_role); 19 }; 20 21 struct imxusbc_attach_args { 22 bus_space_tag_t aa_iot; 23 bus_space_handle_t aa_ioh; 24 bus_dma_tag_t aa_dmat; 25 int aa_unit; /* 0: OTG, 1: HOST1, 2: HOST2 ... */ 26 int aa_irq; 27 }; 28 29 enum imx_usb_if { 30 IMXUSBC_IF_UTMI, 31 IMXUSBC_IF_PHILIPS, 32 IMXUSBC_IF_ULPI, 33 IMXUSBC_IF_SERIAL 34 }; 35 36 struct imxehci_softc { 37 ehci_softc_t sc_hsc; 38 39 bus_space_tag_t sc_iot; 40 bus_space_handle_t sc_ioh; 41 struct imxusbc_softc *sc_usbc; 42 uint sc_unit; 43 enum imx_usb_if sc_iftype; 44 }; 45 46 int imxusbc_attach_common(device_t, device_t, bus_space_tag_t); 47 void imxehci_select_interface(struct imxehci_softc *, enum imx_usb_if); 48 void imxehci_host_mode(struct imxehci_softc *); 49 void imxehci_reset(struct imxehci_softc *); 50 51 #endif /* _ARM_IMX_IMXUSBVAR_H */ 52