From patchwork Sat Sep 29 05:48:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 147815 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp1575187lji; Fri, 28 Sep 2018 22:50:05 -0700 (PDT) X-Google-Smtp-Source: ACcGV60wA5Wr4CyAt9Z9jevnHnbCautO8pvZmCFfgG6Ubekfjz1FBtoMcKCi0t3VN8ALUaZzs9Yv X-Received: by 2002:a63:f848:: with SMTP id v8-v6mr1599107pgj.82.1538200205009; Fri, 28 Sep 2018 22:50:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538200205; cv=none; d=google.com; s=arc-20160816; b=YCEqeR73Ej4x8xYTd85wE5chRaQ+dFxDDI4LtW+BcgtAYvfsKqjPJ9JhGjhxfVrHIN aK9v7sxQCg5pB0hIRfMSdSY/rCwjan/BkkR2QtQ9aDFCG7z/6lRHs9qigt0+h7XSwq2e OYXe6Ew1EneEudlY4WpyyuXCKcRb8uaSmT8tJ8VUFX8v0aFpTsSYVABMGcj794ji/xRK kMpka3KA3sYWqm56cHMQQH2QfpPtlFiItDO1Qcsvi+y/qbpL6sVgvzj/4bJ3+SwRPocp xfZ+UgaZZ9zPjxQs4JyG46k94emlHtsjjvJrWxWdX0a01bUWatEp5/iYyileNpM1cysw YuXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=ESGwK71J9MVIx0LSTHlmPcydTEacdFoGT0gjQtbEMzs=; b=p1rpyj3YgBfLZIVqK6LqXzZdRkBxdQo8U4BdvBpHLKd4A1SLkfDbnMORyGefZBfzTE Gge4NSplNYiLyjCX6HK1feBNR6DE0sMg4U7vOdOC1XN/RRkw287U3OBxu3kTSbzPkNGx swPGpfIfnXzjaRtNBV2w/uoW0HkE9tAkyeL+XSh6izaQRQ86EbEpW7hfCuCaDWa1w4dm a/0YPosaeh3EnR+cUXgtzaljyPEzZItrO4h+m7uoF/Vsp3Yuy68NtYCBFTsosmz1Z3R0 STDGVeUN2klsbtwK9Z4N7Zii0/mpX/RQNr35LNR5lX24g3vIilJIIrAWkVMDGkq34K9W VGVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gNEOE6eC; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v10-v6si2951754plz.158.2018.09.28.22.50.04; Fri, 28 Sep 2018 22:50:04 -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=@linaro.org header.s=google header.b=gNEOE6eC; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727501AbeI2MRG (ORCPT + 32 others); Sat, 29 Sep 2018 08:17:06 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:46084 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727407AbeI2MRG (ORCPT ); Sat, 29 Sep 2018 08:17:06 -0400 Received: by mail-pg1-f196.google.com with SMTP id b129-v6so5860585pga.13 for ; Fri, 28 Sep 2018 22:50:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=ESGwK71J9MVIx0LSTHlmPcydTEacdFoGT0gjQtbEMzs=; b=gNEOE6eCXEHf3IE6h9XVE5pgCYM1vzkbspyms3szdjJJ+l/Uq8cZB4tj/PaIUo4iEe Fy4S1kh/qfy9w+0/t5csp252mRMKvC8gIWadoxyMe3xLkyRXSNZjqphoThcbDOB2cPjl i1CULVEXrpsc66q3rF7biFV6/30cJ876Jo/CU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=ESGwK71J9MVIx0LSTHlmPcydTEacdFoGT0gjQtbEMzs=; b=j/TC7CHcTxAuJ2P5VJ2gKIKhYfPpvJX2hUKsDEaGuZIPYmyA/WfJV8+kDZR5AzzXVu cpIGQ3Meoq7Xc4defEvNxRtR3gkgrRAynkv4iNjcGCkDIjHJW4+W4DHHawp/T/NfryPt UvV7FPJDtX6Jrcn284pQ3oqQhXuzr29KY5ShzeSu6dEC6hwM6fvhq34kahG+beQE5AUN aDoXp5jMCqzCoAXTXlDGc6Bhy/cHdmQdZl4d8vZG/XLKm7rqylUIeKcmt7hSxWcIc0hL c1S9nnVU041ZeSBKvi9R2T/uaZvtbS6u7zO4izAW2FTWiLGrLBu6LkvbSJahAyQwGS1i yIkQ== X-Gm-Message-State: ABuFfoiWo4OxbFUUu9MjcEvFdBSyKHca4GTbYLxudHB7TpikM//MjMdv L3+hcRkjeqO3of49rVUiEBdAfYN7qyb/rg== X-Received: by 2002:a63:8442:: with SMTP id k63-v6mr1583392pgd.388.1538200201941; Fri, 28 Sep 2018 22:50:01 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id i80-v6sm11118049pfi.87.2018.09.28.22.49.58 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Sep 2018 22:50:00 -0700 (PDT) From: Baolin Wang To: dan.j.williams@intel.com, vkoul@kernel.org, eric.long@spreadtrum.com Cc: broonie@kernel.org, baolin.wang@linaro.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/7] dmaengine: sprd: Remove direction usage from struct dma_slave_config Date: Sat, 29 Sep 2018 13:48:59 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The direction field of struct dma_slave_config was marked deprecated, thus remove the usage. Signed-off-by: Baolin Wang --- drivers/dma/sprd-dma.c | 3 --- 1 file changed, 3 deletions(-) -- 1.7.9.5 diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c index 38d4e4f..c226dc93 100644 --- a/drivers/dma/sprd-dma.c +++ b/drivers/dma/sprd-dma.c @@ -847,9 +847,6 @@ static int sprd_dma_slave_config(struct dma_chan *chan, struct sprd_dma_chn *schan = to_sprd_dma_chan(chan); struct dma_slave_config *slave_cfg = &schan->slave_cfg; - if (!is_slave_direction(config->direction)) - return -EINVAL; - memcpy(slave_cfg, config, sizeof(*config)); return 0; } From patchwork Sat Sep 29 05:49:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 147816 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp1575277lji; Fri, 28 Sep 2018 22:50:13 -0700 (PDT) X-Google-Smtp-Source: ACcGV61p+0GJifXRjPd3uB33I6Sv378rz02MtwMPJLr75yPz+ZpvaCCV52b8ZHikvTbMInQdU52G X-Received: by 2002:a17:902:7084:: with SMTP id z4-v6mr1724838plk.236.1538200213311; Fri, 28 Sep 2018 22:50:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538200213; cv=none; d=google.com; s=arc-20160816; b=imtyIROVU4sq3l3QbvF3c0ry6Vc9VUJtmFb/h2V+KX2UbnMLB8j4gHt+iz37AEDZjS 6a1J+F/WZTEfPXG3awZx1R65Q8BGT6C7kFjjCQSUhG6+9uOUCH1fm5AGuMewfk50jiaW CqVaKv43CewN5t0hkc0toJnzHNWD/skRUWnCrRue00Y5MxLJFxLiEDeIQYSMSVYHyeQ9 CBZRKIsfx6wHuNekmllfq0xOBjHDVLJRTvadojUjXc3O1H5wYZc/lhdJfGF1urc35Gh0 6qdfqBn6gxWCxVJg6YCE4LBwzxmJLx60jCPyR/1piywlvJNSDFcTzXhJbR3MRKQ167EM xMXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=sy/AQFQMaVt4C0zh+b0IOP8wDwMdYLhdTc2K4kZ/W/E=; b=PoUMqKpsWCUry6DCL5qHUmcGgnxm9aVrd5TpNU55eN4Os0IAZmeg9JuE4HiS6x8Sk1 z1oe5FeZ5twuW62WJB0g5YLyZad15F24NE1Jt5yCCtAj8UJkIZMnPddrt7pMgD/lkHlT hzAP9D0OugJFju6LnJrZVhiffU48/iu2mgL8hgvGh5oU2FUUfDoJmf/ArH87MSo+ByK8 mM588Y54B3nFWQrF7Tls9joU40747ZY/QJuf+zs4lhEBafjsY1zwL8t8B4MySjYs2gi3 X0lP2i/ylzrECeWz9HwfYsHTZNHKGn6qhQMxctzOCM42NHBVU+NGdxnx7l6hlskT+wsY 4lNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZkhC3ycx; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d36-v6si6848259pla.446.2018.09.28.22.50.12; Fri, 28 Sep 2018 22:50:13 -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=@linaro.org header.s=google header.b=ZkhC3ycx; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727526AbeI2MRK (ORCPT + 32 others); Sat, 29 Sep 2018 08:17:10 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:34331 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727505AbeI2MRJ (ORCPT ); Sat, 29 Sep 2018 08:17:09 -0400 Received: by mail-pf1-f196.google.com with SMTP id k19-v6so5687662pfi.1 for ; Fri, 28 Sep 2018 22:50:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=sy/AQFQMaVt4C0zh+b0IOP8wDwMdYLhdTc2K4kZ/W/E=; b=ZkhC3ycxpJc5Fbohpuuz/zGXQ4Lg5WaCwHn4bHPoSg9nAEJ4BLLLxDNL3mgbp45CDA hG43S+7ghflX3AsBUKVTsEb8rQlc0Ca8dAvxi0G6+arKBMtT/7gjUddGLZOygut7Z9Kc KTZvD8bUAlkWMdGPY06KOAbZ1npPXRk3ssn38= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=sy/AQFQMaVt4C0zh+b0IOP8wDwMdYLhdTc2K4kZ/W/E=; b=rhnMeXdpv0CK8qNMJ/nv/nB3k4RualhYyUyZyEjBWfRMAOlC1f+r/6ulVTQh7h505/ YQ7UJ42megelIHZkG8/FgWNpg9GOOCgNCKJ2lG2vUyoD0PERimUo2XR9wEGpSxbKFbLb LpcctlKMqzEtCqZk6JrWcTGN6+YfYushzl1ALfTwjil7F7sajHTKP4kRHEblXNeP/c2T eLnyf3ME6vxk6p1W8yz27d9DsCBk6KPp/AY7u78GFyBpsxoAFClFDG+UXl1XBfFl2iq8 N5q1DBwkdeQNMgryy9VDZlQTqKu6+pymw+w7dGCUh62qZchDKUpgN9CugQ82xrHgU+n5 pbNQ== X-Gm-Message-State: ABuFfohsPvLZobImsIc4T44/rWc04kb5UHm9lrLxZRI0vhvh5GhcgSLa wfRlqyO3QbSZIzkYmSYYIC0gCg== X-Received: by 2002:a65:4103:: with SMTP id w3-v6mr1605709pgp.284.1538200205296; Fri, 28 Sep 2018 22:50:05 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id i80-v6sm11118049pfi.87.2018.09.28.22.50.02 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Sep 2018 22:50:04 -0700 (PDT) From: Baolin Wang To: dan.j.williams@intel.com, vkoul@kernel.org, eric.long@spreadtrum.com Cc: broonie@kernel.org, baolin.wang@linaro.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/7] dmaengine: sprd: Get transfer residue depending on the transfer direction Date: Sat, 29 Sep 2018 13:49:00 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eric Long Add one field to save the transfer direction for struct sprd_dma_desc, which is used to get correct transfer residue depending on the transfer direction. [Baolin Wang adds one field to present the transfer direction] Signed-off-by: Eric Long Signed-off-by: Baolin Wang --- drivers/dma/sprd-dma.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) -- 1.7.9.5 diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c index c226dc93..4f3587b 100644 --- a/drivers/dma/sprd-dma.c +++ b/drivers/dma/sprd-dma.c @@ -159,6 +159,7 @@ struct sprd_dma_chn_hw { struct sprd_dma_desc { struct virt_dma_desc vd; struct sprd_dma_chn_hw chn_hw; + enum dma_transfer_direction dir; }; /* dma channel description */ @@ -331,6 +332,17 @@ static void sprd_dma_stop_and_disable(struct sprd_dma_chn *schan) sprd_dma_disable_chn(schan); } +static unsigned long sprd_dma_get_src_addr(struct sprd_dma_chn *schan) +{ + unsigned long addr, addr_high; + + addr = readl(schan->chn_base + SPRD_DMA_CHN_SRC_ADDR); + addr_high = readl(schan->chn_base + SPRD_DMA_CHN_WARP_PTR) & + SPRD_DMA_HIGH_ADDR_MASK; + + return addr | (addr_high << SPRD_DMA_HIGH_ADDR_OFFSET); +} + static unsigned long sprd_dma_get_dst_addr(struct sprd_dma_chn *schan) { unsigned long addr, addr_high; @@ -534,7 +546,12 @@ static enum dma_status sprd_dma_tx_status(struct dma_chan *chan, else pos = 0; } else if (schan->cur_desc && schan->cur_desc->vd.tx.cookie == cookie) { - pos = sprd_dma_get_dst_addr(schan); + struct sprd_dma_desc *sdesc = to_sprd_dma_desc(vd); + + if (sdesc->dir == DMA_DEV_TO_MEM) + pos = sprd_dma_get_dst_addr(schan); + else + pos = sprd_dma_get_src_addr(schan); } else { pos = 0; } @@ -804,6 +821,8 @@ static int sprd_dma_fill_linklist_desc(struct dma_chan *chan, if (!sdesc) return NULL; + sdesc->dir = dir; + for_each_sg(sgl, sg, sglen, i) { len = sg_dma_len(sg); From patchwork Sat Sep 29 05:49:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 147817 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp1575280lji; Fri, 28 Sep 2018 22:50:13 -0700 (PDT) X-Google-Smtp-Source: ACcGV63etH0umyVFC8aTDKuViKbUsTu9UgkVgiCjbXqSz1S6ffZnui6panSVUsAN6ypnX+DZIa66 X-Received: by 2002:a62:670a:: with SMTP id b10-v6mr1718038pfc.243.1538200213715; Fri, 28 Sep 2018 22:50:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538200213; cv=none; d=google.com; s=arc-20160816; b=wq4swtddofLbFM6mXJql+OyGLqykxAoBU5NMMEz94sHhEO4zeW+X3Hi9iA7lAVzzeP c8AZIFSCnTVAqidWUrcT7KOzEkogtsJUEKSd1kz7EMIZ2nB3vFXerXgXJGq7YrwZzV+S WwcmieYiEVL1iHzIAfzo7oMBE9OlLTNP2o869Ha3+TnmfO+2pQ+tHcU8DpmmY9GOQxnh dlsU8rdv7/7edbO/KjOOa5kG1h7sgzIHbjdC3KRDTn+0HqJlgJXOHdCuF+G11ETb1Rwi e8k5nne//3Jhw9JSa95oNnczeLMGtEQqqMZOvvtv94JqdsepIwWowkbn+E+BUkf+WU+5 YWRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=Ipu0OKiVTAGWTLE4fg/nM2ymSy+8y5EVSd0lvjhlhp8=; b=mRrTMfLo30+jbv9BDCE2aO9ZFUsWXhpy/s2QoWzIauNF/pS/G2PI4dBuA1ZnKZNFZm A6LuXILt6kRnAdR3GnNnZKp+hSg2mHMnl8XetNQ5+Rgbu6u0zP4Hu48fZu/lxj+jFrDy YA6rAodMwPlZh7TQY7OHgLH7Iq6Pkko+qmp5e2n75v7LnRYMhOGr7JjcRyJsLvYOCVE6 xtcMlw0IIjg2XDeRIDlggjRrrKrQZBYUQT9NGAx/ltOmG6W+rftnJ4Pa45hdJ8q1+vUb WhJNrKK6HWoKhnohNw2m0rwEtAvW6cj1Hnh8TlOpvJ1DVtqO5LFNjW2FCDyeYSgDB8h7 nf0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YqOtdihF; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d36-v6si6848259pla.446.2018.09.28.22.50.13; Fri, 28 Sep 2018 22:50:13 -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=@linaro.org header.s=google header.b=YqOtdihF; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727551AbeI2MRO (ORCPT + 32 others); Sat, 29 Sep 2018 08:17:14 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:38240 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727528AbeI2MRN (ORCPT ); Sat, 29 Sep 2018 08:17:13 -0400 Received: by mail-pg1-f196.google.com with SMTP id r77-v6so5897406pgr.5 for ; Fri, 28 Sep 2018 22:50:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=Ipu0OKiVTAGWTLE4fg/nM2ymSy+8y5EVSd0lvjhlhp8=; b=YqOtdihFkLN2j80Ggp47W6x2EUCNJKJd/quxmLhMX+oR42FFg7B4fxe0615eAXeWi5 HhSIDrOdGDmTKgjwroJ+6xo2GueD3HAG/8OgW8BJSQGodsehaqMRWy5Uy4QooYl74Qaq 7D2+jDJPkJWbqk/6HBNOk3C7tAmrgbG4EAYUo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=Ipu0OKiVTAGWTLE4fg/nM2ymSy+8y5EVSd0lvjhlhp8=; b=jXsyRibr4Cpm0ely4hCLZmO/TauCxb/ycD775woOo1K4ko01KT6nFzvfz9wJ2FOtP6 R7DVbl8YPfEuqQovV988qP+O/MBtbSHbGHi5AmHMfhVxWMg/9WekwcBSDWu0Vc3spHaF 1r+Y8ggme4c/pMx/RaogBuSn4ZIIaulVml41xsuHB0V7mR+VNmlAnfFRnDp2v4eVv+p7 rZJi3uV8Oiz3T/I3FX4UQVpOrJ/YhT9H2IZtr0/FoMTyyMU36Ts+jZP3u1jY5G5+g1Mm px/Quv1mFf4FcAdhSZwuDygAiqioG5XcH3I1iBB4kC3MhjYCaONqz2OqQQHssFZ/iSb9 d2/Q== X-Gm-Message-State: ABuFfoh0a4waDbaMZsiDxxKqsDGM8qcYC0s8vxq8lxVSdOo/6yiSiV95 XS3WV8orAYGxlugO/K0GirxRZg== X-Received: by 2002:a63:745e:: with SMTP id e30-v6mr1601662pgn.446.1538200209055; Fri, 28 Sep 2018 22:50:09 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id i80-v6sm11118049pfi.87.2018.09.28.22.50.05 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Sep 2018 22:50:08 -0700 (PDT) From: Baolin Wang To: dan.j.williams@intel.com, vkoul@kernel.org, eric.long@spreadtrum.com Cc: broonie@kernel.org, baolin.wang@linaro.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/7] dmaengine: sprd: Fix the last link-list configuration Date: Sat, 29 Sep 2018 13:49:01 +0800 Message-Id: <9735715d9e9fb4e6fbbe19643db1ce80ef51d37a.1538199697.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eric Long We will pass sglen as 0 configure the last link-list configuration when filling the descriptor, which will cause the incorrect link-list configuration. Thus we should check if the sglen is 0 to configure the correct link-list configuration. Signed-off-by: Eric Long Signed-off-by: Baolin Wang --- drivers/dma/sprd-dma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 1.7.9.5 diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c index 4f3587b..e6a74dc 100644 --- a/drivers/dma/sprd-dma.c +++ b/drivers/dma/sprd-dma.c @@ -697,7 +697,8 @@ static int sprd_dma_fill_desc(struct dma_chan *chan, hw->cfg |= SPRD_DMA_LINKLIST_EN; /* link-list index */ - temp = (sg_index + 1) % sglen; + temp = sglen ? (sg_index + 1) % sglen : 0; + /* Next link-list configuration's physical address offset */ temp = temp * sizeof(*hw) + SPRD_DMA_CHN_SRC_ADDR; /* From patchwork Sat Sep 29 05:49:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 147818 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp1575296lji; Fri, 28 Sep 2018 22:50:15 -0700 (PDT) X-Google-Smtp-Source: ACcGV60+1j9o59FzicIoN1+NmI+NohZRyT5ksG7q8wwb9ptyQLXegg7JsIzoyxKTVvXp4c/N8kTN X-Received: by 2002:a63:81c8:: with SMTP id t191-v6mr1557394pgd.399.1538200215058; Fri, 28 Sep 2018 22:50:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538200215; cv=none; d=google.com; s=arc-20160816; b=BQWw1jNg+ZOfJkbkZGhsoB9mZM4MjcBLNW2LkJC+aQPmjAFnwaYch/esLdG/k3inRv KqfeTLiEDbYrGlpwth8rw3ccvntvvx2rxX3Deo9w3phGfEZriWsDgeM59nrbfHTFDRDA dOjvDm1bnJVWic6tvNXhR4A7m/Q/jflkltIwO5T6jHcOh7CRIMpM0t8A1C+3dxp5UtWX TChUhUrlD+fXVY8oRBNOJM35BcdVFCzgn4veQYtjbhaDt6QJLJFA82HGUfG7RY8AMFUv ol5VVUag4rjifcrpYvT58jTJ1ieOYikWIOt1UmUMf5fx9G22q/bcV+BPq4XTcyYYmz6Z EoTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=VKu6Lyuuq1HCg2vjK0SKqBKedEZKBAaQkFejaBLFPf0=; b=BsBkfjweU9CZYdiXCiuYTuzpAy/8pRKDDGopBGCSG6emPixkDkZMZcr+0U7ctRsJ9/ WvtmKWqpAJBV+3GfbzUKlCr0YiVqIHB7+mEcioq4VeeKHSZEg/+9dC0VlCuPT1Bt3JVk sNtwr1U1jyvkc1Btx4gE/M/Q4Fs3P/pfug1jUQgLQHnkUsgcncNm7iM6vb+BSorl8Pbi nHGexm3H4fRQSuL0O/tvVnikPKk+jWaa4nNIkii8do/NQIuzoKsqxkahTehD1HNjBb7v XSKGzocJgEcm0BD9J48I0jd0/nloIhDZTnRovF1Wnn8O6uKlatRNKMyA5+bj29GiNjK5 ZxOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Qb2H0IiX; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q10-v6si6576963pgl.522.2018.09.28.22.50.14; Fri, 28 Sep 2018 22:50:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dmaengine-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=@linaro.org header.s=google header.b=Qb2H0IiX; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727528AbeI2MRQ (ORCPT + 3 others); Sat, 29 Sep 2018 08:17:16 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:45380 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727393AbeI2MRQ (ORCPT ); Sat, 29 Sep 2018 08:17:16 -0400 Received: by mail-pg1-f193.google.com with SMTP id t70-v6so5864954pgd.12 for ; Fri, 28 Sep 2018 22:50:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=VKu6Lyuuq1HCg2vjK0SKqBKedEZKBAaQkFejaBLFPf0=; b=Qb2H0IiXPCuD8odQfq1Yamo/SKGFNg2b7kL6xEAWg3+elPiIo4YbrXHFPwc3cSSSfb q5M3wEb87m24TQLVuaaEphVnaC/QLNnL+kolsOklPoVk6MvA7pYqVwOf67gY4YrNAfoy rUtJiy++oR54JMpkDsSVi0K12BLUvfCetQB+I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=VKu6Lyuuq1HCg2vjK0SKqBKedEZKBAaQkFejaBLFPf0=; b=cvGaIt7BMhxLBuWzSH14LnhsnbonTo4kxc4AUqw1RbgGU15KqoHDUl/OGOkwDl8PnB nhHD7l+gPHXXjZCfhQZ+irUVcyxlv56GKDivTaEcX2A8jWgagQ8TV+/5Qn1yl+H8A+Bq KRQ3cici5EL3lyTzwGvHBwdyO5pvbtGNqh9W28J0AphHwnP4ARo86NYa0jBeLopZB64K BobQ4cAQZ2pAeZuALzvE0cJMaHk8cmKoWh0pLz6uUUHzC9rpugUKRz5J9T7bosnIds97 xlXQf3MN1sFHT6WIp4VOFsXI28kc3L9x85XWV4pJ3GatewqW94j8m3dViRpH9mmfT2dq GgdA== X-Gm-Message-State: ABuFfoivi71thg+ipDq7qXiVxJS9IuyTgqieAEHmebuMZTh0rlswoXZk gF4xiNSBP2zBzFCzPQxP5AGLTw== X-Received: by 2002:a62:c42:: with SMTP id u63-v6mr1737797pfi.43.1538200212273; Fri, 28 Sep 2018 22:50:12 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id i80-v6sm11118049pfi.87.2018.09.28.22.50.09 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Sep 2018 22:50:11 -0700 (PDT) From: Baolin Wang To: dan.j.williams@intel.com, vkoul@kernel.org, eric.long@spreadtrum.com Cc: broonie@kernel.org, baolin.wang@linaro.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/7] dmaengine: sprd: Set cur_desc as NULL when free or terminate one dma channel Date: Sat, 29 Sep 2018 13:49:02 +0800 Message-Id: <3a42dff7df19aa14d61b95f81ff22a7e16939ecd.1538199697.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org From: Eric Long It will be failed to start one new transfer if the channel started one none interrupt transfer before, since we will only set the schan->cur_desc as NULL depending on the transfer interrupt now. Thus we should set schan->cur_desc as NULL when free or terminate one dma channel to avoid this issue. Signed-off-by: Eric Long Signed-off-by: Baolin Wang --- drivers/dma/sprd-dma.c | 1 + 1 file changed, 1 insertion(+) -- 1.7.9.5 diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c index e6a74dc..1b39661 100644 --- a/drivers/dma/sprd-dma.c +++ b/drivers/dma/sprd-dma.c @@ -439,6 +439,7 @@ static void sprd_dma_stop(struct sprd_dma_chn *schan) sprd_dma_stop_and_disable(schan); sprd_dma_unset_uid(schan); sprd_dma_clear_int(schan); + schan->cur_desc = NULL; } static bool sprd_dma_check_trans_done(struct sprd_dma_desc *sdesc, From patchwork Sat Sep 29 05:49:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 147819 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp1575344lji; Fri, 28 Sep 2018 22:50:19 -0700 (PDT) X-Google-Smtp-Source: ACcGV61cWPWYM7WGvuXl88bJIhPfMHq1hp2V0EpxL1US3XVHy5Bq5HTYt1ay/Wlx/DdcZOyyo3Is X-Received: by 2002:a63:cf0e:: with SMTP id j14-v6mr1555118pgg.195.1538200219262; Fri, 28 Sep 2018 22:50:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538200219; cv=none; d=google.com; s=arc-20160816; b=reAj7kBFdPh6qcATUpjYI+ooq/glZI337rT71d8f9e5EYp5AyxqbVGF1/ATNKjxAhE 99kZc7BSM6czWs01j99LjRK3Ix6q91OuKAeMjQS2ESrAqj7kDogng2w995uLQi1fK9fq XLc94oFGBDSrwJoax+vkyRlc1Pzpu1ZES8h5zWgR0fv36VKuiwqoSLAKWQdoA7k5hF5j u1D1gBH8uHlA5zcUVqG7BzgIzY6muUpaIU5rOAssY2ZBkdpQqpm+G8LsmZFOa/+1eMuf qLkKAJS2pKn8TdrU0aSZtQbIsmSlMstEDCUwrD2SZbvjioMqjd4OaTKgyT1UjQLUDR9S Nt6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=Ig1u0SVMDYDTOMNzrGMHK+hoBj16/oLyBxKtaJt37JU=; b=yMOQarWcSjTflW81ykA3kz2+F15rK22G7RV/N/xoRF9ZGmxDT9Tk1jZ6PwIuJWkhhR L9Ah79d1Xjmjo0XPBN76yDAUFCE9WnC3uNlCJGwTA3zgvESo/bYNXrEfwegH/5PJBwFc n3HOR2qiIT7WajIO/aFcn0aEdf9wi2N9eV3ZDRk+hAqnGExDHunk1melufR9cpayD3p6 hmPwfu4aHgqqpPgm4a47AXTA3F0iJ368gtPxJeOe5fXiIISW0NJWqmfrgh8DqGCjZUht Vg8VtXRFZSsZ7i5Ijeu7liKCfOoLD6C8aRT/yvfPaGe48sAc2qyCbp3oSuxvYLDraiiv ZUmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XezMXmNa; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d37-v6si7031796pla.40.2018.09.28.22.50.18; Fri, 28 Sep 2018 22:50:19 -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=@linaro.org header.s=google header.b=XezMXmNa; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727604AbeI2MRU (ORCPT + 32 others); Sat, 29 Sep 2018 08:17:20 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:35850 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727393AbeI2MRT (ORCPT ); Sat, 29 Sep 2018 08:17:19 -0400 Received: by mail-pg1-f196.google.com with SMTP id f18-v6so2382002pgv.3 for ; Fri, 28 Sep 2018 22:50:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=Ig1u0SVMDYDTOMNzrGMHK+hoBj16/oLyBxKtaJt37JU=; b=XezMXmNaRKQSJ6O7CK0Mc2+4mFLPQOgXEpsEsnVB2F5WItgYc+VNlacf3o5VCqZ3fZ elgzCOz+EIsJuwUJRO8e04u0P/T/zGFB8JU4R62W9ITRWYlnVAr6Azz4CvLNV64/FPsa si1S4opSex+TcxopZgf4dsOrYXQq5Up/JCEnM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=Ig1u0SVMDYDTOMNzrGMHK+hoBj16/oLyBxKtaJt37JU=; b=gcvk2tVMVZAl+5P0/cw+WAFpXqwVcTfyK5cUYixJolmT8vUXcWTt7R4B/RnScUolOc Z3eXRU/MxrmYL5PwzIxS5w46+DD7WuLllb3pcTgdAYfqtyNe4tjrZ4jsHnowNL0X6BI4 a6ILRcuhmartVUsLQRp2anyl+kiSUnL5UQV7Hg47JcrIxalIHJmWqyP5kvFvDv7tDeRt VG/gm31fNIBqRdBQOaMoQzgVZHwqCBMTSJ9Y2cjCJL9eXZwnwZr4Mti0SeQGD/qlwRvP KnzK+cDWgLRvzX1j/GHAGeiSMxHDvl5qXQhFJNwqvEbLA94iQxe/KSDfKl/oIvFX3U0/ uW0g== X-Gm-Message-State: ABuFfojE/Qg14DDmr1xcQwBtr4Jh42Gf2WjKcklscslyYvlBNpQZEiVA 56cfvIGav5rwJVFYjZx8wfUXpg== X-Received: by 2002:a17:902:585:: with SMTP id f5-v6mr1718464plf.7.1538200215637; Fri, 28 Sep 2018 22:50:15 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id i80-v6sm11118049pfi.87.2018.09.28.22.50.12 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Sep 2018 22:50:14 -0700 (PDT) From: Baolin Wang To: dan.j.williams@intel.com, vkoul@kernel.org, eric.long@spreadtrum.com Cc: broonie@kernel.org, baolin.wang@linaro.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/7] dmaengine: sprd: Support DMA link-list cyclic callback Date: Sat, 29 Sep 2018 13:49:03 +0800 Message-Id: <5512ed9fc0c63cd05a56defd79ab3b6a60a8acb1.1538199697.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eric Long The Spreadtrum DMA link-list mode is always one cyclic transfer, so we should clear the SPRD_DMA_LLIST_END flag for the link-list configuration. Moreover add cyclic callback support for the cyclic transfer. Signed-off-by: Eric Long Signed-off-by: Baolin Wang --- drivers/dma/sprd-dma.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) -- 1.7.9.5 diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c index 1b39661..cefe42f 100644 --- a/drivers/dma/sprd-dma.c +++ b/drivers/dma/sprd-dma.c @@ -463,7 +463,7 @@ static irqreturn_t dma_irq_handle(int irq, void *dev_id) struct sprd_dma_desc *sdesc; enum sprd_dma_req_mode req_type; enum sprd_dma_int_type int_type; - bool trans_done = false; + bool trans_done = false, cyclic = false; u32 i; while (irq_status) { @@ -478,13 +478,19 @@ static irqreturn_t dma_irq_handle(int irq, void *dev_id) sdesc = schan->cur_desc; - /* Check if the dma request descriptor is done. */ - trans_done = sprd_dma_check_trans_done(sdesc, int_type, - req_type); - if (trans_done == true) { - vchan_cookie_complete(&sdesc->vd); - schan->cur_desc = NULL; - sprd_dma_start(schan); + /* cyclic mode schedule callback */ + cyclic = schan->linklist.phy_addr ? true : false; + if (cyclic == true) { + vchan_cyclic_callback(&sdesc->vd); + } else { + /* Check if the dma request descriptor is done. */ + trans_done = sprd_dma_check_trans_done(sdesc, int_type, + req_type); + if (trans_done == true) { + vchan_cookie_complete(&sdesc->vd); + schan->cur_desc = NULL; + sprd_dma_start(schan); + } } spin_unlock(&schan->vc.lock); } @@ -692,9 +698,6 @@ static int sprd_dma_fill_desc(struct dma_chan *chan, /* link-list configuration */ if (schan->linklist.phy_addr) { - if (sg_index == sglen - 1) - hw->frg_len |= SPRD_DMA_LLIST_END; - hw->cfg |= SPRD_DMA_LINKLIST_EN; /* link-list index */ From patchwork Sat Sep 29 05:49:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 147820 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp1575369lji; Fri, 28 Sep 2018 22:50:22 -0700 (PDT) X-Google-Smtp-Source: ACcGV61kWejavbXdyp2HIOiKXF6Tv8mdj2H07QmR+epnb47ZXj0XnapouCRjbBtnpAXYo4t3Q+MN X-Received: by 2002:a63:2d43:: with SMTP id t64-v6mr1621063pgt.128.1538200222253; Fri, 28 Sep 2018 22:50:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538200222; cv=none; d=google.com; s=arc-20160816; b=rdt5ohyghdTXlzcDwt1mbp0zwxA91nAK2zsDZZgyRdXO/yLv3YODkbv4jn2557hS4b GXqHL5fcKXOWQywEeXJ9gScMmAg0B81m41p6IWIRxUGuftWK8Gx/v5OdDq8UBBaxcnmg rx4qb5DWUCp0lYO6d4kmD3vhT80Snj0x80gPWE/rLtjZld2WTu9x3BF+8dEO7C7W2Eja CsEvjNHwYbUJVbRmH+av2qdlDc88EYVs65tdbuUeOio+BCSx8ocrMD5/L+oq62hjfu5d gR7kimTr7WfQEAoV4feguM9Q5kgz4V6FRMHN+GT05XwGbw5MP4VvQex2slG4RLn4C38M nnLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=iWr4gpxLtZb6+cJ6KwEXZgyRLa7YNF4Gx04rrpmRjF4=; b=VtXmi5neiHwh3UM+0Mq0Tp/humXSHQDQNlgQxYPwYZaBJzSVceWwSCDTzr1a3jMzN8 cdH+NChCvu8y2c32G2ypr/Pr6n/usrlnzaYpaarxOKmRSHaVmsLbCRxLtT9iNgViWXqY DIpm+z1ew+k+bRpkSvqwdOKBw2Nq8edsM/XBi2jiND8fzGVraS/lpyGF5I6SQ9wDJihd SnR+BvO1TAuFOPJgPnkiZBxKIBEEYB4V3zcp1icEisliGquLM0EUldYH2GIt5hKV46nV Tcj4+UZDPieAi/nXtRWDlBLWy3fWmNsYWGswFGe6zmaM8TF/tu1BLvyBmNCKYghT1kj1 /xDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SpcJNTqT; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d37-v6si7031796pla.40.2018.09.28.22.50.22; Fri, 28 Sep 2018 22:50:22 -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=@linaro.org header.s=google header.b=SpcJNTqT; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727625AbeI2MRY (ORCPT + 32 others); Sat, 29 Sep 2018 08:17:24 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:35856 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727431AbeI2MRX (ORCPT ); Sat, 29 Sep 2018 08:17:23 -0400 Received: by mail-pg1-f196.google.com with SMTP id f18-v6so2382073pgv.3 for ; Fri, 28 Sep 2018 22:50:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=iWr4gpxLtZb6+cJ6KwEXZgyRLa7YNF4Gx04rrpmRjF4=; b=SpcJNTqTP5x6SwzpklQOKZetxKCuRC+EqICzW67gXkEAbmbGD05qOGayux2q7aWIVG nSiIRP/OKZ13BMWQWJQ8ern6FR3J237gXnqlSJB/I0qQvG1KRBoDIywCerw1VPxcEnNQ jKe4JtvznBmOThO1WWA5a4VB97YjcED3IJTGU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=iWr4gpxLtZb6+cJ6KwEXZgyRLa7YNF4Gx04rrpmRjF4=; b=RCxkBbkugPZUQggLOFqo3q/W4zBwJatzGISeGS20dqOZsRv/w8sG7E36SSofWWg7y0 +zrQVDyIWjSR5bzSh49TABBHxM9MJfVOKX0ludQ/6m/VhBPzU3VIdFO29pdBrqsMwjvA YL7Yo9mMu81zMc5vpPDhgTziVtoZ5Wm1nWTwQwWh84FZr54s/icTP8krtpsR0oiVzY68 5Tnu1Gq8wCu0p6laKv9UAjRfCbIkaS8BcDP44FtCkbRKPXDxbqdJvWH5fyuIlRJgf+zq 0qXfCWOPcYonHykXvLXWI7eHBpzWrQDC/jDMBCLMGXtVERqE4Cvf/GL4VeNVfebPNOMs MYnw== X-Gm-Message-State: ABuFfojvR9vdtNBXCySHGMjWgcwNsejBW8SWJTGST/1RnTMdfr5z3sDv JTeJmgTSKF0VaW7tKyuINruCRw== X-Received: by 2002:a17:902:59dd:: with SMTP id d29-v6mr1746873plj.34.1538200219094; Fri, 28 Sep 2018 22:50:19 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id i80-v6sm11118049pfi.87.2018.09.28.22.50.15 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Sep 2018 22:50:18 -0700 (PDT) From: Baolin Wang To: dan.j.williams@intel.com, vkoul@kernel.org, eric.long@spreadtrum.com Cc: broonie@kernel.org, baolin.wang@linaro.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/7] dmaengine: sprd: Support DMA 2-stage transfer mode Date: Sat, 29 Sep 2018 13:49:04 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eric Long The Spreadtrum DMA controller supports channel 2-stage tansfer mode, that means we can request 2 dma channels, one for source channel, and another one for destination channel. Once the source channel's transaction is done, it will trigger the destination channel's transaction automatically by hardware signal. Signed-off-by: Eric Long Signed-off-by: Baolin Wang --- drivers/dma/sprd-dma.c | 98 +++++++++++++++++++++++++++++++++++++++++- include/linux/dma/sprd-dma.h | 62 ++++++++++++++++++++++++-- 2 files changed, 156 insertions(+), 4 deletions(-) -- 1.7.9.5 diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c index cefe42f..50d6569 100644 --- a/drivers/dma/sprd-dma.c +++ b/drivers/dma/sprd-dma.c @@ -36,6 +36,8 @@ #define SPRD_DMA_GLB_CHN_EN_STS 0x1c #define SPRD_DMA_GLB_DEBUG_STS 0x20 #define SPRD_DMA_GLB_ARB_SEL_STS 0x24 +#define SPRD_DMA_GLB_2STAGE_GRP1 0x28 +#define SPRD_DMA_GLB_2STAGE_GRP2 0x2c #define SPRD_DMA_GLB_REQ_UID(uid) (0x4 * ((uid) - 1)) #define SPRD_DMA_GLB_REQ_UID_OFFSET 0x2000 @@ -57,6 +59,18 @@ #define SPRD_DMA_CHN_SRC_BLK_STEP 0x38 #define SPRD_DMA_CHN_DES_BLK_STEP 0x3c +/* SPRD_DMA_GLB_2STAGE_GRP register definition */ +#define SPRD_DMA_GLB_2STAGE_EN BIT(24) +#define SPRD_DMA_GLB_CHN_INT_MASK GENMASK(23, 20) +#define SPRD_DMA_GLB_LIST_DONE_TRG BIT(19) +#define SPRD_DMA_GLB_TRANS_DONE_TRG BIT(18) +#define SPRD_DMA_GLB_BLOCK_DONE_TRG BIT(17) +#define SPRD_DMA_GLB_FRAG_DONE_TRG BIT(16) +#define SPRD_DMA_GLB_TRG_OFFSET 16 +#define SPRD_DMA_GLB_DEST_CHN_MASK GENMASK(13, 8) +#define SPRD_DMA_GLB_DEST_CHN_OFFSET 8 +#define SPRD_DMA_GLB_SRC_CHN_MASK GENMASK(5, 0) + /* SPRD_DMA_CHN_INTC register definition */ #define SPRD_DMA_INT_MASK GENMASK(4, 0) #define SPRD_DMA_INT_CLR_OFFSET 24 @@ -118,6 +132,10 @@ #define SPRD_DMA_SRC_TRSF_STEP_OFFSET 0 #define SPRD_DMA_TRSF_STEP_MASK GENMASK(15, 0) +/* define DMA channel mode & trigger mode mask */ +#define SPRD_DMA_CHN_MODE_MASK GENMASK(7, 0) +#define SPRD_DMA_TRG_MODE_MASK GENMASK(7, 0) + /* define the DMA transfer step type */ #define SPRD_DMA_NONE_STEP 0 #define SPRD_DMA_BYTE_STEP 1 @@ -170,6 +188,8 @@ struct sprd_dma_chn { struct dma_slave_config slave_cfg; u32 chn_num; u32 dev_id; + enum sprd_dma_chn_mode chn_mode; + enum sprd_dma_trg_mode trg_mode; struct sprd_dma_desc *cur_desc; }; @@ -206,6 +226,16 @@ static inline struct sprd_dma_desc *to_sprd_dma_desc(struct virt_dma_desc *vd) return container_of(vd, struct sprd_dma_desc, vd); } +static void sprd_dma_glb_update(struct sprd_dma_dev *sdev, u32 reg, + u32 mask, u32 val) +{ + u32 orig = readl(sdev->glb_base + reg); + u32 tmp; + + tmp = (orig & ~mask) | val; + writel(tmp, sdev->glb_base + reg); +} + static void sprd_dma_chn_update(struct sprd_dma_chn *schan, u32 reg, u32 mask, u32 val) { @@ -389,6 +419,49 @@ static enum sprd_dma_req_mode sprd_dma_get_req_type(struct sprd_dma_chn *schan) return (frag_reg >> SPRD_DMA_REQ_MODE_OFFSET) & SPRD_DMA_REQ_MODE_MASK; } +static int sprd_dma_set_2stage_config(struct sprd_dma_chn *schan) +{ + struct sprd_dma_dev *sdev = to_sprd_dma_dev(&schan->vc.chan); + u32 val, chn = schan->chn_num + 1; + + switch (schan->chn_mode) { + case SPRD_DMA_SRC_CHN0: + val = chn & SPRD_DMA_GLB_SRC_CHN_MASK; + val |= BIT(schan->trg_mode - 1) << SPRD_DMA_GLB_TRG_OFFSET; + val |= SPRD_DMA_GLB_2STAGE_EN; + sprd_dma_glb_update(sdev, SPRD_DMA_GLB_2STAGE_GRP1, val, val); + break; + + case SPRD_DMA_SRC_CHN1: + val = chn & SPRD_DMA_GLB_SRC_CHN_MASK; + val |= BIT(schan->trg_mode - 1) << SPRD_DMA_GLB_TRG_OFFSET; + val |= SPRD_DMA_GLB_2STAGE_EN; + sprd_dma_glb_update(sdev, SPRD_DMA_GLB_2STAGE_GRP2, val, val); + break; + + case SPRD_DMA_DST_CHN0: + val = (chn << SPRD_DMA_GLB_DEST_CHN_OFFSET) & + SPRD_DMA_GLB_DEST_CHN_MASK; + val |= SPRD_DMA_GLB_2STAGE_EN; + sprd_dma_glb_update(sdev, SPRD_DMA_GLB_2STAGE_GRP1, val, val); + break; + + case SPRD_DMA_DST_CHN1: + val = (chn << SPRD_DMA_GLB_DEST_CHN_OFFSET) & + SPRD_DMA_GLB_DEST_CHN_MASK; + val |= SPRD_DMA_GLB_2STAGE_EN; + sprd_dma_glb_update(sdev, SPRD_DMA_GLB_2STAGE_GRP2, val, val); + break; + + default: + dev_err(sdev->dma_dev.dev, "invalid channel mode setting %d\n", + schan->chn_mode); + return -EINVAL; + } + + return 0; +} + static void sprd_dma_set_chn_config(struct sprd_dma_chn *schan, struct sprd_dma_desc *sdesc) { @@ -423,6 +496,13 @@ static void sprd_dma_start(struct sprd_dma_chn *schan) schan->cur_desc = to_sprd_dma_desc(vd); /* + * Set 2-stage configuration if the channel starts one 2-stage + * transfer. + */ + if (schan->chn_mode && sprd_dma_set_2stage_config(schan)) + return; + + /* * Copy the DMA configuration from DMA descriptor to this hardware * channel. */ @@ -617,6 +697,7 @@ static int sprd_dma_fill_desc(struct dma_chan *chan, { struct sprd_dma_dev *sdev = to_sprd_dma_dev(chan); struct sprd_dma_chn *schan = to_sprd_dma_chan(chan); + enum sprd_dma_chn_mode chn_mode = schan->chn_mode; u32 req_mode = (flags >> SPRD_DMA_REQ_SHIFT) & SPRD_DMA_REQ_MODE_MASK; u32 int_mode = flags & SPRD_DMA_INT_MASK; int src_datawidth, dst_datawidth, src_step, dst_step; @@ -628,7 +709,16 @@ static int sprd_dma_fill_desc(struct dma_chan *chan, dev_err(sdev->dma_dev.dev, "invalid source step\n"); return src_step; } - dst_step = SPRD_DMA_NONE_STEP; + + /* + * For 2-stage transfer, destination channel step can not be 0, + * since destination device is AON IRAM. + */ + if (chn_mode == SPRD_DMA_DST_CHN0 || + chn_mode == SPRD_DMA_DST_CHN1) + dst_step = src_step; + else + dst_step = SPRD_DMA_NONE_STEP; } else { dst_step = sprd_dma_get_step(slave_cfg->dst_addr_width); if (dst_step < 0) { @@ -855,6 +945,12 @@ static int sprd_dma_fill_linklist_desc(struct dma_chan *chan, } } + /* Set channel mode and trigger mode for 2-stage transfer */ + schan->chn_mode = + (flags >> SPRD_DMA_CHN_MODE_SHIFT) & SPRD_DMA_CHN_MODE_MASK; + schan->trg_mode = + (flags >> SPRD_DMA_TRG_MODE_SHIFT) & SPRD_DMA_TRG_MODE_MASK; + ret = sprd_dma_fill_desc(chan, &sdesc->chn_hw, 0, 0, src, dst, len, dir, flags, slave_cfg); if (ret) { diff --git a/include/linux/dma/sprd-dma.h b/include/linux/dma/sprd-dma.h index b42b80e5..ab82df6 100644 --- a/include/linux/dma/sprd-dma.h +++ b/include/linux/dma/sprd-dma.h @@ -3,9 +3,65 @@ #ifndef _SPRD_DMA_H_ #define _SPRD_DMA_H_ -#define SPRD_DMA_REQ_SHIFT 16 -#define SPRD_DMA_FLAGS(req_mode, int_type) \ - ((req_mode) << SPRD_DMA_REQ_SHIFT | (int_type)) +#define SPRD_DMA_REQ_SHIFT 8 +#define SPRD_DMA_TRG_MODE_SHIFT 16 +#define SPRD_DMA_CHN_MODE_SHIFT 24 +#define SPRD_DMA_FLAGS(chn_mode, trg_mode, req_mode, int_type) \ + ((chn_mode) << SPRD_DMA_CHN_MODE_SHIFT | \ + (trg_mode) << SPRD_DMA_TRG_MODE_SHIFT | \ + (req_mode) << SPRD_DMA_REQ_SHIFT | (int_type)) + +/* + * The Spreadtrum DMA controller supports channel 2-stage tansfer, that means + * we can request 2 dma channels, one for source channel, and another one for + * destination channel. Each channel is independent, and has its own + * configurations. Once the source channel's transaction is done, it will + * trigger the destination channel's transaction automatically by hardware + * signal. + * + * To support 2-stage tansfer, we must configure the channel mode and trigger + * mode as below definition. + */ + +/* + * enum sprd_dma_chn_mode: define the DMA channel mode for 2-stage transfer + * @SPRD_DMA_CHN_MODE_NONE: No channel mode setting which means channel doesn't + * support the 2-stage transfer. + * @SPRD_DMA_SRC_CHN0: Channel used as source channel 0. + * @SPRD_DMA_SRC_CHN1: Channel used as source channel 1. + * @SPRD_DMA_DST_CHN0: Channel used as destination channel 0. + * @SPRD_DMA_DST_CHN1: Channel used as destination channel 1. + * + * Now the DMA controller can supports 2 groups 2-stage transfer. + */ +enum sprd_dma_chn_mode { + SPRD_DMA_CHN_MODE_NONE, + SPRD_DMA_SRC_CHN0, + SPRD_DMA_SRC_CHN1, + SPRD_DMA_DST_CHN0, + SPRD_DMA_DST_CHN1, +}; + +/* + * enum sprd_dma_trg_mode: define the DMA channel trigger mode for 2-stage + * transfer + * @SPRD_DMA_NO_TRG: No trigger setting. + * @SPRD_DMA_FRAG_DONE_TRG: Trigger the transaction of destination channel + * automatically once the source channel's fragment request is done. + * @SPRD_DMA_BLOCK_DONE_TRG: Trigger the transaction of destination channel + * automatically once the source channel's block request is done. + * @SPRD_DMA_TRANS_DONE_TRG: Trigger the transaction of destination channel + * automatically once the source channel's transfer request is done. + * @SPRD_DMA_LIST_DONE_TRG: Trigger the transaction of destination channel + * automatically once the source channel's link-list request is done. + */ +enum sprd_dma_trg_mode { + SPRD_DMA_NO_TRG, + SPRD_DMA_FRAG_DONE_TRG, + SPRD_DMA_BLOCK_DONE_TRG, + SPRD_DMA_TRANS_DONE_TRG, + SPRD_DMA_LIST_DONE_TRG, +}; /* * enum sprd_dma_req_mode: define the DMA request mode From patchwork Sat Sep 29 05:49:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 147821 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp1575413lji; Fri, 28 Sep 2018 22:50:26 -0700 (PDT) X-Google-Smtp-Source: ACcGV60bgYTSDw7EJ0XpREeWa0qLQcDHM27Wa5Tz6Yq99w04pL39UC2cFC44VMmNROroZY6602OT X-Received: by 2002:a17:902:6a:: with SMTP id 97-v6mr1679171pla.276.1538200226730; Fri, 28 Sep 2018 22:50:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538200226; cv=none; d=google.com; s=arc-20160816; b=AGRbiCl6Gg16d5qOxb//yI0PH6ib4oQaLF8UrEsGqQWx2VSQSqNPs7WB53c9X0gQja Y4sudcRYobYHh2axph3kxqscyMQRN1hm5R07v/tGNqjCpkdjqgF08h+7RMOwD0rWmiVo QakB0Re7k8HcAIdsCGguDgF8r/6u3stfqYqJIoS9Rve39imKNvalCbSAN4c65eI3kgK+ sCPx+InKMY3ZYcdLah58gMNa47W3RQ6u4oqo2YsX05++v678YtNyIGE6kCNrKzTExcOM 5/AEfgfF2JVNl+HuPU9eqchD+2n9LXmH7yLzr0DBDPBe51QPAhklwXWVZl5dHfETk4QW ajCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=5xZvV9ure0B+Th/au/ie3rB7XqPr/svxvChRm0xoFwg=; b=r2It9UU3mwolhpOJOo22M3VroCzMEAxsAbgt7SZJfF2zCcGwgIKJ4manQRG+YnW5fO G6k5iCifvd4ysXgppM6/cAg0iQ++A0yvkcvTR5TToN09CcyYGp4WopjRpQXhULRWG1a2 QZ0Str5WeFTXnu1w8x1NVDGjmk7mfZJJJILtghanP/cejlUMrK6OJhEQWyu9R13OSpac a2+U13QwJ4kzoh/MEXq1R0KmjjrJAm1SekHhFWeGQi5gHqGQeBUYVxYNZ7wAggOvptZA /haMcjIWHAr1a0ai/zrYPAL701zu0EaQzAO6KUoYQQJvl7Zx8kJD9HcmUeWPL1jaF2jG qG0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hpBvakUN; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z135-v6si5576690pgz.645.2018.09.28.22.50.26; Fri, 28 Sep 2018 22:50:26 -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=@linaro.org header.s=google header.b=hpBvakUN; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727653AbeI2MR2 (ORCPT + 32 others); Sat, 29 Sep 2018 08:17:28 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:37019 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727420AbeI2MR1 (ORCPT ); Sat, 29 Sep 2018 08:17:27 -0400 Received: by mail-pf1-f195.google.com with SMTP id x26-v6so5674947pfn.4 for ; Fri, 28 Sep 2018 22:50:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=5xZvV9ure0B+Th/au/ie3rB7XqPr/svxvChRm0xoFwg=; b=hpBvakUNb4T8ainOmd6UaRX9Am+kZP71yKwiZMqtFvyofcJRewL5Tq/DS46xAwOkqE KIVb1IDSSZS7F/6yiOc+8UD/ML/nTLTal5LYqk+oKHEe5rz2+2tdXsTBcFoo5d06CpRs 6N8OgTQGHPvv4qS8tIraFX/k4k+/kVHKs1Dp4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=5xZvV9ure0B+Th/au/ie3rB7XqPr/svxvChRm0xoFwg=; b=HiSeWYa9aK3Qj4kcRIZuk0MMRfRPICjT3Ley1rUXWEJWJrU1TYHVArJ2FxQIBx0HGC Q/mSdsopq5ZtYDT4DL+KdVEY3oK0I8LwJGLCtpitKxmdCVfyqdUof3fCFCKmpFLMx/6F sHnaGkoKzUK5A96Qv/HUDugMvPyRVxoDQ3Yk6Urvjyno9BiqeoFrwPhHagc1zRDPsCO7 +/u8jUEnO5i79b2zjgUPIrTPoaBOJrQDqHjCXjwATFDw0cSxUnXERISUzsdkMeFNzO1w JtqOpx47t2zb3jWQtU991xh/nc1RgUsj2Aqn8qp0gpOuyPNEVTeA5Se1DgrWMcjpcypb p9+w== X-Gm-Message-State: ABuFfohH0GvECtItrYeesCyav1aRLOYhlMJZgCJskHWcBWtmNZpBsU5O n1bqolY26w2HayNJggV69+o1fdIZZqI/Iw== X-Received: by 2002:a17:902:8b8c:: with SMTP id ay12-v6mr1701882plb.163.1538200222836; Fri, 28 Sep 2018 22:50:22 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id i80-v6sm11118049pfi.87.2018.09.28.22.50.19 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Sep 2018 22:50:21 -0700 (PDT) From: Baolin Wang To: dan.j.williams@intel.com, vkoul@kernel.org, eric.long@spreadtrum.com Cc: broonie@kernel.org, baolin.wang@linaro.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 7/7] dmaengine: sprd: Add me as one of the module authors Date: Sat, 29 Sep 2018 13:49:05 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eric Long Add me as one of the module authors. Signed-off-by: Eric Long Signed-off-by: Baolin Wang --- drivers/dma/sprd-dma.c | 1 + 1 file changed, 1 insertion(+) -- 1.7.9.5 diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c index 50d6569..e2f0167 100644 --- a/drivers/dma/sprd-dma.c +++ b/drivers/dma/sprd-dma.c @@ -1226,4 +1226,5 @@ static int __maybe_unused sprd_dma_runtime_resume(struct device *dev) MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("DMA driver for Spreadtrum"); MODULE_AUTHOR("Baolin Wang "); +MODULE_AUTHOR("Eric Long "); MODULE_ALIAS("platform:sprd-dma");