Commit c3cdcac7 authored by Yoshihiro Shimoda's avatar Yoshihiro Shimoda Committed by Felipe Balbi

usb: renesas_usbhs: change arguments of dma_map_ctrl()

Since usbhsg_dma_map_ctrl() needs DMA device structure in the near future,
this patch changes arguments of dma_map_ctrl() to give such data.
(This patch is only change the argument.)
Signed-off-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent e789ece1
...@@ -799,8 +799,10 @@ static int __usbhsf_dma_map_ctrl(struct usbhs_pkt *pkt, int map) ...@@ -799,8 +799,10 @@ static int __usbhsf_dma_map_ctrl(struct usbhs_pkt *pkt, int map)
struct usbhs_pipe *pipe = pkt->pipe; struct usbhs_pipe *pipe = pkt->pipe;
struct usbhs_priv *priv = usbhs_pipe_to_priv(pipe); struct usbhs_priv *priv = usbhs_pipe_to_priv(pipe);
struct usbhs_pipe_info *info = usbhs_priv_to_pipeinfo(priv); struct usbhs_pipe_info *info = usbhs_priv_to_pipeinfo(priv);
struct usbhs_fifo *fifo = usbhs_pipe_to_fifo(pipe);
struct dma_chan *chan = usbhsf_dma_chan_get(fifo, pkt);
return info->dma_map_ctrl(pkt, map); return info->dma_map_ctrl(chan->device->dev, pkt, map);
} }
static void usbhsf_dma_complete(void *arg); static void usbhsf_dma_complete(void *arg);
......
...@@ -191,7 +191,8 @@ static void usbhsg_queue_push(struct usbhsg_uep *uep, ...@@ -191,7 +191,8 @@ static void usbhsg_queue_push(struct usbhsg_uep *uep,
/* /*
* dma map/unmap * dma map/unmap
*/ */
static int usbhsg_dma_map_ctrl(struct usbhs_pkt *pkt, int map) static int usbhsg_dma_map_ctrl(struct device *dma_dev, struct usbhs_pkt *pkt,
int map)
{ {
struct usbhsg_request *ureq = usbhsg_pkt_to_ureq(pkt); struct usbhsg_request *ureq = usbhsg_pkt_to_ureq(pkt);
struct usb_request *req = &ureq->req; struct usb_request *req = &ureq->req;
......
...@@ -929,7 +929,8 @@ static int usbhsh_dcp_queue_push(struct usb_hcd *hcd, ...@@ -929,7 +929,8 @@ static int usbhsh_dcp_queue_push(struct usb_hcd *hcd,
/* /*
* dma map functions * dma map functions
*/ */
static int usbhsh_dma_map_ctrl(struct usbhs_pkt *pkt, int map) static int usbhsh_dma_map_ctrl(struct device *dma_dev, struct usbhs_pkt *pkt,
int map)
{ {
if (map) { if (map) {
struct usbhsh_request *ureq = usbhsh_pkt_to_ureq(pkt); struct usbhsh_request *ureq = usbhsh_pkt_to_ureq(pkt);
......
...@@ -655,7 +655,8 @@ static void usbhsp_put_pipe(struct usbhs_pipe *pipe) ...@@ -655,7 +655,8 @@ static void usbhsp_put_pipe(struct usbhs_pipe *pipe)
} }
void usbhs_pipe_init(struct usbhs_priv *priv, void usbhs_pipe_init(struct usbhs_priv *priv,
int (*dma_map_ctrl)(struct usbhs_pkt *pkt, int map)) int (*dma_map_ctrl)(struct device *dma_dev,
struct usbhs_pkt *pkt, int map))
{ {
struct usbhs_pipe_info *info = usbhs_priv_to_pipeinfo(priv); struct usbhs_pipe_info *info = usbhs_priv_to_pipeinfo(priv);
struct usbhs_pipe *pipe; struct usbhs_pipe *pipe;
......
...@@ -47,7 +47,8 @@ struct usbhs_pipe_info { ...@@ -47,7 +47,8 @@ struct usbhs_pipe_info {
struct usbhs_pipe *pipe; struct usbhs_pipe *pipe;
int size; /* array size of "pipe" */ int size; /* array size of "pipe" */
int (*dma_map_ctrl)(struct usbhs_pkt *pkt, int map); int (*dma_map_ctrl)(struct device *dma_dev, struct usbhs_pkt *pkt,
int map);
}; };
/* /*
...@@ -84,7 +85,8 @@ int usbhs_pipe_is_running(struct usbhs_pipe *pipe); ...@@ -84,7 +85,8 @@ int usbhs_pipe_is_running(struct usbhs_pipe *pipe);
void usbhs_pipe_running(struct usbhs_pipe *pipe, int running); void usbhs_pipe_running(struct usbhs_pipe *pipe, int running);
void usbhs_pipe_init(struct usbhs_priv *priv, void usbhs_pipe_init(struct usbhs_priv *priv,
int (*dma_map_ctrl)(struct usbhs_pkt *pkt, int map)); int (*dma_map_ctrl)(struct device *dma_dev,
struct usbhs_pkt *pkt, int map));
int usbhs_pipe_get_maxpacket(struct usbhs_pipe *pipe); int usbhs_pipe_get_maxpacket(struct usbhs_pipe *pipe);
void usbhs_pipe_clear(struct usbhs_pipe *pipe); void usbhs_pipe_clear(struct usbhs_pipe *pipe);
int usbhs_pipe_is_accessible(struct usbhs_pipe *pipe); int usbhs_pipe_is_accessible(struct usbhs_pipe *pipe);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment