platform: msm8996: Reset master clock for usb

During boot up earlier stages of bootloader setup the high speed only
mode by writing to usb general config registers. Due to this fastboot
always enumerates in high speed mode. To avoid this update the reset
sequence to include master clock reset to initialize the general config
register to reset state.

Change-Id: I5916f68e6c1d2057d826fbe01648346946868fbe
diff --git a/platform/msm8996/acpuclock.c b/platform/msm8996/acpuclock.c
index 9b1a23b..db4113e 100644
--- a/platform/msm8996/acpuclock.c
+++ b/platform/msm8996/acpuclock.c
@@ -249,6 +249,10 @@
 
 	struct clk *phy_reset_clk = NULL;
 	struct clk *pipe_reset_clk = NULL;
+	struct clk *master_clk = NULL;
+
+	master_clk = clk_get("usb30_master_clk");
+	ASSERT(master_clk);
 
 	/* Look if phy com clock is present */
 	phy_reset_clk = clk_get("usb30_phy_reset");
@@ -258,12 +262,18 @@
 	ASSERT(pipe_reset_clk);
 
 	/* ASSERT */
+	ret = clk_reset(master_clk, CLK_RESET_ASSERT);
+	if (ret)
+	{
+		dprintf(CRITICAL, "Failed to assert usb30_master_reset clk\n");
+		return;
+	}
 	ret = clk_reset(phy_reset_clk, CLK_RESET_ASSERT);
 
 	if (ret)
 	{
 		dprintf(CRITICAL, "Failed to assert usb30_phy_reset clk\n");
-		return;
+		goto deassert_master_clk;
 	}
 
 	ret = clk_reset(pipe_reset_clk, CLK_RESET_ASSERT);
@@ -291,6 +301,15 @@
 		dprintf(CRITICAL, "Failed to deassert usb30_phy_com_reset clk\n");
 		return;
 	}
+deassert_master_clk:
+
+	ret = clk_reset(master_clk, CLK_RESET_DEASSERT);
+	if (ret)
+	{
+		dprintf(CRITICAL, "Failed to deassert usb30_master clk\n");
+		return;
+	}
+
 }
 
 void mmss_gdsc_enable()