From patchwork Fri Aug 24 13:18:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sibi Sankar X-Patchwork-Id: 10575333 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 04AC713B8 for ; Fri, 24 Aug 2018 13:19:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA52B2C3F8 for ; Fri, 24 Aug 2018 13:19:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DDCC32C407; Fri, 24 Aug 2018 13:19:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84A522C407 for ; Fri, 24 Aug 2018 13:19:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726809AbeHXQx6 (ORCPT ); Fri, 24 Aug 2018 12:53:58 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:55070 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726556AbeHXQx6 (ORCPT ); Fri, 24 Aug 2018 12:53:58 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 803A16053C; Fri, 24 Aug 2018 13:19:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1535116759; bh=gRrn3d7Ru9jWz+pHZgswUVNxCTMk+114N5Kb/mf77Uo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VlIrPjgnZMjLJcyLGLpshM3zrp0SeE7Fh7HQSfvdzKg5ozQcrDGQztC3rRS6cOlIJ uVRr4gHa43V7mCraH0VTVKJ/NtHGs5+PkDIYWS+tYUdtne+O8aTkoF0X+goJkG6xXX fbp/GzeBmZM4zso/gulm15FpgLrIDHBxIaaJZ1sI= Received: from blr-ubuntu-87.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sibis@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 6C9A1602BA; Fri, 24 Aug 2018 13:19:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1535116758; bh=gRrn3d7Ru9jWz+pHZgswUVNxCTMk+114N5Kb/mf77Uo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GiUTniVuaMooadNcAjgP9MYxASiYgYoqSoiUgNu58ilI40/cgnKA1ZZnd3UsHcNVY od225zQV5Iy0+8EPa/Hw6lTcG+awy4F0tVE8RDhyzzzf/OoPcnSzEKGrt3S5n0+Ppq U08fPuWBD5ni0T5j94qJsoctccdRiraG173aA22U= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 6C9A1602BA Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sibis@codeaurora.org From: Sibi Sankar To: bjorn.andersson@linaro.org, p.zabel@pengutronix.de, robh+dt@kernel.org Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, ohad@wizery.com, mark.rutland@arm.com, sricharan@codeaurora.org, akdwived@codeaurora.org, linux-arm-msm@vger.kernel.org, tsoni@codeaurora.org, Sibi Sankar Subject: [PATCH v2 1/6] dt-bindings: reset: Add PDC Global binding for SDM845 SoCs Date: Fri, 24 Aug 2018 18:48:55 +0530 Message-Id: <20180824131900.5353-2-sibis@codeaurora.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180824131900.5353-1-sibis@codeaurora.org> References: <20180824131900.5353-1-sibis@codeaurora.org> Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add PDC Global(Power Domain Controller) binding for SDM845 SoCs. Signed-off-by: Sibi Sankar Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring --- .../bindings/reset/qcom,pdc-global.txt | 52 +++++++++++++++++++ include/dt-bindings/reset/qcom,sdm845-pdc.h | 20 +++++++ 2 files changed, 72 insertions(+) create mode 100644 Documentation/devicetree/bindings/reset/qcom,pdc-global.txt create mode 100644 include/dt-bindings/reset/qcom,sdm845-pdc.h diff --git a/Documentation/devicetree/bindings/reset/qcom,pdc-global.txt b/Documentation/devicetree/bindings/reset/qcom,pdc-global.txt new file mode 100644 index 000000000000..69f9edca9503 --- /dev/null +++ b/Documentation/devicetree/bindings/reset/qcom,pdc-global.txt @@ -0,0 +1,52 @@ +PDC Global +====================================== + +This binding describes a reset-controller found on PDC-Global(Power Domain +Controller) block for Qualcomm Technologies Inc SDM845 SoCs. + +Required properties: +- compatible: + Usage: required + Value type: + Definition: must be: + "qcom,sdm845-pdc-global" + +- reg: + Usage: required + Value type: + Definition: must specify the base address and size of the register + space. + +- #reset-cells: + Usage: required + Value type: + Definition: must be 1; cell entry represents the reset index. + +Example: + +pdc_reset: reset-controller@b2e0000 { + compatible = "qcom,sdm845-pdc-global"; + reg = <0xb2e0000 0x20000>; + #reset-cells = <1>; +}; + +PDC reset clients +====================================== + +Device nodes that need access to reset lines should +specify them as a reset phandle in their corresponding node as +specified in reset.txt. + +For list of all valid reset indicies see + + +Example: + +modem-pil@4080000 { + ... + + resets = <&pdc_reset PDC_MODEM_SYNC_RESET>; + reset-names = "pdc_reset"; + + ... +}; diff --git a/include/dt-bindings/reset/qcom,sdm845-pdc.h b/include/dt-bindings/reset/qcom,sdm845-pdc.h new file mode 100644 index 000000000000..53c37f9c319a --- /dev/null +++ b/include/dt-bindings/reset/qcom,sdm845-pdc.h @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2018 The Linux Foundation. All rights reserved. + */ + +#ifndef _DT_BINDINGS_RESET_PDC_SDM_845_H +#define _DT_BINDINGS_RESET_PDC_SDM_845_H + +#define PDC_APPS_SYNC_RESET 0 +#define PDC_SP_SYNC_RESET 1 +#define PDC_AUDIO_SYNC_RESET 2 +#define PDC_SENSORS_SYNC_RESET 3 +#define PDC_AOP_SYNC_RESET 4 +#define PDC_DEBUG_SYNC_RESET 5 +#define PDC_GPU_SYNC_RESET 6 +#define PDC_DISPLAY_SYNC_RESET 7 +#define PDC_COMPUTE_SYNC_RESET 8 +#define PDC_MODEM_SYNC_RESET 9 + +#endif From patchwork Fri Aug 24 13:18:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sibi Sankar X-Patchwork-Id: 10575343 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E2C89112E for ; Fri, 24 Aug 2018 13:19:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D42722C407 for ; Fri, 24 Aug 2018 13:19:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C84A12C42A; Fri, 24 Aug 2018 13:19:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4618A2C407 for ; Fri, 24 Aug 2018 13:19:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727479AbeHXQyE (ORCPT ); Fri, 24 Aug 2018 12:54:04 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:55258 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726556AbeHXQyE (ORCPT ); Fri, 24 Aug 2018 12:54:04 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id A246B6032D; Fri, 24 Aug 2018 13:19:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1535116765; bh=UywL39+S1oIh6m9SZyVj7vKflGYzXlHzf4uHZvhEQRg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=extrh0fBpP8q2GpO7v666Ks4kLqEI+M5VE/Rqf1nbMlVlNWASGsFFOZCaWzWdsxvU 8ML7f1pcUxqFt8DGyJYdAf41yy6tW5OlmZ5omWHCvxf+Qr+1a74Ml/SGqtOF9PQMBq IVRuJZlKzrhQJ/e9d1kw8oAPFrlO2Ss9u9Sg4prk= Received: from blr-ubuntu-87.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sibis@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id ADDFF60559; Fri, 24 Aug 2018 13:19:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1535116764; bh=UywL39+S1oIh6m9SZyVj7vKflGYzXlHzf4uHZvhEQRg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m0SClBueQBadfpy/jLr85UMsT3RKycNfChOoRS3HM8qhbmMeasUkIUk/o82eesNhx Sr01Mc5EKXq1AL4FsjxDj5SOpzNDOOJCrpi9MU64I5DmRfu4OOmDw7lFpqKvylSZmg if2j5joqPtW/a9ZDT7kcEQHxtG0pXH/i9KG2TXig= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org ADDFF60559 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sibis@codeaurora.org From: Sibi Sankar To: bjorn.andersson@linaro.org, p.zabel@pengutronix.de, robh+dt@kernel.org Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, ohad@wizery.com, mark.rutland@arm.com, sricharan@codeaurora.org, akdwived@codeaurora.org, linux-arm-msm@vger.kernel.org, tsoni@codeaurora.org, Sibi Sankar Subject: [PATCH v2 2/6] reset: qcom: PDC Global (Power Domain Controller) reset controller Date: Fri, 24 Aug 2018 18:48:56 +0530 Message-Id: <20180824131900.5353-3-sibis@codeaurora.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180824131900.5353-1-sibis@codeaurora.org> References: <20180824131900.5353-1-sibis@codeaurora.org> Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add reset controller for SDM845 SoCs to control reset signals provided by PDC Global for Modem, Compute, Display, GPU, Debug, AOP, Sensors, Audio, SP and APPS Signed-off-by: Sibi Sankar --- drivers/reset/Kconfig | 9 +++ drivers/reset/Makefile | 1 + drivers/reset/reset-qcom-pdc.c | 142 +++++++++++++++++++++++++++++++++ 3 files changed, 152 insertions(+) create mode 100644 drivers/reset/reset-qcom-pdc.c diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig index 13d28fdbdbb5..c21da9fe51ec 100644 --- a/drivers/reset/Kconfig +++ b/drivers/reset/Kconfig @@ -98,6 +98,15 @@ config RESET_QCOM_AOSS reset signals provided by AOSS for Modem, Venus, ADSP, GPU, Camera, Wireless, Display subsystem. Otherwise, say N. +config RESET_QCOM_PDC + tristate "Qualcomm PDC Reset Driver" + depends on ARCH_QCOM || COMPILE_TEST + help + This enables the PDC (Power Domain Controller) reset driver + for Qualcomm Technologies Inc SDM845 SoCs. Say Y if you want + to control reset signals provided by PDC for Modem, Compute, + Display, GPU, Debug, AOP, Sensors, Audio, SP and APPS. + config RESET_SIMPLE bool "Simple Reset Controller Driver" if COMPILE_TEST default ARCH_SOCFPGA || ARCH_STM32 || ARCH_STRATIX10 || ARCH_SUNXI || ARCH_ZX || ARCH_ASPEED diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile index 4243c38228e2..d08e8b90046a 100644 --- a/drivers/reset/Makefile +++ b/drivers/reset/Makefile @@ -16,6 +16,7 @@ obj-$(CONFIG_RESET_MESON_AUDIO_ARB) += reset-meson-audio-arb.o obj-$(CONFIG_RESET_OXNAS) += reset-oxnas.o obj-$(CONFIG_RESET_PISTACHIO) += reset-pistachio.o obj-$(CONFIG_RESET_QCOM_AOSS) += reset-qcom-aoss.o +obj-$(CONFIG_RESET_QCOM_PDC) += reset-qcom-pdc.o obj-$(CONFIG_RESET_SIMPLE) += reset-simple.o obj-$(CONFIG_RESET_STM32MP157) += reset-stm32mp1.o obj-$(CONFIG_RESET_SUNXI) += reset-sunxi.o diff --git a/drivers/reset/reset-qcom-pdc.c b/drivers/reset/reset-qcom-pdc.c new file mode 100644 index 000000000000..bb6a5e5ee0f8 --- /dev/null +++ b/drivers/reset/reset-qcom-pdc.c @@ -0,0 +1,142 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2018 The Linux Foundation. All rights reserved. + */ + +#include +#include +#include +#include +#include +#include + +#define RPMH_PDC_SYNC_RESET 0x100 + +struct qcom_pdc_reset_map { + u8 bit; +}; + +struct qcom_pdc_desc { + const struct regmap_config *config; + const struct qcom_pdc_reset_map *resets; + size_t num_resets; +}; + +struct qcom_pdc_reset_data { + struct reset_controller_dev rcdev; + struct regmap *regmap; + const struct qcom_pdc_desc *desc; +}; + +static const struct regmap_config sdm845_pdc_regmap_config = { + .name = "pdc-reset", + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .max_register = 0x20000, + .fast_io = true, +}; + +static const struct qcom_pdc_reset_map sdm845_pdc_resets[] = { + [PDC_APPS_SYNC_RESET] = {0}, + [PDC_SP_SYNC_RESET] = {1}, + [PDC_AUDIO_SYNC_RESET] = {2}, + [PDC_SENSORS_SYNC_RESET] = {3}, + [PDC_AOP_SYNC_RESET] = {4}, + [PDC_DEBUG_SYNC_RESET] = {5}, + [PDC_GPU_SYNC_RESET] = {6}, + [PDC_DISPLAY_SYNC_RESET] = {7}, + [PDC_COMPUTE_SYNC_RESET] = {8}, + [PDC_MODEM_SYNC_RESET] = {9}, +}; + +static const struct qcom_pdc_desc sdm845_pdc_desc = { + .config = &sdm845_pdc_regmap_config, + .resets = sdm845_pdc_resets, + .num_resets = ARRAY_SIZE(sdm845_pdc_resets), +}; + +static inline struct qcom_pdc_reset_data *to_qcom_pdc_reset_data( + struct reset_controller_dev *rcdev) +{ + return container_of(rcdev, struct qcom_pdc_reset_data, rcdev); +} + +static int qcom_pdc_control_assert(struct reset_controller_dev *rcdev, + unsigned long idx) +{ + struct qcom_pdc_reset_data *data = to_qcom_pdc_reset_data(rcdev); + const struct qcom_pdc_reset_map *map = &data->desc->resets[idx]; + + return regmap_update_bits(data->regmap, RPMH_PDC_SYNC_RESET, + BIT(map->bit), BIT(map->bit)); +} + +static int qcom_pdc_control_deassert(struct reset_controller_dev *rcdev, + unsigned long idx) +{ + struct qcom_pdc_reset_data *data = to_qcom_pdc_reset_data(rcdev); + const struct qcom_pdc_reset_map *map = &data->desc->resets[idx]; + + return regmap_update_bits(data->regmap, RPMH_PDC_SYNC_RESET, + BIT(map->bit), 0); +} + +static const struct reset_control_ops qcom_pdc_reset_ops = { + .assert = qcom_pdc_control_assert, + .deassert = qcom_pdc_control_deassert, +}; + +static int qcom_pdc_reset_probe(struct platform_device *pdev) +{ + struct qcom_pdc_reset_data *data; + struct device *dev = &pdev->dev; + const struct qcom_pdc_desc *desc; + void __iomem *base; + struct resource *res; + + desc = of_device_get_match_data(dev); + if (!desc) + return -EINVAL; + + data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL); + if (!data) + return -ENOMEM; + + data->desc = desc; + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + base = devm_ioremap_resource(dev, res); + if (IS_ERR(base)) + return PTR_ERR(base); + + data->regmap = devm_regmap_init_mmio(dev, base, desc->config); + if (IS_ERR(data->regmap)) { + dev_err(dev, "Unable to get pdc-global regmap"); + return PTR_ERR(data->regmap); + } + + data->rcdev.owner = THIS_MODULE; + data->rcdev.ops = &qcom_pdc_reset_ops; + data->rcdev.nr_resets = desc->num_resets; + data->rcdev.of_node = dev->of_node; + + return devm_reset_controller_register(dev, &data->rcdev); +} + +static const struct of_device_id qcom_pdc_reset_of_match[] = { + { .compatible = "qcom,sdm845-pdc-global", .data = &sdm845_pdc_desc }, + {} +}; +MODULE_DEVICE_TABLE(of, qcom_pdc_reset_of_match); + +static struct platform_driver qcom_pdc_reset_driver = { + .probe = qcom_pdc_reset_probe, + .driver = { + .name = "qcom_pdc_reset", + .of_match_table = qcom_pdc_reset_of_match, + }, +}; +module_platform_driver(qcom_pdc_reset_driver); + +MODULE_DESCRIPTION("Qualcomm PDC Reset Driver"); +MODULE_LICENSE("GPL v2"); From patchwork Fri Aug 24 13:18:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sibi Sankar X-Patchwork-Id: 10575339 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BCF57139B for ; Fri, 24 Aug 2018 13:19:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE5392C41D for ; Fri, 24 Aug 2018 13:19:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A25942C441; Fri, 24 Aug 2018 13:19:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 55D7C2C41D for ; Fri, 24 Aug 2018 13:19:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727616AbeHXQyK (ORCPT ); Fri, 24 Aug 2018 12:54:10 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:55526 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726556AbeHXQyK (ORCPT ); Fri, 24 Aug 2018 12:54:10 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id F139D60540; Fri, 24 Aug 2018 13:19:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1535116772; bh=ND5io7WlNPAxAeHVhookpLQXpvsAxZ71neE8ELPfd5A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cxkfF9MV0JiAgMH4wGkNlbPP37RUTtdO3pgAeI+DVeUZkAjsiiznH6CHiVWqnNO+q JsY0cSjuWs5zZF7e7AT+jhEDahzi1D27HI2WtWoi01OdBQD6BpfEd7Nap8tAaBRVTi v6nqGBYl/fD/rKmrCnpgosYvLf4jrvhZooxZhxhk= Received: from blr-ubuntu-87.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sibis@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 1BC306053C; Fri, 24 Aug 2018 13:19:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1535116771; bh=ND5io7WlNPAxAeHVhookpLQXpvsAxZ71neE8ELPfd5A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fEuDP8DLOr39A2oOMXpyklP3uQHVHdF2RE/6NliayCUQVXfU4PrBNiVIQ7l3JG9lD OtbkSSLmdQlFzGlPJlTazyqia6f4+O1/xpD2Leh38p3V0ltdczRyWJ3rRO8x7jx0Xk EF2XzfxdmUDyopZcxylU3v39/zuRmWM5oK5d7YPo= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 1BC306053C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sibis@codeaurora.org From: Sibi Sankar To: bjorn.andersson@linaro.org, p.zabel@pengutronix.de, robh+dt@kernel.org Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, ohad@wizery.com, mark.rutland@arm.com, sricharan@codeaurora.org, akdwived@codeaurora.org, linux-arm-msm@vger.kernel.org, tsoni@codeaurora.org, Sibi Sankar Subject: [PATCH v2 3/6] dt-bindings: remoteproc: Remove additional definition tag Date: Fri, 24 Aug 2018 18:48:57 +0530 Message-Id: <20180824131900.5353-4-sibis@codeaurora.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180824131900.5353-1-sibis@codeaurora.org> References: <20180824131900.5353-1-sibis@codeaurora.org> Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove the additional definition tag declared for WCSS sub-system under reset-names. Signed-off-by: Sibi Sankar Reviewed-by: Matthias Kaehlcke --- Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt b/Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt index 601dd9f389aa..c45e4c131fa2 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt +++ b/Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt @@ -58,7 +58,7 @@ on the Qualcomm Hexagon core. Usage: required Value type: Definition: must be "mss_restart" for the modem sub-system - Definition: must be "wcss_aon_reset", "wcss_reset", "wcss_q6_reset" + must be "wcss_aon_reset", "wcss_reset", "wcss_q6_reset" for the wcss syb-system - cx-supply: From patchwork Fri Aug 24 13:18:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sibi Sankar X-Patchwork-Id: 10575349 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2A800112E for ; Fri, 24 Aug 2018 13:19:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B9212C407 for ; Fri, 24 Aug 2018 13:19:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0FC5B2C41D; Fri, 24 Aug 2018 13:19:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BDDB52C441 for ; Fri, 24 Aug 2018 13:19:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727857AbeHXQyS (ORCPT ); Fri, 24 Aug 2018 12:54:18 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:55730 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726556AbeHXQyR (ORCPT ); Fri, 24 Aug 2018 12:54:17 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id BF9806053B; Fri, 24 Aug 2018 13:19:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1535116779; bh=DN+/brB14o0ESMg6UEejMiZDhhOL/wagYttz4YFLFqw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E15T9OWQz6zo+qflH/4Rbe0Nk3zFhdvOAfHmUUXLKM1WWnVmBTzNJXmlSJXx0Z2OK JqzPweVsG6pQLxK+E8fB0yB2V55M+8ThrExbR4kIOnTzdUGwLtH/KUk5lCebIO7uEk INvbAdea6Vk3ZrNY3pFItdJ8HKl5LLTelDQpMeJk= Received: from blr-ubuntu-87.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sibis@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id E17946055B; Fri, 24 Aug 2018 13:19:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1535116777; bh=DN+/brB14o0ESMg6UEejMiZDhhOL/wagYttz4YFLFqw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mdrKoO2g05hvSrlPRmWtR/aEFkcedtpYZ+CaweZBAaRm31Vl/FGEejxbeSv/wkmFK 4CiooSEpk5sWvfwyIxeyLzibla6ltNM2DVjJE3wAOOsSDsv/AqS/VUWJcfzZmegi9S 1P2090AkuAjZC080+9e/HSEnxH+vX/3eZtJFFFBM= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org E17946055B Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sibis@codeaurora.org From: Sibi Sankar To: bjorn.andersson@linaro.org, p.zabel@pengutronix.de, robh+dt@kernel.org Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, ohad@wizery.com, mark.rutland@arm.com, sricharan@codeaurora.org, akdwived@codeaurora.org, linux-arm-msm@vger.kernel.org, tsoni@codeaurora.org, Sibi Sankar Subject: [PATCH v2 4/6] dt-bindings: remoteproc: Add PDC reset binding for Q6V5 PIL Date: Fri, 24 Aug 2018 18:48:58 +0530 Message-Id: <20180824131900.5353-5-sibis@codeaurora.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180824131900.5353-1-sibis@codeaurora.org> References: <20180824131900.5353-1-sibis@codeaurora.org> Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add additional pdc_reset binding required for Q6V5 Modem PIL on SDM845 SoCs. Signed-off-by: Sibi Sankar Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt b/Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt index c45e4c131fa2..4c5473aeb697 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt +++ b/Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt @@ -53,6 +53,8 @@ on the Qualcomm Hexagon core. Definition: reference to the reset-controller for the modem sub-system reference to the list of 3 reset-controllers for the wcss sub-system + reference to the list of 2 reset-controllers for the modem + sub-system on SDM845 SoCs - reset-names: Usage: required @@ -60,6 +62,8 @@ on the Qualcomm Hexagon core. Definition: must be "mss_restart" for the modem sub-system must be "wcss_aon_reset", "wcss_reset", "wcss_q6_reset" for the wcss syb-system + must be "mss_restart", "pdc_reset" for the modem + sub-system on SDM845 SoCs - cx-supply: - mss-supply: From patchwork Fri Aug 24 13:18:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sibi Sankar X-Patchwork-Id: 10575345 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3CCF1139B for ; Fri, 24 Aug 2018 13:19:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D7182C407 for ; Fri, 24 Aug 2018 13:19:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 20CE02C441; Fri, 24 Aug 2018 13:19:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C88922C407 for ; Fri, 24 Aug 2018 13:19:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727990AbeHXQyW (ORCPT ); Fri, 24 Aug 2018 12:54:22 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:55848 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726556AbeHXQyW (ORCPT ); Fri, 24 Aug 2018 12:54:22 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id CA20B6022B; Fri, 24 Aug 2018 13:19:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1535116784; bh=KdMzCWFAWXUHZts0ANXctXm4hIGPbC/w3sThijByrAY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VUTdiiaMfXFuIJN46AiPW/VpM6SjeTdnPPODg7vgZatpVQxjdoY0GT6muFJAguRSV w3byFyMDrUeglm+2eIWycWMJ0ePUG4t5fHLf77gMjJrB3pghGsDaMJZWpQDJWgTsOe rgLZgNR/TlRhhfliaFsTj91WdnBYyjLpx0vHPNAM= Received: from blr-ubuntu-87.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sibis@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id F011F6055C; Fri, 24 Aug 2018 13:19:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1535116783; bh=KdMzCWFAWXUHZts0ANXctXm4hIGPbC/w3sThijByrAY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X5Pe9sIFnkwNXaiSGdKNTs575ruS831MffPpvwvQlFzvPURTJkP+zmbswqHRuBVo9 RWUI2WngynCeHF26UwmRBMQ7IdFGHgkYfuryx6j1n7sICBumOr7wMU96aMDszJHGSz 50220masgCiEoLeQ+dtghi7XAVydTAddvW4yxCBQ= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org F011F6055C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sibis@codeaurora.org From: Sibi Sankar To: bjorn.andersson@linaro.org, p.zabel@pengutronix.de, robh+dt@kernel.org Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, ohad@wizery.com, mark.rutland@arm.com, sricharan@codeaurora.org, akdwived@codeaurora.org, linux-arm-msm@vger.kernel.org, tsoni@codeaurora.org, Sibi Sankar Subject: [PATCH v2 5/6] remoteproc: qcom: q6v5-pil: Explicitly get mss_restart line Date: Fri, 24 Aug 2018 18:48:59 +0530 Message-Id: <20180824131900.5353-6-sibis@codeaurora.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180824131900.5353-1-sibis@codeaurora.org> References: <20180824131900.5353-1-sibis@codeaurora.org> Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Explicitly get mss_restart to facilitate adding PDC reset line for modem on SDM845 SoCs Signed-off-by: Sibi Sankar --- drivers/remoteproc/qcom_q6v5_pil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/remoteproc/qcom_q6v5_pil.c b/drivers/remoteproc/qcom_q6v5_pil.c index b1296d614b8b..968413edf0c8 100644 --- a/drivers/remoteproc/qcom_q6v5_pil.c +++ b/drivers/remoteproc/qcom_q6v5_pil.c @@ -1177,7 +1177,7 @@ static int q6v5_init_clocks(struct device *dev, struct clk **clks, static int q6v5_init_reset(struct q6v5 *qproc) { qproc->mss_restart = devm_reset_control_get_exclusive(qproc->dev, - NULL); + "mss_restart"); if (IS_ERR(qproc->mss_restart)) { dev_err(qproc->dev, "failed to acquire mss restart\n"); return PTR_ERR(qproc->mss_restart); From patchwork Fri Aug 24 13:19:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sibi Sankar X-Patchwork-Id: 10575351 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 60C45139B for ; Fri, 24 Aug 2018 13:19:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50B8C2C407 for ; Fri, 24 Aug 2018 13:19:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 44EB22C42A; Fri, 24 Aug 2018 13:19:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE7192C407 for ; Fri, 24 Aug 2018 13:19:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726883AbeHXQyf (ORCPT ); Fri, 24 Aug 2018 12:54:35 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:56144 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726556AbeHXQyf (ORCPT ); Fri, 24 Aug 2018 12:54:35 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 8208960555; Fri, 24 Aug 2018 13:19:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1535116796; bh=WF+PHE6mmS50HexoxWt8U7CydUjnB7bmUQ1w+0CWYzg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j2ysxCZotG39ZqRMltGNQNfcMMPD39RwoGg8EzizXSWJY1Sfjgi1qufCfi6IDmCnH JIB6JBAXdy5GF/aAZB69uuSFWjjeGuJl7L4m10AiSx1Mb8t0bFAxkNmLuMb4fNJWlZ +VHuPcWQZ9xNCbEtG/6iJHbOjcyi+W6m5NYlMra0= Received: from blr-ubuntu-87.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sibis@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 10EB560251; Fri, 24 Aug 2018 13:19:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1535116796; bh=WF+PHE6mmS50HexoxWt8U7CydUjnB7bmUQ1w+0CWYzg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j2ysxCZotG39ZqRMltGNQNfcMMPD39RwoGg8EzizXSWJY1Sfjgi1qufCfi6IDmCnH JIB6JBAXdy5GF/aAZB69uuSFWjjeGuJl7L4m10AiSx1Mb8t0bFAxkNmLuMb4fNJWlZ +VHuPcWQZ9xNCbEtG/6iJHbOjcyi+W6m5NYlMra0= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 10EB560251 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sibis@codeaurora.org From: Sibi Sankar To: bjorn.andersson@linaro.org, p.zabel@pengutronix.de, robh+dt@kernel.org Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, ohad@wizery.com, mark.rutland@arm.com, sricharan@codeaurora.org, akdwived@codeaurora.org, linux-arm-msm@vger.kernel.org, tsoni@codeaurora.org, Sibi Sankar Subject: [PATCH v2 6/6] remoteproc: qcom: q6v5-pil: Add PDC reset for modem on SDM845 SoCs Date: Fri, 24 Aug 2018 18:49:00 +0530 Message-Id: <20180824131900.5353-7-sibis@codeaurora.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180824131900.5353-1-sibis@codeaurora.org> References: <20180824131900.5353-1-sibis@codeaurora.org> Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In the presence of a PDC block working with subsystem RSC, assert/deassert PDC reset in modem start/stop path. Signed-off-by: Sibi Sankar --- drivers/remoteproc/qcom_q6v5_pil.c | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/drivers/remoteproc/qcom_q6v5_pil.c b/drivers/remoteproc/qcom_q6v5_pil.c index 968413edf0c8..835fa005fe3e 100644 --- a/drivers/remoteproc/qcom_q6v5_pil.c +++ b/drivers/remoteproc/qcom_q6v5_pil.c @@ -149,6 +149,7 @@ struct q6v5 { u32 halt_nc; struct reset_control *mss_restart; + struct reset_control *pdc_reset; struct qcom_q6v5 q6v5; @@ -349,10 +350,17 @@ static int q6v5_load(struct rproc *rproc, const struct firmware *fw) static int q6v5_reset_assert(struct q6v5 *qproc) { - if (qproc->has_alt_reset) - return reset_control_reset(qproc->mss_restart); - else - return reset_control_assert(qproc->mss_restart); + int ret; + + if (qproc->has_alt_reset) { + reset_control_assert(qproc->pdc_reset); + ret = reset_control_reset(qproc->mss_restart); + reset_control_deassert(qproc->pdc_reset); + } else { + ret = reset_control_assert(qproc->mss_restart); + } + + return ret; } static int q6v5_reset_deassert(struct q6v5 *qproc) @@ -360,9 +368,11 @@ static int q6v5_reset_deassert(struct q6v5 *qproc) int ret; if (qproc->has_alt_reset) { + reset_control_assert(qproc->pdc_reset); writel(1, qproc->rmb_base + RMB_MBA_ALT_RESET); ret = reset_control_reset(qproc->mss_restart); writel(0, qproc->rmb_base + RMB_MBA_ALT_RESET); + reset_control_deassert(qproc->pdc_reset); } else { ret = reset_control_deassert(qproc->mss_restart); } @@ -1183,6 +1193,15 @@ static int q6v5_init_reset(struct q6v5 *qproc) return PTR_ERR(qproc->mss_restart); } + if (qproc->has_alt_reset) { + qproc->pdc_reset = devm_reset_control_get_exclusive(qproc->dev, + "pdc_reset"); + if (IS_ERR(qproc->pdc_reset)) { + dev_err(qproc->dev, "failed to acquire pdc reset\n"); + return PTR_ERR(qproc->pdc_reset); + } + } + return 0; } @@ -1303,12 +1322,12 @@ static int q6v5_probe(struct platform_device *pdev) } qproc->active_reg_count = ret; + qproc->has_alt_reset = desc->has_alt_reset; ret = q6v5_init_reset(qproc); if (ret) goto free_rproc; qproc->version = desc->version; - qproc->has_alt_reset = desc->has_alt_reset; qproc->need_mem_protection = desc->need_mem_protection; ret = qcom_q6v5_init(&qproc->q6v5, pdev, rproc, MPSS_CRASH_REASON_SMEM,