Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d891d4b authored by Chandana Kishori Chiluveru's avatar Chandana Kishori Chiluveru
Browse files

USB: dwc3-msm: Turn on core & iface clks before accessing AHB2PHY registers



On some platforms, USB3 controller sits on PCNOC instead of SNOC.
In this case, it is required to turn on core_clks, iface_clk(pcnoc_axi_clk)
and cfg_ahb_clk before accessing AHB2PHY register. Hence make
required change for turning on clks required before AHB2PHY register
access.

Change-Id: Id0de545338e06036f956fc1d495be08df4efdcce
Signed-off-by: default avatarChandana Kishori Chiluveru <cchiluve@codeaurora.org>
parent 436b6888
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -3275,6 +3275,8 @@ static int dwc3_msm_probe(struct platform_device *pdev)
			 * turning on usb gdsc regulator clk is stuck off.
			 */
			dwc3_msm_config_gdsc(mdwc, 1);
			clk_prepare_enable(mdwc->iface_clk);
			clk_prepare_enable(mdwc->core_clk);
			clk_prepare_enable(mdwc->cfg_ahb_clk);
			/* Configure AHB2PHY for one wait state read/write*/
			val = readl_relaxed(mdwc->ahb2phy_base +
@@ -3287,6 +3289,8 @@ static int dwc3_msm_probe(struct platform_device *pdev)
				mb();
			}
			clk_disable_unprepare(mdwc->cfg_ahb_clk);
			clk_disable_unprepare(mdwc->core_clk);
			clk_disable_unprepare(mdwc->iface_clk);
			dwc3_msm_config_gdsc(mdwc, 0);
		}
	}