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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FACBC47255 for ; Mon, 11 May 2020 13:45:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2D7F7206F5 for ; Mon, 11 May 2020 13:45:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729766AbgEKNpH (ORCPT ); Mon, 11 May 2020 09:45:07 -0400 Received: from mail.baikalelectronics.com ([87.245.175.226]:49194 "EHLO mail.baikalelectronics.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729641AbgEKNpG (ORCPT ); Mon, 11 May 2020 09:45:06 -0400 Received: from localhost (unknown [127.0.0.1]) by mail.baikalelectronics.ru (Postfix) with ESMTP id EC8F08030807; Mon, 11 May 2020 13:45:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at baikalelectronics.ru Received: from mail.baikalelectronics.ru ([127.0.0.1]) by localhost (mail.baikalelectronics.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id b5TYIIyRMs46; Mon, 11 May 2020 16:45:03 +0300 (MSK) Date: Mon, 11 May 2020 16:45:02 +0300 From: Serge Semin To: Mark Brown CC: Serge Semin , Andy Shevchenko , Vinod Koul , Viresh Kumar , Dan Williams , Alexey Malahov , Thomas Bogendoerfer , Paul Burton , Ralf Baechle , Arnd Bergmann , Rob Herring , , , , Subject: Re: [PATCH v2 4/6] dmaengine: dw: Print warning if multi-block is unsupported Message-ID: <20200511134502.hjbu5evkiuh75chr@mobilestation> References: <20200306131048.ADBE18030797@mail.baikalelectronics.ru> <20200508105304.14065-1-Sergey.Semin@baikalelectronics.ru> <20200508105304.14065-5-Sergey.Semin@baikalelectronics.ru> <20200508112604.GJ185537@smile.fi.intel.com> <20200508115334.GE4820@sirena.org.uk> <20200511021016.wptcgnc3iq3kadgz@mobilestation> <20200511115813.GG8216@sirena.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20200511115813.GG8216@sirena.org.uk> X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Mon, May 11, 2020 at 12:58:13PM +0100, Mark Brown wrote: > On Mon, May 11, 2020 at 05:10:16AM +0300, Serge Semin wrote: > > > Alas linearizing the SPI messages won't help in this case because the DW DMA > > driver will split it into the max transaction chunks anyway. > > That sounds like you need to also impose a limit on the maximum message > size as well then, with that you should be able to handle messages up > to whatever that limit is. There's code for that bit already, so long > as the limit is not too low it should be fine for most devices and > client drivers can see the limit so they can be updated to work with it > if needed. Hmm, this might work. The problem will be with imposing such limitation through the DW APB SSI driver. In order to do this I need to know: 1) Whether multi-block LLP is supported by the DW DMA controller. 2) Maximum DW DMA transfer block size. Then I'll be able to use this information in the can_dma() callback to enable the DMA xfers only for the safe transfers. Did you mean something like this when you said "There's code for that bit already" ? If you meant the max_dma_len parameter, then setting it won't work, because it just limits the SG items size not the total length of a single transfer. So the question is of how to export the multi-block LLP flag from DW DMAc driver. Andy? -Sergey