From: Sriram Dash <sriram.dash@nxp.com>
To: <linux-kernel@vger.kernel.org>, <linux-usb@vger.kernel.org>
Cc: <mathias.nyman@intel.com>, <gregkh@linuxfoundation.org>,
<suresh.gupta@nxp.com>, <felipe.balbi@linux.intel.com>,
<stern@rowland.harvard.edu>, <pku.leo@gmail.com>,
Arnd Bergmann <arnd@arndb.de>, Sriram Dash <sriram.dash@nxp.com>
Subject: [PATCH v5 2/6] usb: chipidea: use bus->sysdev for DMA configuration
Date: Thu, 17 Nov 2016 17:13:44 +0530 [thread overview]
Message-ID: <1479383028-27701-3-git-send-email-sriram.dash@nxp.com> (raw)
In-Reply-To: <1479383028-27701-1-git-send-email-sriram.dash@nxp.com>
From: Arnd Bergmann <arnd@arndb.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@arndb.de>
Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
Acked-by: Peter Chen <peter.chen@nxp.com>
---
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
next prev parent reply other threads:[~2016-11-17 11:45 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-17 11:43 [PATCH v5 0/6] inherit dma configuration from parent dev Sriram Dash
2016-11-17 11:43 ` [PATCH v5 1/6] usb: separate out sysdev pointer from usb_bus Sriram Dash
2016-12-03 0:19 ` Brian Norris
2017-01-06 19:33 ` Grygorii Strashko
2016-12-13 16:09 ` [v5,1/6] " Alexander Sverdlin
2016-11-17 11:43 ` Sriram Dash [this message]
2016-11-17 11:43 ` [PATCH v5 3/6] usb: ehci: fsl: use bus->sysdev for DMA configuration Sriram Dash
2016-11-17 11:43 ` [PATCH v5 4/6] usb: xhci: " Sriram Dash
2016-12-09 11:56 ` Roger Quadros
2016-12-13 16:09 ` [v5,4/6] " Alexander Sverdlin
2017-01-11 14:21 ` [PATCH v5 4/6] " Mathias Nyman
2017-01-11 15:08 ` Alan Stern
2017-01-12 8:38 ` Roger Quadros
2017-01-18 11:58 ` Mathias Nyman
2017-01-19 9:22 ` Greg KH
2017-01-19 11:33 ` Mathias Nyman
2016-11-17 11:43 ` [PATCH v5 5/6] usb: dwc3: " Sriram Dash
2016-12-13 16:09 ` [v5,5/6] " Alexander Sverdlin
2016-11-17 11:43 ` [PATCH v5 6/6] usb: dwc3: Do not set dma coherent mask Sriram Dash
2016-12-13 16:09 ` [v5,6/6] " Alexander Sverdlin
2016-12-22 6:23 ` [PATCH v5 0/6] inherit dma configuration from parent dev Vivek Gautam
2017-01-05 15:21 ` Roger Quadros
2017-01-05 17:16 ` Greg KH
2017-01-10 12:11 ` Roger Quadros
2017-01-11 21:32 ` Javier Martinez Canillas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1479383028-27701-3-git-send-email-sriram.dash@nxp.com \
--to=sriram.dash@nxp.com \
--cc=arnd@arndb.de \
--cc=felipe.balbi@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=pku.leo@gmail.com \
--cc=stern@rowland.harvard.edu \
--cc=suresh.gupta@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).