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

Commit 5a021a4b authored by Manu Gautam's avatar Manu Gautam
Browse files

USB: ci13xxx_msm_hsic: Don't overwrite TLMM register



Driver is overriding TLMM configuration register with
the value passed from device-tree. Change this to
rather OR with existing value to preserve reserved bits.

Change-Id: Ifde2a6e1d58166183f54c578354a3b6202162305
Signed-off-by: default avatarManu Gautam <mgautam@codeaurora.org>
parent a660e4d0
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2016, 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
@@ -367,14 +367,18 @@ static void msm_hsic_start(void)
{
	struct msm_hsic_per *mhsic = the_mhsic;
	int ret, *seq, seq_count;
	u32 val;

	/* Program TLMM pad configuration for HSIC */
	seq = mhsic->pdata->tlmm_init_seq;
	seq_count = mhsic->pdata->tlmm_seq_count;
	if (seq && seq_count) {
		while (seq[0] >= 0 && seq_count > 0) {
			writel_relaxed(seq[1],
					mhsic->tlmm_regs + seq[0]);
			val = readl_relaxed(mhsic->tlmm_regs + seq[0]);
			val |= seq[1];
			dev_dbg(mhsic->dev, "%s: writing %x to %p\n",
				__func__, val, mhsic->tlmm_regs + seq[0]);
			writel_relaxed(val, mhsic->tlmm_regs + seq[0]);
			seq += 2;
			seq_count -= 2;
		}