From patchwork Mon Feb 22 05:32:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 62468 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp1032517lbl; Sun, 21 Feb 2016 21:32:19 -0800 (PST) X-Received: by 10.66.141.11 with SMTP id rk11mr36119494pab.75.1456119139591; Sun, 21 Feb 2016 21:32:19 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fm8si37239706pab.17.2016.02.21.21.32.19; Sun, 21 Feb 2016 21:32:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751836AbcBVFcS (ORCPT + 7 others); Mon, 22 Feb 2016 00:32:18 -0500 Received: from mail-pa0-f46.google.com ([209.85.220.46]:35475 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750758AbcBVFcR (ORCPT ); Mon, 22 Feb 2016 00:32:17 -0500 Received: by mail-pa0-f46.google.com with SMTP id ho8so87331806pac.2 for ; Sun, 21 Feb 2016 21:32:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=YTfdv5urjYV/y/QUIQIdMgLVqIgFPuv4yQ8+yEPgTRo=; b=UcbKH4V92YhS2pR1vchvDxhy/B5j9lUHDMD97QtrPwMozcJ0BcrGFz9YPldDe7UE4A oIAp51jqY6F4O8u4MjgxTXzfAFP3Ona1VxZUkg0Sf3FwjMn0UYPCXf2aK2Y5318kBcAj +KbnIi052ckSIJ93a+yZNZZQKRJFf2pc48FX0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=YTfdv5urjYV/y/QUIQIdMgLVqIgFPuv4yQ8+yEPgTRo=; b=QRwqxdOSV/kEQ/qa/KYpFT+oBfU10Vc8caYGluIeh1e2wu78jX40b8o7aZaDOsSwSZ tzmCn0kKIp+B70LmLTYjoUyMJcpv0TMA136Lj+C76MIBIhgxM3izASbpeI5sdG65ICK3 rTGMPWfXNZb12ogaoqywaiO8X6G2xAwItdQ6//cmqgeAohT7PvbLUznz6EODGj5PxD7q bwVv8p8H8WVKPHb/SXGCvM4vujtlQC8wte//AkdzWUr+JVhmDIUAsl1jLzdp0AgKABVO q6gqvHwozgr2QtyA51a7f0YoxAXUCJSjzPoRGTXC7mgJjH7N8eEh5wzQHOPtTzExrL+e 4u7w== X-Gm-Message-State: AG10YOQR3jJZyTXh5NJzzuYX+V7uSRKasW611AkGej4wmvEXawXqJi4xMdFQx/WygX7pnAyL X-Received: by 10.66.190.229 with SMTP id gt5mr35821217pac.118.1456119137025; Sun, 21 Feb 2016 21:32:17 -0800 (PST) Received: from tuxbot.san.rr.com (cpe-76-167-68-231.natsow.res.rr.com. [76.167.68.231]) by smtp.gmail.com with ESMTPSA id 144sm33268834pfa.83.2016.02.21.21.32.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 21 Feb 2016 21:32:16 -0800 (PST) From: Bjorn Andersson To: Peter Chen , Greg Kroah-Hartman Cc: Srinivas Kandagatla , linux-usb@vger.kernel.org, linux-arm-msm , linux-kernel@vger.kernel.org Subject: [PATCH] usb: chipidea: Configure DMA properties and ops from DT Date: Sun, 21 Feb 2016 21:32:13 -0800 Message-Id: <1456119133-16114-1-git-send-email-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.5.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On certain platforms (e.g. ARM64) the dma_ops needs to be explicitly set to be able to do DMA allocations, so use the of_dma_configure() helper to populate the dma properties and assign an appropriate dma_ops. Signed-off-by: Bjorn Andersson --- drivers/usb/chipidea/core.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 7404064b9bbc..047b9d4e67aa 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c @@ -62,6 +62,7 @@ #include #include #include +#include #include #include #include @@ -834,6 +835,9 @@ struct platform_device *ci_hdrc_add_device(struct device *dev, pdev->dev.dma_parms = dev->dma_parms; dma_set_coherent_mask(&pdev->dev, dev->coherent_dma_mask); + if (IS_ENABLED(CONFIG_OF) && dev->of_node) + of_dma_configure(&pdev->dev, dev->of_node); + ret = platform_device_add_resources(pdev, res, nres); if (ret) goto err;