ehci: msm-hsic: Add support to disable transaction error counter

CERR is 2bit down error counter that keeps track of number of consecutive
errors detected on single usb transaction. When set to non zero value, hw
decrements the count and updates qTD when transaction fails. If counter
reaches zero, hw marks the qTD inactive and triggers the interrupt. When
CERR is programmed to zero, hw ignores transaction failures. EHCI stack
programs the CERR  to 3 by default. Some peripherals might not work
correctly when CERR is set to 3. Add support to disable CERR in such
platforms.

Change-Id: I750fbe13d70e5f7359c4e1ee1fb649ebe9ec9946
Signed-off-by: Vamsi Krishna <vskrishn@codeaurora.org>
diff --git a/drivers/usb/host/ehci-msm-hsic.c b/drivers/usb/host/ehci-msm-hsic.c
index 14c3323..ef45d49 100644
--- a/drivers/usb/host/ehci-msm-hsic.c
+++ b/drivers/usb/host/ehci-msm-hsic.c
@@ -1895,6 +1895,8 @@
 				"hsic,consider-ipa-handshake"));
 	pdata->ahb_async_bridge_bypass = of_property_read_bool(node,
 				"qcom,ahb-async-bridge-bypass");
+	pdata->disable_cerr = of_property_read_bool(node,
+				"hsic,disable-cerr");
 
 	return pdata;
 }
@@ -1982,8 +1984,10 @@
 	mehci->ehci.pool_64_bit_align = pdata->pool_64_bit_align;
 	mehci->enable_hbm = pdata->enable_hbm;
 
-	if (pdata)
+	if (pdata) {
 		mehci->ehci.log2_irq_thresh = pdata->log2_irq_thresh;
+		mehci->ehci.disable_cerr = pdata->disable_cerr;
+	}
 
 	ret = msm_hsic_init_gdsc(mehci, 1);
 	if (ret) {