mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
mhi: core: Check for RDDM cookie set by device to indicate readiness
If the device is unable to send the mission mode execution environment change event but has already entered mission mode with the ability to allow ramdump collection, it can set a unique cookie pattern to indicate the availability of ramdumps. Allow the controller to query for this unique pattern upon any bootup failure or timeout. Change-Id: Id1f58b75d3f22e9e21b142cbea74d61cc65615b4 Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
This commit is contained in:
parent
739281396c
commit
0e5a6b80ff
2 changed files with 33 additions and 0 deletions
|
|
@ -139,6 +139,31 @@ void mhi_dump_sfr(struct mhi_controller *mhi_cntrl)
|
|||
}
|
||||
EXPORT_SYMBOL(mhi_dump_sfr);
|
||||
|
||||
bool mhi_scan_rddm_cookie(struct mhi_controller *mhi_cntrl, u32 cookie)
|
||||
{
|
||||
int ret;
|
||||
u32 val;
|
||||
|
||||
if (!mhi_cntrl->rddm_supported || !cookie)
|
||||
return false;
|
||||
|
||||
MHI_CNTRL_LOG("Checking BHI debug register for 0x%x\n", cookie);
|
||||
|
||||
if (!MHI_REG_ACCESS_VALID(mhi_cntrl->pm_state))
|
||||
return false;
|
||||
|
||||
ret = mhi_read_reg(mhi_cntrl, mhi_cntrl->bhi, BHI_ERRDBG2, &val);
|
||||
if (ret)
|
||||
return false;
|
||||
|
||||
MHI_CNTRL_LOG("BHI_ERRDBG2 value:0x%x\n", val);
|
||||
if (val == cookie)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
EXPORT_SYMBOL(mhi_scan_rddm_cookie);
|
||||
|
||||
/* setup rddm vector table for rddm transfer and program rxvec */
|
||||
void mhi_rddm_prepare(struct mhi_controller *mhi_cntrl,
|
||||
struct image_info *img_info)
|
||||
|
|
|
|||
|
|
@ -797,6 +797,14 @@ int mhi_pm_fast_resume(struct mhi_controller *mhi_cntrl, bool notify_client);
|
|||
*/
|
||||
int mhi_download_rddm_img(struct mhi_controller *mhi_cntrl, bool in_panic);
|
||||
|
||||
/**
|
||||
* mhi_scan_rddm_cookie - Look for supplied cookie value in the BHI debug
|
||||
* registers set by device to indicate rddm readiness for debugging purposes.
|
||||
* @mhi_cntrl: MHI controller
|
||||
* @cookie: cookie/pattern value to match
|
||||
*/
|
||||
bool mhi_scan_rddm_cookie(struct mhi_controller *mhi_cntrl, u32 cookie);
|
||||
|
||||
/**
|
||||
* mhi_force_rddm_mode - Force external device into rddm mode
|
||||
* to collect device ramdump. This is useful if host driver assert
|
||||
|
|
|
|||
Loading…
Reference in a new issue