diff options
author | Varun Wadekar <vwadekar@nvidia.com> | 2018-04-23 13:25:42 -0700 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2019-01-31 08:50:31 -0800 |
commit | e6712cf547f6beedf50f19c98b7215998df677e2 (patch) | |
tree | a4c8b8b6c5288ff474bff80a15806b62cd97098e /plat/nvidia | |
parent | 6a397d1d44067d71a0e418f1018db6b497f237da (diff) |
Tegra: bpmp: mark device "not present" on boot timeout
This patch updates the state machine to "not present" if the bpmp
firmware is not found in the system during boot. The suspend
handler also checks now if the interface exists, before updating
the internal state machine.
Reported by: Kalyani Chidambaram Vaidyanathan <kalyanic@nvidia.com>
Change-Id: If8fd7f8e412bb603944555c24826855226e7f48c
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Diffstat (limited to 'plat/nvidia')
-rw-r--r-- | plat/nvidia/tegra/common/drivers/bpmp/bpmp.c | 12 | ||||
-rw-r--r-- | plat/nvidia/tegra/include/drivers/bpmp.h | 1 |
2 files changed, 11 insertions, 2 deletions
diff --git a/plat/nvidia/tegra/common/drivers/bpmp/bpmp.c b/plat/nvidia/tegra/common/drivers/bpmp/bpmp.c index 31c7d805..29dc2674 100644 --- a/plat/nvidia/tegra/common/drivers/bpmp/bpmp.c +++ b/plat/nvidia/tegra/common/drivers/bpmp/bpmp.c @@ -175,6 +175,11 @@ int tegra_bpmp_init(void) } else { ERROR("BPMP not powered on\n"); + + /* bpmp is not present in the system */ + bpmp_init_state = BPMP_NOT_PRESENT; + + /* communication timed out */ ret = -ETIMEDOUT; } } @@ -185,8 +190,11 @@ int tegra_bpmp_init(void) void tegra_bpmp_suspend(void) { /* freeze the interface */ - bpmp_init_state = BPMP_SUSPEND_ENTRY; - flush_dcache_range((uint64_t)&bpmp_init_state, sizeof(bpmp_init_state)); + if (bpmp_init_state == BPMP_INIT_COMPLETE) { + bpmp_init_state = BPMP_SUSPEND_ENTRY; + flush_dcache_range((uint64_t)&bpmp_init_state, + sizeof(bpmp_init_state)); + } } void tegra_bpmp_resume(void) diff --git a/plat/nvidia/tegra/include/drivers/bpmp.h b/plat/nvidia/tegra/include/drivers/bpmp.h index 0046f6cc..dc3fb6b6 100644 --- a/plat/nvidia/tegra/include/drivers/bpmp.h +++ b/plat/nvidia/tegra/include/drivers/bpmp.h @@ -27,6 +27,7 @@ #define SIGN_OF_LIFE 0xAAAAAAAAU /* flags to indicate bpmp driver's state */ +#define BPMP_NOT_PRESENT 0xF00DBEEFU #define BPMP_INIT_COMPLETE 0xBEEFF00DU #define BPMP_INIT_PENDING 0xDEADBEEFU #define BPMP_SUSPEND_ENTRY 0xF00DCAFEU |