From patchwork Thu Apr 18 10:11:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 16203 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f70.google.com (mail-qe0-f70.google.com [209.85.128.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9FACF23974 for ; Thu, 18 Apr 2013 10:13:37 +0000 (UTC) Received: by mail-qe0-f70.google.com with SMTP id 1sf4773279qec.5 for ; Thu, 18 Apr 2013 03:13:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=wLla6BhF1AEc3Jtt5kLE9/oOELd6eaSGdTGuaqjl9RQ=; b=Vgei0kiuF0Twb9QNh55jDomhzudYLwT3NiWBjNOC09n9plcHyW2cANG8r9ocXaBMuc zM4fExmGuem7qukSNRqnWUbJK7vzRhqhz3UPE7xDEL0uvvTcCKfzIGBThx/vvv1NtOJW h6DfUUNmpDgXBwylKMIgTcVOJXcQ5udj5l5CqrQCoob3EeSgDltjKY1SK4ZfZWkBnOIq cdh1fASvQdTaccIcI3hy+Kl79nERTHrSRLArL71aB0ucpf0K6XPqSqHZBydkRwxgwyNl MrxwmC5Qf52TPALwi4a5bVU9BE+0lJ6+m0Arvneczv2NyDKz13px6wipDQtZzhvJQjGq 5tmg== X-Received: by 10.224.18.132 with SMTP id w4mr7577337qaa.1.1366279980640; Thu, 18 Apr 2013 03:13:00 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.60.5 with SMTP id d5ls1480049qer.10.gmail; Thu, 18 Apr 2013 03:13:00 -0700 (PDT) X-Received: by 10.220.222.8 with SMTP id ie8mr7783029vcb.27.1366279980496; Thu, 18 Apr 2013 03:13:00 -0700 (PDT) Received: from mail-vb0-x22a.google.com (mail-vb0-x22a.google.com [2607:f8b0:400c:c02::22a]) by mx.google.com with ESMTPS id sx2si6228296vdc.97.2013.04.18.03.13.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Apr 2013 03:13:00 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::22a is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::22a; Received: by mail-vb0-f42.google.com with SMTP id p12so2205941vbe.29 for ; Thu, 18 Apr 2013 03:13:00 -0700 (PDT) X-Received: by 10.58.144.170 with SMTP id sn10mr3187790veb.7.1366279980324; Thu, 18 Apr 2013 03:13:00 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp115745veb; Thu, 18 Apr 2013 03:12:59 -0700 (PDT) X-Received: by 10.180.87.193 with SMTP id ba1mr17032540wib.10.1366279979395; Thu, 18 Apr 2013 03:12:59 -0700 (PDT) Received: from mail-we0-x22c.google.com (mail-we0-x22c.google.com [2a00:1450:400c:c03::22c]) by mx.google.com with ESMTPS id a12si451761wik.63.2013.04.18.03.12.59 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Apr 2013 03:12:59 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::22c is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=2a00:1450:400c:c03::22c; Received: by mail-we0-f172.google.com with SMTP id r3so2143973wey.3 for ; Thu, 18 Apr 2013 03:12:59 -0700 (PDT) X-Received: by 10.180.205.226 with SMTP id lj2mr24983336wic.5.1366279978969; Thu, 18 Apr 2013 03:12:58 -0700 (PDT) Received: from localhost.localdomain (cpc34-aztw25-2-0-cust250.18-1.cable.virginmedia.com. [86.16.136.251]) by mx.google.com with ESMTPS id t7sm30483773wij.2.2013.04.18.03.12.57 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Apr 2013 03:12:58 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: arnd@arndb.de, linus.walleij@stericsson.com, Lee Jones , Vinod Koul , Dan Williams , Per Forlin , Rabin Vincent Subject: [PATCH 15/32] dmaengine: ste_dma40: Separate Logical Global Interrupt Mask (GIM) unmasking Date: Thu, 18 Apr 2013 11:11:57 +0100 Message-Id: <1366279934-30761-16-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1366279934-30761-1-git-send-email-lee.jones@linaro.org> References: <1366279934-30761-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQmNDARDY5mWkuLxovx3zTBgXQGbcyEr2sCvscy1JGG/1J42FJC1q0mzNWxrS/zyEDDsyRKL X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::22a is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , During the initial setup of a logical channel, it is necessary to unmask the GIM in order to receive generated terminal count and error interrupts. We're separating out this required code so it will be possible to move the remaining code in d40_phy_cfg(), which is mostly runtime configuration into the runtime_config() routine. Cc: Vinod Koul Cc: Dan Williams Cc: Per Forlin Cc: Rabin Vincent Signed-off-by: Lee Jones --- drivers/dma/ste_dma40.c | 3 +++ drivers/dma/ste_dma40_ll.c | 11 ++++++----- drivers/dma/ste_dma40_ll.h | 2 ++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index ec0d6ab..178a03c 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -2456,6 +2456,9 @@ static int d40_alloc_chan_resources(struct dma_chan *chan) D40_LCPA_CHAN_SIZE + D40_LCPA_CHAN_DST_DELTA; } + if (chan_is_logical(d40c)) + d40_log_gim_unmask(&d40c->src_def_cfg, &d40c->dst_def_cfg); + dev_dbg(chan2dev(d40c), "allocated %s channel (phy %d%s)\n", chan_is_logical(d40c) ? "logical" : "physical", d40c->phy_chan->num, diff --git a/drivers/dma/ste_dma40_ll.c b/drivers/dma/ste_dma40_ll.c index 5eb6c10..b72d3e2 100644 --- a/drivers/dma/ste_dma40_ll.c +++ b/drivers/dma/ste_dma40_ll.c @@ -50,6 +50,12 @@ void d40_log_cfg(struct stedma40_chan_cfg *cfg, } +void d40_log_gim_unmask(u32 *src_cfg, u32 *dst_cfg) { + + *src_cfg |= 1 << D40_SREG_CFG_LOG_GIM_POS; + *dst_cfg |= 1 << D40_SREG_CFG_LOG_GIM_POS; +} + /* Sets up SRC and DST CFG register for both logical and physical channels */ void d40_phy_cfg(struct stedma40_chan_cfg *cfg, u32 *src_cfg, u32 *dst_cfg, bool is_log) @@ -107,11 +113,6 @@ void d40_phy_cfg(struct stedma40_chan_cfg *cfg, src |= 1 << D40_SREG_CFG_PRI_POS; dst |= 1 << D40_SREG_CFG_PRI_POS; } - - } else { - /* Logical channel */ - dst |= 1 << D40_SREG_CFG_LOG_GIM_POS; - src |= 1 << D40_SREG_CFG_LOG_GIM_POS; } if (cfg->src_info.big_endian) diff --git a/drivers/dma/ste_dma40_ll.h b/drivers/dma/ste_dma40_ll.h index fdde8ef..8aad679 100644 --- a/drivers/dma/ste_dma40_ll.h +++ b/drivers/dma/ste_dma40_ll.h @@ -430,6 +430,8 @@ enum d40_lli_flags { LLI_LAST_LINK = 1 << 3, }; +void d40_log_gim_unmask(u32 *src_cfg, u32 *dst_cfg); + void d40_phy_cfg(struct stedma40_chan_cfg *cfg, u32 *src_cfg, u32 *dst_cfg,