Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2904256ybl; Mon, 20 Jan 2020 11:38:49 -0800 (PST) X-Google-Smtp-Source: APXvYqypRYfsyUMdCs1q4tb1CPSZieBJ1bUIWqN33o1ylzRjfD7EylhgpQGGPYa+ycCmoPD1yg4u X-Received: by 2002:aca:4b06:: with SMTP id y6mr324125oia.81.1579549129003; Mon, 20 Jan 2020 11:38:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579549128; cv=none; d=google.com; s=arc-20160816; b=fA6ODYWwUQ+NhjKxrCLIvJzLUMDD1Vcoobuy07/R22h2SaX3ZB0WDF444TN/64Ank4 OtycrqSeUxg/BX9DjN2Ct7k45PKxzZRa1tL4+J9VWm0Uvr1YSn/P+iiuxAc0XxcfE3xH SRalUa1v//WJ2l509QYMifrmWVYvvXeMGzDadGuEuhNlkBTZ1psExkZvfUp9ePMb47qJ R9isnF2ddIU5TQTh3lMzrNx3xAaLswK+R0EassAg4gtz0PSIdiqKATk30mNFKNacqHHB bLPmWjWyVT1gMSDQr04g6NB8NoQLQzj4knJjWPe/c/APcpShKwNK2T5z+c+a/1pvXIQS PAKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=kV18ZB3OdaVHnupftfiGPuw+5EOO07kYgb5mXEqEo+k=; b=kAneNqhTHaAU6BX4MGNvl5vtWebod2YALW+KRRLuLUMzKeyvVUBlNG8fjl2/FZNd9M ou5D28iGoZ6o0N6Yhd91dI40TWAnOYPDDA9IsnaEyuxgYJdFP/PaTzh9NLvPCrA7X2El fu4xCKYCHYbC+b6vAU0hVM3j87/s+WKImay0lF+RzV/d3qb4KdLatcec7+Hev3gJ6B2u vjKqeZEpBkzY9U5FyRwu/ne2uUSp6nWih8msFKKQgF4rtuP+1aTQzZtwriptvP0Tl0a0 8j+onbz3/EbU6qU7is7zVpRywm8J0Ed0errsn1lZhx187QmcCW5kjyj78O62TcNCPMnd us+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EIan6DgA; 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 i17si20364617ota.82.2020.01.20.11.38.36; Mon, 20 Jan 2020 11:38:48 -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=EIan6DgA; 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 S1727254AbgATTgm (ORCPT + 99 others); Mon, 20 Jan 2020 14:36:42 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:42703 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726780AbgATTgm (ORCPT ); Mon, 20 Jan 2020 14:36:42 -0500 Received: by mail-pg1-f194.google.com with SMTP id s64so157184pgb.9 for ; Mon, 20 Jan 2020 11:36:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=kV18ZB3OdaVHnupftfiGPuw+5EOO07kYgb5mXEqEo+k=; b=EIan6DgANAg+4ke6Cn/EoZM5Bkx1BLqgja/FLOcAN7QnF6He78WJH/Fc98ZouFNhuX p7wS/vsDuAYEk5X+RK0kYx58xYRN+yB2zW9H/RrC99OIgCATBEvlqvXPGcoC6xAj2fnC 9j9uH9RJXpgSXzXV0r/ShpvW+w5/8EBI6tHmW+w0sV+E0gkSBBnhFHzPbzHznAi2imvB DK5O5VMWQm3LUF8rt8+s1KZxBrATrMfa4EdW0b3Ah6MOIdFFXKoZw6IZWaqIgwNCBp0k jAc6hmZakXqfgKPEssaLtGBwZKHrzHvxp6hHnKE3DO6Q54tioEtNGpp5Rqx/N+cp0p3s Eb9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=kV18ZB3OdaVHnupftfiGPuw+5EOO07kYgb5mXEqEo+k=; b=TtpXOTn0VrdrHPPmeamwqakG5fm2XngXCsLA2LtnhiJV6dCndM8HdFGjIuX9JgTgji 1U7Xf2vs7IUwRumewnizNAHlPP9z3tg5S/rY3izYUHdvr0l6igKYvW5bqYp6yXGCscfZ yHE0CRNVhszrNy5W3+1Tpm4IZX8cCEWl0voOVS6kh5RpY2MG/V7XUnssu5vGUeUSgEDb z6uvOUazvWxemvRlX8GLaT4EtHR8jYme2AKijNfTIsOYTbGsGg9OrXdcouWO60z0RjtG pMcFVFUFGKseJTdFgjCF5J+H0Gi6bt5sjW0LZzfdsWUS++sPexDrZeWGlyLkaW9rm5Wm Eyow== X-Gm-Message-State: APjAAAXyMQ8mKY8M+iv4IxPLkYv0U4bibbnpwvUF94IAUADHfXijWq81 Wvf1i9QGdBsRVO8bLiWabjVJrA== X-Received: by 2002:a63:1b54:: with SMTP id b20mr1303204pgm.312.1579549001420; Mon, 20 Jan 2020 11:36:41 -0800 (PST) Received: from yoga (wsip-184-181-24-67.sd.sd.cox.net. [184.181.24.67]) by smtp.gmail.com with ESMTPSA id k190sm39447610pga.73.2020.01.20.11.36.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2020 11:36:40 -0800 (PST) Date: Mon, 20 Jan 2020 11:36:38 -0800 From: Bjorn Andersson To: Sibi Sankar Cc: evgreen@chromium.org, p.zabel@pengutronix.de, ohad@wizery.com, linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, agross@kernel.org Subject: Re: [PATCH 4/4] remoteproc: qcom: q6v5-mss: Improve readability of reset_assert Message-ID: <20200120193638.GK1511@yoga> References: <20200117135130.3605-1-sibis@codeaurora.org> <20200117135130.3605-5-sibis@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200117135130.3605-5-sibis@codeaurora.org> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 17 Jan 05:51 PST 2020, Sibi Sankar wrote: > Define CONN_BOX_SPARE_0_EN and fixup comments to improve readability of > Q6 modem reset_assert sequence on SC7180 SoCs. > > Signed-off-by: Sibi Sankar > --- > drivers/remoteproc/qcom_q6v5_mss.c | 17 ++++++++++++++--- > 1 file changed, 14 insertions(+), 3 deletions(-) > > diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c > index 6a98e9029c70b..8c9cfc213d5ff 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 CONN_BOX_SPARE_0_EN BIT(0) > > #define HALT_ACK_TIMEOUT_MS 100 > #define NAV_HALT_ACK_TIMEOUT_US 200 > @@ -415,16 +416,26 @@ 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 */ > + /* > + * SWWA for the pipeline glitch issue seen while Is SWWA an abbreviation for SoftWare WorkAround? > + * putting the Q6 modem on SC7180 into reset: > + * 1 - Assert PDC reset > + * 2 - Set CONN_BOX_SPARE_0_EN > + * 3 - Withdraw the halt requests > + * 4 - Assert MSS reset > + * 5 - Deassert PDC reset > + * 6 - Clear CONN_BOX_SPARE_0_EN > + * 7 - Deassert MSS reset This pretty much outlines what's written below. How about making this something like: /* * Work around a pipeline glitch seen when putting the Q6 modem in * SC7180 into reset by also toggling CONN_BOX_SPARE_0_EN, while holding * the PDC reset. */ Although, it would be even better if it indicated what you mean with "pipeline glitch"... Regards, Bjorn > + */ > reset_control_assert(qproc->pdc_reset); > regmap_update_bits(qproc->conn_map, qproc->conn_box, > - BIT(0), BIT(0)); > + CONN_BOX_SPARE_0_EN, 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); > + CONN_BOX_SPARE_0_EN, 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