From patchwork Thu Nov 6 17:20:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liviu Dudau X-Patchwork-Id: 40362 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DE0F724687 for ; Thu, 6 Nov 2014 17:21:16 +0000 (UTC) Received: by mail-lb0-f198.google.com with SMTP id 10sf961743lbg.1 for ; Thu, 06 Nov 2014 09:21:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=iRXbAkT5X/xRiQRUcZUV02vLhcKac/9mbGDqTXnuKgQ=; b=HniAMdj9P/A73HFKlwSkj9lGJN82Pda0lwolKxMeNCuh3JSPVMjx5hERwr+or85uJh 1LrzThsJBdfQCeBt5W2pcUF2czZP3UPwJ1VoFxj5zzhpaBfdiliLaLQh53gwVWs93J/k cIyPlnDtJJSDOcXigYmFLAueLepxXG6OHw+wpHjuEPsWKF3r7Armv796ZorvZiYzBOwW o33OoJjzUj9x1BQNRiWTrZ2LQMIEhat8oGCpgO8Mj8t498+FdZWhh6vtJEFacj+tO303 tnVPaRgTM+MD6sXdPWDMgaq3P3Z741nQaVQlHsE3nOzeZMmi7yLRLGqCuXXK0LQLtCXs RM5Q== X-Gm-Message-State: ALoCoQn3Oxk20sQDWjirzTp+iIW4g/fRxuQRZcJjP6yoEQuxYGIx0T3mGh4eA4x9x0qUiunihddd X-Received: by 10.180.221.7 with SMTP id qa7mr1658295wic.6.1415294475803; Thu, 06 Nov 2014 09:21:15 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.169 with SMTP id c9ls102255laa.104.gmail; Thu, 06 Nov 2014 09:21:15 -0800 (PST) X-Received: by 10.112.144.228 with SMTP id sp4mr6265420lbb.58.1415294475508; Thu, 06 Nov 2014 09:21:15 -0800 (PST) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id ra3si12265971lbb.24.2014.11.06.09.21.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 06 Nov 2014 09:21:15 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by mail-la0-f53.google.com with SMTP id mc6so2932819lab.40 for ; Thu, 06 Nov 2014 09:21:15 -0800 (PST) X-Received: by 10.152.87.100 with SMTP id w4mr6205075laz.27.1415294475048; Thu, 06 Nov 2014 09:21:15 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp78871lbc; Thu, 6 Nov 2014 09:21:14 -0800 (PST) X-Received: by 10.68.140.203 with SMTP id ri11mr2513728pbb.169.1415294473321; Thu, 06 Nov 2014 09:21:13 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id uf3si6520544pab.66.2014.11.06.09.21.12 for ; Thu, 06 Nov 2014 09:21:13 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751594AbaKFRVK (ORCPT + 25 others); Thu, 6 Nov 2014 12:21:10 -0500 Received: from fw-tnat.cambridge.arm.com ([217.140.96.21]:52798 "EHLO cam-smtp0.cambridge.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750955AbaKFRVH (ORCPT ); Thu, 6 Nov 2014 12:21:07 -0500 Received: from e106497-lin.cambridge.arm.com (e106497-lin.cambridge.arm.com [10.1.195.53]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id sA6HKCVc002458; Thu, 6 Nov 2014 17:20:12 GMT From: Liviu Dudau To: Vinod Koul , Dan Williams , dmaengine@vger.kernel.org Cc: LAKML , LKML Subject: [PATCH] DMA: Fix allocation size for PL330 data buffer depth. Date: Thu, 6 Nov 2014 17:20:12 +0000 Message-Id: <1415294412-13818-1-git-send-email-Liviu.Dudau@arm.com> X-Mailer: git-send-email 2.1.3 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: liviu.dudau@arm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The datasheet for PL330 says that the data buffer value in the CRD register is 10bits wide. However, the value stored is "minus one", which the driver corrects for. Maximum value that the data buffer depth can have is 1024 lines, which requires 11 bits for storage. While making updates I found printing the peripheral ID as a hex value to be more useful as the datasheet shows the values that way. Signed-off-by: Liviu Dudau --- drivers/dma/pl330.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 4839bfa..7f62b73 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -271,7 +271,7 @@ struct pl330_config { #define DMAC_MODE_NS (1 << 0) unsigned int mode; unsigned int data_bus_width:10; /* In number of bits */ - unsigned int data_buf_dep:10; + unsigned int data_buf_dep:11; unsigned int num_chan:4; unsigned int num_peri:6; u32 peri_ns; @@ -2732,7 +2732,7 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) dev_info(&adev->dev, - "Loaded driver for PL330 DMAC-%d\n", adev->periphid); + "Loaded driver for PL330 DMAC-%x\n", adev->periphid); dev_info(&adev->dev, "\tDBUFF-%ux%ubytes Num_Chans-%u Num_Peri-%u Num_Events-%u\n", pcfg->data_buf_dep, pcfg->data_bus_width / 8, pcfg->num_chan,