mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 03:27:03 +02:00
bus: mhi: host: Add session ID to MHI controller
Session ID to be used during BHI transfers to recognize a particular session are currently not being stored in the MHI controller structure. Store them to allow for tracking and other future usage. Change-Id: I45a55f39226be3a21ff1e3317a899da1a63f3439 Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org> Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
This commit is contained in:
parent
04d4e7ae5c
commit
6375f3b44a
|
|
@ -185,7 +185,7 @@ static int mhi_fw_load_bhie(struct mhi_controller *mhi_cntrl,
|
|||
void __iomem *base = mhi_cntrl->bhie;
|
||||
struct device *dev = &mhi_cntrl->mhi_dev->dev;
|
||||
rwlock_t *pm_lock = &mhi_cntrl->pm_lock;
|
||||
u32 tx_status, sequence_id;
|
||||
u32 tx_status;
|
||||
int ret;
|
||||
|
||||
read_lock_bh(pm_lock);
|
||||
|
|
@ -194,9 +194,9 @@ static int mhi_fw_load_bhie(struct mhi_controller *mhi_cntrl,
|
|||
return -EIO;
|
||||
}
|
||||
|
||||
sequence_id = MHI_RANDOM_U32_NONZERO(BHIE_TXVECSTATUS_SEQNUM_BMSK);
|
||||
mhi_cntrl->session_id = MHI_RANDOM_U32_NONZERO(BHIE_TXVECSTATUS_SEQNUM_BMSK);
|
||||
dev_dbg(dev, "Starting image download via BHIe. Sequence ID: %u\n",
|
||||
sequence_id);
|
||||
mhi_cntrl->session_id);
|
||||
mhi_write_reg(mhi_cntrl, base, BHIE_TXVECADDR_HIGH_OFFS,
|
||||
upper_32_bits(mhi_buf->dma_addr));
|
||||
|
||||
|
|
@ -206,7 +206,7 @@ static int mhi_fw_load_bhie(struct mhi_controller *mhi_cntrl,
|
|||
mhi_write_reg(mhi_cntrl, base, BHIE_TXVECSIZE_OFFS, mhi_buf->len);
|
||||
|
||||
ret = mhi_write_reg_field(mhi_cntrl, base, BHIE_TXVECDB_OFFS,
|
||||
BHIE_TXVECDB_SEQNUM_BMSK, sequence_id);
|
||||
BHIE_TXVECDB_SEQNUM_BMSK, mhi_cntrl->session_id);
|
||||
read_unlock_bh(pm_lock);
|
||||
|
||||
if (ret)
|
||||
|
|
|
|||
|
|
@ -429,6 +429,7 @@ struct mhi_controller {
|
|||
u32 minor_version;
|
||||
u32 serial_number;
|
||||
u32 oem_pk_hash[MHI_MAX_OEM_PK_HASH_SEGMENTS];
|
||||
u32 session_id;
|
||||
|
||||
struct mhi_event *mhi_event;
|
||||
struct mhi_cmd *mhi_cmd;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user