diff options
author | Victor Hsu <hsuvictor@google.com> | 2022-09-01 06:48:34 +0000 |
---|---|---|
committer | Victor Hsu <hsuvictor@google.com> | 2022-09-05 07:02:32 +0000 |
commit | c9dddc4e190c2314ac5724e9e603cfe182ec2b75 (patch) | |
tree | 6b4d1c3a691ae7ea71d670841e91267fe1ec39a1 | |
parent | 4194a4d73a9ac567654a7515082b351d2bc6447a (diff) | |
download | cnss2-c9dddc4e190c2314ac5724e9e603cfe182ec2b75.tar.gz |
cnss: Delay to start CBC
If COLD_BOOT_CAL starts too early, the MHI powers on failed.
Delay 5000 ms to start calibration.
Bug: 243876449
Signed-off-by: Victor Hsu <hsuvictor@google.com>
Change-Id: I83ae27bf5abd03aec0f1a8b9639ea7d3b2851f37
-rw-r--r-- | cnss2/main.c | 7 | ||||
-rw-r--r-- | mhi/core/Makefile | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/cnss2/main.c b/cnss2/main.c index 5f4a5ab..736f065 100644 --- a/cnss2/main.c +++ b/cnss2/main.c @@ -1916,6 +1916,13 @@ static int cnss_cold_boot_cal_start_hdlr(struct cnss_plat_data *plat_priv) return -EINVAL; } +#if IS_ENABLED(CONFIG_WCN_GOOGLE) + // workaround: If COLD_BOOT_CAL starts too early, the MHI powers on failed. + // delay 5000 ms to start calibration. + msleep(5000); + cnss_pr_dbg("Wait for 5 seconds to start calibration\n"); +#endif + while (retry++ < CNSS_CAL_START_PROBE_WAIT_RETRY_MAX) { if (test_bit(CNSS_PCI_PROBE_DONE, &plat_priv->driver_state)) break; diff --git a/mhi/core/Makefile b/mhi/core/Makefile index 17be4ee..4133159 100644 --- a/mhi/core/Makefile +++ b/mhi/core/Makefile @@ -4,4 +4,4 @@ mhi-y := init.o main.o pm.o boot.o mhi-$(CONFIG_MHI_BUS_MISC) += misc.o mhi-$(CONFIG_MHI_BUS_DEBUG) += debugfs.o -ccflags-y += -DDEBUG -DCONFIG_WCN_GOOGLE +ccflags-y += -DCONFIG_WCN_GOOGLE |