Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1213842imm; Wed, 6 Jun 2018 12:13:51 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIFB2COREVqKxnwcNhILKEx+Sd1fuf9VtwiWsVluCh7FIMNnpAnJaSKdn6DaUHokfcWO+mE X-Received: by 2002:a17:902:b483:: with SMTP id y3-v6mr4555186plr.66.1528312431008; Wed, 06 Jun 2018 12:13:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528312430; cv=none; d=google.com; s=arc-20160816; b=VCRF4ZVK2MGYLQnspGhQZy1nYU8w9zp0Y9eQ5pMnlFH84qt/L0kt9RDw72uTL7Y/h/ nCYMCv3apJyXpDxca5MnU+MMFrO4q9KwH9v0wvDZBNXqbMutq3YndfRv5b3a5T2yH8Gq 1WKmBNaD+EAc3WZaw2eDkOErM7a6yWboXtaqTyDwOjjFOal/byW3fdVgfkkib1TESM8J 0rQR19Iqc8s4Z8FVJj0I4QSDtkyruHPdY7JnQVyIeCrRDTbITUNOnmhZIoEQ1qBHmIpO KUfhogFgEN99lUW7I+Tmns8JrWlGalUQ9rLjptXxoBASnEq9TUbmVFm2vRSTriFPltbq 0WCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=Uqr79VxFABNriftKR5Gm0J0OCspnzc02QYV3oMA+mQE=; b=fMhvO+XdpOpWjJxMYdKNaufAGyMuddf4YWCtx5NqjFux7T3eJVqk/wSw3zUhlg156A +n1uHhZ0xs5R7HB3uI+6gif9yDycjLR+G1xZ99CyamwiGcm5Rx7ySzy/iCjyWE38vt5r zfyDHWHfcZVXmA+a/VCsmspL8d0y/wUMsDPuWjL97s2phbKUfyqIOLTx6snQbkvd4V1P FPM6leBLwDXMkPZPrzN6uRknefXOzal966WCSGIMTtC0DAtJXf/fFn5D9+JHZg3XkPNs 0XfbMp2VSNyvXT1ts/FGrqGubqW6GayVRtaJSPKQI+XM0QS/FAXhhaFDPaajML8YgRQM qdug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=m5yz+Rv4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x69-v6si19462684pfa.108.2018.06.06.12.13.36; Wed, 06 Jun 2018 12:13:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=m5yz+Rv4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754142AbeFFSGe (ORCPT + 99 others); Wed, 6 Jun 2018 14:06:34 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:35274 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752401AbeFFSGc (ORCPT ); Wed, 6 Jun 2018 14:06:32 -0400 Received: by mail-qt0-f193.google.com with SMTP id s9-v6so7343374qtg.2; Wed, 06 Jun 2018 11:06:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Uqr79VxFABNriftKR5Gm0J0OCspnzc02QYV3oMA+mQE=; b=m5yz+Rv46oEb3jFfimtenrsBPn678SRW5UWElWcP84JJ6I4K0DjQt6sIj5ejexjJf0 WqQ1duWhyNV6lMUN+eSkw8YSB5ZwGoSE7Pzgrh1EOnZ4Fl8iDCoSxwfm8H5vcLyg1gtw Q7CgbdfFYWkBbv4lRTOkkxur49xpyil5Wk0g7feYyU4fRkxmVtr5W+Gx9W3x6ggeoRW+ KmZk3FE9JVH1ckRveetoWxq6HwLkJhfHzRFTugb9PgSI1ZUOrmnrDAzKWHao4fzoz3Ez wWPZBGymV7bEnCmL3euTkx4J1vDCRvcOf0aucsr+XIT4qJuyBLERQY/e7ubMMeVQpW16 Rfsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Uqr79VxFABNriftKR5Gm0J0OCspnzc02QYV3oMA+mQE=; b=osenKDRji2DEzXMjwUvdYFpcz3jN+emYA1te8hc/ZkLaGf36ufQkml4sCeNpgE3m0V W3L79UQ4lvs/odgpsrFMMMwy9JJlWeTHtHB3qWsfwrhGv6psYxSzWhyAeY97Pyrm8vCR /6amF5HVJKoxqmJKXocWDT46dOHUjc71K6BfRJ744yqHsklRBWYXQg+0VueeWmQlUOpX yuo3gZ/5Coqfd60rORUFgrJR23vwrNd84kUMacLZas6bZwv9yQLMBIMUrKHd/2H6DutB 2KakhN0DY02AdqimD/8odUrU1K7La75KLsp9x70kfOD8VG+dDy5UzuGE5XmjRM988Ody UoIg== X-Gm-Message-State: APt69E24pYAaeo/TnvnV0aEOKm1mp8VaJQKS9j4rgGZlWeVpvacLXdBm nsoH46cIrLJJzgRlv/4AQfx/a9qMjg3vhz4mQGE= X-Received: by 2002:aed:3ce8:: with SMTP id e37-v6mr3874743qtf.295.1528308391895; Wed, 06 Jun 2018 11:06:31 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a0c:98f9:0:0:0:0:0 with HTTP; Wed, 6 Jun 2018 11:06:31 -0700 (PDT) In-Reply-To: <1528224240-30786-1-git-send-email-mark.jonas@de.bosch.com> References: <1528224240-30786-1-git-send-email-mark.jonas@de.bosch.com> From: Andy Shevchenko Date: Wed, 6 Jun 2018 21:06:31 +0300 Message-ID: Subject: Re: [PATCH 0/5] can: enable multi-queue for SocketCAN devices To: Mark Jonas Cc: Wolfgang Grandegger , Marc Kleine-Budde , linux-can@vger.kernel.org, netdev , Linux Kernel Mailing List , Heiko Schocher , Zhu Yi Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 5, 2018 at 9:43 PM, Mark Jonas wrote: > Upon request by Marc Kleine-Budde this patch series does not only > contain our patch to enable enable multi-queue for SocketCAN devices > but also a driver (Companion driver suite) which makes active use of > this feature. > > The driver suite implements > - two CAN interfaces > - one generic command interfaces > and offers a SocketCAN as well as a char device interface. The > SocketCAN interface supports multi-queue. > > The functionality bases on an external peripheral chip named Companion. > It offers two CAN interfaces, each has 8 prioritized transmit FIFOs as > well as one receive FIFO. Besides CAN, undisclosed additional functions > can be accessed through the char device. > > A standard SPI interface with two additional lines for flow control is > used. The Companion chip is the SPI slave. Can remoteproc API be utilized here? > > The driver suite consists of three separate drivers. The following > diagram illustrates the dependencies in layers. > > /dev/companion SocketCAN User Space > ------------------------------------------------------------------- > +----------------+ +---------------+ > | companion-char | | companion-can | > +----------------+ +---------------+ > +----------------------------------+ > | companion-spi | > +----------------------------------+ > +----------------------------------+ > | standard SPI subsystem | > +----------------------------------+ Linux Kernel > ------------------------------------------------------------------- > | | | | | | Hardware > CS-+ | | | | +-BUSY > CLK--+ | | +---REQUEST > MOSI---+ | > MISO-----+ > > companion-spi > core.c: handles SPI, sysfs entry and interface to upper layer > protocol-manager.c: handles protocol with the SPI HW > queue-manager.c: handles buffering and packets scheduling > > companion-can > makes use of multi-queue support and allows to use tc to configure > the queuing discipline (e.g. mqprio). Together with the SO_PRIORITY > socket option this allows to specify the FIFO a CAN frame shall be > sent to. > > companion-char > handles messages to other undisclosed functionality beyond CAN. > > Zhu Yi (5): > can: enable multi-queue for SocketCAN devices > spi: implement companion-spi driver > char: implement companion-char driver > can: implement companion-can driver > spi,can,char: add companion DT binding documentation > > .../devicetree/bindings/spi/bosch,companion.txt | 82 ++ > drivers/char/Kconfig | 7 + > drivers/char/Makefile | 2 + > drivers/char/companion-char.c | 367 ++++++ > drivers/net/can/Kconfig | 8 + > drivers/net/can/Makefile | 1 + > drivers/net/can/companion-can.c | 694 ++++++++++++ > drivers/net/can/dev.c | 8 +- > drivers/spi/Kconfig | 2 + > drivers/spi/Makefile | 2 + > drivers/spi/companion/Kconfig | 5 + > drivers/spi/companion/Makefile | 2 + > drivers/spi/companion/core.c | 1189 ++++++++++++++++++++ > drivers/spi/companion/protocol-manager.c | 1035 +++++++++++++++++ > drivers/spi/companion/protocol-manager.h | 348 ++++++ > drivers/spi/companion/protocol.h | 273 +++++ > drivers/spi/companion/queue-manager.c | 146 +++ > drivers/spi/companion/queue-manager.h | 245 ++++ > include/linux/can/dev.h | 7 +- > include/linux/companion.h | 258 +++++ > 20 files changed, 4677 insertions(+), 4 deletions(-) > create mode 100644 Documentation/devicetree/bindings/spi/bosch,companion.txt > create mode 100644 drivers/char/companion-char.c > create mode 100644 drivers/net/can/companion-can.c > create mode 100644 drivers/spi/companion/Kconfig > create mode 100644 drivers/spi/companion/Makefile > create mode 100644 drivers/spi/companion/core.c > create mode 100644 drivers/spi/companion/protocol-manager.c > create mode 100644 drivers/spi/companion/protocol-manager.h > create mode 100644 drivers/spi/companion/protocol.h > create mode 100644 drivers/spi/companion/queue-manager.c > create mode 100644 drivers/spi/companion/queue-manager.h > create mode 100644 include/linux/companion.h > > -- > 2.7.4 > -- With Best Regards, Andy Shevchenko