Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754803AbcKJIhC (ORCPT ); Thu, 10 Nov 2016 03:37:02 -0500 Received: from mail-bn3nam01on0061.outbound.protection.outlook.com ([104.47.33.61]:44503 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753732AbcKJIg7 (ORCPT ); Thu, 10 Nov 2016 03:36:59 -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 v3 2/6] usb: chipidea: use bus->sysdev for DMA configuration Date: Thu, 10 Nov 2016 13:49:57 +0530 Message-ID: <1478766001-26463-3-git-send-email-sriram.dash@nxp.com> X-Mailer: git-send-email 1.7.7.4 In-Reply-To: <1478766001-26463-1-git-send-email-sriram.dash@nxp.com> References: <1478766001-26463-1-git-send-email-sriram.dash@nxp.com> X-IncomingHeaderCount: 11 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131232397499976580;(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)(189002)(199003)(87936001)(5001770100001)(4720700003)(8936002)(8666005)(8676002)(586003)(36756003)(45336002)(960300001)(97736004)(5660300001)(305945005)(52956003)(47776003)(46386002)(33646002)(50226002)(6666003)(626004)(7846002)(90966002)(42186005)(575784001)(50466002)(189998001)(4326007)(48376002)(7416002)(81156014)(81166006)(76176999)(103686003)(50986999)(5003940100001)(101416001)(42882006)(86372001)(2906002)(68736007)(106466001)(92566002)(356003)(2950100002)(105586002)(7059030);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR03MB2892;H:tx30smr01.am.freescale.net;FPR:;SPF:None;PTR:InfoDomainNonexistent;MX:1;A:0;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD024;1:/E0ohChLlXNRBK6t4hx8wcjl+8Ta3LWtbtDUj6+gYt4PscdwloTYnOtzpJ4kG5b6mP0VThj7HDqMERiWe55mVQ1I9vuPkicM7XxLS+3/Psj8YxX0n3A2VEltRd/J3TB/wFIa9lYYHHhmZhL2cpASLlzcawZd55gvXRSLpDGLOU1BKjRyaIQt4VM3ch4Fn3g9BD3i9XvTYPzyymvnMnbEw3BuLReyFuq2mOIIk9g8ol+z0UWijmYRuutVLFAV/UysPbvDR+tNszAeNylIyxsJtIqMP3YgBkWFuA5RyG5SMRx4+Lj8GlHg64+1wNJzrXac9tVIRDSsSh69acN9qYlL9i0zX8ceukGH5kNVMTdqs6TcLBT+FtBtwYbIOP/fhjpcKvkLnAtgR38iwdkSLefgSSqiY8Wn4P/YA0FIChoJrBpWg08s9/PH7F7lTVJ9CbjQ+qAeItNRgHHkuLaV4LaDGu7kcguNTTzhnfKDN0rn4sT/oRm06hWvskAfHlIQ7+fABwuwU5kxcLt1+LH/pr30GZtylF6UNgWVZ3KD9Myk2alGPF51l1hexpwthPZJu4zpa+6CtKFzNDcm+zJUD+vytecRI9Nkb5JNIgeD+D8yrhqCrV81FIxiM52cl3Shvb5lQo6q9cBxJV+WKlO+vczvZA== MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1;DM5PR03MB2892;2:TOuOJ8fjbqdgL06OEDO/s0rEkZXHyQIgyCn0SXQXwem6cfyCzcfh9ILaVT4oFheHSWkRnmJwzBjP5vDqnY6ranYgrpgNrPjBVaOInRX6VxFwGfBeEISeMuTTE/F5IL7rGHG/BlU92iL2BOn16uB51iC2Os5dYasSjyKVBluDdMM=;3:fqXYdhk2+BYPJthjSF54VmGkXMZt3FoThiRQQBhrbBmBquhqUIE1Xi9pU2NzzOg2FPJlZThcvE4WxqszyrUCzqA0Z65JNTKLPGu8kT5FzWxTyp1hDb7xqL747gU15+zswsxnWdh8BsOQ15cs3XpB8hGhQpv5Ve8M6MdBH5KzvDofaCzwBcOZZr6+2RMd2kxo4Ryv7VmxmnTbfonD0B38X7xTybdVRjULcb1c5d+EAxpoC2L+9wshT2coZKLLbTK8kHrzyUXXQAsZ22RcZeRrrw== X-MS-Office365-Filtering-Correlation-Id: ec06fa26-56d2-4821-ea24-08d40942b676 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DM5PR03MB2892; X-Microsoft-Exchange-Diagnostics: 1;DM5PR03MB2892;25:c5IV9JPTHeJe/RHcy7kSjdlEQ2io6+Fo9qGxriKxe8oV4XpUyyT0jK+2suva2PYAj1wSJH1ybgCoGw0uUZjgMsb63gfkoJpveH1b2MqFWG2HeuRXtoqGW38Uem3AvENGfTzf8K6WaS3X5NPcjhtMFT1UGWht+opPEDRtJiP38+7TWf5CKJe7c6QeDa0Wr2lPKl4hqU/ZFAySxwl74jbdGFa3K8eKhJVQBMLgDp9sXQOzTP0LKdh8G7i/XCA9r5o3bIkoQfMSru2z7kex7eIo6nNpWyn3Ac2C0PuCv58ceJFq2mcMGj5gdkLgkqvrQ4MdejG4EoTqbjdMBtgjAfOp54I4XtuE7Q73qATHhFnXUT3yHSADZQ2zGzDgaN4iO9nSgS+zmSIcq448tF1RuTIUFqIgkPZfgGJFRHeD3/vhcNhX6/66285bKwlpzyMeWlwuRCWi4UlO89ZQp1/sjJFQ+Q/BpOALd0rjr6G+Yk7XLPB1Z1wcQJQIeA7YYbSW1LYLtOZ+IGdT+NTVzE6ZxEF3LK6056qyPS4CJVVSD34UMzUxucFX7/K1btbx+lzXxRVVolaJSfJU5pqZ2i2QeunxyeoSL6On5jry8BA48nfG25aJrIMfZzfznGsh3dP2BP0K4WhFN93ijkF20KHw1h7fR61QF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tvIkjX/Ysn2xN8 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(13023025)(8121501046)(13024025)(13017025)(5005006)(13015025)(13018025)(10201501046)(3002001)(6055026);SRVR:DM5PR03MB2892;BCL:0;PCL:0;RULEID:(400006);SRVR:DM5PR03MB2892; X-Forefront-PRVS: 01221E3973 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM5PR03MB2892;23:XL2QXmR7ULYAfKpslevfJ5n9FYKSljEsNeJxCRG4c?= =?us-ascii?Q?3xhxMM6Itx/i+ycTJWf10bTO3Rfe8gJNZsuMyrh03uZXkWjNln9im+mdu5De?= =?us-ascii?Q?I7eG0Ai1757i7PwJWt2V0PXpUkV3iOS6MYiuCbDVlPxmqGfJFlPGCJsTK6uO?= =?us-ascii?Q?OsTpK/lR3kkx93bGDiDAhVbS54Oa3ZnFqBdnzqUXpozGip9qQhMd3NyP31zE?= =?us-ascii?Q?4BJb/oD6eCZj9hSPfXu2sJuGIlP6zbMjpGd/+yAxF+b1viY9AVYomAfGRCSr?= =?us-ascii?Q?uKx5snEIOLJkNL0nT9j1IywkAfVSIYWMJkcKk/LtLH/+CxBjYhqCXvabZnKF?= =?us-ascii?Q?FI+VjGZ3lbyWz9CTuoNuWv3p/3ps9tgn8PYdoSr2rRmIhpP0Uauvmtbx5So3?= =?us-ascii?Q?xMYYZvGJ112Dpm127WAEwSXuiP3lLpvQ1HktcaurUPMoNcV5jNfeSAQsnjgU?= =?us-ascii?Q?LvCW3j9uLSIXwOs7zI30MQC/xDMJL0K9GaJ3ZzhgIo7KSmpmKpBpLF41vAFd?= =?us-ascii?Q?bHDW71UXJVX8q2GWlEsCvIV1poX9ZGgR4bzXit5hsQeP+DSM81dOuXQEU4EM?= =?us-ascii?Q?bvQEftOUM/r6BXJKLUwzOOYNDTK49t8nKS3j1dUEjxnikse2p++z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Z+lPM9mkInMuCR9Xd6uaMWe+qrDABEVLXzKQ6oS3rhgsvXVgJCUKJ9lKFIupSQrF5AUWTU;5:5Y1uq1FbCa7oSxpMLltpD48UMv17aT7q0uu6zT8ler11Iivw4DP82T1oe8FzY5/VebEqvZePGrtMPIEqBka+LiCq4nRKfEP/97BIMLux/BopOziNlXlp1Pn4zvgLduc+lQtjsP7iLTd3vUpDRfpfnDhMEmikuZigWj+9z7WjjUisw1aLqQirySGf72iFkYKi;24:WvAMg+yc7ogH8rJ1M8LoloaypWbVxybUVui/G2SIaiHeQyQ5APPTjpJ3jDoUJD1z0uO4dlDzHA2Lhnz7wggtoqJS9NKcovetd8oMGdMz+/E= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM5PR03MB2892;7:Waed/WA40kRT9qc2GEw+Vd19/PzXt7HuzGZ1m+MOlxxn795ziMVbPmfSEzMBGd+8pXjiam8Fr+pE8jRGJcwphi+yBvjPEKSEPkaZaZdwjAITwiZarQ70hrHgcooqwZ4mIoO+z/K2wwCGVUjbMy3NqBlIqTgpaMayUlGafhIpEqMcq6g/PU4ENg4B4FlUVAcs090fdZPuin4wgm9s4+S06v54FxZBcWoXfo4LrchP8B+nNPOutrFgHhys/Ns36a/hf4ZSWLmI2HeDfnJM00s/RKS4j5tzm+I/JOyhfe04hnNjJCBMkcN4wGEAhE6jN4xmFislNA6IGJhKK0u523Cl6CDvF/UamLk4EpZVHzU8hj0= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2016 08:22:29.7636 (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: DM5PR03MB2892 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2952 Lines: 91 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 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 661f43f..bc55922 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