FreeBSD/sys/arm/ti/usb/omap_ehci.c
/**
 *	omap_ehci_init - initialises the USB host EHCI controller
 *	@isc: omap ehci device context
 *
 *	This initialisation routine is quite heavily based on the work done by the
 *	OMAP Linux team (for which I thank them very much).  The init sequence is
 *	almost identical, diverging only for the FreeBSD specifics.
 *
 *	LOCKING:
 *	none
 *
 *	RETURNS:
 *	0 on success, a negative error code on failure.
 */
initialises the USB host EHCI controller
@isc: omap ehci device context

This initialisation routine is quite heavily based on the work done by the
OMAP Linux team (for which I thank them very much).  The init sequence is
almost identical, diverging only for the FreeBSD specifics.

none

0 on success, a negative error code on failure.
initialises the USB host EHCI controller @isc : omap ehci device context This initialisation routine is quite heavily based on the work done by the OMAP Linux team ( for which I thank them very much ) . The init sequence is almost identical diverging only for the FreeBSD specifics . none 0 on success a negative error code on failure .
static int
omap_ehci_init(struct omap_ehci_softc *isc)
{
	uint32_t reg = 0;
	int i;
	device_t uhh_dev;
	uhh_dev = device_get_parent(isc->sc_dev);
	device_printf(isc->sc_dev, "Starting TI EHCI USB Controller\n");
	reg = omap_ehci_read_4(isc, OMAP_USBHOST_USBCMD);
	reg &= 0xff00ffff;
	reg |= (1 << 16);
	omap_ehci_write_4(isc, OMAP_USBHOST_USBCMD, reg);
	for (i = 0; i < OMAP_HS_USB_PORTS; i++) {
		if (omap_usb_port_mode(uhh_dev, i) == EHCI_HCD_OMAP_MODE_PHY)
			omap_ehci_soft_phy_reset(isc, i);
	}
	return(0);
}
static int omap_ehci_init ( struct omap_ehci_softc * isc ) { uint32_t reg = 0 ; int i ; device_t uhh_dev ; uhh_dev = device_get_parent ( isc -> sc_dev ) ; device_printf ( isc -> sc_dev , " \n " ) ; reg = omap_ehci_read_4 ( isc , OMAP_USBHOST_USBCMD ) ; reg &= 0xff00ffff ; reg |= ( 1 << 16 ) ; omap_ehci_write_4 ( isc , OMAP_USBHOST_USBCMD , reg ) ; for ( i = 0 ; i < OMAP_HS_USB_PORTS ; i ++ ) { if ( omap_usb_port_mode ( uhh_dev , i ) == EHCI_HCD_OMAP_MODE_PHY ) omap_ehci_soft_phy_reset ( isc , i ) ; } return ( 0 ) ; }
omap_ehci_init - initialises the USB host EHCI controller
      @isc: omap ehci device context
omap_ehci_init - initialises the USB host EHCI controller @isc : omap ehci device context
/* Set the interrupt threshold control, it controls the maximum rate at
	 * which the host controller issues interrupts.  We set it to 1 microframe
	 * at startup - the default is 8 mircoframes (equates to 1ms).
	 */ /* Soft reset the PHY using PHY reset command over ULPI */