From patchwork Mon Oct 5 08:42:43 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Aggarwal, Anuj" X-Patchwork-Id: 51708 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n958oT9a032637 for ; Mon, 5 Oct 2009 08:50:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758654AbZJEIn1 (ORCPT ); Mon, 5 Oct 2009 04:43:27 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758629AbZJEIn1 (ORCPT ); Mon, 5 Oct 2009 04:43:27 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:35336 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751609AbZJEIn0 (ORCPT ); Mon, 5 Oct 2009 04:43:26 -0400 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id n958gkvk012131 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 5 Oct 2009 03:42:49 -0500 Received: from psplinux050.india.ti.com (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id n958ghE1009755; Mon, 5 Oct 2009 14:12:44 +0530 (IST) Received: from psplinux050.india.ti.com (localhost [127.0.0.1]) by psplinux050.india.ti.com (8.13.1/8.13.1) with ESMTP id n958ghCU003541; Mon, 5 Oct 2009 14:12:43 +0530 Received: (from a0393534@localhost) by psplinux050.india.ti.com (8.13.1/8.13.1/Submit) id n958ghxA003538; Mon, 5 Oct 2009 14:12:43 +0530 From: Anuj Aggarwal To: linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Cc: svenkatr@ti.com, tony@atomide.com, Anuj Aggarwal Subject: [PATCH v2] SDMA: Fixing bug in omap_dma_set_global_params() Date: Mon, 5 Oct 2009 14:12:43 +0530 Message-Id: <1254732163-3509-1-git-send-email-anuj.aggarwal@ti.com> X-Mailer: git-send-email 1.6.2.4 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index fd3154a..0eb676d 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -829,10 +829,10 @@ EXPORT_SYMBOL(omap_free_dma); * * @param arb_rate * @param max_fifo_depth - * @param tparams - Number of thereads to reserve : DMA_THREAD_RESERVE_NORM - * DMA_THREAD_RESERVE_ONET - * DMA_THREAD_RESERVE_TWOT - * DMA_THREAD_RESERVE_THREET + * @param tparams - Number of threads to reserve : DMA_THREAD_RESERVE_NORM + * DMA_THREAD_RESERVE_ONET + * DMA_THREAD_RESERVE_TWOT + * DMA_THREAD_RESERVE_THREET */ void omap_dma_set_global_params(int arb_rate, int max_fifo_depth, int tparams) @@ -844,11 +844,14 @@ omap_dma_set_global_params(int arb_rate, int max_fifo_depth, int tparams) return; } + if (max_fifo_depth == 0) + max_fifo_depth = 1; if (arb_rate == 0) arb_rate = 1; - reg = (arb_rate & 0xff) << 16; - reg |= (0xff & max_fifo_depth); + reg = 0xff & max_fifo_depth; + reg |= (0x3 & tparams) << 12; + reg |= (arb_rate & 0xff) << 16; dma_write(reg, GCR); }