From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7306C4708F for ; Tue, 1 Jun 2021 16:01:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 86CE160238 for ; Tue, 1 Jun 2021 16:01:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 86CE160238 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=r5zJdyhg1p/1Zw6Hf5zA3fFYtGT71XX4qjE3ZzzAkD8=; b=kRgQlU1OtMXfPS r7orNAWY/tjvzjgBhQUTKDv+dLnW4yxPseYSbyN9/V8RYshVN0nXTP1wb3Y9If4YytpUnjjpx95St uj+u5zPDm6zZxCCDANHLu/rzYxk4BfuL+2QFkELhJ8BgopGgDXqpqntk02UW/PKMMsPnkDBJMJqwG JL66UbFKFJmpIuN9bMnShYRd7U3KytfStrENIH67KEE0mygsnjelzgsBtQXBr0e2/25ssa0xONsNI kilItJRc11g6qdwHKFQ5noRVsOdNhfrVd5Ow5fRxFMRdJEkz0AR0MFotiBDxKpzXBaE0Yr0UvMKjl elazIVtl491mQCHGa4rg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lo6oU-00HNY6-8o; Tue, 01 Jun 2021 16:00:18 +0000 Received: from mail-ot1-x329.google.com ([2607:f8b0:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lo6oQ-00HNXO-Iv for linux-arm-kernel@lists.infradead.org; Tue, 01 Jun 2021 16:00:16 +0000 Received: by mail-ot1-x329.google.com with SMTP id 69-20020a9d0a4b0000b02902ed42f141e1so14587287otg.2 for ; Tue, 01 Jun 2021 09:00:13 -0700 (PDT) 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; bh=+EQc3xvG4vj4snpRMCUapfXHF8CpIpQCf2oacLZFBAk=; b=JeHyn8OpcfFeowio6lacRBlt7uKlEBVT0atacKuoMyyheIZe6HEZu8oJ/iBrO1DO1F OVCJhIf0AfES6MFJ+irIKqRLXlp/XbXYltlH4VO+ibPgl0QVSc6s78aPUXbuBvv8yocD afVNLPjC4HLPkk/Cd2qCIZFkpoGavJXHJcKUGfSV+NA/WryXTERG3dvjf/jL/PB9luFx 98P38atSF+M/EjlnURCenI5RexCscTp24Gmkj7x8EuJmpnOTNKs8tAHj4TWY2bQiLmHO Bd34DwXpJQG3Rs2VW+ed0CMqgWICwIarye8SitaTgBtoCXoyOGcrt951KGkSrXriw2Dx IihQ== 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; bh=+EQc3xvG4vj4snpRMCUapfXHF8CpIpQCf2oacLZFBAk=; b=C7U5hUd21ZmkquiLTzu3+johIwuU1ECgXOrjt64ky7DWDu7t2pUHXKkQVp2atS2KoB TSh7nzCx/1O9cQgxlXwnu2rRwbWRSKfr4k2KuqT/UF0BvG+InyqaUAQetnyK3xIVx1Dq a53u9dl/11/8n5ThMLha08jE0YIrKtYj/NAmdTQv/sQ3p6d9S/6vh4O1J2T+qKD2/RU0 JJ87G+yyCbsB2ucJsrrhaJOU8DA0djQnRvNl6czRG2gknP6/U1EQpfW3tleYvN/Yzgg4 D5Pa9rmnid7dTp/9EqytNskjUahZu6r62Nwwa8llJRpAVsGEK5ES/lg6IEoZHnyIkdjJ Kulw== X-Gm-Message-State: AOAM530G4ve2ShEOqkMEyOCl5sexcmXduzmUky0YTiP2+nRzo2tvR9P8 8VUFzl2+L2mzfww02vZPe87Uag== X-Google-Smtp-Source: ABdhPJwPbmwjUcUd/RkviTbfJMWI6W/96DM7lu5hzupA0RL0pKF638/dfu5fK+yefZmIG0F5nNmpqw== X-Received: by 2002:a05:6830:a:: with SMTP id c10mr23699912otp.114.1622563213374; Tue, 01 Jun 2021 09:00:13 -0700 (PDT) Received: from yoga (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id a71sm3508262oib.20.2021.06.01.09.00.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Jun 2021 09:00:12 -0700 (PDT) Date: Tue, 1 Jun 2021 11:00:10 -0500 From: Bjorn Andersson To: Mathieu Poirier Cc: "Peng Fan (OSS)" , ohad@wizery.com, o.rempel@pengutronix.de, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan Subject: Re: [PATCH] remoteproc: imx_rproc: correct firmware reload Message-ID: References: <20210601102939.16139-1-peng.fan@oss.nxp.com> <20210601153139.GB1759269@xps15> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210601153139.GB1759269@xps15> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210601_090014_651627_5F7CBB5A X-CRM114-Status: GOOD ( 29.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue 01 Jun 10:31 CDT 2021, Mathieu Poirier wrote: > On Tue, Jun 01, 2021 at 06:29:39PM +0800, Peng Fan (OSS) wrote: > > From: Peng Fan > > > > ENABLE_M4 should be set to 1 when loading code to TCM, otherwise > > you will not able to replace the firmware after you stop m4. > > > > Besides ENABLE_M4, we still need set SW_M4C_RST, because this bit > > will be automatically set with SW_M4C_NON_SCLR_RST set. > > > > Signed-off-by: Peng Fan > > --- > > > > V1: > > Although this is an fix, but it is not critical, patch is based on > > https://patchwork.kernel.org/project/linux-remoteproc/cover/1620274123-1461-1-git-send-email-peng.fan@oss.nxp.com/ > > > > drivers/remoteproc/imx_rproc.c | 8 +++++--- > > 1 file changed, 5 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c > > index cd2ca96a30e5..ce2ce42bee91 100644 > > --- a/drivers/remoteproc/imx_rproc.c > > +++ b/drivers/remoteproc/imx_rproc.c > > @@ -33,7 +33,8 @@ > > > > #define IMX7D_M4_START (IMX7D_ENABLE_M4 | IMX7D_SW_M4P_RST \ > > | IMX7D_SW_M4C_RST) > > -#define IMX7D_M4_STOP (IMX7D_ENABLE_M4 | IMX7D_SW_M4C_NON_SCLR_RST) > > +#define IMX7D_M4_STOP (IMX7D_ENABLE_M4 | IMX7D_SW_M4C_RST | \ > > + IMX7D_SW_M4C_NON_SCLR_RST) > > > > /* Address: 0x020D8000 */ > > #define IMX6SX_SRC_SCR 0x00 > > @@ -44,7 +45,8 @@ > > > > #define IMX6SX_M4_START (IMX6SX_ENABLE_M4 | IMX6SX_SW_M4P_RST \ > > | IMX6SX_SW_M4C_RST) > > -#define IMX6SX_M4_STOP (IMX6SX_ENABLE_M4 | IMX6SX_SW_M4C_NON_SCLR_RST) > > +#define IMX6SX_M4_STOP (IMX6SX_ENABLE_M4 | IMX6SX_SW_M4C_RST | \ > > + IMX6SX_SW_M4C_NON_SCLR_RST) > > #define IMX6SX_M4_RST_MASK (IMX6SX_ENABLE_M4 | IMX6SX_SW_M4P_RST \ > > | IMX6SX_SW_M4C_NON_SCLR_RST \ > > | IMX6SX_SW_M4C_RST) > > @@ -691,7 +693,7 @@ static int imx_rproc_detect_mode(struct imx_rproc *priv) > > return ret; > > } > > > > - if (!(val & dcfg->src_stop)) > > + if ((val & dcfg->src_mask) != dcfg->src_stop) > > priv->rproc->state = RPROC_DETACHED; > > Reviewed-by: Mathieu Poirier > > Bjorn hasn't picked up this set yet so it is best to send a v7 of [1] with this > change merged in it. > Sorry I had missed that [1] was fully reviewed, so I figured I'll just apply the series and squash this in. But afaict this patch isn't a fix to any of the patches in [1]. More so, this patch doesn't apply on top of either v5.13-rc1, linux-next or [1] - because neither IMX7D_M4_STOP nor IMX6SX_M4_STOP has IMX6SX_ENABLE_M4 included. Peng, I've applied [1] now, please let me know what to do about this patch. Regards, Bjorn > Thanks, > Mathieu > > [1]. https://patchwork.kernel.org/project/linux-remoteproc/cover/1620274123-1461-1-git-send-email-peng.fan@oss.nxp.com/ > > > > > return 0; > > -- > > 2.30.0 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel