From patchwork Tue Jul 15 10:51:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 4553041 X-Patchwork-Delegate: vinod.koul@intel.com Return-Path: X-Original-To: patchwork-dmaengine@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A33F89F3BC for ; Tue, 15 Jul 2014 10:51:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C8D7020127 for ; Tue, 15 Jul 2014 10:51:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AD0FE20145 for ; Tue, 15 Jul 2014 10:51:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758038AbaGOKvX (ORCPT ); Tue, 15 Jul 2014 06:51:23 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:51384 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758438AbaGOKvT (ORCPT ); Tue, 15 Jul 2014 06:51:19 -0400 Received: from ayumi.isobedori.kobe.vergenet.net (p8205-ipbfp1004kobeminato.hyogo.ocn.ne.jp [118.10.146.205]) by kirsty.vergenet.net (Postfix) with ESMTP id 78D1E25BF58; Tue, 15 Jul 2014 20:51:17 +1000 (EST) Received: by ayumi.isobedori.kobe.vergenet.net (Postfix, from userid 7100) id 1B4F5EDE5F4; Tue, 15 Jul 2014 19:51:15 +0900 (JST) From: Simon Horman To: Vinod Koul Cc: dmaengine@vger.kernel.org, linux-sh@vger.kernel.org, Magnus Damm , Kuninori Morimoto , Simon Horman Subject: [PATCH 2/3] dma: rcar-audmapp: don't keep audmapp_slave_config for each channeles Date: Tue, 15 Jul 2014 19:51:07 +0900 Message-Id: <75bfa5f60a368b1ccacaf71bfc0376b8d9eb2e9f.1405401560.git.horms+renesas@verge.net.au> X-Mailer: git-send-email 2.0.0 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 X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto Current audmapp driver is keeping audmapp_slave_config for each channeles, but, nessasary information is only "chcr". Current style (= keeping audmapp_slave_config) is not good match for DT support. Keep "chcr" instead of audmapp_slave_config Signed-off-by: Kuninori Morimoto Signed-off-by: Simon Horman --- drivers/dma/sh/rcar-audmapp.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/dma/sh/rcar-audmapp.c b/drivers/dma/sh/rcar-audmapp.c index 858483b..dd00775 100644 --- a/drivers/dma/sh/rcar-audmapp.c +++ b/drivers/dma/sh/rcar-audmapp.c @@ -45,9 +45,9 @@ struct audmapp_chan { struct shdma_chan shdma_chan; - struct audmapp_slave_config *config; void __iomem *base; dma_addr_t slave_addr; + u32 chcr; }; struct audmapp_device { @@ -103,9 +103,8 @@ static void audmapp_start_xfer(struct shdma_chan *schan, struct audmapp_chan *auchan = to_chan(schan); struct audmapp_device *audev = to_dev(auchan); struct audmapp_desc *desc = to_desc(sdesc); - struct audmapp_slave_config *cfg = auchan->config; struct device *dev = audev->dev; - u32 chcr = cfg->chcr | PDMACHCR_DE; + u32 chcr = auchan->chcr | PDMACHCR_DE; dev_dbg(dev, "src/dst/chcr = %pad/%pad/%08x\n", &desc->src, &desc->dst, chcr); @@ -145,7 +144,7 @@ static int audmapp_set_slave(struct shdma_chan *schan, int slave_id, if (try) return 0; - auchan->config = cfg; + auchan->chcr = cfg->chcr; auchan->slave_addr = slave_addr ? : cfg->dst; return 0; @@ -156,11 +155,6 @@ static int audmapp_desc_setup(struct shdma_chan *schan, dma_addr_t src, dma_addr_t dst, size_t *len) { struct audmapp_desc *desc = to_desc(sdesc); - struct audmapp_chan *auchan = to_chan(schan); - struct audmapp_slave_config *cfg = auchan->config; - - if (!cfg) - return -ENODEV; if (*len > (size_t)AUDMAPP_LEN_MAX) *len = (size_t)AUDMAPP_LEN_MAX;