From patchwork Fri Dec 27 05:32:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 182474 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp2565430ild; Thu, 26 Dec 2019 21:33:02 -0800 (PST) X-Google-Smtp-Source: APXvYqxfHXdA38bW0dK+0MZloO32PVzUhZYcsgy6Wn7BTTppHS0O2sn63DD8TLkAxQn29ARLlSHv X-Received: by 2002:a05:6830:1f95:: with SMTP id v21mr47381264otr.325.1577424782027; Thu, 26 Dec 2019 21:33:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577424782; cv=none; d=google.com; s=arc-20160816; b=eZAcG24KOCAKcd6cEFtySZo3cSITw0az6P1N4USVdqNIyLvx1ZHEBKmfnHmk3Oh/u/ Fhur4FYM2jsFfPGhLCsn3V744eDhUi1X9gc9dUSfPeELEcKfKVRkIWpOwepAVjaFqkkN nWRph33Okp+/QqUYI/eYpIv5mgNI0/XoI5fbrPGGrUSegWArRWmw6mNDSPVGD6ybmDtr wZbdyZAa95AvMSfxCLmEJBbmmSK6Pw7I0w2tFdBQ/9Nuh1bqLSpJBLZxNxR4dSmA8MP+ caGXsxKVYg1cR7pmQxkAAZww7h72xJqvhZxsfc4AxtoWM5l/zwqMh32/Vz4eZwi9Ga6D thGQ== 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=akm4NfbJgAiIEKZHJ9zU6ThCpH8qtZ85+rrJ2Ji+w5w=; b=F3OWF+ZuXedl7x8MrfdI4NGvJbreqHvJeitU7pat7ZHrXFbI66vLSoz2rDVaHyF6ET yb5JdVxjTcLrwOYraGoa+veKG+bmrG42WAB9U+gDyHbCxp/wSbfy1sLDAm1htrhMgt64 WzmTRhottJaJjlP29Sm8NIpH+nAhW19FQsBXAlNGTTfQQcLPAmU6V83rDv2OhgsY3bSl dsxsDQsXIDz9fhnrTO84yS3a6M9yxOVuCk4tYgqwjS8Zt6AYMceVG/3fN9J3C14Np+Ku hT9uL3T8qu+8rozWJShnZAPjlls9WK6YQKdFBlvqh+dulrqaRAiVGbtXHOlv1k1am8tL R/BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ys4E5Ao0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 j16si17331955otp.316.2019.12.26.21.33.01; Thu, 26 Dec 2019 21:33:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=Ys4E5Ao0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1726293AbfL0Fc6 (ORCPT + 27 others); Fri, 27 Dec 2019 00:32:58 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:39067 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726483AbfL0Fcy (ORCPT ); Fri, 27 Dec 2019 00:32:54 -0500 Received: by mail-pf1-f193.google.com with SMTP id q10so14223385pfs.6 for ; Thu, 26 Dec 2019 21:32:54 -0800 (PST) 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=akm4NfbJgAiIEKZHJ9zU6ThCpH8qtZ85+rrJ2Ji+w5w=; b=Ys4E5Ao0K33XCaNhJOZNGG9eB1LVmFEVbNik0eOadjtEdYVBg6XfirjuF26rOWP7wJ selaNF1Ku4vVNw3OPr/T4qBYMpvnbsD/vACg2AoSzOqhD3Eql1k/x84vD8Z7NaaXpOso twlspk/MZzFumGdwATJ+bq6wfL+RC/8BUi3ofUp6SMVYBwL3kHF3fNXw9lTzE+sPOfg1 687E6VVlhERlRsvlslt/q+aG7LpxIK3ZR2gf+h2HUe9uaH5s9tkVTSEwa8AFSC08nziy 9tosGaNqpkLQ5fKQ4AvHf2m2vgwGPZZQJanxHaVxlJ/85qMML5RMWtHxqtQ6uSGaYtU4 iQIg== 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=akm4NfbJgAiIEKZHJ9zU6ThCpH8qtZ85+rrJ2Ji+w5w=; b=onC71v+oaGSgoG1WkAmsedPP3p8mmqQlKA6ycbisfE5t1IefJOG0LKIOMPVFoKwwG4 foepwj17i8r51rorGj/wJDgqmb1qArYVa1U6IsSQRrgMnAVjCWx5x9HYjU9gSPbxT9eD XhvIhc1sho2KTfci4n4E0jthly88eHmIbhEvriKj4W83a8SWwnrlJcQjynLSqshN+6td 1iZPAk9CXsXelI21x/hDOz5zWR6SSUbjZM4t8cyNwDCo7softYLAS4EVg943rAqmpwJS LtoWjQ+E0D0Ps28en4XmcZNvLcuTuDAP43Q/Lm38v+p9lYLpemfJzm+oU8DuUzBrGuS5 aGjg== X-Gm-Message-State: APjAAAUp/LSa53BF/E7ycsBxnRMtbqWaXTUwyiU6yUtf2Ef82TrtQdXz VRmSknjPCEHJWR9BR9JX1ak4gA== X-Received: by 2002:a63:5809:: with SMTP id m9mr51181799pgb.26.1577424773541; Thu, 26 Dec 2019 21:32:53 -0800 (PST) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id c22sm16789196pfo.50.2019.12.26.21.32.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Dec 2019 21:32:53 -0800 (PST) From: Bjorn Andersson To: Rob Herring , Mark Rutland , Ohad Ben-Cohen Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org, Sibi Sankar , Rishabh Bhatnagar Subject: [PATCH v2 2/8] remoteproc: qcom: Introduce driver to store pil info in IMEM Date: Thu, 26 Dec 2019 21:32:09 -0800 Message-Id: <20191227053215.423811-3-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191227053215.423811-1-bjorn.andersson@linaro.org> References: <20191227053215.423811-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A region in IMEM is used to communicate load addresses of remoteproc to post mortem debug tools. Implement a driver that can be used to store this information in order to enable these tools to process collected ramdumps. Signed-off-by: Bjorn Andersson --- Changes since v1: - Added helper to probe defer clients - Fixed logical bug in slot scan - Added SPDX header in header file drivers/remoteproc/Kconfig | 3 + drivers/remoteproc/Makefile | 1 + drivers/remoteproc/qcom_pil_info.c | 150 +++++++++++++++++++++++++++++ drivers/remoteproc/qcom_pil_info.h | 8 ++ 4 files changed, 162 insertions(+) create mode 100644 drivers/remoteproc/qcom_pil_info.c create mode 100644 drivers/remoteproc/qcom_pil_info.h -- 2.24.0 diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig index 94afdde4bc9f..0798602e355a 100644 --- a/drivers/remoteproc/Kconfig +++ b/drivers/remoteproc/Kconfig @@ -85,6 +85,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 00f09e658cb3..c1b46e9033cb 100644 --- a/drivers/remoteproc/Makefile +++ b/drivers/remoteproc/Makefile @@ -14,6 +14,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..b0897ae9eae5 --- /dev/null +++ b/drivers/remoteproc/qcom_pil_info.c @@ -0,0 +1,150 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2019 Linaro Ltd. + */ +#include +#include +#include +#include +#include +#include +#include +#include + +struct pil_reloc_entry { + char name[8]; + __le64 base; + __le32 size; +} __packed; + +#define PIL_INFO_SIZE 200 +#define PIL_INFO_ENTRIES (PIL_INFO_SIZE / sizeof(struct pil_reloc_entry)) + +struct pil_reloc { + struct device *dev; + struct regmap *map; + u32 offset; + int val_bytes; + + struct pil_reloc_entry entries[PIL_INFO_ENTRIES]; +}; + +static struct pil_reloc *_reloc; +static DEFINE_MUTEX(reloc_mutex); + +/** + * 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 + */ +void qcom_pil_info_store(const char *image, phys_addr_t base, size_t size) +{ + struct pil_reloc_entry *entry; + int idx = -1; + int i; + + mutex_lock(&reloc_mutex); + if (!_reloc) + goto unlock; + + for (i = 0; i < PIL_INFO_ENTRIES; i++) { + if (!_reloc->entries[i].name[0]) { + if (idx == -1) + idx = i; + continue; + } + + if (!strncmp(_reloc->entries[i].name, image, 8)) { + idx = i; + goto found; + } + } + + if (idx == -1) { + dev_warn(_reloc->dev, "insufficient PIL info slots\n"); + goto unlock; + } + +found: + entry = &_reloc->entries[idx]; + stracpy(entry->name, image); + entry->base = base; + entry->size = size; + + regmap_bulk_write(_reloc->map, _reloc->offset + idx * sizeof(*entry), + entry, sizeof(*entry) / _reloc->val_bytes); + +unlock: + mutex_unlock(&reloc_mutex); +} +EXPORT_SYMBOL_GPL(qcom_pil_info_store); + +/** + * qcom_pil_info_available() - query if the pil info is probed + * + * Return: boolean indicating if the pil info device is probed + */ +bool qcom_pil_info_available(void) +{ + return !!_reloc; +} +EXPORT_SYMBOL_GPL(qcom_pil_info_available); + +static int pil_reloc_probe(struct platform_device *pdev) +{ + struct pil_reloc *reloc; + + reloc = devm_kzalloc(&pdev->dev, sizeof(*reloc), GFP_KERNEL); + if (!reloc) + return -ENOMEM; + + reloc->dev = &pdev->dev; + reloc->map = syscon_node_to_regmap(pdev->dev.parent->of_node); + if (IS_ERR(reloc->map)) + return PTR_ERR(reloc->map); + + if (of_property_read_u32(pdev->dev.of_node, "offset", &reloc->offset)) + return -EINVAL; + + reloc->val_bytes = regmap_get_val_bytes(reloc->map); + if (reloc->val_bytes < 0) + return -EINVAL; + + regmap_bulk_write(reloc->map, reloc->offset, reloc->entries, + sizeof(reloc->entries) / reloc->val_bytes); + + mutex_lock(&reloc_mutex); + _reloc = reloc; + mutex_unlock(&reloc_mutex); + + return 0; +} + +static int pil_reloc_remove(struct platform_device *pdev) +{ + mutex_lock(&reloc_mutex); + _reloc = NULL; + mutex_unlock(&reloc_mutex); + + return 0; +} + +static const struct of_device_id pil_reloc_of_match[] = { + { .compatible = "qcom,pil-reloc-info" }, + {} +}; +MODULE_DEVICE_TABLE(of, pil_reloc_of_match); + +static struct platform_driver pil_reloc_driver = { + .probe = pil_reloc_probe, + .remove = pil_reloc_remove, + .driver = { + .name = "qcom-pil-reloc-info", + .of_match_table = pil_reloc_of_match, + }, +}; +module_platform_driver(pil_reloc_driver); + +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..0372602fae1d --- /dev/null +++ b/drivers/remoteproc/qcom_pil_info.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __QCOM_PIL_INFO_H__ +#define __QCOM_PIL_INFO_H__ + +void qcom_pil_info_store(const char *image, phys_addr_t base, size_t size); +bool qcom_pil_info_available(void); + +#endif From patchwork Fri Dec 27 05:32:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 182479 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp2565692ild; Thu, 26 Dec 2019 21:33:22 -0800 (PST) X-Google-Smtp-Source: APXvYqwY4Z2Bg27qGbaQaIBaP1YawNoa0h1lZQnNZVDSSl1nAUd2/o1JAFVT8eYTRNo7OS+ZdhKw X-Received: by 2002:a05:6830:3001:: with SMTP id a1mr43193882otn.254.1577424802823; Thu, 26 Dec 2019 21:33:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577424802; cv=none; d=google.com; s=arc-20160816; b=Z8EHVy/IM7snhwJpvwBJ3RxiX+j53TZuLIFyWYuzt1tIPI+FfB8ytePpQBcbVR9S31 TF8BnoGueXe+fiCne3iybFJSvEaYM+2jBl5B0pdoSpRszYvxf5ZqezsaFWpkSZmFbyqf IQm+D8E/YnOhTs3rjg68DSEfTqYebp9v49zVx3LPRkbv5zPQlx9C5B1F84baS/YOG+bb ief+SlgZ9fjYKZHQBm48X/12MwjuMn3CLoKUqu04MS3lGCahK9ml6ZtEpc9UVI2EWCJ3 qvtNcXukWjIlQbtCK82GaefVjE6V586RzjOHVkzH+h6rpUKXgXUzabj/gwL0jPVd3q3+ xUVA== 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=1I6rPruw7MJKOaeZo3Qo45SuClRViIUj/poNzJMdGTo=; b=TMPhzoy/rK5AJ6QovF3KGXGumSOYOwqMTc8F+CRcumvdwv0js2qqMybO1jvxZnzWpa 0sLASIbjTS458KLS4HfbUw6QzK+HNw9ZCn9yiM4gAdIH90+LptxmDPURCs5283sYV8tT tFEEwviBVZYOVmCLQgneIBp/BddAMjpbYB+ow/1s39dr0IwWq8A3+R3gc1QidFsnOkBM hWOyA9IDc3vuARDTrQLlNdE4vPIeC14rwxwu0R+KoCwxKM9ArXdJXFMtllL6dQkSpSdU adn1Ep2qWJUaXb3twUd4w8l9Mw3JM57ABM2juZQflDigXR8lQIeoE3O2opFtZ/JG0aa5 rp5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OJSuUHNr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 11si14761980otu.301.2019.12.26.21.33.22; Thu, 26 Dec 2019 21:33:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=OJSuUHNr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1727257AbfL0FdV (ORCPT + 27 others); Fri, 27 Dec 2019 00:33:21 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:38786 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726857AbfL0Fc4 (ORCPT ); Fri, 27 Dec 2019 00:32:56 -0500 Received: by mail-pf1-f194.google.com with SMTP id x185so14230107pfc.5 for ; Thu, 26 Dec 2019 21:32:56 -0800 (PST) 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=1I6rPruw7MJKOaeZo3Qo45SuClRViIUj/poNzJMdGTo=; b=OJSuUHNrddt6e40HHC82STYYK5Fw3NtsBidIhnm+7rvbABpYNWx5j3qcKIbjxKn/CX Yccavw/9H02QW+qQi7SdY9yihm3kxLqCAAnJ7d8/SXZ4O3iXxXxHZXnO6nDtIqxKoebn 1pIX4jNEbEtYFjglqefMXJ/1q2TdJH43Ro+5CSygyYcHtxO1Lfwtn0wm+GlSZN2UR+yp Q2IMR21TVO+tRWNn1HY5Bp7FzBjeBBaXGvveU0UKqvZxRNrl8MyHWWLgh3XomOdAyxa0 ipoir+/A89PL6CvmrHf+2AXIuTo/p0UaCeZAW1TFj05E7QK68xvhpTL9w67VLpDS5J62 2uDg== 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=1I6rPruw7MJKOaeZo3Qo45SuClRViIUj/poNzJMdGTo=; b=tyjIoOl7foqJj0CDTW/RWFN5lle+ej0+6NkkI5vcVdLv1iDcpL1TuedPDTpThpTHLQ oaSwQfyAFhhiq3PovNIGP3NXzivLQjASQK6mMqX67/fXpSkXVeuQzatsIKdF1P9iJugb Bq4dAYDDj7t53k6spzN6K26rVQ46JIdV7eNbL3cWkhGNCw46bV37z4JgiU1zTru56PxL oPBTx1iX4MKomhNtwhSRoNr3lzkzrgJ8JLfCWBj4SKWu/DZfqxXqL1+VzI2ibXTVEgjQ 1KlCa37phcBvEu97+9vnvqZCcKu4nT4GokG3tJJJvzqylHgmo+Y1jnF+dNyPsKfqBchR eEbw== X-Gm-Message-State: APjAAAVoVdQfUWfftjF78KZKT4NYU2DDLXz9fTIgMo5z6ZPnbF+fDIi/ RDGc5dvUNeAvYVDdksO6EKhOWQ== X-Received: by 2002:a65:530d:: with SMTP id m13mr52900616pgq.351.1577424776207; Thu, 26 Dec 2019 21:32:56 -0800 (PST) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id c22sm16789196pfo.50.2019.12.26.21.32.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Dec 2019 21:32:55 -0800 (PST) From: Bjorn Andersson To: Rob Herring , Mark Rutland , Ohad Ben-Cohen Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org, Sibi Sankar , Rishabh Bhatnagar Subject: [PATCH v2 4/8] arm64: dts: qcom: qcs404: Add IMEM and PIL info region Date: Thu, 26 Dec 2019 21:32:11 -0800 Message-Id: <20191227053215.423811-5-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191227053215.423811-1-bjorn.andersson@linaro.org> References: <20191227053215.423811-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 --- Changes since v1: - None arch/arm64/boot/dts/qcom/qcs404.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.24.0 diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi b/arch/arm64/boot/dts/qcom/qcs404.dtsi index f5f0c4c9cb16..9d2a2b1c64dd 100644 --- a/arch/arm64/boot/dts/qcom/qcs404.dtsi +++ b/arch/arm64/boot/dts/qcom/qcs404.dtsi @@ -890,6 +890,16 @@ blsp2_spi0: spi@7af5000 { 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 Fri Dec 27 05:32:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 182478 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp2565618ild; Thu, 26 Dec 2019 21:33:17 -0800 (PST) X-Google-Smtp-Source: APXvYqywVclNuD9c+iVh1RdOI2/dD8Eg1fJkclvGNXE22YzPEBlaZTNKHQMLmkfZVco8yzmybQNS X-Received: by 2002:a9d:7590:: with SMTP id s16mr51527450otk.89.1577424796932; Thu, 26 Dec 2019 21:33:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577424796; cv=none; d=google.com; s=arc-20160816; b=t1F9eBvl5uo/TCDvDJ86gd5dEemMEvxFt/HgNMkcQVZHDiN5d8BiWOIe9usvzge0mp ljja8SwHSRG1RoFVGUk/EH4JMrxyaAor0cz7QYxxn9e9aFs6Yc9GUjjesTvsgaf4Gml6 qBjlPAAkwcjQtyuzmwKPti8f8QRhdwEwJEVzXaQbujcn4XJeU8QcYpTJ7KRuWfqt6kIi y+G+ID57YZuLCiZ9ywBiPWg/LSv7G3fZhPf+wH63RSv1IxLDjDq3pj8reS3vdDhHAThw sezDGaWvVAizGfsU5CxVh6PAh3zCZJ2iTUyoXqZfDttha988deMROwuNKvqTNsguXRdP NpBw== 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=CACSvkGQXTdbudbrDCr3GVf27K5HI0XInZ9uwni3MXE=; b=KQtM5Bqq7uwqZUjoNy/v9HNeKv4t5acgxReOsMjCxbIDvtwQtJUaUHwdz+8m7mZ6Cu SCcfOUF0ALyx7F/CIo84JgTfoJ+AHmJvkQm9GFCpllkNFk1gmJ2bfE18Zkd4tFxjxQel KNPrqwA3YUBhEznSPkBJwdztfmv6ttYnc0Z2yqAnMSlRjIgyQ74pH9r4v4kA51PMxwDn blYVTL4h5UUv5jrhGVqU+AOQtNEAldO4f/JHPqxt8ZmkJhfBJqzdS13C5ZIfhNuMp8Ls 6yNfdSa47XYvayC9QoqzZoDfBpfzHOae75pYv5dXz6JlgNCrcCmjJRXZxhc48qD4KRXm xcaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ylrRXdCY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 t2si12477477otq.196.2019.12.26.21.33.16; Thu, 26 Dec 2019 21:33:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=ylrRXdCY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1727230AbfL0FdP (ORCPT + 27 others); Fri, 27 Dec 2019 00:33:15 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:46420 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727060AbfL0Fc6 (ORCPT ); Fri, 27 Dec 2019 00:32:58 -0500 Received: by mail-pl1-f196.google.com with SMTP id y8so11287714pll.13 for ; Thu, 26 Dec 2019 21:32:57 -0800 (PST) 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=CACSvkGQXTdbudbrDCr3GVf27K5HI0XInZ9uwni3MXE=; b=ylrRXdCYJxPFdRcRwT43YU9htEJXb3RZq6jzea19OthZoBfBd4m9/gGbj4femDTUv9 KuHvQ1v0+LGkzmPlgXvWU7wHnTpPl0y44bxs+RtiWMm9fZ1ZzxaCPIC+3ueLS5NsksXo lExY7XfeYQ1d4pHEXWPRCzBhgaFLJ0FYq/24nd33ipvfzcmOmxessAFWP8ki5PzrQi+z wvJ8T//luOhE3WHswVoW8CxcF3xrwCvJRWWm5/6FwIdkW4qzkPTNIZm/IOoAu0ll8/4F CNZprkIcdhzbDBj0VccAJpBfZc/0WSl0tCd5Jnp9ljcIrqoX7W0Ujo+pL3dADh5IOv0M gfew== 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=CACSvkGQXTdbudbrDCr3GVf27K5HI0XInZ9uwni3MXE=; b=SgNgKuPqvsUpXxHKLUvavp9dYgSHHUG9iRKxMGbP8MUWRzK+xHdrwZIXfV3oOF67gP YYPbR/9+OP7f1HVNSUAIEPBhINBVDVte2awdNYh7WXHSg6qaRn3yfwEDfmhPUePJo5r7 c9GrMvTpmGI3O5TkFuYFa8f8LvEG81M8SBYt6xopDTiMPOtIc0vn73i3hKzPhsErfs0V +xKih+fADSSppalOG3cmLgSL6tevTl/1TKL/xm/nh8NsiTIyKuxumRYDjxn8nB2H8CGD sKlJuHhr9foFanhiXMdFe692+IzNi+2+aIjGRH5PTTGT1q7yeExN79655YHyOQ60oglE SDvA== X-Gm-Message-State: APjAAAVtU5dK6u/GVsht8cGHYkPE/yG8UjkvSW7dWNnXcYPEGtUVx+i9 eY14uJ6+TN6LyACcv4xTunw6JA== X-Received: by 2002:a17:90a:8912:: with SMTP id u18mr23852528pjn.64.1577424777538; Thu, 26 Dec 2019 21:32:57 -0800 (PST) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id c22sm16789196pfo.50.2019.12.26.21.32.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Dec 2019 21:32:56 -0800 (PST) From: Bjorn Andersson To: Rob Herring , Mark Rutland , Ohad Ben-Cohen Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org, Sibi Sankar , Rishabh Bhatnagar Subject: [PATCH v2 5/8] arm64: dts: qcom: sdm845: Add IMEM and PIL info region Date: Thu, 26 Dec 2019 21:32:12 -0800 Message-Id: <20191227053215.423811-6-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191227053215.423811-1-bjorn.andersson@linaro.org> References: <20191227053215.423811-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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. Signed-off-by: Bjorn Andersson --- Changes since v1: - None arch/arm64/boot/dts/qcom/sdm845.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.24.0 diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index 407d26e92fcc..e1e13d5bfeb3 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -3020,6 +3020,16 @@ spmi_bus: spmi@c440000 { cell-index = <0>; }; + imem@146bf000 { + compatible = "syscon", "simple-mfd"; + reg = <0 0x146bf000 0 0x1000>; + + pil-reloc { + compatible ="qcom,pil-reloc-info"; + offset = <0x94c>; + }; + }; + apps_smmu: iommu@15000000 { compatible = "qcom,sdm845-smmu-500", "arm,mmu-500"; reg = <0 0x15000000 0 0x80000>;