lkml.org 
[lkml]   [2023]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 5/6] remoterproc: qcom: refactor to leverage exported minidump symbol
Date
qcom_minidump driver provides qcom_minidump_subsystem_desc()
exported API which other driver can use it query subsystem
descriptor. Refactor qcom_minidump() to use this symbol.

Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
---
drivers/remoteproc/qcom_common.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/drivers/remoteproc/qcom_common.c b/drivers/remoteproc/qcom_common.c
index f607e1e..273f92b 100644
--- a/drivers/remoteproc/qcom_common.c
+++ b/drivers/remoteproc/qcom_common.c
@@ -89,19 +89,10 @@ void qcom_minidump(struct rproc *rproc, unsigned int minidump_id)
{
int ret;
struct minidump_subsystem *subsystem;
- struct minidump_global_toc *toc;

- /* Get Global minidump ToC*/
- toc = qcom_smem_get(QCOM_SMEM_HOST_ANY, SBL_MINIDUMP_SMEM_ID, NULL);
-
- /* check if global table pointer exists and init is set */
- if (IS_ERR(toc) || !toc->status) {
- dev_err(&rproc->dev, "Minidump TOC not found in SMEM\n");
+ subsystem = qcom_minidump_subsystem_desc(minidump_id);
+ if (IS_ERR(subsystem))
return;
- }
-
- /* Get subsystem table of contents using the minidump id */
- subsystem = &toc->subsystems[minidump_id];

/**
* Collect minidump if SS ToC is valid and segment table
--
2.7.4
\
 
 \ /
  Last update: 2023-03-27 00:29    [W:0.181 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site