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);