From patchwork Mon Feb 6 09:13:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Chen X-Patchwork-Id: 9557299 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8504F60413 for ; Mon, 6 Feb 2017 09:23:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 720DF27C0B for ; Mon, 6 Feb 2017 09:23:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 65E3A27F88; Mon, 6 Feb 2017 09:23:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00 autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id ADAF727C0B for ; Mon, 6 Feb 2017 09:23:46 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cafWO-0001C1-Cf; Mon, 06 Feb 2017 09:23:40 +0000 Received: from mail-cys01nam02on0063.outbound.protection.outlook.com ([104.47.37.63] helo=NAM02-CY1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cafNs-0004Ya-EK for linux-arm-kernel@lists.infradead.org; Mon, 06 Feb 2017 09:14:54 +0000 Received: from BN6PR03CA0035.namprd03.prod.outlook.com (10.175.124.21) by DM2PR0301MB0735.namprd03.prod.outlook.com (10.160.97.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16; Mon, 6 Feb 2017 09:14:44 +0000 Received: from BN1BFFO11FD025.protection.gbl (2a01:111:f400:7c10::1:130) by BN6PR03CA0035.outlook.office365.com (2603:10b6:404:10c::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16 via Frontend Transport; Mon, 6 Feb 2017 09:14:44 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; linux.intel.com; dkim=none (message not signed) header.d=none; linux.intel.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD025.mail.protection.outlook.com (10.58.144.88) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.888.7 via Frontend Transport; Mon, 6 Feb 2017 09:14:43 +0000 Received: from b29397-desktop.ap.freescale.net (b29397-desktop.ap.freescale.net [10.192.242.114]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v169Dq2P005959; Mon, 6 Feb 2017 02:14:34 -0700 From: Peter Chen To: , , , , , , , , Subject: [PATCH v12 4/9] usb: chipidea: use bus->sysdev for DMA configuration Date: Mon, 6 Feb 2017 17:13:36 +0800 Message-ID: <1486372421-29073-5-git-send-email-peter.chen@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1486372421-29073-1-git-send-email-peter.chen@nxp.com> References: <1486372421-29073-1-git-send-email-peter.chen@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131308460839789431; (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)(7916002)(336005)(39380400002)(39860400002)(39840400002)(39450400003)(39410400002)(39850400002)(39400400002)(2980300002)(1109001)(1110001)(3190300001)(339900001)(199003)(189002)(81156014)(2950100002)(5660300001)(92566002)(81166006)(50226002)(106466001)(189998001)(8936002)(105606002)(5001770100001)(97736004)(8676002)(104016004)(33646002)(2171002)(47776003)(305945005)(356003)(77096006)(68736007)(38730400001)(53936002)(54906002)(7406005)(2201001)(86362001)(5003940100001)(2906002)(39060400001)(4326007)(7416002)(8656002)(76176999)(626004)(50466002)(48376002)(85426001)(50986999)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0301MB0735; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD025; 1:937uYxS1W4A3NmTMa6LdOwRrZGeXBsZ0ENEMs5Vb22HC4cBdx6Jh/ExTe1ZCD4/vhwMFATLmMxmuCWWOWKIDcH+hd7p3H2cz0smn4FAG/FFsGTLr2gNmuGbEzYE1MS+UXZNAL8zImZk6oDNTH++3sutR7fuukIohw0Vdg4Ohig+TlHnXq00TpqzoQNcLg9E9EIgLh/RA712XV42o8vTfVAQLeYOaCUPgg8aoOj+PiICyq7iOMggPL+qXQpE9sCjunjjTZesiR8gGGnwDX80xEuMLLWEZqM1ndajpZ7Yf8dz3cXnJdOX3ch5reO+sgcU3sghELYV+wlngsKJRWYZ36CEC/nTB9zik0LESZBFiaV1T3YD5wawFPHmCtUo9xrMG96CC+Yv/kKGjhaPQHcd/cMUS60vy0DopqVSe8KZA1ApTkj3JT7h3pZppSESYQLDA7+p/1PACGMPpcf8S0aU3YC8RNiijaHSG6jZcMRX0XVKHBzpOnBeuaCw4oHDyyuKzkBRJKCPixpmE17Q6nYAK3vq2dIqPFyDbGkCirqorgYZdvSY9d1oyzNuqAyZxoj3JOZQdpeuDc5Gfd2a6WwsGl7MCNd1gS55fAnAEjra93Nl2/SemY3wcD6UAg+ztd6qcBZlvpAVJBOtTiXRtE/xvzbOaI7Nk9KkHiu23TaitD8CCfe/FM+JejY8D/6wVJNz9 MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 879727b0-023d-4d67-e377-08d44e7096d2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:DM2PR0301MB0735; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0735; 3:5qKGvG3WoPkIOQ9r6OqNz0OI/6gbnihVuChctWLse1AvcOdK23lomnAgSQae+c0m+6+dKtzXPHsuBHdoWKzZyNpk1SZ7i/KCH1yIeo0tIb/OEk80YAMWF8pUDOcciSc4rpyatNkGA8euQnj5bGfaTJsSvN2uclt2k7rCurWRH38x4oynd5dK5xO5EQBqNr7nFw2DUmU7fkcC4UBuHLYhYtAfWz9OyugoMVygl8vBg+32WlcIMs2iqLQSJ8irF9xqkXugOu+sy56Yi0StTY27sYKNeJ1/+aVzKb31ZP5sU9U3dtcSUSEsvPTdiBRZmmSI+HHdvWbhx2kEOSMXfFCN3a/sDZloYERB6jNZ1VlICHU2BP7Xgv4KM8KuMmZkS9ec; 25:d5O6mZPjd37CCxQqSWfWvPiP2PkVj6UtOmZcP61MkT3MgpjLGx5Hkk7vY0+jaygm3wVOwSP5OaA2voAU1pAwXL5PnyfelGYp99SfOXc00aU+6DB2rclbqLhvMbjqULE83wiy53TLT0homAEJTQElwAilfgqL5SEpI0WMbwVI7eCwDkCg26nFXVQtZZwv0qEiZn1M0LhqrzGIuSmOxwuP3VYDwMYHhmw7NIMJKPLPQaUXIWByZeAvPXtB/SajF2Clr5O2EliZRmvl2CMR7yVQzIiWkZUut/BdRKRE67XjZZYcoK5uMVItubK6Iydk+TqJ1NYww3vqlX2GN+xVpTbA7gb1FqECPYtNEqXL16NOvQCp+grfc9rIiaLdVEs2Cn/6SZ6WvZYb3zANs1prSjkd5oPeXE73xnfsSS72P/w2wamInrrn37on1ZHjxDj3aV7iSXdWSmBgYfGzwbUaqkwE4A== X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0735; 31:EW/UgMjNc2+EYpppX9Fy3rQdtMchkvnYnVBmU74tgxFvEM1+iSIqWML549jVVQIx0UOhQ57b+y+l7qQTk9NeVYWP42TJUwIk9dAHgSu88FKUcy9LiMmS+/N+kQ307fI4TbKW+P2fvVr7ui2MaVvpUKobFo3Fnc4AmWmyeBLgKS1Us+3Cvywv3ct9+hwRJRXQS0iKvZnfMtxGSInFcY5eZMECZko6UBpFsmOG7ratvXTVEUdBM1cVhMXpKi7cLrnmkRHuUTL8EOZsinYF1IVq9w== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(13018025)(13024025)(13017025)(5005006)(13015025)(20170203043)(8121501046)(13023025)(10201501046)(3002001)(6055026)(6096035)(20161123563025)(20161123565025)(20161123556025)(20161123559025)(20161123561025); SRVR:DM2PR0301MB0735; BCL:0; PCL:0; RULEID:(400006); SRVR:DM2PR0301MB0735; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0735; 4:wjkkI72ucAhUzlHh0cA8bxl1G+19obmCV/gkhSti6mCO9xAT6rsmGH0BBcFEjs3sCoF8O+Pe+yb6JGvhFhnyQMGolz6JdG0K7DOVyjhUAdLUP+7f2OiOtITtXfOMQch+zYNlv9jmHEoEa+erECT2Twn1HsvLNXPevbg67SSBD/YxlmGfKCwabLNNkPn5bPGDfXUP68/BVyUXoNTkc5Wk/nGGubsyyCT0aNUroCbvoX78Y2zYQ33VZ9/XJ6UzYMXwwpOGVYWVPQ/oe/tq3kdMc2hlBaIgN1PHMNGzYeizOBViVDkdRAJymiR8/S7u3FPsZICmjuCcwrxtbD1bi10Inxskls+B3Dp6WvhNEo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OreIZEaqWTpBKNtH1INZu10bt27Pdi8Y5GcLpL7nBKgBhxqxCvEWNGjG3?= =?us-ascii?Q?p812AWo/bGMjTLyXT91FzCGZgOntroS2+HMCng68hr1WNI/ag?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0735; 6:80nFWpYdgjZSPFL9/KQpWPFbBQO2g/tQZLAavIrjRLql5n4dg/WDxG78fFyuySK+zdEaSsV8vtyox9CbNAWooeSQLLLUUAHj++pBpPae1gM4I7yChxLKQv5OtutECklbtfuXMoRebQGXRBJuJsw6eMXfsKKwUdHMZciW/make2sQUepAkMWEl5WygLkw7xASx+W2sxjjXaD5othl7E1/w3DUB4sZrtC4SOB/aeU969EsfkjCMpJG+xvJuxcsAI9660f6bv0kX5yD3FCLW2gkb8qlQFW8oH5WviYTCUgFD5SL5aJfdIrCxPp2wD1X2OVD3fyrMN+EI2haBD3IfkcP11Qq4P6NpuoGGcHrhtartynUTFNWfqX7eUBD2sVaCTP3TkkhLP6D8Q9RkYjYkc72uGbc8rF9uktEf47b1bhp6AY=; 5:nNIjE5eVWXfKSXueheeLHzcluWzc+1o1iBfqu1DOex5YB7sBoc2SMKP797KuqkZ+TI7no7z/8Mo8QByU4Gkp8Bv9w2AfACs7dlWvgFRv8uM6oajOLiscRrjzEEqSFZcU7FHM/Y6UXVxl967u3IG0QE/ofDVm+NnKxytlgUR2uJQA0akEoWgFep26yFX3uF6J; 24:Dx7FpIs2U5P8Ap+FGbN0HDd2mkGJ9uicXlF9c49jjfcVDCSdPxslGNknHIN8bnnJQu15eJviUqiohLKiI0Fb+q3MTALO0Djxfw/jRUZDma4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0735; 7:y0jjAoS1zq3GubWCaM9dfgKMrYFC17+4MbZOLoG87d8OiGva9QEfFH6+3X24AXL6cdkf/SfLKulc4AvTa0cTqJbaHbzfup0BbeUeCYIyo+eKquMQ9XRqlY/58ydCGSrSEJ0r/kdkW4G4+88t6wk5U/HxiRzrzrVFtWpVwuqOca+z2DTQMJ7q6NJ2LhUBwj0HsdccpsZhuOkBRldVQeI2435AapRVCpsaOIzVa7LHYEAFPoeIaRriuUCnY7EcB2l9BHmY5VQQ9qElJtTpcITGw8DR/vC/TA8afc9anGCegl1Dn8r6KcQNtvlOQ8pJpRRx37DxRPjQiOGN2L+joPgEcqgA+/eIm/c8KhNNylEK/aGya6nWRUaCq0PcnI3PH8yQFE30DH8tsaN6RORLPpQb+8o3yxITjFMKPzGcIvV3k/nTYTqwmt+UHJkr2TXkztLpnxunN73t/DXEauqTshCikjZFy251FciO/UaT7AadH8s1tg8HeCqYoqryTQCTSDppOaR65Uh5yqyvTyeeu6kIaQ== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2017 09:14:43.5109 (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: DM2PR0301MB0735 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170206_011452_670839_FCDD8FF0 X-CRM114-Status: GOOD ( 13.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, heiko@sntech.de, stephen.boyd@linaro.org, gary.bisson@boundarydevices.com, Sriram Dash , festevam@gmail.com, stillcompiling@gmail.com, arnd@arndb.de, vaibhav.hiremath@linaro.org, krzk@kernel.org, mka@chromium.org, devicetree@vger.kernel.org, mail@maciej.szmigiero.name, pawel.moll@arm.com, linux-pm@vger.kernel.org, s.hauer@pengutronix.de, troy.kisky@boundarydevices.com, Mathias Nyman , linux-arm-kernel@lists.infradead.org, hverkuil@xs4all.nl, oscar@naiandei.net, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, p.zabel@pengutronix.de Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Mathias Nyman --- 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 79ad8e9..b4a78b2 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c @@ -783,9 +783,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 915f3e9..18cb8e4 100644 --- a/drivers/usb/chipidea/host.c +++ b/drivers/usb/chipidea/host.c @@ -123,7 +123,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 f88e915..1fb5235 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; @@ -1899,13 +1901,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) {