From patchwork Fri May 3 14:32:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 16693 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f70.google.com (mail-qa0-f70.google.com [209.85.216.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E4AE923905 for ; Fri, 3 May 2013 14:35:47 +0000 (UTC) Received: by mail-qa0-f70.google.com with SMTP id bv4sf1238903qab.1 for ; Fri, 03 May 2013 07:35:38 -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=MXjw9fTeG8nRh0xvlco4G52YuiTAaiWvL9lqI/s6/ww=; b=SPf1k1wRH0Hp1lmgNEdXcFKbz10F+nBgpDxwd8JlIi2NqdIPLPRBG66uuV8pl0msdM OwY2CDul05WqWvahprl87/xldyaiDcrWAK6EW9JwZbxVdOnZsE7cey/mIKSp/me/79yV BbFxqbjG1I5GKXqTUyT4mlFwfaTZu0ttAg7jmZB8zMQCe3VKIV2PubgKmV609pL8Kv8d r4WeYW016UcmxC0JUTsaNlt96eXJCqfx9FUAAXoZyGw23xQ8jzGXim2TeT6wBqGKR8lV Na81AGt3Vfc1QwvHJBBJH6TeyoovNfusxHvIJ8HtHAeo4NxaVd87C9m4eixN2KYcE3XT 7YjA== X-Received: by 10.236.145.131 with SMTP id p3mr8459679yhj.6.1367591738065; Fri, 03 May 2013 07:35:38 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.2.72 with SMTP id 8ls485183qes.57.gmail; Fri, 03 May 2013 07:35:37 -0700 (PDT) X-Received: by 10.221.9.70 with SMTP id ov6mr3704751vcb.72.1367591737688; Fri, 03 May 2013 07:35:37 -0700 (PDT) Received: from mail-ve0-x22c.google.com (mail-ve0-x22c.google.com [2607:f8b0:400c:c01::22c]) by mx.google.com with ESMTPS id ir6si5156286vdb.117.2013.05.03.07.35.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 03 May 2013 07:35:37 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::22c 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:c01::22c; Received: by mail-ve0-f172.google.com with SMTP id da11so1550578veb.17 for ; Fri, 03 May 2013 07:35:37 -0700 (PDT) X-Received: by 10.52.166.103 with SMTP id zf7mr3188169vdb.94.1367591737618; Fri, 03 May 2013 07:35:37 -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 nf2csp25306veb; Fri, 3 May 2013 07:35:37 -0700 (PDT) X-Received: by 10.180.73.173 with SMTP id m13mr13432864wiv.27.1367591736732; Fri, 03 May 2013 07:35:36 -0700 (PDT) Received: from mail-we0-x233.google.com (mail-we0-x233.google.com [2a00:1450:400c:c03::233]) by mx.google.com with ESMTPS id jc7si3601690wic.95.2013.05.03.07.35.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 03 May 2013 07:35:36 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::233 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=2a00:1450:400c:c03::233; Received: by mail-we0-f179.google.com with SMTP id t9so1377328wey.24 for ; Fri, 03 May 2013 07:35:36 -0700 (PDT) X-Received: by 10.194.61.237 with SMTP id t13mr14402126wjr.2.1367591736341; Fri, 03 May 2013 07:35:36 -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 ESMTPSA id o3sm17516019wia.2.2013.05.03.07.35.34 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 03 May 2013 07:35:35 -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, srinidhi.kasagar@stericsson.com, Lee Jones , Vinod Koul , Dan Williams , Per Forlin , Rabin Vincent Subject: [PATCH 62/63] dmaengine: ste_dma40: Fetch the number of physical channels from DT Date: Fri, 3 May 2013 15:32:48 +0100 Message-Id: <1367591569-32197-63-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1367591569-32197-1-git-send-email-lee.jones@linaro.org> References: <1367591569-32197-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQnFzMMYhG6sR5xaoLLPW/z7yP/m8Pbi8Sxu3DBRbldNwW6U3zG70+QgrKsugsYNDSWUvWBL X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::22c 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: , Some platforms insist on obscure physical channel availability. This information is currently passed though platform data in internal BSP kernels. Once those platforms land, they'll need to configure them appropriately, so we may as well add the infrastructure. Cc: Vinod Koul Cc: Dan Williams Cc: Per Forlin Cc: Rabin Vincent Signed-off-by: Lee Jones --- drivers/dma/ste_dma40.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index bd5b156..ee96acb 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -3468,7 +3468,7 @@ static int __init d40_of_probe(struct platform_device *pdev, struct device_node *np) { struct stedma40_platform_data *pdata; - int num_memcpy = 0; + int num_phy = 0, num_memcpy = 0; const const __be32 *list; pdata = devm_kzalloc(&pdev->dev, @@ -3477,6 +3477,11 @@ static int __init d40_of_probe(struct platform_device *pdev, if (!pdata) return -ENOMEM; + /* If absent this value will be obtained from h/w. */ + of_property_read_u32(np, "dma-channels", &num_phy); + if (num_phy > 0) + pdata->num_of_phy_chans = num_phy; + list = of_get_property(np, "memcpy-channels", &num_memcpy); num_memcpy /= sizeof(*list);