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