On 10/27/2020 7:57 PM, Carl Yin(殷张成) wrote:
Hi bbhatt:
On Wednesday, October 28, 2020 9:34 AM, bbhatt wrote:
Hi Carl,
On 2020-10-27 16:01, Hemant Kumar wrote:
Hi Jeff,
On 10/27/20 8:11 AM, Jeffrey Hugo wrote:
On 10/27/2020 3:43 AM, carl.yin@xxxxxxxxxxx wrote:
From: "carl.yin" <carl.yin@xxxxxxxxxxx>
MHI wwan modems support download firmware to nand or emmc by
firehose protocol, process as next:
1. wwan modem normal bootup and enter EE AMSS, create mhi DIAG chan
device 2. send EDL cmd via DIAG chan, then modem enter EE EDL 3.
boot.c download 'firehose/prog_firehose_sdx55.mbn' via BHI interface
4. modem enter EE FP, and create mhi EDL chan device 5. user space
tool download FW to modem via EDL chan by firehose protocol
Signed-off-by: carl.yin <carl.yin@xxxxxxxxxxx>
---
drivers/bus/mhi/core/boot.c | 4 +++-
drivers/bus/mhi/core/init.c | 2 ++
drivers/bus/mhi/core/internal.h | 1 +
drivers/bus/mhi/core/main.c | 3 +++
drivers/bus/mhi/core/pm.c | 16 +++++++++++++++-
include/linux/mhi.h | 4 +++-
6 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/drivers/bus/mhi/core/boot.c
b/drivers/bus/mhi/core/boot.c index 24422f5..ab39ad6 100644
--- a/drivers/bus/mhi/core/boot.c
+++ b/drivers/bus/mhi/core/boot.c
@@ -460,8 +460,10 @@ void mhi_fw_load_handler(struct mhi_controller
*mhi_cntrl)
return;
}
- if (mhi_cntrl->ee == MHI_EE_EDL)
+ if (mhi_cntrl->ee == MHI_EE_EDL) {
+ mhi_ready_state_transition(mhi_cntrl);
return;
+ }
write_lock_irq(&mhi_cntrl->pm_lock);
mhi_cntrl->dev_state = MHI_STATE_RESET; diff --git
a/drivers/bus/mhi/core/init.c b/drivers/bus/mhi/core/init.c index
ac4aa5c..9c2c2f3 100644
--- a/drivers/bus/mhi/core/init.c
+++ b/drivers/bus/mhi/core/init.c
@@ -26,6 +26,7 @@ const char * const mhi_ee_str[MHI_EE_MAX] = {
[MHI_EE_WFW] = "WFW",
[MHI_EE_PTHRU] = "PASS THRU",
[MHI_EE_EDL] = "EDL",
+ [MHI_EE_FP] = "FP",
[MHI_EE_DISABLE_TRANSITION] = "DISABLE",
[MHI_EE_NOT_SUPPORTED] = "NOT SUPPORTED",
};
@@ -35,6 +36,7 @@ const char * const
dev_state_tran_str[DEV_ST_TRANSITION_MAX] = {
[DEV_ST_TRANSITION_READY] = "READY",
[DEV_ST_TRANSITION_SBL] = "SBL",
[DEV_ST_TRANSITION_MISSION_MODE] = "MISSION_MODE",
+ [DEV_ST_TRANSITION_FP] = "FP",
Longer description here would be nice (FLASH PROGRAMMER).
[carl.yin] yes, for SDX24 and SDX55 chip, 'FIREHOSE PROGRAMMER' is more better.
"Flash programmer" is more generic. It means that the EE can be used
with a different protocol than firehose if there is a use for that.
--
Jeffrey Hugo
Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.