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 0F9F0C77B7E for ; Tue, 2 May 2023 06:53:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233704AbjEBGx3 (ORCPT ); Tue, 2 May 2023 02:53:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233677AbjEBGxB (ORCPT ); Tue, 2 May 2023 02:53:01 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A10A4C02 for ; Mon, 1 May 2023 23:52:31 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-50bc075d6b2so4670100a12.0 for ; Mon, 01 May 2023 23:52:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683010350; x=1685602350; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Qp50p2Ws7bkjK436XWAEC92FxJZeHIdYYG8HIYuRl1w=; b=Y5pd7ipHf5khD4XXKqFvFfxPCqEek3mtfmLwTKDEHg7xHWpfqhktBQFGAo9UHWTgOv 3zdZU6nD1TC58buCWqJqP0aLcYi594gaFF1xeJ/KGUYh04G3wDTO0HYvAN15XuSCYxyR kvdu20eomVrXxX9MVwcFM3uZGjOENIcCEhq/vCnK7cByoL+Q8md6dV1FHVe1kthW7V/2 Y8kvqlu9h7Jce79Oe4Y7/ZrnnYv9Plkvi4ePgBJQkYAy+gVs2+x3qPVlanp2fqnKkuHO Dt/57xMiYLdgxaZlq7/+ftvHlJaqsCOEwCEU6R4+mAiBGWb7lDakeLjwcir5pzHnAsNp KvIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683010350; x=1685602350; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Qp50p2Ws7bkjK436XWAEC92FxJZeHIdYYG8HIYuRl1w=; b=JDghs7uWUs7W66DB/dYDbfO7xkuSGT7CnMy4L3nClc2jfGRlR+MzpW03vfNYSwPRMB 2IFy2Eyy2H5qZNB1NCKn071avb627rF4liQI2/wUq0OEjul4Fb3brhbjs7EITEUIm9jS N8y4hPB75UqV+wW4v0yBecrcV4BK2JQPSXm+ClDz7wDqkhwonV0iwmPJtyoMhGXHeBTO ooSNZz2BqIDYP/Bjr0NT5lQPiRX9Qa+ubRSA274Ay7gTb3pzyNeACBRqjzigSDVbhYal ZXP4PJi/5FE8ef3QnadPaNJ9r/hIxobsAuJyohbpWCzt4eOqPlVwoG8BpT3R8vwmpyPP /2Sg== X-Gm-Message-State: AC+VfDxakP1bKJP8HtQs2F/iB4ErHgmQYzWx3627OqG/8yBJmC56XrsM lCyGR6T+SdOFdlNQ68bQDiKaew== X-Google-Smtp-Source: ACHHUZ4gBYHT+yHlP2EQUafOqVWSMCUgol+Ynv+bGX1fRtxeQk2R3Ue7g8hGpMWN1q2Xo43rvnlgZQ== X-Received: by 2002:a17:907:3f9e:b0:95e:d74d:c4e6 with SMTP id hr30-20020a1709073f9e00b0095ed74dc4e6mr15909803ejc.25.1683010349936; Mon, 01 May 2023 23:52:29 -0700 (PDT) Received: from ?IPV6:2a02:810d:15c0:828:bafd:1283:b136:5f6a? ([2a02:810d:15c0:828:bafd:1283:b136:5f6a]) by smtp.gmail.com with ESMTPSA id hy13-20020a1709068a6d00b009606806b2fesm6457878ejc.217.2023.05.01.23.52.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 01 May 2023 23:52:29 -0700 (PDT) Message-ID: Date: Tue, 2 May 2023 08:52:27 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH v4 0/4] Enable multiple MCAN on AM62x Content-Language: en-US To: Judith Mendez , Chandrasekar Ramakrishnan , Wolfgang Grandegger , Marc Kleine-Budde , Krzysztof Kozlowski Cc: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Schuyler Patton , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Oliver Hartkopp , Simon Horman References: <20230501224624.13866-1-jm@ti.com> From: Krzysztof Kozlowski In-Reply-To: <20230501224624.13866-1-jm@ti.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 02/05/2023 00:46, Judith Mendez wrote: > On AM62x there is one MCAN in MAIN domain and two in MCU domain. > The MCANs in MCU domain were not enabled since there is no > hardware interrupt routed to A53 GIC interrupt controller. > Therefore A53 Linux cannot be interrupted by MCU MCANs. > > This solution instantiates a hrtimer with 1 ms polling interval > for MCAN device when there is no hardware interrupt and there is > poll-interval property in DTB MCAN node. The hrtimer generates a > recurring software interrupt which allows to call the isr. The isr > will check if there is pending transaction by reading a register > and proceed normally if there is. > > On AM62x, this series enables two MCU MCAN which will use the hrtimer > implementation. MCANs with hardware interrupt routed to A53 Linux > will continue to use the hardware interrupt as expected. > > Timer polling method was tested on both classic CAN and CAN-FD > at 125 KBPS, 250 KBPS, 1 MBPS and 2.5 MBPS with 4 MBPS bitrate > switching. > > Letency and CPU load benchmarks were tested on 3x MCAN on AM62x. > 1 MBPS timer polling interval is the better timer polling interval > since it has comparable latency to hardware interrupt with the worse > case being 1ms + CAN frame propagation time and CPU load is not > substantial. Latency can be improved further with less than 1 ms > polling intervals, howerver it is at the cost of CPU usage since CPU > load increases at 0.5 ms. > > Note that in terms of power, enabling MCU MCANs with timer-polling > implementation might have negative impact since we will have to wake > up every 1 ms whether there are CAN packets pending in the RX FIFO or > not. This might prevent the CPU from entering into deeper idle states > for extended periods of time. > > This patch series depends on 'Enable CAN PHY transceiver driver': > Link: https://lore.kernel.org/lkml/775ec9ce-7668-429c-a977-6c8995968d6e@app.fastmail.com/T/ > > v2: > Link: https://lore.kernel.org/linux-can/20230424195402.516-1-jm@ti.com/T/#t > > V1: > Link: https://lore.kernel.org/linux-can/19d8ae7f-7b74-a869-a818-93b74d106709@ti.com/T/#t > > RFC: > Link: https://lore.kernel.org/linux-can/52a37e51-4143-9017-42ee-8d17c67028e3@ti.com/T/#t > > Changes since v3: > - Wrong patch sent, resend correct patch series Sending patchsets every 10 minutes does not help us... Best regards, Krzysztof