From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756184Ab2ICKpy (ORCPT ); Mon, 3 Sep 2012 06:45:54 -0400 Received: from mga03.intel.com ([143.182.124.21]:47145 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752562Ab2ICKpx (ORCPT ); Mon, 3 Sep 2012 06:45:53 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.80,359,1344236400"; d="scan'208";a="188176699" From: Andy Shevchenko To: Viresh Kumar , linux-kernel@vger.kernel.org, Vinod Koul , Heikki Krogerus Cc: Andy Shevchenko Subject: [PATCH] dw_dmac: utilize slave_id to pass request line Date: Mon, 3 Sep 2012 13:46:19 +0300 Message-Id: <1346669179-21024-1-git-send-email-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 1.7.10.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is slave_id field in the generic slave config structure that is dedicated for the uniq slave number. In our case we have the request lines wired to the certain hardware. Therefore the number of the request line is uniq and could be used as slave_id. It allows us in some cases to drop out the usage of the custom slave config structure. Signed-off-by: Andy Shevchenko --- drivers/dma/dw_dmac.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c index f0c9403..7a67673 100644 --- a/drivers/dma/dw_dmac.c +++ b/drivers/dma/dw_dmac.c @@ -187,6 +187,11 @@ static void dwc_initialize(struct dw_dma_chan *dwc) cfghi = dws->cfg_hi; cfglo |= dws->cfg_lo & ~DWC_CFGL_CH_PRIOR_MASK; + } else { + if (dwc->dma_sconfig.direction == DMA_MEM_TO_DEV) + cfghi = DWC_CFGH_DST_PER(dwc->dma_sconfig.slave_id); + else if (dwc->dma_sconfig.direction == DMA_DEV_TO_MEM) + cfghi = DWC_CFGH_SRC_PER(dwc->dma_sconfig.slave_id); } channel_writel(dwc, CFG_LO, cfglo); -- 1.7.10.4