OMAP4: USB Host: Re-implement EHCI Hub Control to workaround errata

The OMAP4 EHCI controller has the following defect (errata ID i640):

Title:
	USB HOST EHCI In TLL Mode Will See The Port Being Disabled Upon Resume
	Or Remote Wakeup.

Description:
	This bug impacts the TLL module when used in conjunction with the EHCI
	part of the USB host module. Upon resume or remote wakeup from a bus
	suspended state, the device will switch from full speed to high speed
	before the host does.This will incorrectly generate a disconnect IRQ on
	the host side (USBSTS[2]:PCD=1), and the hardware will disable the port
	(PORTSC[2]:PED=0). The peripheral will then go back to suspend because
	there is no more activity on the bus.

	PHY mode (non-TLL) is not impacted. OHCI is not impacted.

WORKAROUND:
	The workaround consists of stalling the device for some time so that
	the host can switch to HS before the device.

	The programming guide to follow at the end of the resume sequence is:
	1. The host ends the resume sequence by clearing PORTSC.FPR bit.
	2. The software waits for the TLL to report the LineState change from
	   K to SE0 on ULPI. PORTSC.LS will switch from 0x1(K) to 0x0(SE0).
	3. Gate the TLL ULPI clock and thereby the device controller by PRCM
	   control: the whole TLL is frozen, including the ULPI clock
		- Clear the appropriate OPTFCLKEN_USB_CHx_CLK bit in the
		  CM_L3INIT_HSUSBTLL_CLKCTRL register
	4. Wait 3 us for the host to go to HS.
	5. Restart the TLL ULPI clock and the device controller by PRCM
	   control, to unfreeze the entire TLL, including the ULPI clock
		- Set back the appropriate OPTFCLKEN_USB_CHx_CLK bit in the
		  CM_L3INIT_HSUSBTLL_CLKCTRL register
	6. The USB device switches to HS.

Add a wrapper function to default ehci_hub_control function that is called
for omap4 devices for ports configured for TLL mode. Please note that
OMAP4430 ES2.3 devices are not impacted by this errata.

Change-Id: Iaf3e116c80681a5073febec3a254ac81f90f8bc6
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Ravikumar Vembu <a18394@motorola.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Ruslan Bilovol <x0155540@ti.com>
modified by faux123