aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/chipidea/udc.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-03-12 22:18:42 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-23 03:20:21 -0400
commitaeb78cda51005fa00943e331c1fb47c6ad74015d (patch)
treea97c366cf5c3a9de5e0e322909617744bfc31701 /drivers/usb/chipidea/udc.c
parenta8c06e407ef969461b7f51ec72839fe382dd3c29 (diff)
usb: chipidea: use bus->sysdev for DMA configuration
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@arndb.de> Signed-off-by: Sriram Dash <sriram.dash@nxp.com> Acked-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea/udc.c')
-rw-r--r--drivers/usb/chipidea/udc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index f88e9157fad0..1fb52359f7b9 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)
423 423
424 hwreq->req.status = -EALREADY; 424 hwreq->req.status = -EALREADY;
425 425
426 ret = usb_gadget_map_request(&ci->gadget, &hwreq->req, hwep->dir); 426 ret = usb_gadget_map_request_by_dev(ci->dev->parent,
427 &hwreq->req, hwep->dir);
427 if (ret) 428 if (ret)
428 return ret; 429 return ret;
429 430
@@ -603,7 +604,8 @@ static int _hardware_dequeue(struct ci_hw_ep *hwep, struct ci_hw_req *hwreq)
603 list_del_init(&node->td); 604 list_del_init(&node->td);
604 } 605 }
605 606
606 usb_gadget_unmap_request(&hwep->ci->gadget, &hwreq->req, hwep->dir); 607 usb_gadget_unmap_request_by_dev(hwep->ci->dev->parent,
608 &hwreq->req, hwep->dir);
607 609
608 hwreq->req.actual += actual; 610 hwreq->req.actual += actual;
609 611
@@ -1899,13 +1901,13 @@ static int udc_start(struct ci_hdrc *ci)
1899 INIT_LIST_HEAD(&ci->gadget.ep_list); 1901 INIT_LIST_HEAD(&ci->gadget.ep_list);
1900 1902
1901 /* alloc resources */ 1903 /* alloc resources */
1902 ci->qh_pool = dma_pool_create("ci_hw_qh", dev, 1904 ci->qh_pool = dma_pool_create("ci_hw_qh", dev->parent,
1903 sizeof(struct ci_hw_qh), 1905 sizeof(struct ci_hw_qh),
1904 64, CI_HDRC_PAGE_SIZE); 1906 64, CI_HDRC_PAGE_SIZE);
1905 if (ci->qh_pool == NULL) 1907 if (ci->qh_pool == NULL)
1906 return -ENOMEM; 1908 return -ENOMEM;
1907 1909
1908 ci->td_pool = dma_pool_create("ci_hw_td", dev, 1910 ci->td_pool = dma_pool_create("ci_hw_td", dev->parent,
1909 sizeof(struct ci_hw_td), 1911 sizeof(struct ci_hw_td),
1910 64, CI_HDRC_PAGE_SIZE); 1912 64, CI_HDRC_PAGE_SIZE);
1911 if (ci->td_pool == NULL) { 1913 if (ci->td_pool == NULL) {