From patchwork Mon Jun 22 19:19:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 191389 Delivered-To: patch@linaro.org Received: by 2002:a92:1f07:0:0:0:0:0 with SMTP id i7csp1315812ile; Mon, 22 Jun 2020 12:19:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyINfgL0qp70Yl4mrLZ/IE2V1jas8ucRarkM0la97pR0rxz4FWMftZJOwlL5J/hy0kn2tWH X-Received: by 2002:aa7:c6d1:: with SMTP id b17mr19433016eds.39.1592853598679; Mon, 22 Jun 2020 12:19:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592853598; cv=none; d=google.com; s=arc-20160816; b=fNdUbQpD3rm34E4GVUhGoSvJOy2e88GwFGoAZ+/DSSnD/5Cbc+h0uSzmmjKpwM7/LG lwPYOziyTIGxR2yFC5xj6H4jltQ2ldhXzlWNOw0vTi7+9MM03T7P2Pixsmysbczk+fsS /3ltAKJFXwWUJtrSQWrvjvumE42s/7BT6Ot4in2wBQMF5qK05q9hKStnEtHruRIXNh6Q H7tYdW8SHXrLhuK3g3coheKs9a15V9l1dYgza/AYXyFogF7UvCv5tij8GBmxNcTsFIJ6 fDUW2PyaJwQRPJeOQeZGT8O97MehldokAuGTe+TUHSEUZSh6tjpQwsLzrSmZaItJQQAU lqrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=WpdygEuxEbkEHwJ7Dc7yTeQc0s6WGpubIGVPN8hUzwI=; b=BZJpruS93ics1BzpVHjM0F24NzP70WHn47e996v4S3cwn87h6yzaJpqZXZDczvDHew t0VH6OhEMidZ7r75kHXb1cgPVFW98ATungimt5qC/TDwryNE20bZibGFRvki96te6NT1 gXmi4HQoOT7npMfrjKhtgMAe3gTTRv8Npt7z1EXGSYnLq09g0ZSW9ValvUQiaidcSo5D IqJF6zWwVEl9Oj3aU2ve33RWjaVPtTlo7ryyLAZkk59WgiIPwK3pPffQRMfZNH9sPsB9 nIyBOcfBwLtNWin9zQ7+RqF6TpdDAd4NkWrBHvBxqRR5oO4aqKzGDq3AwxIt8ovlpAO/ usKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ptebOAxv; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id 27si9733150ejv.134.2020.06.22.12.19.58; Mon, 22 Jun 2020 12:19:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ptebOAxv; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 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 S1728496AbgFVTTg (ORCPT + 16 others); Mon, 22 Jun 2020 15:19:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728489AbgFVTTf (ORCPT ); Mon, 22 Jun 2020 15:19:35 -0400 Received: from mail-oi1-x242.google.com (mail-oi1-x242.google.com [IPv6:2607:f8b0:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D34CC061573 for ; Mon, 22 Jun 2020 12:19:35 -0700 (PDT) Received: by mail-oi1-x242.google.com with SMTP id p82so5912623oif.1 for ; Mon, 22 Jun 2020 12:19:35 -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 :mime-version:content-transfer-encoding; bh=WpdygEuxEbkEHwJ7Dc7yTeQc0s6WGpubIGVPN8hUzwI=; b=ptebOAxvDdaND1bSmx+wZ0WhkMUfYrP4NqBlrOz/GpBppJcuw1tk1uUy+i7V13LWhH s0UO1oY/AyHU1T/Es4lhiqpz/RTShFaacDb8lGR3pSwZrh7MofFAUI/EqnOYVXe4t2Vd e9BO75ciF7zO40MPLegW44aW1clYneJChKo7/X1FP82k9qBXRNfvUITgoPUu3uTmGvSD 0bb1wdoHI4Crq6siiscGwkg7P5q82flpWWOjbGiIYYwwKrjm2R7Gn/WQlwGuymzSRRhG Ra5XQz37tzPKUX9cQB9FnfaVIs4mo4danY29Wz9XyFTbnXqtNCcrpBNjG9O1zpkXRYex G16g== 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:mime-version:content-transfer-encoding; bh=WpdygEuxEbkEHwJ7Dc7yTeQc0s6WGpubIGVPN8hUzwI=; b=IQvDvQbV3MDms5rRNE41MYzGTI1MVfwC5ainskIzbhAY8aOpcuu43JgXe72SDv+SOi ZxVi4ZoMAOK9wbI920WDAL35gIb9ZjA4YFDjgyz1OFNeUaBxU/ISwZ1dFz5yJ9Yqc74R 70uaOg0bdDlepqVjwWqNn2NMMRhJBYQcY/+k97PnDisAohvI7p/tGFSBHAgm2R17ZCY4 OXCuJrR9lt2mAMeA5HvhRBAby2vX0H1Y2dDeeMKYRFRCELv5wP39CKlpwtAhjQQEWCN0 gw7y4/GBpvDYNUxh1zZFjdd+ypPUQv5seDz1uroZJHnnQ8MMmo5ekEj2WFAnZc8Khc6q 5n8A== X-Gm-Message-State: AOAM531OsoMjQTM79oMoBaiS138gwYLvP+ajSP5pDazumuxMBTuxBg2H cEQPAJLp83YDB29q1/cbbRrLxQ== X-Received: by 2002:a54:4d96:: with SMTP id y22mr12894021oix.55.1592853574476; Mon, 22 Jun 2020 12:19:34 -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 m84sm3348294oif.32.2020.06.22.12.19.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jun 2020 12:19:33 -0700 (PDT) From: Bjorn Andersson To: Andy Gross , Bjorn Andersson , Ohad Ben-Cohen Cc: Rob Herring , linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Mathieu Poirier , Rob Herring , Stephen Boyd , Vinod Koul Subject: [PATCH v7 1/5] dt-bindings: remoteproc: Add Qualcomm PIL info binding Date: Mon, 22 Jun 2020 12:19:38 -0700 Message-Id: <20200622191942.255460-2-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200622191942.255460-1-bjorn.andersson@linaro.org> References: <20200622191942.255460-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add a devicetree binding for the Qualcomm peripheral image loader relocation information region found in the IMEM. Reviewed-by: Mathieu Poirier Reviewed-by: Rob Herring Reviewed-by: Stephen Boyd Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson --- Changes since v6: - None .../bindings/remoteproc/qcom,pil-info.yaml | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Documentation/devicetree/bindings/remoteproc/qcom,pil-info.yaml -- 2.26.2 diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,pil-info.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,pil-info.yaml new file mode 100644 index 000000000000..87c52316ddbd --- /dev/null +++ b/Documentation/devicetree/bindings/remoteproc/qcom,pil-info.yaml @@ -0,0 +1,44 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/remoteproc/qcom,pil-info.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm peripheral image loader relocation info binding + +maintainers: + - Bjorn Andersson + +description: + The Qualcomm peripheral image loader relocation memory region, in IMEM, is + used for communicating remoteproc relocation information to post mortem + debugging tools. + +properties: + compatible: + const: qcom,pil-reloc-info + + reg: + maxItems: 1 + +required: + - compatible + - reg + +examples: + - | + imem@146bf000 { + compatible = "syscon", "simple-mfd"; + reg = <0x146bf000 0x1000>; + + #address-cells = <1>; + #size-cells = <1>; + + ranges = <0 0x146bf000 0x1000>; + + pil-reloc@94c { + compatible = "qcom,pil-reloc-info"; + reg = <0x94c 0xc8>; + }; + }; +... From patchwork Mon Jun 22 19:19:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 191388 Delivered-To: patch@linaro.org Received: by 2002:a92:1f07:0:0:0:0:0 with SMTP id i7csp1315802ile; Mon, 22 Jun 2020 12:19:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVSN9xOzzhs+oISHFY3rWL+LAeEshTHnefIDXlV5RH1i5TK5DvN8RR8J06CpYb4mNKexbr X-Received: by 2002:a50:fc0d:: with SMTP id i13mr18211696edr.260.1592853597584; Mon, 22 Jun 2020 12:19:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592853597; cv=none; d=google.com; s=arc-20160816; b=O38aRxpQSpBhRSchRAHWhcrEq1nFhw7HRqk74qPu+oIv9sFN1y6cgh9XEqN3rLxIOr XZW7m8j3ZLu7+HRFZ/8/6QWU/Y2Vea5SnU8guJ/kabXKe2qpmlqON37R3y2EpSF/RsMy WZzaI6qpAMaWF9geNtYzgA8uzoYntr694ANVIBMyfZEiDvF3DqbyoTUhsCrkY2hoOuKh pUhOn5T1xQlOlz9nNUCKd7fd+lmpjk9j1ecCwjW9tQ7Ub68mA0EQfGHwc/qf7LxmEE+I BzuaHw7QFXuaBVKKdPL7l7znv5NHyk8eJomu+nadSlgj0dQXppDbRGloPuXwyJdmuQG0 Nqrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YDklUAlI6bHbMEfvS3rwfyZb5ytTzpIXJfmJrHuuOsM=; b=VvZKtGXKp/57++f4sWL3U2hs4N38F5tMlSQmgzqn4p3gLaGgt0Mr2Dm7trydWgLc/t 3terQD3BuViWfGlC8TquOQp67zN732mAMGhHDHW0JoYL8XH+zNpT3MbE8F88Cz+kUTx0 QDpEuf21/L+sdjufEUvqQ5eyYQh+O34aKcZbXyWhEBAbbPnvkKo3PFJZ8ZHgMgmksARB d4DTRinsMMkR63zuK4dRQ7iNs7U24MstSvtuJfgvNtDSlX1+Vf7hqSsJ9qgfUqEkp6xZ i51Zx65zr0pFBvDFM13kGRQfhOkNa6w51WJTPdNk4ykACANizTbojVkWEKGRTmtThZ3m crfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OPtZjkUS; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id 27si9733150ejv.134.2020.06.22.12.19.57; Mon, 22 Jun 2020 12:19:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OPtZjkUS; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 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 S1728526AbgFVTTj (ORCPT + 16 others); Mon, 22 Jun 2020 15:19:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728489AbgFVTTh (ORCPT ); Mon, 22 Jun 2020 15:19:37 -0400 Received: from mail-oi1-x243.google.com (mail-oi1-x243.google.com [IPv6:2607:f8b0:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FA38C061573 for ; Mon, 22 Jun 2020 12:19:36 -0700 (PDT) Received: by mail-oi1-x243.google.com with SMTP id p70so16618195oic.12 for ; Mon, 22 Jun 2020 12:19:36 -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 :mime-version:content-transfer-encoding; bh=YDklUAlI6bHbMEfvS3rwfyZb5ytTzpIXJfmJrHuuOsM=; b=OPtZjkUSGtiBYUCUGNcJAwEiuhXja+slcfyFtGDUFWt2uhdHFQcecKAJtq/5Jby1mG bKkc7dFIcHEXAJRNhHBLqz3miAhjkDemNqHN93iblDtrGduNnVmJy/qODLPFTuFeR3kP rmw9rtt2DA7M4q9guToFp5koAdIJ/6220rjcghPh9DN4O1gCMZjpyII+P3ayJZgf+3NC +tMKZGkt+/otEnsJkMfuFYwIeLlLAspjEUN+99NC40xpSQNRYQ1iv/KF/WpzV1uYp0X1 nRMyCh87ZqCYqqc6IndFK9LuTdSgTJxadMLc+7/1jJjuXUZYahKfbn0nuC58geE9LU6k Yecw== 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:mime-version:content-transfer-encoding; bh=YDklUAlI6bHbMEfvS3rwfyZb5ytTzpIXJfmJrHuuOsM=; b=ZJu9q2rCa7kaYiS4CCIIrVwISFPBfgAm4BC2mcADkq7i5e8vGCTvaf07OCUy1n5nYr jYwxjwZbPLH+GkiIehrogl7W94AYkEkGxxa/dESUjaB94ZMrBPSUBfIMGX1g/A1Cnivp Ze+T7S/tuKoK0+Kkcm9rLcVqYr9WE+w8uUleYVX/XQqL01HvIVWRc+OLZqjQNTXoiwFh J0s+paCHiswNub5aw+DfMn/u7wHnsoXFvXLmQI7vHSw82zLbVzinGhZVgGWCjSPN+i6B ByaA87JLrSZkHMdepWjaZjgtHBboJrZi1xxiIqjPaEIFSe22GIiqP4hk1ZKWZ3bNKBV/ JQWw== X-Gm-Message-State: AOAM531foTSIryTRHKbSinqE8m2kCpz2HbCkPUCwu1YlDmNzUyemf7it lRH4E17O92Ws0stDrSzPdUbjVQ== X-Received: by 2002:aca:6c6:: with SMTP id 189mr13217866oig.134.1592853575882; Mon, 22 Jun 2020 12:19:35 -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 m84sm3348294oif.32.2020.06.22.12.19.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jun 2020 12:19:35 -0700 (PDT) From: Bjorn Andersson To: Andy Gross , Bjorn Andersson , Ohad Ben-Cohen Cc: Rob Herring , linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Mathieu Poirier , Vinod Koul Subject: [PATCH v7 2/5] remoteproc: qcom: Introduce helper to store pil info in IMEM Date: Mon, 22 Jun 2020 12:19:39 -0700 Message-Id: <20200622191942.255460-3-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200622191942.255460-1-bjorn.andersson@linaro.org> References: <20200622191942.255460-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org A region in IMEM is used to communicate load addresses of remoteproc to post mortem debug tools. Implement a helper function that can be used to store this information in order to enable these tools to process collected ramdumps. Reviewed-by: Mathieu Poirier Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson --- Changes since v6: - Replaced entry struct and usage of offset_of with a comment and defined offsets - Renamed pil_reloc_lock - Write out upper 32 bits of the address - Include header from implementation - Add linux/types.h to the header file drivers/remoteproc/Kconfig | 3 + drivers/remoteproc/Makefile | 1 + drivers/remoteproc/qcom_pil_info.c | 129 +++++++++++++++++++++++++++++ drivers/remoteproc/qcom_pil_info.h | 9 ++ 4 files changed, 142 insertions(+) create mode 100644 drivers/remoteproc/qcom_pil_info.c create mode 100644 drivers/remoteproc/qcom_pil_info.h -- 2.26.2 Reviewed-by: Rishabh Bhatnagar Tested-by: Rishabh Bhatnagar diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig index c4d1731295eb..f4bd96d1a1a3 100644 --- a/drivers/remoteproc/Kconfig +++ b/drivers/remoteproc/Kconfig @@ -116,6 +116,9 @@ config KEYSTONE_REMOTEPROC It's safe to say N here if you're not interested in the Keystone DSPs or just want to use a bare minimum kernel. +config QCOM_PIL_INFO + tristate + config QCOM_RPROC_COMMON tristate diff --git a/drivers/remoteproc/Makefile b/drivers/remoteproc/Makefile index e8b886e511f0..fe398f82d550 100644 --- a/drivers/remoteproc/Makefile +++ b/drivers/remoteproc/Makefile @@ -16,6 +16,7 @@ obj-$(CONFIG_OMAP_REMOTEPROC) += omap_remoteproc.o obj-$(CONFIG_WKUP_M3_RPROC) += wkup_m3_rproc.o obj-$(CONFIG_DA8XX_REMOTEPROC) += da8xx_remoteproc.o obj-$(CONFIG_KEYSTONE_REMOTEPROC) += keystone_remoteproc.o +obj-$(CONFIG_QCOM_PIL_INFO) += qcom_pil_info.o obj-$(CONFIG_QCOM_RPROC_COMMON) += qcom_common.o obj-$(CONFIG_QCOM_Q6V5_COMMON) += qcom_q6v5.o obj-$(CONFIG_QCOM_Q6V5_ADSP) += qcom_q6v5_adsp.o diff --git a/drivers/remoteproc/qcom_pil_info.c b/drivers/remoteproc/qcom_pil_info.c new file mode 100644 index 000000000000..0536e3904669 --- /dev/null +++ b/drivers/remoteproc/qcom_pil_info.c @@ -0,0 +1,129 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2019-2020 Linaro Ltd. + */ +#include +#include +#include +#include +#include "qcom_pil_info.h" + +/* + * The PIL relocation information region is used to communicate memory regions + * occupied by co-processor firmware for post mortem crash analysis. + * + * It consists of an array of entries with an 8 byte textual identifier of the + * region followed by a 64 bit base address and 32 bit size, both little + * endian. + */ +#define PIL_RELOC_NAME_LEN 8 +#define PIL_RELOC_ENTRY_SIZE (PIL_RELOC_NAME_LEN + sizeof(__le64) + sizeof(__le32)) + +struct pil_reloc { + void __iomem *base; + size_t num_entries; +}; + +static struct pil_reloc _reloc __read_mostly; +static DEFINE_MUTEX(pil_reloc_lock); + +static int qcom_pil_info_init(void) +{ + struct device_node *np; + struct resource imem; + void __iomem *base; + int ret; + + /* Already initialized? */ + if (_reloc.base) + return 0; + + np = of_find_compatible_node(NULL, NULL, "qcom,pil-reloc-info"); + if (!np) + return -ENOENT; + + ret = of_address_to_resource(np, 0, &imem); + of_node_put(np); + if (ret < 0) + return ret; + + base = ioremap(imem.start, resource_size(&imem)); + if (!base) { + pr_err("failed to map PIL relocation info region\n"); + return -ENOMEM; + } + + memset_io(base, 0, resource_size(&imem)); + + _reloc.base = base; + _reloc.num_entries = resource_size(&imem) / PIL_RELOC_ENTRY_SIZE; + + return 0; +} + +/** + * qcom_pil_info_store() - store PIL information of image in IMEM + * @image: name of the image + * @base: base address of the loaded image + * @size: size of the loaded image + * + * Return: 0 on success, negative errno on failure + */ +int qcom_pil_info_store(const char *image, phys_addr_t base, size_t size) +{ + char buf[PIL_RELOC_NAME_LEN]; + void __iomem *entry; + int ret; + int i; + + mutex_lock(&pil_reloc_lock); + ret = qcom_pil_info_init(); + if (ret < 0) { + mutex_unlock(&pil_reloc_lock); + return ret; + } + + for (i = 0; i < _reloc.num_entries; i++) { + entry = _reloc.base + i * PIL_RELOC_ENTRY_SIZE; + + memcpy_fromio(buf, entry, PIL_RELOC_NAME_LEN); + + /* + * An empty record means we didn't find it, given that the + * records are packed. + */ + if (!buf[0]) + goto found_unused; + + if (!strncmp(buf, image, PIL_RELOC_NAME_LEN)) + goto found_existing; + } + + pr_warn("insufficient PIL info slots\n"); + mutex_unlock(&pil_reloc_lock); + return -ENOMEM; + +found_unused: + memcpy_toio(entry, image, PIL_RELOC_NAME_LEN); +found_existing: + /* Use two writel() as base is only aligned to 4 bytes on odd entries */ + writel(base, entry + PIL_RELOC_NAME_LEN); + writel(base >> 32, entry + PIL_RELOC_NAME_LEN + 4); + writel(size, entry + PIL_RELOC_NAME_LEN + sizeof(__le64)); + mutex_unlock(&pil_reloc_lock); + + return 0; +} +EXPORT_SYMBOL_GPL(qcom_pil_info_store); + +static void __exit pil_reloc_exit(void) +{ + mutex_lock(&pil_reloc_lock); + iounmap(_reloc.base); + _reloc.base = NULL; + mutex_unlock(&pil_reloc_lock); +} +module_exit(pil_reloc_exit); + +MODULE_DESCRIPTION("Qualcomm PIL relocation info"); +MODULE_LICENSE("GPL v2"); diff --git a/drivers/remoteproc/qcom_pil_info.h b/drivers/remoteproc/qcom_pil_info.h new file mode 100644 index 000000000000..0dce6142935e --- /dev/null +++ b/drivers/remoteproc/qcom_pil_info.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __QCOM_PIL_INFO_H__ +#define __QCOM_PIL_INFO_H__ + +#include + +int qcom_pil_info_store(const char *image, phys_addr_t base, size_t size); + +#endif From patchwork Mon Jun 22 19:19:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 191387 Delivered-To: patch@linaro.org Received: by 2002:a92:1f07:0:0:0:0:0 with SMTP id i7csp1315782ile; Mon, 22 Jun 2020 12:19:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvL0dZBOBo2padc/8xhpkzbJ6rwwxLDYKitKSH+Mk+jtR3UsvwPVr0rlDswJS3OyNl2QYd X-Received: by 2002:a17:906:cd06:: with SMTP id oz6mr18041598ejb.434.1592853596699; Mon, 22 Jun 2020 12:19:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592853596; cv=none; d=google.com; s=arc-20160816; b=s6k3+loxDCVKCrFdGbPmFLFTs+DeJHTzWknwRAUlUUt6B/xxfJk93RS1cu6UBF1J0B zMy0r8moWbfbltqvyaKmPYIhm1RS6vymHcOwAOq7wAS+WeLNqoxcFgaoRKXSa//KeYQh ce0J5AFFkfcMjFeqSqbG39f2KjdKzTiLAycL4gpJs8PZIFtNxwkn4+BUg5RzZLeXsi6U qH8wka/CgFDImtLrVLFhvKsK8Bm+wPQS6qhXpvjTTLuPDAweDkhZuqxVpL5oeTD3pBFf /5nboEN5Ne6+7OIigeyfoj+7kLfvSCLmjsuQY1+mRtZK6KeWpoKGqdWfy2Z2RNIlBKsz 5w1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=T7aDthwfVK4X3zkJhuLT621NaM0SCkvfXrIC1UxtpAo=; b=pK1KsXpe+dFkkbqlFdmC/i1ygVwuVZziyanC8wgeadj5b9E6ieVLn9pIBYJ+7n0K0R SXoQzy+qCxX4ttN9R9ue1AZxiynuTF/pKk1d5/ptktKXslovSDR+pbEhvOU9SzH1m8Jw LUW2T/3tBEcwRTVEvaMaJdcYh6J1cAKYZ3QU8G5zmbQEqxeW8ViKGUFvOhZMv3klW+T5 9ehnPFxiRhn4IUNpkUnevzqS4t0AdZsVs9m3D/4iDnWkFGspWIfzdDy1jLU5md6EWDK+ I3dZSaW/xF+U0uWrSf9EnMLWPqsjllzpZXuJmuNqlo8ewCu5G3NfNCUC7/EVa6Wr4mRN 9juQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WenEuPK6; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id 27si9733150ejv.134.2020.06.22.12.19.56; Mon, 22 Jun 2020 12:19:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WenEuPK6; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 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 S1728532AbgFVTTj (ORCPT + 16 others); Mon, 22 Jun 2020 15:19:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728512AbgFVTTi (ORCPT ); Mon, 22 Jun 2020 15:19:38 -0400 Received: from mail-oi1-x244.google.com (mail-oi1-x244.google.com [IPv6:2607:f8b0:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BCD4C061799 for ; Mon, 22 Jun 2020 12:19:38 -0700 (PDT) Received: by mail-oi1-x244.google.com with SMTP id a21so16651696oic.8 for ; Mon, 22 Jun 2020 12:19:38 -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 :mime-version:content-transfer-encoding; bh=T7aDthwfVK4X3zkJhuLT621NaM0SCkvfXrIC1UxtpAo=; b=WenEuPK6bKXoYKUBm6U9eecNOGvp86TCjIZoXl3kBie5ZlBhBi3X9FaoFd37hzOryK OVZlz5nI+SiAwjF8/4hP409pvaRsGuQWHCSWwt8YSFLg8iRRlT9T0XVMW3qWtzB4GhFb Uer2+myuvaAUczwiSayX0x23mbIqILkrv+M4ixrOZVQpYCqI0oUeI6j1CzOivKnRtU0k DqrPipdWM+uuuzFRghGAoqzCLO5nGhWaFvyGyDf7se1G0OUTigri/GRNOF9cLe95WbpO LTUp6XaxBfkDE8cIFp3yW+qFWJUF3Gme3V8f2ZCfVJO35BcLi1YAw+Qx9trEa9mHkPm1 7+4w== 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:mime-version:content-transfer-encoding; bh=T7aDthwfVK4X3zkJhuLT621NaM0SCkvfXrIC1UxtpAo=; b=CeDREN4KMDn0igJ+5lEIPqEZWf2igeIRcOvpel/Y+tlx7wixlSAYLPGtFwA1G1yn2R q+g2ZH2fa8gZfh6GJBMt5dj0XYSwHd8+0jlo/MOp5i76mk+fzSWLPVNatLQmxfiY6JXf D1AXennh5bm+A+agFRynWfM6AzzUu+0f7QywFVAL08+LH4MZT4kb6ZgleimZbeJzXiVF /D+jgeJXCTQU+Y6vs3tsYNFB9EdzYPUyCr5KowiiBwPY8ruc9qA0U3wpZtv/5rthrPH3 cmsJ4xvsMpspfW4TWz2R4xPvIzIwErFlF1WBs4uMuomEMjxLJ2LYClrBubMFjXZjxMYZ +v5w== X-Gm-Message-State: AOAM532+d2OOhmOe6+LuwmOk7wyOMCqYnX0X5kPUw1evGOelkTn0zYny 3wtYEYgSv+GRi7sMGe9AyMGuQg== X-Received: by 2002:a05:6808:6d9:: with SMTP id m25mr12862254oih.111.1592853577397; Mon, 22 Jun 2020 12:19:37 -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 m84sm3348294oif.32.2020.06.22.12.19.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jun 2020 12:19:36 -0700 (PDT) From: Bjorn Andersson To: Andy Gross , Bjorn Andersson , Ohad Ben-Cohen Cc: Rob Herring , linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Vinod Koul , Stephen Boyd Subject: [PATCH v7 3/5] remoteproc: qcom: Update PIL relocation info on load Date: Mon, 22 Jun 2020 12:19:40 -0700 Message-Id: <20200622191942.255460-4-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200622191942.255460-1-bjorn.andersson@linaro.org> References: <20200622191942.255460-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Update the PIL relocation information in IMEM with information about where the firmware for various remoteprocs are loaded. Reviewed-by: Vinod Koul Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson --- Changes since v6: - None drivers/remoteproc/Kconfig | 5 +++++ drivers/remoteproc/qcom_q6v5_adsp.c | 16 +++++++++++++--- drivers/remoteproc/qcom_q6v5_mss.c | 3 +++ drivers/remoteproc/qcom_q6v5_pas.c | 15 ++++++++++++--- drivers/remoteproc/qcom_q6v5_wcss.c | 14 +++++++++++--- drivers/remoteproc/qcom_wcnss.c | 14 +++++++++++--- 6 files changed, 55 insertions(+), 12 deletions(-) -- 2.26.2 Reviewed-by: Rishabh Bhatnagar Tested-by: Rishabh Bhatnagar diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig index f4bd96d1a1a3..3e8d5d1a2b9e 100644 --- a/drivers/remoteproc/Kconfig +++ b/drivers/remoteproc/Kconfig @@ -135,6 +135,7 @@ config QCOM_Q6V5_ADSP 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 @@ -151,6 +152,7 @@ config QCOM_Q6V5_MSS depends on QCOM_SYSMON || QCOM_SYSMON=n select MFD_SYSCON select QCOM_MDT_LOADER + select QCOM_PIL_INFO select QCOM_Q6V5_COMMON select QCOM_Q6V5_IPA_NOTIFY select QCOM_RPROC_COMMON @@ -167,6 +169,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 @@ -185,6 +188,7 @@ config QCOM_Q6V5_WCSS depends on QCOM_SYSMON || QCOM_SYSMON=n select MFD_SYSCON select QCOM_MDT_LOADER + select QCOM_PIL_INFO select QCOM_Q6V5_COMMON select QCOM_RPROC_COMMON select QCOM_SCM @@ -218,6 +222,7 @@ config QCOM_WCNSS_PIL depends on QCOM_SMEM depends on QCOM_SYSMON || QCOM_SYSMON=n select QCOM_MDT_LOADER + select QCOM_PIL_INFO select QCOM_RPROC_COMMON select QCOM_SCM help diff --git a/drivers/remoteproc/qcom_q6v5_adsp.c b/drivers/remoteproc/qcom_q6v5_adsp.c index d2a2574dcf35..efb2c1aa80a3 100644 --- a/drivers/remoteproc/qcom_q6v5_adsp.c +++ b/drivers/remoteproc/qcom_q6v5_adsp.c @@ -26,6 +26,7 @@ #include #include "qcom_common.h" +#include "qcom_pil_info.h" #include "qcom_q6v5.h" #include "remoteproc_internal.h" @@ -82,6 +83,7 @@ struct qcom_adsp { unsigned int halt_lpass; int crash_reason_smem; + const char *info_name; struct completion start_done; struct completion stop_done; @@ -164,10 +166,17 @@ static int qcom_adsp_shutdown(struct qcom_adsp *adsp) static int adsp_load(struct rproc *rproc, const struct firmware *fw) { struct qcom_adsp *adsp = (struct qcom_adsp *)rproc->priv; + int ret; + + ret = qcom_mdt_load_no_init(adsp->dev, fw, rproc->firmware, 0, + 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_phys, adsp->mem_size); - return qcom_mdt_load_no_init(adsp->dev, fw, rproc->firmware, 0, - adsp->mem_region, adsp->mem_phys, adsp->mem_size, - &adsp->mem_reloc); + return 0; } static int adsp_start(struct rproc *rproc) @@ -436,6 +445,7 @@ static int adsp_probe(struct platform_device *pdev) adsp = (struct qcom_adsp *)rproc->priv; adsp->dev = &pdev->dev; adsp->rproc = rproc; + adsp->info_name = desc->sysmon_name; platform_set_drvdata(pdev, adsp); ret = adsp_alloc_memory_region(adsp); diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c index 903b2bb97e12..4b8567f970f9 100644 --- a/drivers/remoteproc/qcom_q6v5_mss.c +++ b/drivers/remoteproc/qcom_q6v5_mss.c @@ -30,6 +30,7 @@ #include "remoteproc_internal.h" #include "qcom_common.h" +#include "qcom_pil_info.h" #include "qcom_q6v5.h" #include @@ -1190,6 +1191,8 @@ static int q6v5_mpss_load(struct q6v5 *qproc) else if (ret < 0) dev_err(qproc->dev, "MPSS authentication failed: %d\n", ret); + qcom_pil_info_store("modem", qproc->mpss_phys, qproc->mpss_size); + release_firmware: release_firmware(fw); out: diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index 61791a03f648..3837f23995e0 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -25,6 +25,7 @@ #include #include "qcom_common.h" +#include "qcom_pil_info.h" #include "qcom_q6v5.h" #include "remoteproc_internal.h" @@ -64,6 +65,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; @@ -117,11 +119,17 @@ static void adsp_pds_disable(struct qcom_adsp *adsp, struct device **pds, 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_phys, adsp->mem_size); + + return 0; } static int adsp_start(struct rproc *rproc) @@ -405,6 +413,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); device_wakeup_enable(adsp->dev); diff --git a/drivers/remoteproc/qcom_q6v5_wcss.c b/drivers/remoteproc/qcom_q6v5_wcss.c index 88c76b9417fa..8846ef0b0f1a 100644 --- a/drivers/remoteproc/qcom_q6v5_wcss.c +++ b/drivers/remoteproc/qcom_q6v5_wcss.c @@ -14,6 +14,7 @@ #include #include #include "qcom_common.h" +#include "qcom_pil_info.h" #include "qcom_q6v5.h" #define WCSS_CRASH_REASON 421 @@ -424,10 +425,17 @@ static void *q6v5_wcss_da_to_va(struct rproc *rproc, u64 da, size_t len) static int q6v5_wcss_load(struct rproc *rproc, const struct firmware *fw) { struct q6v5_wcss *wcss = rproc->priv; + int ret; + + ret = qcom_mdt_load_no_init(wcss->dev, fw, rproc->firmware, + 0, wcss->mem_region, wcss->mem_phys, + wcss->mem_size, &wcss->mem_reloc); + if (ret) + return ret; + + qcom_pil_info_store("wcnss", wcss->mem_phys, wcss->mem_size); - return qcom_mdt_load_no_init(wcss->dev, fw, rproc->firmware, - 0, wcss->mem_region, wcss->mem_phys, - wcss->mem_size, &wcss->mem_reloc); + return ret; } static const struct rproc_ops q6v5_wcss_ops = { diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c index 5d65e1a9329a..e2573f79a137 100644 --- a/drivers/remoteproc/qcom_wcnss.c +++ b/drivers/remoteproc/qcom_wcnss.c @@ -27,6 +27,7 @@ #include "qcom_common.h" #include "remoteproc_internal.h" +#include "qcom_pil_info.h" #include "qcom_wcnss.h" #define WCNSS_CRASH_REASON_SMEM 422 @@ -145,10 +146,17 @@ void qcom_wcnss_assign_iris(struct qcom_wcnss *wcnss, static int wcnss_load(struct rproc *rproc, const struct firmware *fw) { struct qcom_wcnss *wcnss = (struct qcom_wcnss *)rproc->priv; + int ret; + + ret = qcom_mdt_load(wcnss->dev, fw, rproc->firmware, WCNSS_PAS_ID, + wcnss->mem_region, wcnss->mem_phys, + wcnss->mem_size, &wcnss->mem_reloc); + if (ret) + return ret; + + qcom_pil_info_store("wcnss", wcnss->mem_phys, wcnss->mem_size); - return qcom_mdt_load(wcnss->dev, fw, rproc->firmware, WCNSS_PAS_ID, - wcnss->mem_region, wcnss->mem_phys, - wcnss->mem_size, &wcnss->mem_reloc); + return 0; } static void wcnss_indicate_nv_download(struct qcom_wcnss *wcnss) From patchwork Mon Jun 22 19:19:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 191385 Delivered-To: patch@linaro.org Received: by 2002:a92:1f07:0:0:0:0:0 with SMTP id i7csp1315714ile; Mon, 22 Jun 2020 12:19:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyjzutPoU2/tXrwApi0NCDuDRx2rTsIxWg0EPhpYGJKLSDwefbbwLNniWi3d8SQVsxbNXM X-Received: by 2002:a05:6402:1202:: with SMTP id c2mr18029850edw.182.1592853591927; Mon, 22 Jun 2020 12:19:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592853591; cv=none; d=google.com; s=arc-20160816; b=uDoo5CugfHf24XRkjuWcReVNbbCE1+OCgHxU2Hajo5slseHsc+4H5TO+wwWxTowo09 JNa1yYZXfMxv2pMnjkiZ96XmVXA6rKTHZg4H1pQCm2m9mwV1S5u5JJTaXBrMgnrm0Bt7 wMauU+wP8qMRUYd+0dXdfmEK8uIf3dzj6Hi9nz6EDRm2X4YnCHF2YJ6EcEg00xzWzMhF JoPDcnhFneYKe4ipKvk0sHo4HrPP1XrJGbfUM88Fw/jb37L7QbaNNQPDkbpdpWkBohn5 0g54bpwe7qKtDSErop5ukYxMk4DaK9+/4hAg4c8U3Q35LcsgZmjIjV0BHsqhk9hk95EK osvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YIazu2RiYqWy+wLjTZlhFuFMzL0wUDBze0yedPUrnMk=; b=ZBvwVM9njLp+LfoIwEfYlEpk8EBoDvSUdclRm0/E1gBuoYRiZinJLp7+ssbfhwfpBr s1Sy0ME/GeLzG2clLpuE/sMhd17sF4E2YqLTuNJTzxHcliHzR64wuyEqYmJ1uu6nkvA+ L3lKZN4BhPHPPv7xvYV8JtQ7OdROIrKmo8Z30eZYQFzht37mFxUaM6PuUYLKDGFCbXRR b8Gz96ci4fjNB383dXJJw8LUG5oS2VvcEMx+t0cCu1rl0KLm/D6TxnjFPwP+9XQUKmRw f7Cs7igtuLfIaKc315MrflCWeZW2UPd/gBZTbDSrO7+BSKPs8rLjs5In/wQmxY+8qC7Q fREw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rF8znHBG; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id k12si9867261edi.198.2020.06.22.12.19.51; Mon, 22 Jun 2020 12:19:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rF8znHBG; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 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 S1728557AbgFVTTm (ORCPT + 16 others); Mon, 22 Jun 2020 15:19:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728538AbgFVTTl (ORCPT ); Mon, 22 Jun 2020 15:19:41 -0400 Received: from mail-ot1-x344.google.com (mail-ot1-x344.google.com [IPv6:2607:f8b0:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDD9FC06179A for ; Mon, 22 Jun 2020 12:19:40 -0700 (PDT) Received: by mail-ot1-x344.google.com with SMTP id d4so14078616otk.2 for ; Mon, 22 Jun 2020 12:19:40 -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 :mime-version:content-transfer-encoding; bh=YIazu2RiYqWy+wLjTZlhFuFMzL0wUDBze0yedPUrnMk=; b=rF8znHBG1+wbr507/H4zIJpBiygQSLn5iMVT7/IHb9kHNVnPutLYZ1QtxmlZSchb5q vK/gOdkb6X9ngylTLc+GTaJZm0Fp76zz/jc/gXPRUtqcpgChoP3qgFj6bm9pn9e3YBOj njS6L9EqhsJkSslXOPjntPjJdvBe90oH5yJSanndoBxIj7puBLZhwadw4Aru/D0Qn3Bi D5XyInJTmjuAH4I+4EQS4n8YBGhmAPd2aqeXx+yX715fFOsfmav3EBOhvVoIyxfpMcqW 9XHsu4GS4AJ6edJ4vsDuhoeFsPaVOzRV4u6oEmAbsTvXDf0fwKCf3PI4IO0hd5SJPxob ryMA== 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:mime-version:content-transfer-encoding; bh=YIazu2RiYqWy+wLjTZlhFuFMzL0wUDBze0yedPUrnMk=; b=du/ihKlIDd7tvkELAibhxB69mQWuV90YVlFRBv0C4kIkm2d2QbrAJv3pAzRnNoOO2i xMYfCOA9htD4P+nnqnIa+8E3LnA9PbjGA0lipB9i4LWxNgMXDN1sQQ06k+zw1rzyKZjU cHJTdx9pZKhznmVDIS7zHCRcIHNYqETVlJSsIkWIQjhyLt40HCBz4BZF/Y1vM+dvvNzJ 6X6EM7E52/4WovhwzhgdUd1XBdexJCEHU+9J+83EQ13EdDL2WwDbV7LCFMkufMFWMtxF hdIS8ge3fWb+3ntIk7svZss/2s+w7tYo0z3f8TjiLsMNMPHjJF1JyMTB8sj0jLWkBrcj cWdg== X-Gm-Message-State: AOAM532aNRFpV4Zv0pBLjF8ZT4wDCy2usg7yCu2P5yGAL6WClyfQIid0 03QPHPXzY8ODV+VVvGzIAFPBcHFycA0= X-Received: by 2002:a9d:1722:: with SMTP id i34mr14228083ota.6.1592853580165; Mon, 22 Jun 2020 12:19:40 -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 m84sm3348294oif.32.2020.06.22.12.19.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jun 2020 12:19:39 -0700 (PDT) From: Bjorn Andersson To: Andy Gross , Bjorn Andersson , Ohad Ben-Cohen Cc: Rob Herring , linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Stephen Boyd , Vinod Koul Subject: [PATCH v7 5/5] arm64: dts: qcom: sdm845: Add IMEM and PIL info region Date: Mon, 22 Jun 2020 12:19:42 -0700 Message-Id: <20200622191942.255460-6-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200622191942.255460-1-bjorn.andersson@linaro.org> References: <20200622191942.255460-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 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 SDM845 and define the PIL relocation info region, so that post mortem tools will be able to locate the loaded remoteprocs. Reviewed-by: Stephen Boyd Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson --- Changes since v6: - None arch/arm64/boot/dts/qcom/sdm845.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) -- 2.26.2 diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index 8eb5a31346d2..fee50d979dc3 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -3724,6 +3724,21 @@ spmi_bus: spmi@c440000 { cell-index = <0>; }; + imem@146bf000 { + compatible = "simple-mfd"; + reg = <0 0x146bf000 0 0x1000>; + + #address-cells = <1>; + #size-cells = <1>; + + ranges = <0 0 0x146bf000 0x1000>; + + pil-reloc@94c { + compatible = "qcom,pil-reloc-info"; + reg = <0x94c 0xc8>; + }; + }; + apps_smmu: iommu@15000000 { compatible = "qcom,sdm845-smmu-500", "arm,mmu-500"; reg = <0 0x15000000 0 0x80000>;