Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp242252pxb; Fri, 15 Jan 2021 02:01:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJw7YWkBLRkJ+hvVdyUrdTsz0hWWWMChmUpKZyyGklefVhFwY6vXQ5FYj+b4GWwwZET4Rm0I X-Received: by 2002:a17:906:4a19:: with SMTP id w25mr7916058eju.153.1610704874645; Fri, 15 Jan 2021 02:01:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610704874; cv=none; d=google.com; s=arc-20160816; b=e+bHBSQubp4CovSyiifMjH7S5rseJbvyFibG2inG9WsDsQB4eqL9iA+Iu9wFliRtlu X8kVODp3XFm6+vya8+4pemCxXPh3dFRbKfHEwfkrzYQnmHdhhdHPvfeY+Ozd8SD1nm78 JEHx4qIanCbDhutA4fubenlzFRtYkLG8GqG2dy0R6IKqS2hK9RpIyb1B32wNuiOsldgP Hn8dCf5mkpVdf2LUhSNI7IDp7NiV0MNGGVttPz1z1AtfVeFDVNPiXzTFTCBqhQYIa1Tl CoGefQAiKwqFPsAqve9Kpuvqx3M71HVNK2dv7qfNQ2mTo8HjBxp42uO4JSKlAQTNOtMx UOWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from:ironport-sdr :ironport-sdr; bh=U1Y/dPUHRznJZABws0wGrG9UTkTrZJ+xWn4KgK1f5k4=; b=rrZD/OJaQ8oqJej/aomxo1fGEMC3Bxn7bCUM4bAds3KN0Mog7da2Je5VGe2B52buBj Gwd21Upt71ynbEtm5+LAE2aAF3tjNQxaQFEUPwODe9TW8OJLxSguvwJhUaXM6zR4FeuH AZqgqIcstQhEYsaF8Um6Xl+xYXr0Uij7n5Mk/MxXGDc1KTwYfyaBpVR+TedxyCoebwIq Ca8kcVb8+xon5b/Ypy1zVjQen9SaynkAAkZ4/Ie6gkys5QeBkTz2pTjSBOfz7M9siq7Z w321nDXcndDIZCOtMOrmXHEkCy87yOO1Fur1DUvDPubVATnFoyz5xabBr0DTzH4QPZuQ +ytQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lf25si3427205ejb.303.2021.01.15.02.00.50; Fri, 15 Jan 2021 02:01:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727144AbhAOJ5p (ORCPT + 99 others); Fri, 15 Jan 2021 04:57:45 -0500 Received: from mga07.intel.com ([134.134.136.100]:10891 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726385AbhAOJ5o (ORCPT ); Fri, 15 Jan 2021 04:57:44 -0500 IronPort-SDR: JFibVVLp4NHdqqOkBeKLfBgjiUEYzGY+6M3xm4M3bCPFJklM5YAehUEUxHvTNxGTu7RVyZgoH6 WCDzwbltLObQ== X-IronPort-AV: E=McAfee;i="6000,8403,9864"; a="242596624" X-IronPort-AV: E=Sophos;i="5.79,349,1602572400"; d="scan'208";a="242596624" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jan 2021 01:56:13 -0800 IronPort-SDR: Y+vTJRvOtOnc2M9E1Luw/iV6NiGYPWPSNpYEk80Kx/2xifV2gRs9nalv9YsPi1rhzyPcJ3ixZh ZD7jjQ8aFdTA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,349,1602572400"; d="scan'208";a="352762493" Received: from sgsxdev004.isng.phoenix.local (HELO localhost) ([10.226.81.179]) by orsmga006.jf.intel.com with ESMTP; 15 Jan 2021 01:56:10 -0800 From: Amireddy Mallikarjuna reddy To: dmaengine@vger.kernel.org, vkoul@kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org Cc: linux-kernel@vger.kernel.org, andriy.shevchenko@intel.com, chuanhua.lei@linux.intel.com, cheol.yong.kim@intel.com, qi-ming.wu@intel.com, mallikarjunax.reddy@linux.intel.com, malliamireddy009@gmail.com, rtanwar@maxlinear.com, lchuanhua@maxlinear.com Subject: [PATCH v11 0/2] Add Intel LGM SoC DMA support Date: Fri, 15 Jan 2021 17:56:01 +0800 Message-Id: X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add DMA controller driver for Lightning Mountain (LGM) family of SoCs. The main function of the DMA controller is the transfer of data from/to any peripheral to/from the memory. A memory to memory copy capability can also be configured. This ldma driver is used for configure the device and channnels for data and control paths. These controllers provide DMA capabilities for a variety of on-chip devices such as SSC, HSNAND and GSWIP (Gigabit Switch IP). ------------- Future Plans: ------------- LGM SOC also supports Hardware Memory Copy engine. The role of the HW Memory copy engine is to offload memory copy operations from the CPU. Amireddy Mallikarjuna reddy (2): dt-bindings: dma: Add bindings for Intel LGM SoC Add Intel LGM SoC DMA support. .../devicetree/bindings/dma/intel,ldma.yaml | 116 ++ drivers/dma/Kconfig | 2 + drivers/dma/Makefile | 1 + drivers/dma/lgm/Kconfig | 9 + drivers/dma/lgm/Makefile | 2 + drivers/dma/lgm/lgm-dma.c | 1739 +++++++++++++++++ 6 files changed, 1869 insertions(+) create mode 100644 Documentation/devicetree/bindings/dma/intel,ldma.yaml create mode 100644 drivers/dma/lgm/Kconfig create mode 100644 drivers/dma/lgm/Makefile create mode 100644 drivers/dma/lgm/lgm-dma.c --- v1: - Initial version. v2: - Fix device tree bot issues, correspondign driver changes done. - Fix kerntel test robot warnings. -------------------------------------------------------- >> drivers/dma/lgm/lgm-dma.c:729:5: warning: no previous prototype for function 'intel_dma_chan_desc_cfg' [-Wmissing-prototypes] int intel_dma_chan_desc_cfg(struct dma_chan *chan, dma_addr_t desc_base, ^ drivers/dma/lgm/lgm-dma.c:729:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int intel_dma_chan_desc_cfg(struct dma_chan *chan, dma_addr_t desc_base, ^ static 1 warning generated. vim +/intel_dma_chan_desc_cfg +729 drivers/dma/lgm/lgm-dma.c 728 > 729 int intel_dma_chan_desc_cfg(struct dma_chan *chan, dma_addr_t desc_base, 730 int desc_num) 731 { 732 return ldma_chan_desc_cfg(to_ldma_chan(chan), desc_base, desc_num); 733 } 734 EXPORT_SYMBOL_GPL(intel_dma_chan_desc_cfg); 735 Reported-by: kernel test robot --------------------------------------------------------------- v3: - Fix smatch warning. ---------------------------------------------------------------- smatch warnings: drivers/dma/lgm/lgm-dma.c:1306 ldma_cfg_init() error: uninitialized symbol 'ret'. Reported-by: kernel test robot Reported-by: Dan Carpenter ---------------------------------------------------------------- v4: - Address Thomas Langer comments in dtbinding and corresponding driver side changes. - Driver side changes to corresponding device tree changes. v5: - Add changes to read 'dmas' properties and update the config properties driver side. - Add virt_dma_desc utilizes virt-dma API. v6: - Driver changes corresponding to the device tree changes. - Restructure things to have less activity with the spinlock. - Save the slave config in dma_slave_config() and used in prepare time. - Addressed & fixed issues related to desc_free callback _free_ up the memory. - Addressed peter review comments. v7: - Change bool to tristate in Kconfig - Explained the _initcall() - change of_property*() to device_property_*() - split the code to functions at version checks - Remove the dma caller capability restrictions - used for_each_set_bit() - Addressed minor comments and fine tune the code. v7-resend: - rebase to 5.10-rc1 - No change. v8: - rebase to 5.10-rc3 - Addressed structural things and fine tune the code. v9: - No change. v10: - rebase to 5.10-rc6 - Used helpers in bitfield.h (FIELD_PREP ()) instead of bit fields to set the descriptor fields. - Removed local copy of dmaengine ops. - Removed custom API and used dmaengine callback & remove include/linux/dma/lgm_dma.h file - Moved dt properties to driver data. - Fine tune the code. v10-resend: - rebased to 5.10 - No change. v11: - No change -- 2.17.1