bus: mhi: core: Enable bandwidth scaling usage

Enable bandwidth scaling usage for MHI core driver.

Change-Id: I31492bd87162c0347f9f8f8acc1a0316a84af572
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
This commit is contained in:
Bhaumik Bhatt 2021-09-16 15:39:00 -07:00 committed by Gerrit - the friendly Code Review server
parent 85269c6e88
commit 6ff1554291
2 changed files with 10 additions and 1 deletions

View File

@ -563,6 +563,8 @@ int mhi_init_mmio(struct mhi_controller *mhi_cntrl)
return ret;
}
mhi_misc_init_mmio(mhi_cntrl);
return 0;
}
@ -707,6 +709,9 @@ static int parse_ev_cfg(struct mhi_controller *mhi_cntrl,
case MHI_ER_CTRL:
mhi_event->process_event = mhi_process_ctrl_ev_ring;
break;
case MHI_ER_BW_SCALE:
mhi_event->process_event = mhi_process_misc_bw_ev_ring;
break;
default:
dev_err(dev, "Event Ring type not supported\n");
goto error_ev_cfg;

View File

@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
*
*/
#ifndef _MHI_H_
@ -104,10 +104,12 @@ struct image_info {
* struct mhi_link_info - BW requirement
* target_link_speed - Link speed as defined by TLS bits in LinkControl reg
* target_link_width - Link width as defined by NLW bits in LinkStatus reg
* sequence_num - used by device to track bw requests sent to host
*/
struct mhi_link_info {
unsigned int target_link_speed;
unsigned int target_link_width;
int sequence_num;
};
/**
@ -185,10 +187,12 @@ enum mhi_ch_ee_mask {
* enum mhi_er_data_type - Event ring data types
* @MHI_ER_DATA: Only client data over this ring
* @MHI_ER_CTRL: MHI control data and client data
* @MHI_ER_BW_SCALE: MHI controller bandwidth scale functionality
*/
enum mhi_er_data_type {
MHI_ER_DATA,
MHI_ER_CTRL,
MHI_ER_BW_SCALE,
};
/**