public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Chen <hzpeterchen@gmail.com>
To: Sriram Dash <sriram.dash@nxp.com>
Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	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>
Subject: Re: [PATCH v2 2/6] usb: chipidea: use bus->sysdev for DMA configuration
Date: Wed, 2 Nov 2016 14:03:42 +0800	[thread overview]
Message-ID: <20161102060342.GE28525@b29397-desktop> (raw)
In-Reply-To: <1478065093-6923-3-git-send-email-sriram.dash@nxp.com>

On Wed, Nov 02, 2016 at 11:08:09AM +0530, Sriram Dash wrote:
> 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>
> ---
> 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 96ae695..ca27893 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) {
> -- 

Acked-by: Peter Chen <peter.chen@nxp.com>

-- 

Best Regards,
Peter Chen

  reply	other threads:[~2016-11-02  6:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-02  5:38 [PATCH v2 0/6] inherit dma configuration from parent dev Sriram Dash
2016-11-02  5:38 ` [PATCH v2 1/6] usb: separate out sysdev pointer from usb_bus Sriram Dash
2016-11-03 17:49   ` Grygorii Strashko
2016-11-02  5:38 ` [PATCH v2 2/6] usb: chipidea: use bus->sysdev for DMA configuration Sriram Dash
2016-11-02  6:03   ` Peter Chen [this message]
2016-11-02  5:38 ` [PATCH v2 3/6] usb: ehci: fsl: " Sriram Dash
2016-11-02  8:53   ` kbuild test robot
2016-11-02  9:26   ` Sriram Dash
2016-11-02  5:38 ` [PATCH v2 4/6] usb: xhci: " Sriram Dash
2016-11-02  5:38 ` [PATCH v2 5/6] usb: dwc3: " Sriram Dash
2016-11-02  5:38 ` [PATCH v2 6/6] usb: dwc3: Do not set dma coherent mask Sriram Dash

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=20161102060342.GE28525@b29397-desktop \
    --to=hzpeterchen@gmail.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=sriram.dash@nxp.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