From patchwork Wed Aug 7 05:39:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 170710 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp6660758ile; Tue, 6 Aug 2019 22:40:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxu7ME5FFD5l3G8KTFgyYfLJv/c2CBGy+FAshZ4wuMBEz6+bOPdRpc9IKzNCvBfOU9ZF02c X-Received: by 2002:a63:1d4:: with SMTP id 203mr6156973pgb.441.1565156415206; Tue, 06 Aug 2019 22:40:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565156415; cv=none; d=google.com; s=arc-20160816; b=jVLXigrLqvIbb8+zezsJKs6HP89MIil9L2slnUcSUMiz0i8BBXl7t8A/vC1hO8IXbv NrAMAY6gKmIweQsz4x7YL75JrgLnmboOYxCO53tuj2ZF8o04oxiCCSkqIy4LNyb7dfEd B4uN12XMh2CRB1y0Ur0WHUpnj2y1oGHNI4CzwxMZSapOfJu40oenX3iVw/coEAEnXqVe +ro1Y0oRmBXz4Ib5ZuUH+AgpHs4R8YfSCq5QLqy2Wdzyxi+Z2+L5klp8lkSTbUagRyKJ rmN2OkISqCSri8c2hQoHJMpN0iC7VUwkTD9C/KIbJwj7KDLUyCzh+6yrzBZVJCLbQ19t dAkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=vtVBkwA1h86i3IgqSipfDgtWxsjyT/oqz+jf2YjzTg0=; b=oOyM76VP++Po7sTM6NuyxG/p15vrNcfF2RomBneUKORgY42jorZG+ge4xZx2R2alsu c9PvQYvgC8lxpVqexQar1ALJsAHHUDIUdv553cM5yuBxN12ZBpH+3uh3H6ohULv2hiYE afuDOYhSVfEFM4v6vIAcXHNIF5R9RbB2xW9IvX181tJoR6g2KCzLv2Cplg6GabfqEM2s 3+CIHNXO+yyAYAMQyEbQwkg9YhYAZSM7+Tyf2k9eu+i0CuS7Ih2mtXHNxVhBUlJvvhWi LbynpSq77h1wyWx0fFqtzJtsuTAk355Ukp+F1uoghrVtK+Uvw8nB1Zi9nEhPbxbiv8fw wNTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iDiNfOYE; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b93si45102814plb.11.2019.08.06.22.40.14; Tue, 06 Aug 2019 22:40:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iDiNfOYE; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727173AbfHGFjw (ORCPT + 16 others); Wed, 7 Aug 2019 01:39:52 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:42180 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727142AbfHGFju (ORCPT ); Wed, 7 Aug 2019 01:39:50 -0400 Received: by mail-pl1-f193.google.com with SMTP id ay6so38986443plb.9 for ; Tue, 06 Aug 2019 22:39:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vtVBkwA1h86i3IgqSipfDgtWxsjyT/oqz+jf2YjzTg0=; b=iDiNfOYEotcvnZDMgdSF14s4ZRODb3EgWflPP8UEq63YZ6JuonspSElpfLSHlmoxPo MX+ciKThLCRBrbSaIo1zbMQj2UuQ54eZQdhDOfsmP2assVHrNGLQSg+aH2QXqLcD1JyU +zWJ8soLGnEGo7wEmwfmXbfZ2sC54VvDaQAPdaBBZ+E6PJ5FPoGJK9uUWqPTnqaHYxPE gwhr+a5HX58ntzLFq/gUsB87gWlfl6RVnNf77xc0V01/fvK/whZvLUHku3r5Gc5wz/AF elNfZYSG+TyTdEf9pSPQQTl7I0IvBhnG31tHLDttd4QQkvoc9aNMWpX72GXnxKKGmrXn c1Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vtVBkwA1h86i3IgqSipfDgtWxsjyT/oqz+jf2YjzTg0=; b=VvVeY8CNXApWLmTvCSYDlpQw0N0m5+p759iWMudw6FDfz27NuUZJvGJ4ThSgHY5+VH ivQ8WbCQMew3EHobnnwy+NEAEODZQk23E/uLDmD2eFINUzTIp2BrjBkThWxFIuZ+TNCt 8CXEhDhIIzkhv32phJRbdTAX2Hl1o9iToTehF5KtnxF1wpUG9RYMz8NQ3Sm3YzaaYDnB lPY5uFS5rHMAGwbneBklRI7Hn2SHELccovjcdgsK54WG4K66UcJashNqo3NTKt4CnnT2 zEZKBbVhM/8qCY/xhaXBDDI0e2s1j7x+EAWSA5oluHTq2LfM1wS/UgfbFacehRkCGqIR lKrw== X-Gm-Message-State: APjAAAVaZCg4z1x1bRxp4Z/gBjMAMu/3U7EtSkTe/pI+ozU9FlWIRV+2 rtji4DhKkn3Z02KDE2Zt0EGWog== X-Received: by 2002:a17:902:ac87:: with SMTP id h7mr6812117plr.36.1565156389577; Tue, 06 Aug 2019 22:39:49 -0700 (PDT) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id u7sm86070777pfm.96.2019.08.06.22.39.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Aug 2019 22:39:49 -0700 (PDT) From: Bjorn Andersson To: Ohad Ben-Cohen , Bjorn Andersson Cc: Andy Gross , Sibi Sankar , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org Subject: [PATCH 3/9] remoteproc: qcom: pas: Update IMEM PIL info on load Date: Tue, 6 Aug 2019 22:39:36 -0700 Message-Id: <20190807053942.9836-4-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20190807053942.9836-1-bjorn.andersson@linaro.org> References: <20190807053942.9836-1-bjorn.andersson@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Use the sysmon_name as identifier and store the relocated base address and size of the memory region in the PIL reloation info structure in IMEM. Signed-off-by: Bjorn Andersson --- drivers/remoteproc/Kconfig | 1 + drivers/remoteproc/qcom_q6v5_pas.c | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) -- 2.18.0 diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig index b88d74632d39..2aa0743fc05b 100644 --- a/drivers/remoteproc/Kconfig +++ b/drivers/remoteproc/Kconfig @@ -136,6 +136,7 @@ config QCOM_Q6V5_PAS depends on RPMSG_QCOM_GLINK_SMEM || RPMSG_QCOM_GLINK_SMEM=n depends on QCOM_SYSMON || QCOM_SYSMON=n select MFD_SYSCON + select QCOM_PIL_INFO select QCOM_MDT_LOADER select QCOM_Q6V5_COMMON select QCOM_RPROC_COMMON diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index db4b3c4bacd7..bfb622d36cb3 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -23,6 +23,7 @@ #include #include "qcom_common.h" +#include "qcom_pil_info.h" #include "qcom_q6v5.h" #include "remoteproc_internal.h" @@ -52,6 +53,7 @@ struct qcom_adsp { int pas_id; int crash_reason_smem; bool has_aggre2_clk; + const char *info_name; struct completion start_done; struct completion stop_done; @@ -70,11 +72,17 @@ struct qcom_adsp { static int adsp_load(struct rproc *rproc, const struct firmware *fw) { struct qcom_adsp *adsp = (struct qcom_adsp *)rproc->priv; + int ret; - return qcom_mdt_load(adsp->dev, fw, rproc->firmware, adsp->pas_id, - adsp->mem_region, adsp->mem_phys, adsp->mem_size, - &adsp->mem_reloc); + ret = qcom_mdt_load(adsp->dev, fw, rproc->firmware, adsp->pas_id, + adsp->mem_region, adsp->mem_phys, adsp->mem_size, + &adsp->mem_reloc); + if (ret) + return ret; + qcom_pil_info_store(adsp->info_name, adsp->mem_reloc, adsp->mem_size); + + return 0; } static int adsp_start(struct rproc *rproc) @@ -278,6 +286,7 @@ static int adsp_probe(struct platform_device *pdev) adsp->rproc = rproc; adsp->pas_id = desc->pas_id; adsp->has_aggre2_clk = desc->has_aggre2_clk; + adsp->info_name = desc->sysmon_name; platform_set_drvdata(pdev, adsp); ret = adsp_alloc_memory_region(adsp); From patchwork Wed Aug 7 05:39:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 170709 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp6660681ile; Tue, 6 Aug 2019 22:40:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqwD7a3r4mrtioAsj2cfvYNUzO6+B7wTLJE3aK6sIE1UcybzSi4bZuP88eSLlF27gsoR4uS9 X-Received: by 2002:a17:90a:cf0d:: with SMTP id h13mr6651746pju.63.1565156410938; Tue, 06 Aug 2019 22:40:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565156410; cv=none; d=google.com; s=arc-20160816; b=iRHpv9AH0YW2Kd5Xb418mvpr9WjTCfXpUz+iOFwEYovYnFUzcyVQSiDnjEMuVQger4 PHp35n1Yy0HxNq7lUdgkz9EmyzL9q+MSJ3it5hXEE9+iap2RAPRNXfmcnucPov5ezG3f L/Tz9aV6/XBGb9kB/Rp53DsDqKjDP8gpVrq/3Opk5A/Qk+vYpnw7RbVhaRx9e3i31rrq M/y+vgpIeIzaSJP5ANnOG5FqZ2sauZrPriICy/YS9/6QIsytTsOgJGCCZ6JAcL5OkM/x RXbFzeUsK2oKwblNNJYAgAw0vn/cJbc4vVktetqYBk7/to30PSzog5jU36QF2W31d3fA xtkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=LuR1ky4R+W8DnJlClr7ItKCcIJSpq5BHTgJG+rP0wz4=; b=IGkERHzYwqofdyc+eDLiZPXMQT4DPTp6g6NVWgLFaS8fREL2IPcWZn8HQ7MrlHE8Ez Q/VuJgD6jsILgfmaMoGVOhaFnhFUOA5E8irErlUjhL4h7eS7RkzJ9PgReCrEDjLxYx+/ 0fRevcrZUkUCY++S21hai/VyubLcrWQbP6t9aK6ggGT1D7SmAIy6068rWX6/yc9+lCuo EVM7ybOtQleH4UzOKD1pVMop1F18RhIx1Yz/oy/DGjm3oQgTcOJ/TQ9+Nz4yQFNvIXY3 hN3ko+5s19dTXNWbsWgEtODL+YG0ypf4kH7GliPPfrME5/iXzG4Yq9cBEmB1iIY4z/dv rqag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BN1iYmX3; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u91si26275814plb.243.2019.08.06.22.40.10; Tue, 06 Aug 2019 22:40:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BN1iYmX3; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727182AbfHGFjx (ORCPT + 16 others); Wed, 7 Aug 2019 01:39:53 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:43384 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727179AbfHGFjw (ORCPT ); Wed, 7 Aug 2019 01:39:52 -0400 Received: by mail-pl1-f194.google.com with SMTP id 4so31939678pld.10 for ; Tue, 06 Aug 2019 22:39:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LuR1ky4R+W8DnJlClr7ItKCcIJSpq5BHTgJG+rP0wz4=; b=BN1iYmX3VS7iNjW36GRLTazm6lrD0RRsFwt3TRZMMqbhiC7X6+9Uzi4RYwPKB60hQn 4nS2QQ4CVKBocbEcvJEM7OOGQcV7THez5IHf0FQiGx7UInJSEoH3dELsSjvHwx0Jg2JJ eJgm6W9JJfX0M5zOEKyX3dQj5qdXRl6ruoNTm2zdwPcLNEq4xOoe7o3FKadQa8TJZRHv dFFgTWSlwiRuxq20DKWLdBaPUkkHgfoyJrhSienE5+enZLqZzBFOdQGx/z7+54x9dfFP llaWNYh0YsFjxuK9DISr6aso0211Ps+SesAbVPKLemIq78WkV4K1X++La0IY9sSuR84O QkSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LuR1ky4R+W8DnJlClr7ItKCcIJSpq5BHTgJG+rP0wz4=; b=M9LuN9VFT+jj4/9JPWfxL/MuCdVgnlyZuBrESgMuXmpXhYLXaMwebPFX/15L+RVZze vccGvIfTn3OI/pwHPZKE8N1/JBhUbEoenDl73JRH31yAdJK3lUgW/jbOhxJCVsayz/GL Uq0aQULq5MQXb4IkqJSDW6kK16N5vQgDQVh3+W85e9XDVgcUpmjXAhL+sbbfesRqvE+s lTkP0cXF5ToDesDOO0bYs2t84sRwQvzdBqvwOzwWOYNhU744di3GVmuN9tkSWBdbqGz1 qZlgnfTBMMSuSsZJ8t0xqlnvGZkQSqxUsSBbe0OVZUe2z47dgl2LomJRNVG1CEkaky6f eE0g== X-Gm-Message-State: APjAAAWK4oho0yO04H7rvLKW0X1dJ6qXd0uXrqiE9/KolXF3L1Qyl5eh XoRDSHisQ0is2R2M2angw5OiYS5jIDI= X-Received: by 2002:a17:902:7612:: with SMTP id k18mr6498473pll.48.1565156391829; Tue, 06 Aug 2019 22:39:51 -0700 (PDT) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id u7sm86070777pfm.96.2019.08.06.22.39.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Aug 2019 22:39:51 -0700 (PDT) From: Bjorn Andersson To: Andy Gross Cc: Ohad Ben-Cohen , Sibi Sankar , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org Subject: [PATCH 5/9] arm64: dts: qcom: qcs404: Add IMEM and PIL info region Date: Tue, 6 Aug 2019 22:39:38 -0700 Message-Id: <20190807053942.9836-6-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20190807053942.9836-1-bjorn.andersson@linaro.org> References: <20190807053942.9836-1-bjorn.andersson@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add a simple-mfd representing IMEM on QCS404 and define the PIL relocation info region, so that post mortem tools will be able to locate the loaded remoteprocs. Signed-off-by: Bjorn Andersson --- arch/arm64/boot/dts/qcom/qcs404.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.18.0 diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi b/arch/arm64/boot/dts/qcom/qcs404.dtsi index 3d0789775009..1604a9697832 100644 --- a/arch/arm64/boot/dts/qcom/qcs404.dtsi +++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi @@ -845,6 +845,16 @@ status = "disabled"; }; + imem@8600000 { + compatible = "syscon", "simple-mfd"; + reg = <0x08600000 0x1000>; + + pil-reloc { + compatible ="qcom,pil-reloc-info"; + offset = <0x94c>; + }; + }; + intc: interrupt-controller@b000000 { compatible = "qcom,msm-qgic2"; interrupt-controller; From patchwork Wed Aug 7 05:39:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 170707 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp6660517ile; Tue, 6 Aug 2019 22:39:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqwMQWAlhFqQtBpbvL41tDAgXDWOfw1ZufXJK0u43OEp2ryooyy4bieFc8RTqHN8E+EF+E2N X-Received: by 2002:a17:902:7448:: with SMTP id e8mr6569772plt.85.1565156399601; Tue, 06 Aug 2019 22:39:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565156399; cv=none; d=google.com; s=arc-20160816; b=tQLCsdMieYQ0LU95eIKL86EO96LTcp+dBOSp6mYaWfhPdj+AncH5WKsRpPnm0yjIK6 3/Xb/vptrSBJNjSmCQg3cQSi67ZIByyslM1TFJbrtXYnhELAp6+eFOf3d57ICb1KQAWs LhlFVZI+PQE9GvnVBDXyS3vvi6ZkdmYFZ+fWgFtaqvZlr8+tbudGd2CoKRopbcyXPwho xP7LpouO+8LFfC4fwpNxlnbq2r/zEJq5IH6NrcVnsd5AdMZvj9hYz402MLnpQz/KDhzf 7YrLgsCaLErSPKOrrWAtYdw06SjRJv8B3WqAg/GiZZIpn6l7rB2U3lSytj3svDg0MNiD S7pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=h/HptULj1ZkwXqtKtnx9KrZAoKYoT1D4MPjQTFSgnOE=; b=BiD7Yy+PKDTSiXgGoEEQG6/OYV6votR/jWkR+qxQ56LIBzTzm2/rbuyOh39Hh60JcH 9PGAQOYeDhxeZVsY/7WFQRkZ8DNvJNSMHBPxc8FqVhYVlU9hwZymrQG9kYKMwsrk8Svo 0F3KrPb/ZWo6TH7qaVZ5QYEwsuAw228g+gPvsjpRt6N9CAHl99JCNQoj++YCJ3cyPCSO lOmRT6Yn3poI7MF4/OiVU1MalCIswSYbxAQracBuQq+OFSH4epAZLNfyE+khnHf1a+ph 4hiLrLNfQesat9WpU+XzH719LNemGPwb4rbuiADg7hUgj8gOBhKlPa49mGECob9oCaCe zSLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VxaiY8HU; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 102si45335499plf.250.2019.08.06.22.39.59; Tue, 06 Aug 2019 22:39:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VxaiY8HU; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727253AbfHGFj6 (ORCPT + 16 others); Wed, 7 Aug 2019 01:39:58 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:38549 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727280AbfHGFj5 (ORCPT ); Wed, 7 Aug 2019 01:39:57 -0400 Received: by mail-pl1-f194.google.com with SMTP id m12so330003plt.5 for ; Tue, 06 Aug 2019 22:39:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=h/HptULj1ZkwXqtKtnx9KrZAoKYoT1D4MPjQTFSgnOE=; b=VxaiY8HUkDhAJK5OgMj/acEOEgWXyEaHjVYNOdw1Hci6Y4sEt+drKbkvjpYDtH9KV0 3BEfBbpJCoFTh72TNpLRW8ZWifVynAXWjfY6sUAiMiqJKT9tLty9vJCR1YNJzFr/NIBW UUM6JWhYW7Ehntlr86XA3il2jvwRb/3IMVJ97+UQihBCQTf/eOKHrxE2DL/Ol0AP3ews 35YHA/qZ+9AxgOiNzRKa4YvGB437AL0RuTDL/YjdfnLxKpGoyq0Id7izZ7NBHXxurj0v Onjldxfpe6qOvoAQFjAcFFpic3OWRLTg35c3GXLxAufgxgfV1BNINACjeAjiflGAu6tD ELFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=h/HptULj1ZkwXqtKtnx9KrZAoKYoT1D4MPjQTFSgnOE=; b=gVLqXL6Ft3j7uCfs1jjCh8l67lLOO3xQkehQoQWfohlezo3qVSYcRxF0INNxcnrVd6 Feg5x9BAdK93+gh01faTNPNrtWzH9behbLvz+eq/MT80GlMfxz9GtoJC2GYlAoiu+IVh EuSp+GmBU9mJfEUVllcxXuKSPQGy3NRwkJ0QEuimIcJGquPrgzAYXjVGzVI9ysm19KiZ fKbP6w92Ns4R2TbQxLuyglETiBeeW7KCGqnIdwpIsaqtnviVNL3oFLdknRGIKflw5EL6 O1MiGEPtBUVaZmxJ2RvLuWb0lp9uQQ1YEH/ShDGMtRBs9K4mm7w4qLHz+Ua0errgLC7I n/uQ== X-Gm-Message-State: APjAAAWk9IMRHJPU250vXF8vYj4E0sr2OBeVlIYYnN6yFCBBoxgjWWzn DMGMtmIwu8BGsVqGKSW+z5lXjBmubXs= X-Received: by 2002:aa7:98da:: with SMTP id e26mr7570022pfm.34.1565156396240; Tue, 06 Aug 2019 22:39:56 -0700 (PDT) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id u7sm86070777pfm.96.2019.08.06.22.39.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Aug 2019 22:39:55 -0700 (PDT) From: Bjorn Andersson To: Ohad Ben-Cohen , Bjorn Andersson Cc: Andy Gross , Sibi Sankar , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org Subject: [PATCH 9/9] remoteproc: qcom: Introduce panic handler for PAS and ADSP Date: Tue, 6 Aug 2019 22:39:42 -0700 Message-Id: <20190807053942.9836-10-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20190807053942.9836-1-bjorn.andersson@linaro.org> References: <20190807053942.9836-1-bjorn.andersson@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Make the PAS and ADSP/CDSP remoteproc drivers implement the panic handler that will invoke a stop to prepare the remoteprocs for post mortem debugging. Signed-off-by: Bjorn Andersson --- drivers/remoteproc/qcom_q6v5_adsp.c | 8 ++++++++ drivers/remoteproc/qcom_q6v5_pas.c | 8 ++++++++ 2 files changed, 16 insertions(+) -- 2.18.0 diff --git a/drivers/remoteproc/qcom_q6v5_adsp.c b/drivers/remoteproc/qcom_q6v5_adsp.c index e953886b2eb7..3de1683903db 100644 --- a/drivers/remoteproc/qcom_q6v5_adsp.c +++ b/drivers/remoteproc/qcom_q6v5_adsp.c @@ -282,12 +282,20 @@ static void *adsp_da_to_va(struct rproc *rproc, u64 da, int len) return adsp->mem_region + offset; } +static void adsp_panic(struct rproc *rproc) +{ + struct qcom_adsp *adsp = (struct qcom_adsp *)rproc->priv; + + qcom_q6v5_panic(&adsp->q6v5); +} + static const struct rproc_ops adsp_ops = { .start = adsp_start, .stop = adsp_stop, .da_to_va = adsp_da_to_va, .parse_fw = qcom_register_dump_segments, .load = adsp_load, + .panic = adsp_panic, }; static int adsp_init_clock(struct qcom_adsp *adsp, const char **clk_ids) diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index bfb622d36cb3..31ff09bcd3ee 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -179,12 +179,20 @@ static void *adsp_da_to_va(struct rproc *rproc, u64 da, int len) return adsp->mem_region + offset; } +static void adsp_panic(struct rproc *rproc) +{ + struct qcom_adsp *adsp = (struct qcom_adsp *)rproc->priv; + + qcom_q6v5_panic(&adsp->q6v5); +} + static const struct rproc_ops adsp_ops = { .start = adsp_start, .stop = adsp_stop, .da_to_va = adsp_da_to_va, .parse_fw = qcom_register_dump_segments, .load = adsp_load, + .panic = adsp_panic, }; static int adsp_init_clock(struct qcom_adsp *adsp)