hc
2024-05-10 61598093bbdd283a7edc367d900f223070ead8d2
kernel/drivers/dma/altera-msgdma.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * DMA driver for Altera mSGDMA IP core
34 *
....@@ -5,11 +6,6 @@
56 *
67 * Based on drivers/dma/xilinx/zynqmp_dma.c, which is:
78 * 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.
139 */
1410
1511 #include <linux/bitops.h>
....@@ -157,7 +153,8 @@
157153 * struct msgdma_sw_desc - implements a sw descriptor
158154 * @async_tx: support for the async_tx api
159155 * @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
161158 */
162159 struct msgdma_sw_desc {
163160 struct dma_async_tx_descriptor async_tx;
....@@ -166,7 +163,7 @@
166163 struct list_head tx_list;
167164 };
168165
169
-/**
166
+/*
170167 * struct msgdma_device - DMA device structure
171168 */
172169 struct msgdma_device {
....@@ -262,6 +259,7 @@
262259 * @dst: Destination buffer address
263260 * @src: Source buffer address
264261 * @len: Transfer length
262
+ * @stride: Read/write stride value to set
265263 */
266264 static void msgdma_desc_config(struct msgdma_extended_desc *desc,
267265 dma_addr_t dst, dma_addr_t src, size_t len,
....@@ -680,11 +678,11 @@
680678
681679 /**
682680 * msgdma_tasklet - Schedule completion tasklet
683
- * @data: Pointer to the Altera sSGDMA channel structure
681
+ * @t: Pointer to the Altera sSGDMA channel structure
684682 */
685
-static void msgdma_tasklet(unsigned long data)
683
+static void msgdma_tasklet(struct tasklet_struct *t)
686684 {
687
- struct msgdma_device *mdev = (struct msgdma_device *)data;
685
+ struct msgdma_device *mdev = from_tasklet(mdev, t, irq_tasklet);
688686 u32 count;
689687 u32 __maybe_unused size;
690688 u32 __maybe_unused status;
....@@ -776,10 +774,10 @@
776774 return -EBUSY;
777775 }
778776
779
- *ptr = devm_ioremap_nocache(device, region->start,
777
+ *ptr = devm_ioremap(device, region->start,
780778 resource_size(region));
781779 if (*ptr == NULL) {
782
- dev_err(device, "ioremap_nocache of %s failed!", name);
780
+ dev_err(device, "ioremap of %s failed!", name);
783781 return -ENOMEM;
784782 }
785783
....@@ -832,7 +830,7 @@
832830 if (ret)
833831 return ret;
834832
835
- tasklet_init(&mdev->irq_tasklet, msgdma_tasklet, (unsigned long)mdev);
833
+ tasklet_setup(&mdev->irq_tasklet, msgdma_tasklet);
836834
837835 dma_cookie_init(&mdev->dmachan);
838836