aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/renesas_usbhs
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2013-12-10 22:09:02 -0500
committerFelipe Balbi <balbi@ti.com>2013-12-12 14:43:34 -0500
commit1b2e21b082a1c67cd7861bd86c4a46a3f0f348ea (patch)
treea7c3ec5932385bac1a0c54df9d0d47cd69e08253 /drivers/usb/renesas_usbhs
parent25acdd08fd715cf612428c2b3c39ce2a41926238 (diff)
usb: renesas_usbhs: fifo: request DMAEngine once
DMAEngine uses IRQ if dma_request_channel() was called, and it is using devm_request_irq() today, OTOH, dma_request_channel() will be called when each USB connection happened on this driver. This means same IRQ will be requested many times whenever each USB connected, and this IRQ isn't freed when USB disconnected. Request DMAEngine once. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/renesas_usbhs')
-rw-r--r--drivers/usb/renesas_usbhs/fifo.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c
index 45b94019aec8..d49f9c326035 100644
--- a/drivers/usb/renesas_usbhs/fifo.c
+++ b/drivers/usb/renesas_usbhs/fifo.c
@@ -1124,19 +1124,8 @@ void usbhs_fifo_init(struct usbhs_priv *priv)
1124 mod->irq_brdysts = 0; 1124 mod->irq_brdysts = 0;
1125 1125
1126 cfifo->pipe = NULL; 1126 cfifo->pipe = NULL;
1127 cfifo->tx_chan = NULL;
1128 cfifo->rx_chan = NULL;
1129
1130 d0fifo->pipe = NULL; 1127 d0fifo->pipe = NULL;
1131 d0fifo->tx_chan = NULL;
1132 d0fifo->rx_chan = NULL;
1133
1134 d1fifo->pipe = NULL; 1128 d1fifo->pipe = NULL;
1135 d1fifo->tx_chan = NULL;
1136 d1fifo->rx_chan = NULL;
1137
1138 usbhsf_dma_init(priv, usbhsf_get_d0fifo(priv));
1139 usbhsf_dma_init(priv, usbhsf_get_d1fifo(priv));
1140} 1129}
1141 1130
1142void usbhs_fifo_quit(struct usbhs_priv *priv) 1131void usbhs_fifo_quit(struct usbhs_priv *priv)
@@ -1147,9 +1136,6 @@ void usbhs_fifo_quit(struct usbhs_priv *priv)
1147 mod->irq_ready = NULL; 1136 mod->irq_ready = NULL;
1148 mod->irq_bempsts = 0; 1137 mod->irq_bempsts = 0;
1149 mod->irq_brdysts = 0; 1138 mod->irq_brdysts = 0;
1150
1151 usbhsf_dma_quit(priv, usbhsf_get_d0fifo(priv));
1152 usbhsf_dma_quit(priv, usbhsf_get_d1fifo(priv));
1153} 1139}
1154 1140
1155int usbhs_fifo_probe(struct usbhs_priv *priv) 1141int usbhs_fifo_probe(struct usbhs_priv *priv)
@@ -1171,6 +1157,7 @@ int usbhs_fifo_probe(struct usbhs_priv *priv)
1171 fifo->ctr = D0FIFOCTR; 1157 fifo->ctr = D0FIFOCTR;
1172 fifo->tx_slave.shdma_slave.slave_id = usbhs_get_dparam(priv, d0_tx_id); 1158 fifo->tx_slave.shdma_slave.slave_id = usbhs_get_dparam(priv, d0_tx_id);
1173 fifo->rx_slave.shdma_slave.slave_id = usbhs_get_dparam(priv, d0_rx_id); 1159 fifo->rx_slave.shdma_slave.slave_id = usbhs_get_dparam(priv, d0_rx_id);
1160 usbhsf_dma_init(priv, fifo);
1174 1161
1175 /* D1FIFO */ 1162 /* D1FIFO */
1176 fifo = usbhsf_get_d1fifo(priv); 1163 fifo = usbhsf_get_d1fifo(priv);
@@ -1180,10 +1167,13 @@ int usbhs_fifo_probe(struct usbhs_priv *priv)
1180 fifo->ctr = D1FIFOCTR; 1167 fifo->ctr = D1FIFOCTR;
1181 fifo->tx_slave.shdma_slave.slave_id = usbhs_get_dparam(priv, d1_tx_id); 1168 fifo->tx_slave.shdma_slave.slave_id = usbhs_get_dparam(priv, d1_tx_id);
1182 fifo->rx_slave.shdma_slave.slave_id = usbhs_get_dparam(priv, d1_rx_id); 1169 fifo->rx_slave.shdma_slave.slave_id = usbhs_get_dparam(priv, d1_rx_id);
1170 usbhsf_dma_init(priv, fifo);
1183 1171
1184 return 0; 1172 return 0;
1185} 1173}
1186 1174
1187void usbhs_fifo_remove(struct usbhs_priv *priv) 1175void usbhs_fifo_remove(struct usbhs_priv *priv)
1188{ 1176{
1177 usbhsf_dma_quit(priv, usbhsf_get_d0fifo(priv));
1178 usbhsf_dma_quit(priv, usbhsf_get_d1fifo(priv));
1189} 1179}