From patchwork Wed May 15 09:52:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 16955 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f198.google.com (mail-qc0-f198.google.com [209.85.216.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5B6EA2396C for ; Wed, 15 May 2013 09:53:58 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id k15sf726790qcv.1 for ; Wed, 15 May 2013 02:53:21 -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=NzEJx8epCrvosDKCuO0gIFG0cKfdCQ0h4yGMJV7TVKM=; b=D7pzv9KAHvCq9+a3+J1cS6dRhg89C7p44c7tXdRJ91E7h4l4IKGX6w9ZlmI/y0XFVH 0DvQCyVWkjNitqUsT3i/iPnp6ZslQi9szPOCrKuv0o5AjBI0Hab/15z3ejDc/GVZ7kLj BjYcSczOecN9OlHsKvLfQMEPetch+LROc/R2Mdg3oO7GoB1c/Jl5Es8RR3D1c385nOJj RQTkuH/Lbuq4b210HMxVFqBHhrwvOh5kEhkqToDEkSzWy+Xu3by+pbD23OV5XNXLKTPp WdmIq9+ELoqmGGK+KSXbjvzjrAx16JAhoCRLH+sgkbcAbOLi2saeI0h9zb7CkzN3VU+A sUgQ== X-Received: by 10.224.165.130 with SMTP id i2mr23042414qay.2.1368611601821; Wed, 15 May 2013 02:53:21 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.39.6 with SMTP id l6ls725371qek.45.gmail; Wed, 15 May 2013 02:53:21 -0700 (PDT) X-Received: by 10.58.250.66 with SMTP id za2mr23974996vec.56.1368611601642; Wed, 15 May 2013 02:53:21 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id wl5si1009483vec.34.2013.05.15.02.53.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 15 May 2013 02:53:21 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id gd11so1636288vcb.11 for ; Wed, 15 May 2013 02:53:21 -0700 (PDT) X-Received: by 10.52.36.115 with SMTP id p19mr3327723vdj.8.1368611601481; Wed, 15 May 2013 02:53:21 -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.220.217.15 with SMTP id hk15csp11393vcb; Wed, 15 May 2013 02:53:21 -0700 (PDT) X-Received: by 10.181.12.1 with SMTP id em1mr13349730wid.4.1368611600317; Wed, 15 May 2013 02:53:20 -0700 (PDT) Received: from mail-wi0-x22d.google.com (mail-wi0-x22d.google.com [2a00:1450:400c:c05::22d]) by mx.google.com with ESMTPS id es18si6894734wic.0.2013.05.15.02.53.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 15 May 2013 02:53:20 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c05::22d is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=2a00:1450:400c:c05::22d; Received: by mail-wi0-f173.google.com with SMTP id hi5so3564239wib.0 for ; Wed, 15 May 2013 02:53:19 -0700 (PDT) X-Received: by 10.180.74.207 with SMTP id w15mr13214247wiv.19.1368611599903; Wed, 15 May 2013 02:53:19 -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 q13sm2898210wie.8.2013.05.15.02.53.18 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 15 May 2013 02:53:19 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, balbi@ti.com, linux-usb@vger.kernel.org, linux-crypto@vger.kernel.org, davem@davemloft.net, herbert@gondor.apana.org.au, vinod.koul@intel.com Cc: arnd@arndb.de, linus.walleij@stericsson.com, srinidhi.kasagar@stericsson.com, Lee Jones , Dan Williams , Per Forlin , Rabin Vincent Subject: [PATCH 38/39] dmaengine: ste_dma40: Fetch the number of physical channels from DT Date: Wed, 15 May 2013 10:52:01 +0100 Message-Id: <1368611522-9984-39-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1368611522-9984-1-git-send-email-lee.jones@linaro.org> References: <1368611522-9984-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQni1F3FqqbMdA1v/d3oC0JYfcO+e6YmOuOiFpyi5A9SXFXg8IEJ7zx36FkJDDLlD44uFzgx X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.180 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 ae462d3..4e528dd 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -3482,7 +3482,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, @@ -3491,6 +3491,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);