[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1486776443-2280-5-git-send-email-peter.chen@nxp.com>
Date: Sat, 11 Feb 2017 09:27:15 +0800
From: Peter Chen <peter.chen@....com>
To: <gregkh@...uxfoundation.org>, <stern@...land.harvard.edu>,
<ulf.hansson@...aro.org>, <broonie@...nel.org>, <sre@...nel.org>,
<robh+dt@...nel.org>, <shawnguo@...nel.org>, <rjw@...ysocki.net>,
<dbaryshkov@...il.com>
CC: <heiko@...ech.de>, <linux-arm-kernel@...ts.infradead.org>,
<p.zabel@...gutronix.de>, <devicetree@...r.kernel.org>,
<pawel.moll@....com>, <mark.rutland@....com>,
<linux-usb@...r.kernel.org>, <arnd@...db.de>,
<s.hauer@...gutronix.de>, <mail@...iej.szmigiero.name>,
<troy.kisky@...ndarydevices.com>, <festevam@...il.com>,
<oscar@...andei.net>, <stephen.boyd@...aro.org>,
<linux-pm@...r.kernel.org>, <stillcompiling@...il.com>,
<linux-kernel@...r.kernel.org>, <mka@...omium.org>,
<vaibhav.hiremath@...aro.org>, <gary.bisson@...ndarydevices.com>,
<hverkuil@...all.nl>, <krzk@...nel.org>, <frank.li@....com>,
<jun.li@....com>, Sriram Dash <sriram.dash@....com>,
Mathias Nyman <mathias.nyman@...ux.intel.com>
Subject: [PATCH v13 04/12] usb: chipidea: use bus->sysdev for DMA configuration
From: Arnd Bergmann <arnd@...db.de>
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 <arnd@...db.de>
Signed-off-by: Sriram Dash <sriram.dash@....com>
Acked-by: Peter Chen <peter.chen@....com>
Signed-off-by: Mathias Nyman <mathias.nyman@...ux.intel.com>
---
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) {
--
2.7.4
Powered by blists - more mailing lists