hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/arch/arm/kernel/dma-isa.c
....@@ -1,11 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * linux/arch/arm/kernel/dma-isa.c
34 *
45 * Copyright (C) 1999-2000 Russell King
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
96 *
107 * ISA DMA primitives
118 * Taken from various sources, including:
....@@ -55,6 +52,12 @@
5552 return chan < 4 ? count : (count << 1);
5653 }
5754
55
+static struct device isa_dma_dev = {
56
+ .init_name = "fallback device",
57
+ .coherent_dma_mask = ~(dma_addr_t)0,
58
+ .dma_mask = &isa_dma_dev.coherent_dma_mask,
59
+};
60
+
5861 static void isa_enable_dma(unsigned int chan, dma_t *dma)
5962 {
6063 if (dma->invalid) {
....@@ -89,7 +92,7 @@
8992 dma->sg = &dma->buf;
9093 dma->sgcount = 1;
9194 dma->buf.length = dma->count;
92
- dma->buf.dma_address = dma_map_single(NULL,
95
+ dma->buf.dma_address = dma_map_single(&isa_dma_dev,
9396 dma->addr, dma->count,
9497 direction);
9598 }