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

Commit 5cf4f63e authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mhi_dev: Update channel processing"

parents 6e99898e 21328121
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1055,7 +1055,8 @@ static void mhi_dev_check_channel_interrupt(struct mhi_dev *mhi)

	for (i = 0; i < MHI_MASK_ROWS_CH_EV_DB; i++) {
		ch_num = i * MHI_MASK_CH_EV_LEN;
		chintr_value = mhi->chdb[i].status;
		/* Process channel status whose mask is enabled */
		chintr_value = (mhi->chdb[i].status & mhi->chdb[i].mask);
		if (chintr_value) {
			mhi_log(MHI_MSG_VERBOSE,
				"processing id: %d, ch interrupt 0x%x\n",
+14 −1
Original line number Diff line number Diff line
/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015, 2017, 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
@@ -133,6 +133,11 @@ static int mhi_dev_mmio_mask_set_chdb_int_a7(struct mhi_dev *dev,
	chid_mask = (1 << chid_shft);
	chid_idx = chdb_id/32;

	if (chid_idx >= MHI_MASK_ROWS_CH_EV_DB) {
		pr_err("Invalid channel id:%d\n", chid_idx);
		return -EINVAL;
	}

	if (enable)
		val = 1;

@@ -143,6 +148,13 @@ static int mhi_dev_mmio_mask_set_chdb_int_a7(struct mhi_dev *dev,
		return rc;
	}

	rc = mhi_dev_mmio_read(dev, MHI_CHDB_INT_MASK_A7_n(chid_idx),
						&dev->chdb[chid_idx].mask);
	if (rc) {
		pr_err("Read channel db INT on row:%d failed\n", chid_idx);
		return rc;
	}

	return rc;
}

@@ -286,6 +298,7 @@ static int mhi_dev_mmio_set_chdb_interrupts(struct mhi_dev *dev, bool enable)
			pr_err("Set channel db on row:%d failed\n", i);
			return rc;
		}
		dev->chdb[i].mask = mask;
	}

	return rc;