mmp_tdma.c (e3c55d406bd8df1a878546002c93db90c42be10c) mmp_tdma.c (174b537ac2b8fe1bac31039185b80f873716c5a1)
1/*
2 * Driver For Marvell Two-channel DMA Engine
3 *
4 * Copyright: Marvell International Ltd.
5 *
6 * The code contained herein is licensed under the GNU General Public
7 * License. You may obtain a copy of the GNU General Public License
8 * Version 2 or later at the following locations:

--- 310 unchanged lines hidden (view full) ---

319 struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(chan);
320 int ret;
321
322 dma_async_tx_descriptor_init(&tdmac->desc, chan);
323 tdmac->desc.tx_submit = mmp_tdma_tx_submit;
324
325 if (tdmac->irq) {
326 ret = devm_request_irq(tdmac->dev, tdmac->irq,
1/*
2 * Driver For Marvell Two-channel DMA Engine
3 *
4 * Copyright: Marvell International Ltd.
5 *
6 * The code contained herein is licensed under the GNU General Public
7 * License. You may obtain a copy of the GNU General Public License
8 * Version 2 or later at the following locations:

--- 310 unchanged lines hidden (view full) ---

319 struct mmp_tdma_chan *tdmac = to_mmp_tdma_chan(chan);
320 int ret;
321
322 dma_async_tx_descriptor_init(&tdmac->desc, chan);
323 tdmac->desc.tx_submit = mmp_tdma_tx_submit;
324
325 if (tdmac->irq) {
326 ret = devm_request_irq(tdmac->dev, tdmac->irq,
327 mmp_tdma_chan_handler, IRQF_DISABLED, "tdma", tdmac);
327 mmp_tdma_chan_handler, 0, "tdma", tdmac);
328 if (ret)
329 return ret;
330 }
331 return 1;
332}
333
334static void mmp_tdma_free_chan_resources(struct dma_chan *chan)
335{

--- 218 unchanged lines hidden (view full) ---

554 if (IS_ERR(tdev->base))
555 return PTR_ERR(tdev->base);
556
557 INIT_LIST_HEAD(&tdev->device.channels);
558
559 if (irq_num != chan_num) {
560 irq = platform_get_irq(pdev, 0);
561 ret = devm_request_irq(&pdev->dev, irq,
328 if (ret)
329 return ret;
330 }
331 return 1;
332}
333
334static void mmp_tdma_free_chan_resources(struct dma_chan *chan)
335{

--- 218 unchanged lines hidden (view full) ---

554 if (IS_ERR(tdev->base))
555 return PTR_ERR(tdev->base);
556
557 INIT_LIST_HEAD(&tdev->device.channels);
558
559 if (irq_num != chan_num) {
560 irq = platform_get_irq(pdev, 0);
561 ret = devm_request_irq(&pdev->dev, irq,
562 mmp_tdma_int_handler, IRQF_DISABLED, "tdma", tdev);
562 mmp_tdma_int_handler, 0, "tdma", tdev);
563 if (ret)
564 return ret;
565 }
566
567 /* initialize channel parameters */
568 for (i = 0; i < chan_num; i++) {
569 irq = (irq_num != chan_num) ? 0 : platform_get_irq(pdev, i);
570 ret = mmp_tdma_chan_init(tdev, i, irq, type);

--- 54 unchanged lines hidden ---
563 if (ret)
564 return ret;
565 }
566
567 /* initialize channel parameters */
568 for (i = 0; i < chan_num; i++) {
569 irq = (irq_num != chan_num) ? 0 : platform_get_irq(pdev, i);
570 ret = mmp_tdma_chan_init(tdev, i, irq, type);

--- 54 unchanged lines hidden ---