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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4D6AC4332F for ; Wed, 2 Nov 2022 17:30:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230491AbiKBRaf (ORCPT ); Wed, 2 Nov 2022 13:30:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231638AbiKBRaL (ORCPT ); Wed, 2 Nov 2022 13:30:11 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89CC41707E for ; Wed, 2 Nov 2022 10:30:06 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id bs21so25586982wrb.4 for ; Wed, 02 Nov 2022 10:30:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=g+rK1oS5b52BUstGwWG9rUx1UdvvX13i+yEKBaYvTNQ=; b=VD4MJW+qcwgnBm9szQ6+h6/LW+4yTBmfI3sFDOf2xthoO7MmLBx1eTeGY3MeeFuEb7 oGNDRpU1BzApBH2MZ7e8VOXw2pp0wZ9ZsMQRbrYBFsQ2ikSt4M+RrDX9Hi6CuZNFkmKy tAWUw0M1kWfDgdW6vEA/N0WAdFI+Kh+s8LFASUK3kbZhooz33+bdWnMNuPkcCQL4Y++K pTQ1TnPNk4ModOIomsgcehbQmISc7NNLnEaBEfs8grDehp7C8gg9+Safmkl/71BkP4IR 1mXl5xH+AfW6hfVHd1RyE13RPzYwn6/rJTE0W+Db0wRzHuqQSA3uaNExWFkBh34KGDNU KZ8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=g+rK1oS5b52BUstGwWG9rUx1UdvvX13i+yEKBaYvTNQ=; b=f4yeZQEPl2Tkd+eG+mf5sPDx4PMFy69GPWAY8C0d22H1geE4u0zk1dUGf8EuS6Wfb6 wQASTMuuboQpwqY6TCcR3EWiBQSAAak47vOOPdsGvyuUCMB5ZoZO0qYa4dI1ub9HrrR0 AFS2VCYt9em3gkSpTZ6Po6m46ETNvQlATR18M5zGlKtulu/v229f2Uk8E30HJSbFbL20 JkpuNIemtVlDfqw0yDD4kkQVtQTS8IqXYo6ijYteb5rNBPXUJ2sniWnHdwFbcQe58l55 k9xRNgJEzwy3LTVHy8GfmoJZgMth/kMCBVtVoW2e748BNjGPp7/va6gDwj/jN5zKKMGc jEjA== X-Gm-Message-State: ACrzQf2gYfEu/+HgOlqicQB9cPBG66LIGedyu4RcGpOzPSaqzAB3l1gj 27VsQTNM2BDxvObDKvJ4pZIYsd7Gx5HNTzyWQj6GTg== X-Google-Smtp-Source: AMsMyM4+uiTjeEtL+Z6dWj5D18OHpZ4bBgrqXby9zaGCPTR2QKHUYJzfcJMmInKTZJQKz5CYR/UtzCeAgzxhi5IkKQA= X-Received: by 2002:a5d:6743:0:b0:236:6301:918 with SMTP id l3-20020a5d6743000000b0023663010918mr16200534wrw.247.1667410205063; Wed, 02 Nov 2022 10:30:05 -0700 (PDT) MIME-Version: 1.0 References: <20221102112451.128110-1-peng.fan@oss.nxp.com> In-Reply-To: <20221102112451.128110-1-peng.fan@oss.nxp.com> From: Mathieu Poirier Date: Wed, 2 Nov 2022 11:29:53 -0600 Message-ID: Subject: Re: [PATCH V2 0/2] remoteproc: imx: add start up delay To: "Peng Fan (OSS)" Cc: andersson@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, 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, devicetree@vger.kernel.org, Peng Fan Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org On Wed, 2 Nov 2022 at 05:23, Peng Fan (OSS) wrote: > > From: Peng Fan > > V2: > Rebased on linux-next > > V1: > https://lore.kernel.org/lkml/20220609123500.3492475-1-peng.fan@oss.nxp.com/ > > There is case that after remoteproc start remote processor[M4], the M4 > runs slow and before M4 finish its own rpmsg framework initialization, > linux sends out vring kick message, then M4 firmware drops the kick > message. Some NXP released Cortex-M[x] images has such limitation that > it requires linux sends out vring kick message after M4 firmware finish > its rpmsg framework initialization. > > The best case is to use a method to let M4 notify Linux that M4 has > finished initialization, but we could not patch released firmware, > then update driver to detect notification. > > So add delay before linux send out vring kick message. It is not good to > use a fixed time delay in driver, so I choose to get that from device > tree. > >From where I stand this is a hack to hide the lack of motivation to enact the real solution that is outlined above. I also wonder how these problems were not caught during the testing phase. Either find a way to upgrade your firmware or keep this in your internal tree. > Peng Fan (2): > dt-bindings: remoteproc: imx_rproc: add fsl,startup-delay-ms > remoteproc: imx_rproc: delay after kick remote processor > > .../devicetree/bindings/remoteproc/fsl,imx-rproc.yaml | 4 ++++ > drivers/remoteproc/imx_rproc.c | 9 +++++++++ > 2 files changed, 13 insertions(+) > > -- > 2.37.1 > 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 30F90C433FE for ; Wed, 2 Nov 2022 17:31:10 +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:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IBkWsEnOwF9vQ+Y0YxrKxzmYhNzYZNkp0yHgHqFWE1E=; b=gNJZWOV4OJ+KRX gljIs/gJZOZBwGpWYjFhbYHWrhwDQ4lqjGmw1XHO3Xl29ZEwwg6+H5zmX+5xpMT/Sq4Lgvs/hVJ5x R04RN5PhpGV0UTsGbyciYiWN5JePsdP9DV6wfntFPZl09z8+zCKQXreL1pdCz6UFyaF8MXwe6cL4U B5SiXaOAeUiZMz+Mtul4HKn+q2dj42l2xoKFLNE7/dbip35PJ4XT9CA2ueIGq3pshWFO68Ud8V+4z 5si6N1H7kN/T+Pv2MVBCOcr+g57iAoltvWKIde3mDyr9jT799RNwoFIqiuBtpylEYYJ2+EHuGUhEa rEe7w3YLMfUeZ1EBCTfA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqHZ6-00CZhs-1a; Wed, 02 Nov 2022 17:30:12 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqHZ1-00CZeL-Fz for linux-arm-kernel@lists.infradead.org; Wed, 02 Nov 2022 17:30:09 +0000 Received: by mail-wr1-x436.google.com with SMTP id o4so25584535wrq.6 for ; Wed, 02 Nov 2022 10:30:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=g+rK1oS5b52BUstGwWG9rUx1UdvvX13i+yEKBaYvTNQ=; b=VD4MJW+qcwgnBm9szQ6+h6/LW+4yTBmfI3sFDOf2xthoO7MmLBx1eTeGY3MeeFuEb7 oGNDRpU1BzApBH2MZ7e8VOXw2pp0wZ9ZsMQRbrYBFsQ2ikSt4M+RrDX9Hi6CuZNFkmKy tAWUw0M1kWfDgdW6vEA/N0WAdFI+Kh+s8LFASUK3kbZhooz33+bdWnMNuPkcCQL4Y++K pTQ1TnPNk4ModOIomsgcehbQmISc7NNLnEaBEfs8grDehp7C8gg9+Safmkl/71BkP4IR 1mXl5xH+AfW6hfVHd1RyE13RPzYwn6/rJTE0W+Db0wRzHuqQSA3uaNExWFkBh34KGDNU KZ8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=g+rK1oS5b52BUstGwWG9rUx1UdvvX13i+yEKBaYvTNQ=; b=BQJv4nzHbkI0ZzDGDNVo7f54t4yqQQ/73BPlzY9HeBDTXzROlYmyJxUmnjEW24J8jY er3SGZHtP+/smougmfUogFlC+8EGfDGMO6U1+9rktRo5QRQ5c8WpP3uv7RXEN4H6xnwz aaym7SUlSETkNWPzxWdXYZDtIfWvyaNPP21pj5K0xf0SI5jm9M1bY5semOkRRmIeCtxO esi52KfLjyAzIceyxPDaEKNakdaGhU3BZWGgsgWaOuo5mAS7PwrEg+g4YC+NeQb1lhq6 9Ahe/Orb/Oj/QMAxIuHuXqlGNQjPZewOCcBsu1SbAvgsPoMaShSMXcYsfqI+oR1JaZQ8 2vAQ== X-Gm-Message-State: ACrzQf0GDQZDCKti5MgAEIdl6xNf2G4lPOBEWcWnSVi6deWnA8I3luKO 3CsobfXazDvRS6DNlmlRethn3VuQKlccY83OfxLPTg== X-Google-Smtp-Source: AMsMyM4+uiTjeEtL+Z6dWj5D18OHpZ4bBgrqXby9zaGCPTR2QKHUYJzfcJMmInKTZJQKz5CYR/UtzCeAgzxhi5IkKQA= X-Received: by 2002:a5d:6743:0:b0:236:6301:918 with SMTP id l3-20020a5d6743000000b0023663010918mr16200534wrw.247.1667410205063; Wed, 02 Nov 2022 10:30:05 -0700 (PDT) MIME-Version: 1.0 References: <20221102112451.128110-1-peng.fan@oss.nxp.com> In-Reply-To: <20221102112451.128110-1-peng.fan@oss.nxp.com> From: Mathieu Poirier Date: Wed, 2 Nov 2022 11:29:53 -0600 Message-ID: Subject: Re: [PATCH V2 0/2] remoteproc: imx: add start up delay To: "Peng Fan (OSS)" Cc: andersson@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, 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, devicetree@vger.kernel.org, Peng Fan X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221102_103007_584908_4C1F5766 X-CRM114-Status: GOOD ( 17.30 ) 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 Wed, 2 Nov 2022 at 05:23, Peng Fan (OSS) wrote: > > From: Peng Fan > > V2: > Rebased on linux-next > > V1: > https://lore.kernel.org/lkml/20220609123500.3492475-1-peng.fan@oss.nxp.com/ > > There is case that after remoteproc start remote processor[M4], the M4 > runs slow and before M4 finish its own rpmsg framework initialization, > linux sends out vring kick message, then M4 firmware drops the kick > message. Some NXP released Cortex-M[x] images has such limitation that > it requires linux sends out vring kick message after M4 firmware finish > its rpmsg framework initialization. > > The best case is to use a method to let M4 notify Linux that M4 has > finished initialization, but we could not patch released firmware, > then update driver to detect notification. > > So add delay before linux send out vring kick message. It is not good to > use a fixed time delay in driver, so I choose to get that from device > tree. > >From where I stand this is a hack to hide the lack of motivation to enact the real solution that is outlined above. I also wonder how these problems were not caught during the testing phase. Either find a way to upgrade your firmware or keep this in your internal tree. > Peng Fan (2): > dt-bindings: remoteproc: imx_rproc: add fsl,startup-delay-ms > remoteproc: imx_rproc: delay after kick remote processor > > .../devicetree/bindings/remoteproc/fsl,imx-rproc.yaml | 4 ++++ > drivers/remoteproc/imx_rproc.c | 9 +++++++++ > 2 files changed, 13 insertions(+) > > -- > 2.37.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel