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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 5B8C8C61DA4 for ; Tue, 14 Feb 2023 20:26:18 +0000 (UTC) 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=K8oIp3SCun22NSm2EnBQnFV0dmw5wkRNbR2wblFg5/M=; b=siP/ECHefSxnjp zi748VkU1/5SPIfylouY/QBBDN43Q8E13c8FHz8AvQta30sRQ6tJB5S178AAXSLCjJnl/ynSlwDKf TP7AXEXcfFD7rd8JD93wtIZYaV/C2HPiD9f5Q9FsxXTdqcnF/9MOKDZMayg7d1H/vUgpwuhZBOxF6 PHosFniKyPp3s5Wc6o2WPW+qCDvaDOoxQ03b6iHBO8SogTxEkA5PymPqxnWEvNzqt8SFMipLxTJwR 2s+jILvW93sl3Y04A6QhmYco4/dK/nQQJyhgc4vcyBFtN8gCh5OtTF7mJXJcBNdUPBuJILu4mesxg Xj+hbO+UK/Qo9Gxo6OhQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pS1rX-003Nys-IX; Tue, 14 Feb 2023 20:25:15 +0000 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pS1rU-003Nxm-N4 for linux-arm-kernel@lists.infradead.org; Tue, 14 Feb 2023 20:25:14 +0000 Received: by mail-pf1-x433.google.com with SMTP id s20so11083647pfe.2 for ; Tue, 14 Feb 2023 12:25:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=a6owkNXIzp1vvBsxZwQmk2daqoSOZH7CsTkxkBz81Dk=; b=pdA6JyYQHNErVqK8LINqlRGMqxtADvlL90ZJrL6mWqZ91n/eHY3Caw74nZvN0P/HBe JQ5RYHrGTVqtuOgV2wOy3SLUkT3Ou378ZeWaifGUkROZMmfC0/jWnct97FqY7eMln/SC S6causZK3rl4RecLSW/4yIm09/4sHLwskojjipik7emxeZaxvSmVXE4KuI3MTxrP6JtI U5ORDIM50hiPc7R2f+nURu/EC3pzXoLENgPp+d/WqzG4ydCGUH5w/WBWo2onlmK66a0r e/0NPx1ilq8omftTipz3Yw924m1DVSIyCtcjTZTLan5ZLngCDPfBGkpeffuALosRElc2 TTOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=a6owkNXIzp1vvBsxZwQmk2daqoSOZH7CsTkxkBz81Dk=; b=DAqtoMfKDQpdFHRmnEdyjRO23fCKqVXgE5iodvoBNTG6SxTDQalMN/PQGa9wL3oKSn hGaX+/BylNFxxTLTbVRuQ0j6mysmfaIZQ+eysmIpemrN5xuC+OJt/o2XlFBiu6il6ubY vdFVS06qn4QrLAJFgRL0c733MTctcCX4T43e3z7+mkg02aXNs8KyyE6FJl88QmQpqQ7+ k02NM0bP3fvV8QpY8wLeY63FG3Bx2ynZ/0YmV5KzO7/rG771emd8RJFtIqJzWTfMohP7 Z0SalI3bgUTRRsQsxWm//3+kc5mGrGbRt3/fIv4Tpq+bt08JluzQk13NlvABHvizpN4Z 22cw== X-Gm-Message-State: AO0yUKVE4zC6ZujR/5ogl1M0x/NJvMZU245W/feSG7ythOg3/2l/rCwa /vfx10Xw2mdpPRkzKvcbGjmnEg== X-Google-Smtp-Source: AK7set9j8KXiZRlMz3+V5fLFfRnJMFs/x9O9jvoz8VDtOyZT2uChw1vlI384CedfCzm6km2vc0VA9Q== X-Received: by 2002:a05:6a00:4108:b0:5a6:cbdc:2a1a with SMTP id bu8-20020a056a00410800b005a6cbdc2a1amr916874pfb.2.1676406309569; Tue, 14 Feb 2023 12:25:09 -0800 (PST) Received: from p14s ([2604:3d09:148c:c800:21f5:b54f:9213:bd83]) by smtp.gmail.com with ESMTPSA id p26-20020a62ab1a000000b0058e264958b7sm5326691pff.91.2023.02.14.12.25.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Feb 2023 12:25:09 -0800 (PST) Date: Tue, 14 Feb 2023 13:25:06 -0700 From: Mathieu Poirier To: "Iuliana Prodan (OSS)" Cc: Bjorn Andersson , Shawn Guo , Sascha Hauer , "S.J. Wang" , Fabio Estevam , Daniel Baluta , Iuliana Prodan , linux-imx , linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Pengutronix Kernel Team Subject: Re: [RESEND PATCH v4] remoteproc: imx_dsp_rproc: add module parameter to ignore ready flag from remote processor Message-ID: <20230214202506.GA384054@p14s> References: <20230214163744.16377-1-iuliana.prodan@oss.nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230214163744.16377-1-iuliana.prodan@oss.nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230214_122512_835481_C682B2CD X-CRM114-Status: GOOD ( 28.55 ) 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, Feb 14, 2023 at 06:37:44PM +0200, Iuliana Prodan (OSS) wrote: > From: Iuliana Prodan > > There are cases when we want to test a simple "hello world" > application on the DSP and we don't have IPC between the cores. > Therefore, do not wait for a confirmation from the remote processor > at start. > > Added "ignore_dsp_ready" flag while inserting the module to ignore > remote processor reply after start. > By default, this is off - do not ignore reply from rproc. > > Signed-off-by: Iuliana Prodan > Reviewed-by: Daniel Baluta This patch is on my review list, as indicated in February 8th's patchset review order email. That said, I haven't seen Daniel's RB on the mailing list. > --- > Changes since v3 > - do not instantiate static var to 0, this is done by default > - do not initialize mailbox if not IPC between the core > > Changes since v2 > - s/ignoreready/ignore_dsp_ready > > Changes since v1 > - change BIT(31) to BIT(1) for REMOTE_SKIP_WAIT > > --- > drivers/remoteproc/imx_dsp_rproc.c | 27 +++++++++++++++++++++++++++ > 1 file changed, 27 insertions(+) > > diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c > index 95da1cbefacf..fb69f4e8ee96 100644 > --- a/drivers/remoteproc/imx_dsp_rproc.c > +++ b/drivers/remoteproc/imx_dsp_rproc.c > @@ -26,9 +26,18 @@ > #include "remoteproc_elf_helpers.h" > #include "remoteproc_internal.h" > > +/* > + * Module parameters > + */ > +static unsigned int imx_dsp_rproc_ignore_ready; > +module_param_named(ignore_dsp_ready, imx_dsp_rproc_ignore_ready, int, 0644); > +MODULE_PARM_DESC(ignore_dsp_ready, > + "Ignore remote proc reply after start, default is 0 (off)."); > + > #define DSP_RPROC_CLK_MAX 5 > > #define REMOTE_IS_READY BIT(0) > +#define REMOTE_SKIP_WAIT BIT(1) > #define REMOTE_READY_WAIT_MAX_RETRIES 500 > > /* att flags */ > @@ -282,6 +291,10 @@ static int imx_dsp_rproc_ready(struct rproc *rproc) > struct imx_dsp_rproc *priv = rproc->priv; > int i; > > + /* No IPC between the cores */ > + if (priv->flags & REMOTE_SKIP_WAIT) > + return 0; > + > if (!priv->rxdb_ch) > return 0; > > @@ -503,6 +516,13 @@ static int imx_dsp_rproc_mbox_init(struct imx_dsp_rproc *priv) > struct mbox_client *cl; > int ret; > > + /* > + * If there is no IPC between the cores, > + * then no need to initialize mailbox. > + */ > + if (priv->flags & REMOTE_SKIP_WAIT) > + return 0; > + > if (!of_get_property(dev->of_node, "mbox-names", NULL)) > return 0; > > @@ -562,6 +582,10 @@ static int imx_dsp_rproc_mbox_init(struct imx_dsp_rproc *priv) > > static void imx_dsp_rproc_free_mbox(struct imx_dsp_rproc *priv) > { > + /* No IPC between the cores */ > + if (priv->flags & REMOTE_SKIP_WAIT) > + return; > + > mbox_free_channel(priv->tx_ch); > mbox_free_channel(priv->rx_ch); > mbox_free_channel(priv->rxdb_ch); > @@ -903,6 +927,9 @@ static int imx_dsp_rproc_probe(struct platform_device *pdev) > priv->rproc = rproc; > priv->dsp_dcfg = dsp_dcfg; > > + if (imx_dsp_rproc_ignore_ready) > + priv->flags |= REMOTE_SKIP_WAIT; > + > dev_set_drvdata(dev, rproc); > > INIT_WORK(&priv->rproc_work, imx_dsp_rproc_vq_work); > -- > 2.17.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel