Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp641849ybl; Thu, 23 Jan 2020 05:15:18 -0800 (PST) X-Google-Smtp-Source: APXvYqzvMKY5KwlcYW1RR6sLk4ZV97us7Od7THlQlubm/wmeq7y0U0OImoiOdWoL0uQkLgcw2xkP X-Received: by 2002:a05:6830:612:: with SMTP id w18mr11439961oti.264.1579785317965; Thu, 23 Jan 2020 05:15:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579785317; cv=none; d=google.com; s=arc-20160816; b=ZoqsSo/FkgfvzxAllUxJUmPAbDKvZB7z/raS+w/FFdiVU/qJoSMWcskcVROx0x8Wu0 PK0Ecix1GFkFZ4ghIyvzaFMNNzrm2jf5g9EGiCvWtunyMZ/YdFIR8Xa9EYZjZ9DPPCy4 1pCt5qN3wuvMGkWktjUKKVK89uZkCryHJjqaQK8CGxBjiSWuHsaCYhOzO4doBhRYHZeT RUvYJ4vdLB1eMMPtbzirFdVMmBoSR0VAtDEmDzGly2WGyopP5fj6reOZGi0yUs/SxbGv wh31UeAY/JTmolGuHIXfNAGMHwjGkRLoAwDiAvpLi4VEVW85aXrObn+bUnag+503zqgH 2OYA== 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 :dmarc-filter:dkim-signature; bh=HQkB2ZhFnCLma0netfVRRuYUjdLJFslhBm5LAJ36CLI=; b=btKVwjei2TJ+liqIIEOVjV8fHZWeVHoD/RYYI8rEn6ve+wzcI0MSQFZhSxQYwy1BD5 xoOvy3t6o3rxS6wOjgxywZeqn+2hjS8dlsiQMU0QNc5X6JNx4xsSlo7hLn9oBBZR+ive oY3S4oyvnocvKrOzyPD15BNHXSf/WdrfWAYC/MGNMr5jY6tmiz4X2UqKKg6bmy3DKKXi 30bTNqpxC9SUqLhP+VRhukSEEO8lHONdhZhKnzuEOrU9PtZKTmMdU+cNei2TV/AjoVG0 kosumSpVnEDMCJZe7BNUEjloAEjEodw1vABBxcaCNm3Tux5YMYr+GPNMIG+SlVzMkZti 8MgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=QeFapJ65; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u127si880717oig.71.2020.01.23.05.15.06; Thu, 23 Jan 2020 05:15:17 -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=fail header.i=@mg.codeaurora.org header.s=smtp header.b=QeFapJ65; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728853AbgAWNNF (ORCPT + 99 others); Thu, 23 Jan 2020 08:13:05 -0500 Received: from mail26.static.mailgun.info ([104.130.122.26]:34011 "EHLO mail26.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728792AbgAWNNC (ORCPT ); Thu, 23 Jan 2020 08:13:02 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1579785182; h=Content-Transfer-Encoding: MIME-Version: References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=HQkB2ZhFnCLma0netfVRRuYUjdLJFslhBm5LAJ36CLI=; b=QeFapJ65gZwGDXUaX9JW4M+mbC1Fh+AchvZtKZbECfHpEcPKmKIHwQtEWITUN62vqXSFu8Sz ZBfJjxFdC4kVEQWfusPIS4vkCEcKxrCqbwScTWQy4qUzqcBMy37F9JLHzEdjWQ050MlW74Wj IC8mwWOIS5dGjq4j/spxEri0CeU= X-Mailgun-Sending-Ip: 104.130.122.26 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5e299bdd.7fa62d251420-smtp-out-n02; Thu, 23 Jan 2020 13:13:01 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id DFEC2C433CB; Thu, 23 Jan 2020 13:13:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 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) by smtp.codeaurora.org (Postfix) with ESMTPSA id 5A88AC447A1; Thu, 23 Jan 2020 13:12:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 5A88AC447A1 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=sibis@codeaurora.org From: Sibi Sankar To: bjorn.andersson@linaro.org, evgreen@chromium.org, p.zabel@pengutronix.de Cc: ohad@wizery.com, linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, agross@kernel.org, Sibi Sankar Subject: [PATCH v2 2/2] remoteproc: qcom: q6v5-mss: Improve readability of reset_assert Date: Thu, 23 Jan 2020 18:42:36 +0530 Message-Id: <20200123131236.1078-3-sibis@codeaurora.org> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20200123131236.1078-1-sibis@codeaurora.org> References: <20200123131236.1078-1-sibis@codeaurora.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Define AXI_GATING_VALID_OVERRIDE and fixup comments to improve readability of Q6 modem reset sequence on SC7180 SoCs. Signed-off-by: Sibi Sankar --- drivers/remoteproc/qcom_q6v5_mss.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c index 89ab96c21a44a..a1cc9cbe038f1 100644 --- a/drivers/remoteproc/qcom_q6v5_mss.c +++ b/drivers/remoteproc/qcom_q6v5_mss.c @@ -71,6 +71,7 @@ #define NAV_AXI_HALTREQ_BIT BIT(0) #define NAV_AXI_HALTACK_BIT BIT(1) #define NAV_AXI_IDLE_BIT BIT(2) +#define AXI_GATING_VALID_OVERRIDE BIT(0) #define HALT_ACK_TIMEOUT_US 100000 #define NAV_HALT_ACK_TIMEOUT_US 200 @@ -415,16 +416,24 @@ static int q6v5_reset_assert(struct q6v5 *qproc) ret = reset_control_reset(qproc->mss_restart); reset_control_deassert(qproc->pdc_reset); } else if (qproc->has_halt_nav) { - /* SWAR using CONN_BOX_SPARE_0 for pipeline glitch issue */ + /* + * When the AXI pipeline is being reset with the Q6 modem partly + * operational there is possibility of AXI valid signal to + * glitch, leading to spurious transactions and Q6 hangs. A work + * around is employed by asserting the AXI_GATING_VALID_OVERRIDE + * BIT before triggering Q6 MSS reset. Both the HALTREQ and + * AXI_GATING_VALID_OVERRIDE are withdrawn post MSS assert + * followed by a MSS deassert, while holding the PDC reset. + */ reset_control_assert(qproc->pdc_reset); regmap_update_bits(qproc->conn_map, qproc->conn_box, - BIT(0), BIT(0)); + AXI_GATING_VALID_OVERRIDE, 1); regmap_update_bits(qproc->halt_nav_map, qproc->halt_nav, NAV_AXI_HALTREQ_BIT, 0); reset_control_assert(qproc->mss_restart); reset_control_deassert(qproc->pdc_reset); regmap_update_bits(qproc->conn_map, qproc->conn_box, - BIT(0), 0); + AXI_GATING_VALID_OVERRIDE, 0); ret = reset_control_deassert(qproc->mss_restart); } else { ret = reset_control_assert(qproc->mss_restart); -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project