mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
mhi: core: Separate rddm support and dump collection
As of now, there is no way for MHI to know if device supports RDDM and host controller wishes to skip ramdump collection. Allow for that by letting the controller set the rddm support boolean which indicates device side support. If rddm_size is set to zero while the support for RDDM is present, that indicates disinterest in ramdump collection if RDDM execution environment is entered. Change-Id: I0a36219fc7782951aa1b81b9ec0d182ecfb3a916 Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
This commit is contained in:
parent
7eee98e175
commit
20aba7d1d7
5 changed files with 12 additions and 3 deletions
|
|
@ -278,6 +278,10 @@ int mhi_download_rddm_img(struct mhi_controller *mhi_cntrl, bool in_panic)
|
|||
void __iomem *base = mhi_cntrl->bhie;
|
||||
u32 rx_status;
|
||||
|
||||
/* device supports RDDM but controller wants to skip ramdumps */
|
||||
if (!mhi_cntrl->rddm_supported || !mhi_cntrl->rddm_image)
|
||||
return -EINVAL;
|
||||
|
||||
if (in_panic)
|
||||
return __mhi_download_rddm_in_panic(mhi_cntrl);
|
||||
|
||||
|
|
|
|||
|
|
@ -1780,7 +1780,7 @@ int mhi_prepare_for_power_up(struct mhi_controller *mhi_cntrl)
|
|||
* allocate rddm table if specified, this table is for debug purpose
|
||||
* so we'll ignore erros
|
||||
*/
|
||||
if (mhi_cntrl->rddm_size) {
|
||||
if (mhi_cntrl->rddm_supported && mhi_cntrl->rddm_size) {
|
||||
mhi_alloc_bhie_table(mhi_cntrl, &mhi_cntrl->rddm_image,
|
||||
mhi_cntrl->rddm_size);
|
||||
|
||||
|
|
|
|||
|
|
@ -1212,7 +1212,7 @@ int mhi_process_ctrl_ev_ring(struct mhi_controller *mhi_cntrl,
|
|||
* event instead of sys error state change event
|
||||
*/
|
||||
if (mhi_cntrl->ee == MHI_EE_RDDM ||
|
||||
mhi_cntrl->rddm_image)
|
||||
mhi_cntrl->rddm_supported)
|
||||
break;
|
||||
|
||||
MHI_ERR("MHI system error detected\n");
|
||||
|
|
|
|||
|
|
@ -859,7 +859,7 @@ void mhi_process_sys_err(struct mhi_controller *mhi_cntrl)
|
|||
* if controller supports rddm, we do not process sys error state,
|
||||
* instead we will jump directly to rddm state
|
||||
*/
|
||||
if (mhi_cntrl->rddm_image) {
|
||||
if (mhi_cntrl->rddm_supported) {
|
||||
MHI_CNTRL_LOG(
|
||||
"Controller supports RDDM, skipping SYS_ERR_PROCESS\n");
|
||||
return;
|
||||
|
|
@ -1714,6 +1714,10 @@ int mhi_force_rddm_mode(struct mhi_controller *mhi_cntrl)
|
|||
to_mhi_pm_state_str(mhi_cntrl->pm_state),
|
||||
TO_MHI_EXEC_STR(mhi_cntrl->ee));
|
||||
|
||||
/* device does not support RDDM */
|
||||
if (!mhi_cntrl->rddm_supported)
|
||||
return -EINVAL;
|
||||
|
||||
/* device already in rddm */
|
||||
if (mhi_cntrl->ee == MHI_EE_RDDM)
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -295,6 +295,7 @@ struct mhi_controller {
|
|||
|
||||
/* mhi host manages downloading entire fbc images */
|
||||
bool fbc_download;
|
||||
bool rddm_supported;
|
||||
size_t rddm_size;
|
||||
size_t sbl_size;
|
||||
size_t seg_len;
|
||||
|
|
|
|||
Loading…
Reference in a new issue