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 A52BFC47257 for ; Fri, 8 May 2020 19:23:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8F43C20CC7 for ; Fri, 8 May 2020 19:23:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727769AbgEHTXW (ORCPT ); Fri, 8 May 2020 15:23:22 -0400 Received: from mga17.intel.com ([192.55.52.151]:4583 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726767AbgEHTXW (ORCPT ); Fri, 8 May 2020 15:23:22 -0400 IronPort-SDR: nUEWvKeS3JiCq5263IrrP/w9YK7hYoMh2nZ8Igm193I0yX+YFg+hRE3xmCojyrBmGRiXb+Fppq 36kCQhobjHEg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2020 12:23:22 -0700 IronPort-SDR: YBGQ2qrMBTesT4Bt1+Pp0hKYceuBkdo2goqmHCLg1MR8iBMQOLxRoyW8j/nNbEFXkmDo+F10yQ 8koC5HBDH51w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,368,1583222400"; d="scan'208";a="285577444" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga004.fm.intel.com with ESMTP; 08 May 2020 12:23:15 -0700 Received: from andy by smile with local (Exim 4.93) (envelope-from ) id 1jX8ab-005T6G-GW; Fri, 08 May 2020 22:23:17 +0300 Date: Fri, 8 May 2020 22:23:17 +0300 From: Andy Shevchenko To: Serge Semin Cc: Mark Brown , Serge Semin , Georgy Vlasov , Ramil Zaripov , Alexey Malahov , Thomas Bogendoerfer , Paul Burton , Ralf Baechle , Arnd Bergmann , Allison Randal , Gareth Williams , Rob Herring , linux-mips@vger.kernel.org, devicetree@vger.kernel.org, John Garry , Chuanhong Guo , Krzysztof Kozlowski , Geert Uytterhoeven , Chris Packham , Tomer Maimon , Masahisa Kojima , Florian Fainelli , Thomas Gleixner , Stephen Boyd , Jarkko Nikula , Phil Edworthy , YueHaibing , Linus Walleij , "wuxu.wu" , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 14/17] spi: dw: Add DMA support to the DW SPI MMIO driver Message-ID: <20200508192317.GU185537@smile.fi.intel.com> References: <20200508132943.9826-1-Sergey.Semin@baikalelectronics.ru> <20200508132943.9826-15-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200508132943.9826-15-Sergey.Semin@baikalelectronics.ru> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 08, 2020 at 04:29:39PM +0300, Serge Semin wrote: > Since the common code in the spi-dw-dma.c driver is ready to be used > by the MMIO driver, we just need to initialize the DW SPI private data > fields with Tx/Rx DMA channel handlers and setup the DW SPI DMA > callbacks. This commit introduces such alterations to the DW SPI > DMA/MMIO code. A dedicated DW SPI MMIO DMA initializer performs the > DMA channels request from the parental device (which is supposed to be > a DW SPI platform device). Then it checks whether the retrieved DW DMA > channels support LLP. If they don't currently we print a warning, that > further DMA usage may be finished with DW SPI inbound FIFO overflow > (nothing else we can do about it at the moment). Finally the DW SPI > MMIO DMA initializer sets the DMA-inited flag. > > Currently the DMA will be initialized only for a generic DW SPI MMIO > device declared with "snps,dw-apb-ssi" compatible string if SPI_DW_DMA > kernel config is enabled. Already in spi/for-next (see for generic suffix in spi-dw-mid.c). -- With Best Regards, Andy Shevchenko