Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1188833rwb; Wed, 16 Nov 2022 13:31:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf5y8dKoXtFhKVN5cIQLDTINz5VgrGCVPCJRZsfmX/QnNXlEG4fN4R+iUBPE2PJ9AiQZuaeN X-Received: by 2002:a17:906:6d89:b0:7ad:eb7f:d082 with SMTP id h9-20020a1709066d8900b007adeb7fd082mr18418350ejt.356.1668634305870; Wed, 16 Nov 2022 13:31:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668634305; cv=none; d=google.com; s=arc-20160816; b=W3fc6CZUaG2Zk4/6yqbW976x6JiqNVfIXNUstQHL/1huMK+f3CfWYlfE4UhwB3CdQP AhiWzV7L4bKV4pl9ksCooe1ir+bGIchhQ2c9wu46Tr95K2uJQRwl3lbRwZy2Vn2W9ZoX HYpbs5BkNA7VM9Ptt1P/vcymtV+E0uHqEPK2v6KxNmkLX2ippabkXuS+xA+Xz1EKLrfI sDLggk66DEnrtyP5Ffs0ISGJ3/fD4+BMwg+KWnyfThVV6V8nhioebcSNHmVFIGwc/aqv QuSZLMWEvq4zlCFNWvFBShwYnvJ+nnts1wgPALPWibpy7tpx6jD2bpyXAO8soAQdCOT1 WkFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=CYWMMUbBw93RRaB82Tv6rmjWQ7OjIXTvTPik8qxDxCo=; b=YuyeBIiaRM9rrldWYJJiC+DbIcVdlRuK5MJRgq0oYRCjJtXPdMnZ+WIi96ck4sgFo+ 9PWXtI/ft9Ko+Kp8tZ1r4l9woFf23kCBFntIVMkVd9iAlGY6VkqsXK5c0sWMYO4JuTzZ sMXQur6GE8ixDPHwe8LC1KOYYM08j3ZAiROYXmdjTaW4OIL6OICkwWo6y/Tozp6XA84T ZKVgu+G3wcmVOy1Nu885R77xCSUrq4GNjRS5UZnUs6xyZrHSLhdWzTSMM6KkleGQG+61 WGpG8aHNxthiIVYxXSYKzvhjauxttewRj7rvaEzDNcdbcLPBqkWnybT9NONNqv/DYlcY JNxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b="rTDy/jgY"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jg3-20020a170907970300b0078200e81b92si16586813ejc.758.2022.11.16.13.31.20; Wed, 16 Nov 2022 13:31:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b="rTDy/jgY"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238756AbiKPUyH (ORCPT + 90 others); Wed, 16 Nov 2022 15:54:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238595AbiKPUxn (ORCPT ); Wed, 16 Nov 2022 15:53:43 -0500 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A62823B9 for ; Wed, 16 Nov 2022 12:53:24 -0800 (PST) Received: by mail-ed1-x52a.google.com with SMTP id l11so28488769edb.4 for ; Wed, 16 Nov 2022 12:53:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=CYWMMUbBw93RRaB82Tv6rmjWQ7OjIXTvTPik8qxDxCo=; b=rTDy/jgYPCRzE6NdKcp1p40vLzuwCFilt4GMZ2KgsYOwc3AeCM+94KSaGrZKLYKxFG opmzxtk5xRCS5WSeC565gaVF4DdshwC1HSRqklfwYr7WJ+S0owa0wHj3IbmeF8U1T4i7 6RiyePLsWNqDFSqXEFhJCNuyBMF6k4Yb7ur9DPggsh6q8H5JA4FmNPH5NuR0vw5ngGgX EpYPw123nxWG7VbD4qJmqj19F3NVD0pF4BS+TSEKNlxF5l8N1f3xyN6mpRnn/CsSlGp6 3rLhBMS8WxVlXUhSQSd6FVwmIqlHmbypQP6abng742u05WM1o/YX6VCFz2FMNznvbHgS ybZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CYWMMUbBw93RRaB82Tv6rmjWQ7OjIXTvTPik8qxDxCo=; b=juChfMDpXQCpkZ8HGLG8d2Hc2QeER6VZ/9ID1DPpzDvm6aC2lmT1cfh/VwwW2LwFcT 6PvZ7EDriRD2DUEDR1c9XUWazz0kPUY2UV+XTwPTKB631LYKfUdYrZSIqTOYiR4EhmX1 z1nBYCU0/FxjgOLW/zWWUTsqzABBwEGlKOkNKbQ8/T2mOzl8EJFBEj0zWHKDJj1Z5CgN 4SsXpi93Er1tWXEPCO+0/3RyPYaEj9BaIyRIqpBh1ZgNoTw94JQxAUwfZLXlatka3OqM s6pY6Ul/e66gLOz9tf14xCO+IDAyaavn8b3xXdTRBdSB+gzLFyki1tYbFTPhIAM2nGKz BEtg== X-Gm-Message-State: ANoB5pkc1j2sRq8KIFCbXfD7x+x6hICSrZIEA4Aly0vRcdwHCZuToli4 3cPDI4ohhZgZojpuLctVJe9omw== X-Received: by 2002:a05:6402:f8d:b0:461:8f21:5f12 with SMTP id eh13-20020a0564020f8d00b004618f215f12mr20896599edb.54.1668632003246; Wed, 16 Nov 2022 12:53:23 -0800 (PST) Received: from blmsp.fritz.box ([2001:4090:a244:804b:353b:565:addf:3aa7]) by smtp.gmail.com with ESMTPSA id kv17-20020a17090778d100b007aece68483csm6782828ejc.193.2022.11.16.12.53.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Nov 2022 12:53:22 -0800 (PST) From: Markus Schneider-Pargmann To: Chandrasekar Ramakrishnan , Marc Kleine-Budde , Wolfgang Grandegger Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Markus Schneider-Pargmann Subject: [PATCH 00/15] can: m_can: Optimizations for tcan and peripheral chips Date: Wed, 16 Nov 2022 21:52:53 +0100 Message-Id: <20221116205308.2996556-1-msp@baylibre.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, this series is aimed at optimizing the driver code for tcan chips and more generally for peripheral m_can chips. I did different things to improve the performance: - Reduce the number of SPI transfers. - Reduce the number of interrupts. - Enable use of FIFOs. I am working with a tcan4550 in loopback mode attached to a beaglebone black. I am currently working on optimizing the receive path as well which will be submitted in another series once it is done. Best, Markus Markus Schneider-Pargmann (15): can: m_can: Eliminate double read of TXFQS in tx_handler can: m_can: Wakeup net queue once tx was issued can: m_can: Cache tx putidx and transmits in flight can: m_can: Use transmit event FIFO watermark level interrupt can: m_can: Disable unused interrupts can: m_can: Avoid reading irqstatus twice can: m_can: Read register PSR only on error can: m_can: Count TXE FIFO getidx in the driver can: m_can: Count read getindex in the driver can: m_can: Batch acknowledge rx fifo can: m_can: Batch acknowledge transmit events can: tcan4x5x: Remove invalid write in clear_interrupts can: tcan4x5x: Fix use of register error status mask can: tcan4x5x: Fix register range of first block can: tcan4x5x: Specify separate read/write ranges drivers/net/can/m_can/m_can.c | 140 +++++++++++++++--------- drivers/net/can/m_can/m_can.h | 5 + drivers/net/can/m_can/tcan4x5x-core.c | 19 ++-- drivers/net/can/m_can/tcan4x5x-regmap.c | 45 ++++++-- 4 files changed, 141 insertions(+), 68 deletions(-) base-commit: 094226ad94f471a9f19e8f8e7140a09c2625abaa prerequisite-patch-id: e9df6751d43bb0d1e3b8938d7e93bc1cfa22cef2 prerequisite-patch-id: dad9ec37af766bcafe54cb156f896267a0f47fe1 prerequisite-patch-id: f4e6f1a213a31df2741a5fa3baa87aa45ef6707a -- 2.38.1