Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941252AbcKQLpm (ORCPT ); Thu, 17 Nov 2016 06:45:42 -0500 Received: from mail-bl2nam02on0045.outbound.protection.outlook.com ([104.47.38.45]:54891 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751995AbcKQLoW (ORCPT ); Thu, 17 Nov 2016 06:44:22 -0500 Authentication-Results: spf=none (sender IP is 192.88.168.50) smtp.mailfrom=lvd5587.freescale.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=fail action=none header.from=nxp.com; X-IncomingTopHeaderMarker: OriginalChecksum:;UpperCasedChecksum:;SizeAsReceived:1026;Count:11 From: Sriram Dash To: , CC: , , , , , , Arnd Bergmann , Sriram Dash Subject: [PATCH v5 2/6] usb: chipidea: use bus->sysdev for DMA configuration Date: Thu, 17 Nov 2016 17:13:44 +0530 Message-ID: <1479383028-27701-3-git-send-email-sriram.dash@nxp.com> X-Mailer: git-send-email 1.7.7.4 In-Reply-To: <1479383028-27701-1-git-send-email-sriram.dash@nxp.com> References: <1479383028-27701-1-git-send-email-sriram.dash@nxp.com> X-IncomingHeaderCount: 11 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131238566525794007;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(6039001)(7916002)(2980300002)(428002)(336004)(199003)(189002)(50466002)(2950100002)(42882006)(4720700003)(6666003)(106466001)(103686003)(68736007)(86372001)(575784001)(105586002)(2906002)(50986999)(76176999)(189998001)(305945005)(7846002)(33646002)(101416001)(90966002)(42186005)(47776003)(97736004)(48376002)(5001770100001)(8676002)(8666005)(356003)(4326007)(87936001)(960300001)(81156014)(81166006)(5003940100001)(92566002)(45336002)(46386002)(5660300001)(8936002)(50226002)(52956003)(7416002)(36756003)(626004)(7059030);DIR:OUT;SFP:1101;SCL:1;SRVR:BN1PR0301MB0738;H:tx30smr01.am.freescale.net;FPR:;SPF:None;PTR:InfoDomainNonexistent;A:0;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11FD007;1:JoBUwoHFyp7DRYT/rAJ3tqjsMDCqHnOYNDgwIjSLYA+AsVufvLWmUtr6PjhOYRv4ajyF0wXG2DzTDrsHEFoMcVA3vo2W2CoXk43E4ohjeqWkmjDYuYimMYxXsU/Tzb+yaLlicXsxXZjSwY/wfw2REnDly6IWwjzVOfUH8hyCa+AqX3eOKQ4pD40AHr8xuoo7QoYoYaNlXuGk+KcjnEem8by/wgn3kZ1ptsOGxVdgAukGITZgjDoGOiBvld5Kwek1pPwhzeKOkc3EvJNqzsvUJvA+ybL+OZlUT9TE/+kY4hXkWJh9zyQORNh7c8ZFU301t3SsU/aBSgBeOqebH8eVNRpZmXXsxapJk1vDbxguv9sZKWxUwriPPegbKU19EPFejfaVLKolh63d/LNtV/O9yiep+8XDcvIaZypVM8ak3uk43tRAjHBI+pg/+3DEk8rWBmT8IJRbdvOKQwIqShgmXeOBeZo7VBoFNuT9lu4521TXLgGp7A0/Wn+iO86oDBKtzelKkLfWq13Ik0+u5SD8isEyMAZrRY0qrquxblcaWGHbJMZ9Hrz54TIwW/QnRpIRap2/7bnGZlY4W8i5N4fJ/vIYdh8wdjJVQ3C8N2IXcWxzoVn5PiYNj+ncIZdTc/WQczQAG+nB636FmU+XiHYeag== MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1;BN1PR0301MB0738;2:TevMLyVo1ygjR9PV1eVkSZ9+S0YaQbssu2QZn05mWk43cBDRHZiNPNJsFxONmKaorCA7x7bCGw7tdEFu25bsW6ZPRrySRu5IQgq5+EWU3K0kRnhCS3Fs6u2zqe/Xd98DSc2hJB2mcPz58LHuIcqrJk8sG4pxB5wG/AixC65Kv58=;3:6aEoShzfIIECFemaDNHGVLetkrNa8hFIfE1R0e3ykpwfEe2JDMTmmHqb0L2k7JQwEZhL8jIYUzpLeuIMFNL6cV8WN1Ing2nFGLKtYdg7Tterh7mc/J6oiwLNM+g5FZIvKUkRj9gJVLs0PrD7jR4JJVsk+tlpYcs9crQ+xW1WXBUkMu3Jy/ay6W/s4EBVxsQSUSJpPUfpuCPwX4Jan5kE+GZHFfbaX5mQ58eppwaPikLSj+5YtunORCpxZQYMuIYxchDSaUQuh6nX1LuLWlYtTA==;25:WlwaynRkYUCPrBUQe8dayXWQwkxT1UE+mgJ3+Tj+WgWpBfWTYVL2leBLesbPJ1t1fl50uNRZlJ0CfcDW/PzeKDG0JzeV7f8Y4nLUDDjDhgy1okQ6w+tfV+mVMMWIx1Nws4yf/27zdWtlfZEucio3aSLrRkSze26rIzt3856t0PYlpVIkugIeG66RCoLzFolxtXJ6BT1uOG/kmroqR3TxeN2YBCP2MimOa6HvcR4jMGdsLzoRrf9/Y3FDB/IctsHkHUbMAM06wv/i1GVAyP5YaL40pIUkcYvdNlm4J64wqbbNtOLFRLhmxvrHNIQOOtcMXNWR1z0PpbBsFQL1BoM7PFjvNkTVCfa0FopdKJWfQQyfB0l35E64esuVmU19cmx1QTOaSYsAK2gvne0bnCzi0MgVn3fQBnKbvqF99yUmoUl2uUCrQxeqc1yjrL3ScIgYEcI+OwhrbYK5R4b16FdEvg== X-MS-Office365-Filtering-Correlation-Id: 4f8e52c2-08a4-4661-9577-08d40edf0d0e X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BN1PR0301MB0738; X-Microsoft-Exchange-Diagnostics: 1;BN1PR0301MB0738;31:sJmZcSLezvYTFKw2Xhj/W+J4/C9Oa6c6WBng66YL96hX5F4+S1m9wM0C0Ud35tD7l1GBgqlIQjxbsAByHOvfv8TmF644b8zTgTuCZoOElZUJsuAvKYbXhNIRAezX94E+Wm7Qsf5VOjWZrIO3P/HfY+3YqLPUNBp7/b+8HEGK1rsErN1iaCZhHG/+TANOxU6kjz9+ini3gs+YRdEs2kt1VEPIgnzivUq5oC3rzWYTGyOgw/QyT9SZtAutT7WTMKT3TDqtjKVofJsJtkfG4PNsISJ0xZIFybLaXYH9hDoHytbdfhIc6/ZcMds8AeaZSqL6;4:xI4fTcBc9gxj05Jb78UYeNZsKEOCHexYXSx/YGk4NWoSfKwInQNyxW0E9pz41ovzbkTGweeI+S+p3iOzmlUCmbLVm6/iqmIAcG4BKqrsPHFYWE03QupJTMYCsxNnAGkr2m4aV7P6jAYNO4J1G146iaIDIcPJkliZUI1nHDnGqDGk6742Z7Cm0bCy0exetHSm25pyLTpdFeYE7e/UAIB5jj9zCgzfuTG9FAkdRVLs/snMEcJQvRIB0Z10rkQ43NVJYE1ehHOJHfCaE6ZbU8IU1DvhS4kJvHhmgC19qn6x6djr8CkPB0IQymbZs1O0UjZSBKMgzHOec6hugX7MP7Kcs+2AEwtwUXH6GMf4G3g3mkxOpgr7zaDoKcVT4bsrKd9okCBSw+KwnqCS25O+D0nhR5Pk8fCEdsw4JtmkXL6XEVOJrQgZ1nxoiO5QAlaRPJEiwgm2/8aV2V4uC1znxJjhoZfZC9RoS66fZttiUXe6UWlCxg9xFmfxsMCJQLxlNO6dNTAGGu2vPYhJG3Vslr8IDqkcwYS0HQx7EkcRN1sjYuc+QRDX5mOp3Ko+RDNR7jXO1A1sztBlaIk+QDhWhAUUlg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6095035)(601004)(2401047)(13024025)(13023025)(13018025)(13017025)(13015025)(8121501046)(5005006)(10201501046)(3002001)(6055026)(6096035);SRVR:BN1PR0301MB0738;BCL:0;PCL:0;RULEID:(400006);SRVR:BN1PR0301MB0738; X-Forefront-PRVS: 01294F875B X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN1PR0301MB0738;23:dMypINQbbryJkcx+0N8QFq0w+qfNhGHUja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UVVaMuEjE8RxyXVTGkTTjDd21OrwWLlUoLbpUh30NdIAPSUVquJPZ56Y= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BN1PR0301MB0738;7:f/Gb6fPgORLWIS/hJMb1Vp6VsHkz/1xk86G+9bltZBUbV9vVIokY8hr6+dZqGvwJVbEY2791fcQrWQPW4EA190jqU8NvB+w4quIOi4ZdEcokV6ZbS70ZKl2pioZIqO/xp2hMNgx09yHKyj/jiadbCmfnecjzW9BQ1KGvF3REXrYZesIfzNMgvx95tto7aGVUbvlOEbVI5VFb2gg6+0423R6xnVgI2do1J2VMq0FguPofoMQ4p9simODrX+VRsoIxBThbvolpL/9+FMKN4bH1ohxCUBp4g8YsAYKEwP3r30mED1RagqYLiVkKg7/0U4Wjf0WE3hfaGFm+b2zSRKCzleFaxRchQ/Fm6+bCIBOq0rI= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2016 11:44:12.2518 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR0301MB0738 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3012 Lines: 97 From: Arnd Bergmann Set the dma for chipidea from sysdev. This is inherited from its parent node. Also, do not set dma mask for child as it is not required now. Signed-off-by: Arnd Bergmann Signed-off-by: Sriram Dash Acked-by: Peter Chen --- Changes in v5: - No update Changes in v4: - No update Changes in v3: - No update Changes in v2: - integrate chipidea driver changes together. drivers/usb/chipidea/core.c | 3 --- drivers/usb/chipidea/host.c | 3 ++- drivers/usb/chipidea/udc.c | 10 ++++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 69426e6..8917a03 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c @@ -833,9 +833,6 @@ struct platform_device *ci_hdrc_add_device(struct device *dev, } pdev->dev.parent = dev; - pdev->dev.dma_mask = dev->dma_mask; - pdev->dev.dma_parms = dev->dma_parms; - dma_set_coherent_mask(&pdev->dev, dev->coherent_dma_mask); ret = platform_device_add_resources(pdev, res, nres); if (ret) diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c index 111b0e0b..3218b49 100644 --- a/drivers/usb/chipidea/host.c +++ b/drivers/usb/chipidea/host.c @@ -116,7 +116,8 @@ static int host_start(struct ci_hdrc *ci) if (usb_disabled()) return -ENODEV; - hcd = usb_create_hcd(&ci_ehci_hc_driver, ci->dev, dev_name(ci->dev)); + hcd = __usb_create_hcd(&ci_ehci_hc_driver, ci->dev->parent, + ci->dev, dev_name(ci->dev), NULL); if (!hcd) return -ENOMEM; diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index a7b383d..891626a 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -423,7 +423,8 @@ static int _hardware_enqueue(struct ci_hw_ep *hwep, struct ci_hw_req *hwreq) hwreq->req.status = -EALREADY; - ret = usb_gadget_map_request(&ci->gadget, &hwreq->req, hwep->dir); + ret = usb_gadget_map_request_by_dev(ci->dev->parent, + &hwreq->req, hwep->dir); if (ret) return ret; @@ -603,7 +604,8 @@ static int _hardware_dequeue(struct ci_hw_ep *hwep, struct ci_hw_req *hwreq) list_del_init(&node->td); } - usb_gadget_unmap_request(&hwep->ci->gadget, &hwreq->req, hwep->dir); + usb_gadget_unmap_request_by_dev(hwep->ci->dev->parent, + &hwreq->req, hwep->dir); hwreq->req.actual += actual; @@ -1904,13 +1906,13 @@ static int udc_start(struct ci_hdrc *ci) INIT_LIST_HEAD(&ci->gadget.ep_list); /* alloc resources */ - ci->qh_pool = dma_pool_create("ci_hw_qh", dev, + ci->qh_pool = dma_pool_create("ci_hw_qh", dev->parent, sizeof(struct ci_hw_qh), 64, CI_HDRC_PAGE_SIZE); if (ci->qh_pool == NULL) return -ENOMEM; - ci->td_pool = dma_pool_create("ci_hw_td", dev, + ci->td_pool = dma_pool_create("ci_hw_td", dev->parent, sizeof(struct ci_hw_td), 64, CI_HDRC_PAGE_SIZE); if (ci->td_pool == NULL) { -- 2.1.0