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

Commit b62c172f authored by Liron Kuch's avatar Liron Kuch
Browse files

msm: tspp2: Reset TSPP2 core on device open



Add reset of TSPP2 HW core when opening the device for use.
This is required for proper operation of the HW.

Change-Id: I5fdb904948a5a11d7d147662351b844e5a24cec6
Signed-off-by: default avatarLiron Kuch <lkuch@codeaurora.org>
parent b71a5b93
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@
#include <linux/msm_iommu_domains.h>
#include <mach/msm_bus.h>
#include <mach/msm_tspp2.h>
#include <linux/clk/msm-clk.h>

#define TSPP2_MODULUS_OP(val, mod)	((val) & ((mod) - 1))

@@ -2073,6 +2074,11 @@ int tspp2_device_open(u32 dev_id)
	if (rc)
		goto err_mutex_unlock;

	/* Reset TSPP2 core */
	clk_reset(device->tspp2_core_clk, CLK_RESET_ASSERT);
	udelay(10);
	clk_reset(device->tspp2_core_clk, CLK_RESET_DEASSERT);

	/* Start HW clocks before accessing registers */
	rc = tspp2_reg_clock_start(device);
	if (rc)