usb: host: read bus scaling parameters for HSIC host

Use a bus scaling device tree parameters for the HSIC host node.

Change-Id: I93f57400c6a2a4da2634b50fd67f2d6015eab9c2
Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
EHCI: HSIC: Fix a race between root hub resume and controller removal

The pm_qos request is removed before unregistering the HCD in remove
function. If root hub resume runs in parallel, there is a possibility
of adding the pm_qos request back to the active list. The pm_qos request
memory is freed after unregistering the HCD and this would lead to
pm_qos list corruption. A crash is observed when another driver is
submitting a pm_qos request after HSIC controller is removed during
shutdown.  Remove HCD prior to releasing controller resources.

CRs-Fixed: 444928
Change-Id: Iaed6964e7d4245b8ae6c295ed6c76f5a9d32e20f
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
usb: ehci-msm-hsic: Restore CMD_RUN bit in ehci->command after resume

EHCI driver maintains a copy of USB_CMD contents in ehci->command
variable.  CMD_RUN bit is cleared from this variable to delay SOF
till port is resumed. Restore this bit back in ehci->command after
resume is completed otherwise ehci driver may later use stale
ehci->command value to update USB_CMD register clearing CMD_RUN bit.

Change-Id: I672aa14140f44a8de8757d84fe2305693da18130
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
usb: ehci-msm-hsic: Add support for ASYNC IRQ to exit LPM

Some HSIC controllers have dedicated IRQ line for ASYNC interrupts
to notify any wakeup event during low power state. Add support for
the same.

CRs-Fixed: 452718
Change-Id: I63f7b21c8306e043128e3c4cae32732a3af60e67
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
EHCI: HSIC: fix driver removal function for msm_hsic_host

Upon driver removal function we need to disable the device pm runtime
in order to, first, undo all the logic done in probe and second, to keep
balanced disable depth counter in case of platform driver unbind.

However the removal function can be called also in consequences of
platform_device_del(), in this case the platform device was already
disabled and removed so if we call pm_runtime_disable() again we
decrease the disable_depth for the second time causing for unbalanced
counter.

Therefore we use an if statement to check if the device was already
removed or not.

CRs-Fixed: 445674
Change-Id: I5ff6b20d0f8e811a5c673903ca340f7bcc2e2d78
Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
USB: ehci_hcd: Don't panic on receiving FATAL ERROR

"commit 105d07f EHCI: HSIC: Add debug support for HSIC system error"
 has introduced panic() on receiving FATAL STATUS interrupt. For OTG
and 2nd/3rd HSUSB instance this panic() is not required as the system
can be functional with USB system error, hence avoiding this panic()
for OTG and 2nd/3rd HSUSB instances.

CRs-Fixed: 447040
Change-Id: I94dc63c5e8ac612ce9bbe42d2ef8266816be2693
Signed-off-by: Chiranjeevi Velempati <cvelempa@codeaurora.org>
msm: msm_bus: Add device tree support for bus scaling clients

This patch enables clients to specify vectors in device tree
format. Clients will no longer need to specify vectors in
the boards file. Instead, they can add the bus-scaling
related data to their own device-nodes.
The clients can then call an API exposed by the bus driver
which will build the pdata out of those strings.
The registration process using pdata remains unchanged.

Change-Id: I1bba645d031e2cd822f16d8edcdf926a0418618c
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
Linux 3.4.33

Signed-off-by: Harsh Bhanvadia <harsh.slade@gmail.com>