aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/leon/patches/016-ioport_update.patch
blob: 130b36ed1139b21040ff64f6b9311be515651acc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From 36cad96a50eb877d0c5cb3d8d93c1807ad9c774c Mon Sep 17 00:00:00 2001
From: Daniel Hellstrom <daniel@gaisler.com>
Date: Wed, 1 Dec 2010 09:37:23 +0100
Subject: [PATCH] Fix kristoffers ioport.c patch for more recent kernel.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
---
 arch/sparc/include/asm/dma-mapping.h |   13 +------------
 arch/sparc/kernel/ioport.c           |    3 ++-
 2 files changed, 3 insertions(+), 13 deletions(-)

--- a/arch/sparc/include/asm/dma-mapping.h
+++ b/arch/sparc/include/asm/dma-mapping.h
@@ -51,17 +51,6 @@ static inline int dma_mapping_error(stru
 	return (dma_addr == DMA_ERROR_CODE);
 }
 
-static inline int dma_set_mask(struct device *dev, u64 mask)
-{
-#ifdef CONFIG_PCI
-	if (dev->bus == &pci_bus_type) {
-		if (!dev->dma_mask || !dma_supported(dev, mask))
-			return -EINVAL;
-		*dev->dma_mask = mask;
-		return 0;
-	}
-#endif
-	return -EINVAL;
-}
+extern int dma_set_mask(struct device *dev, u64 dma_mask);
 
 #endif
--- a/arch/sparc/kernel/ioport.c
+++ b/arch/sparc/kernel/ioport.c
@@ -301,7 +301,7 @@ static void *sbus_alloc_coherent(struct
 		goto err_nova;
 	}
 #endif
-	res->name = op->node->name;
+	res->name = op->dev.of_node->name;
 
 	return (void *)(unsigned long)res->start;
 
@@ -737,6 +737,7 @@ int dma_set_mask(struct device *dev, u64
 }
 EXPORT_SYMBOL(dma_set_mask);
 
+
 #ifdef CONFIG_PROC_FS
 
 static int sparc_io_proc_show(struct seq_file *m, void *v)