usb: renesas_usbhs: change arguments of dma_map_ctrl()
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Mon, 18 Apr 2016 07:53:41 +0000 (16:53 +0900)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 19 Apr 2016 08:11:54 +0000 (11:11 +0300)
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: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/renesas_usbhs/fifo.c
drivers/usb/renesas_usbhs/mod_gadget.c
drivers/usb/renesas_usbhs/mod_host.c
drivers/usb/renesas_usbhs/pipe.c
drivers/usb/renesas_usbhs/pipe.h

index a805b239e8050938595832499a8b9bf39b17cf1c..7be4e7d57aced9b17c6b5d0fb7877059a280ec53 100644 (file)
@@ -799,8 +799,10 @@ static int __usbhsf_dma_map_ctrl(struct usbhs_pkt *pkt, int map)
        struct usbhs_pipe *pipe = pkt->pipe;
        struct usbhs_priv *priv = usbhs_pipe_to_priv(pipe);
        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);
index 53d104b56ef17a9d47d29a9d1bcdfac9f8f4e7de..d701ae643acecdf623ad60e9cc84ac1ca310a61d 100644 (file)
@@ -191,7 +191,8 @@ static void usbhsg_queue_push(struct usbhsg_uep *uep,
 /*
  *             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 usb_request *req = &ureq->req;
index 1a8e4c45c4c552f816f1488e25633bce241fd0f4..3bf0b72eb359f192422fca689159b2b71669dcdc 100644 (file)
@@ -929,7 +929,8 @@ static int usbhsh_dcp_queue_push(struct usb_hcd *hcd,
 /*
  *             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) {
                struct usbhsh_request *ureq = usbhsh_pkt_to_ureq(pkt);
index 78e9dba701c495bea8b6455ea52ae03677d803ac..77b615ce4a25410be6272ef22638808ad97ac439 100644 (file)
@@ -655,7 +655,8 @@ static void usbhsp_put_pipe(struct usbhs_pipe *pipe)
 }
 
 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 *pipe;
index 7835747f980398a1e8a398e52c02e567bd96b1c7..95185fdb29b1532cfe7f6e0edecd1a25d0c54742 100644 (file)
@@ -47,7 +47,8 @@ struct usbhs_pipe_info {
        struct usbhs_pipe *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);
 void usbhs_pipe_running(struct usbhs_pipe *pipe, int running);
 
 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);
 void usbhs_pipe_clear(struct usbhs_pipe *pipe);
 int usbhs_pipe_is_accessible(struct usbhs_pipe *pipe);