.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * DMA driver for Altera mSGDMA IP core |
---|
3 | 4 | * |
---|
.. | .. |
---|
5 | 6 | * |
---|
6 | 7 | * Based on drivers/dma/xilinx/zynqmp_dma.c, which is: |
---|
7 | 8 | * Copyright (C) 2016 Xilinx, Inc. All rights reserved. |
---|
8 | | - * |
---|
9 | | - * This program is free software: you can redistribute it and/or modify |
---|
10 | | - * it under the terms of the GNU General Public License as published by |
---|
11 | | - * the Free Software Foundation, either version 2 of the License, or |
---|
12 | | - * (at your option) any later version. |
---|
13 | 9 | */ |
---|
14 | 10 | |
---|
15 | 11 | #include <linux/bitops.h> |
---|
.. | .. |
---|
157 | 153 | * struct msgdma_sw_desc - implements a sw descriptor |
---|
158 | 154 | * @async_tx: support for the async_tx api |
---|
159 | 155 | * @hw_desc: assosiated HW descriptor |
---|
160 | | - * @free_list: node of the free SW descriprots list |
---|
| 156 | + * @node: node to move from the free list to the tx list |
---|
| 157 | + * @tx_list: transmit list node |
---|
161 | 158 | */ |
---|
162 | 159 | struct msgdma_sw_desc { |
---|
163 | 160 | struct dma_async_tx_descriptor async_tx; |
---|
.. | .. |
---|
166 | 163 | struct list_head tx_list; |
---|
167 | 164 | }; |
---|
168 | 165 | |
---|
169 | | -/** |
---|
| 166 | +/* |
---|
170 | 167 | * struct msgdma_device - DMA device structure |
---|
171 | 168 | */ |
---|
172 | 169 | struct msgdma_device { |
---|
.. | .. |
---|
262 | 259 | * @dst: Destination buffer address |
---|
263 | 260 | * @src: Source buffer address |
---|
264 | 261 | * @len: Transfer length |
---|
| 262 | + * @stride: Read/write stride value to set |
---|
265 | 263 | */ |
---|
266 | 264 | static void msgdma_desc_config(struct msgdma_extended_desc *desc, |
---|
267 | 265 | dma_addr_t dst, dma_addr_t src, size_t len, |
---|
.. | .. |
---|
680 | 678 | |
---|
681 | 679 | /** |
---|
682 | 680 | * msgdma_tasklet - Schedule completion tasklet |
---|
683 | | - * @data: Pointer to the Altera sSGDMA channel structure |
---|
| 681 | + * @t: Pointer to the Altera sSGDMA channel structure |
---|
684 | 682 | */ |
---|
685 | | -static void msgdma_tasklet(unsigned long data) |
---|
| 683 | +static void msgdma_tasklet(struct tasklet_struct *t) |
---|
686 | 684 | { |
---|
687 | | - struct msgdma_device *mdev = (struct msgdma_device *)data; |
---|
| 685 | + struct msgdma_device *mdev = from_tasklet(mdev, t, irq_tasklet); |
---|
688 | 686 | u32 count; |
---|
689 | 687 | u32 __maybe_unused size; |
---|
690 | 688 | u32 __maybe_unused status; |
---|
.. | .. |
---|
776 | 774 | return -EBUSY; |
---|
777 | 775 | } |
---|
778 | 776 | |
---|
779 | | - *ptr = devm_ioremap_nocache(device, region->start, |
---|
| 777 | + *ptr = devm_ioremap(device, region->start, |
---|
780 | 778 | resource_size(region)); |
---|
781 | 779 | if (*ptr == NULL) { |
---|
782 | | - dev_err(device, "ioremap_nocache of %s failed!", name); |
---|
| 780 | + dev_err(device, "ioremap of %s failed!", name); |
---|
783 | 781 | return -ENOMEM; |
---|
784 | 782 | } |
---|
785 | 783 | |
---|
.. | .. |
---|
832 | 830 | if (ret) |
---|
833 | 831 | return ret; |
---|
834 | 832 | |
---|
835 | | - tasklet_init(&mdev->irq_tasklet, msgdma_tasklet, (unsigned long)mdev); |
---|
| 833 | + tasklet_setup(&mdev->irq_tasklet, msgdma_tasklet); |
---|
836 | 834 | |
---|
837 | 835 | dma_cookie_init(&mdev->dmachan); |
---|
838 | 836 | |
---|