Home | History | Annotate | Line # | Download | only in imx
imxusbvar.h revision 1.4
      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 param & routine */
     17 	bus_size_t sc_ehci_size;
     18 	void (* sc_init_md_hook)(struct imxehci_softc *);
     19 	void (* sc_setup_md_hook)(struct imxehci_softc *, enum imx_usb_role);
     20 };
     21 
     22 struct imxusbc_attach_args {
     23 	bus_space_tag_t aa_iot;
     24 	bus_space_handle_t aa_ioh;
     25 	bus_dma_tag_t aa_dmat;
     26 	int aa_unit;	/* 0: OTG, 1: HOST1, 2: HOST2 ... */
     27 	int aa_irq;
     28 };
     29 
     30 enum imx_usb_if {
     31 	IMXUSBC_IF_UTMI,
     32 	IMXUSBC_IF_PHILIPS,
     33 	IMXUSBC_IF_ULPI,
     34 	IMXUSBC_IF_SERIAL,
     35 	IMXUSBC_IF_UTMI_WIDE,
     36 	IMXUSBC_IF_HSIC
     37 };
     38 
     39 struct imxehci_softc {
     40 	ehci_softc_t sc_hsc;
     41 
     42 	bus_space_tag_t sc_iot;
     43 	bus_space_handle_t sc_ioh;
     44 	struct imxusbc_softc *sc_usbc;
     45 	uint sc_unit;
     46 	enum imx_usb_if sc_iftype;
     47 };
     48 
     49 int imxusbc_attach_common(device_t, device_t, bus_space_tag_t);
     50 void imxehci_reset(struct imxehci_softc *);
     51 
     52 #endif	/* _ARM_IMX_IMXUSBVAR_H */
     53