imxusbvar.h revision 1.3
1#ifndef _ARM_IMX_IMXUSBVAR_H 2#define _ARM_IMX_IMXUSBVAR_H 3 4struct imxehci_softc; 5 6enum imx_usb_role { 7 IMXUSB_HOST, 8 IMXUSB_DEVICE 9}; 10 11struct 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 21struct 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 29enum imx_usb_if { 30 IMXUSBC_IF_UTMI, 31 IMXUSBC_IF_PHILIPS, 32 IMXUSBC_IF_ULPI, 33 IMXUSBC_IF_SERIAL, 34 IMXUSBC_IF_UTMI_WIDE 35}; 36 37struct imxehci_softc { 38 ehci_softc_t sc_hsc; 39 40 bus_space_tag_t sc_iot; 41 bus_space_handle_t sc_ioh; 42 struct imxusbc_softc *sc_usbc; 43 uint sc_unit; 44 enum imx_usb_if sc_iftype; 45}; 46 47int imxusbc_attach_common(device_t, device_t, bus_space_tag_t); 48void imxehci_reset(struct imxehci_softc *); 49 50#endif /* _ARM_IMX_IMXUSBVAR_H */ 51