diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-05 19:15:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-05 19:15:33 -0400 |
commit | 2b03adc1911d1c84cb7fad8b424234f589547cb3 (patch) | |
tree | ca817632d166046bbfe917894afd99c698d47627 /arch/microblaze/include | |
parent | eb3d3ec567e868c8a3bfbfdfc9465ffd52983d11 (diff) | |
parent | 225fba216261b0e24273f5f4eee504e3c7bd0255 (diff) |
Merge tag 'microblaze-3.16-rc1' of git://git.monstr.eu/linux-2.6-microblaze into next
Pull Microblaze updates from Michal Simek:
- cleanup PCI and DMA handling
- use generic device.h
- some cleanups
* tag 'microblaze-3.16-rc1' of git://git.monstr.eu/linux-2.6-microblaze:
microblaze: Fix typo in head.S s/substract/subtract/
microblaze: remove check for CONFIG_XILINX_CONSOLE
microblaze: Use generic device.h
microblaze: Do not setup empty unmap_sg function
microblaze: Remove device_to_mask
microblaze: Clean device dma_ops structure
microblaze: Cleanup PCI_DRAM_OFFSET handling
microblaze: Do not setup pci_dma_ops
microblaze: Return default dma operations
microblaze: Enable SERIAL_OF_PLATFORM
Diffstat (limited to 'arch/microblaze/include')
-rw-r--r-- | arch/microblaze/include/asm/Kbuild | 1 | ||||
-rw-r--r-- | arch/microblaze/include/asm/device.h | 26 | ||||
-rw-r--r-- | arch/microblaze/include/asm/dma-mapping.h | 25 | ||||
-rw-r--r-- | arch/microblaze/include/asm/io.h | 3 | ||||
-rw-r--r-- | arch/microblaze/include/asm/pci.h | 8 |
5 files changed, 2 insertions, 61 deletions
diff --git a/arch/microblaze/include/asm/Kbuild b/arch/microblaze/include/asm/Kbuild index c98ed95c0541..35b3ecaf25d5 100644 --- a/arch/microblaze/include/asm/Kbuild +++ b/arch/microblaze/include/asm/Kbuild | |||
@@ -2,6 +2,7 @@ | |||
2 | generic-y += barrier.h | 2 | generic-y += barrier.h |
3 | generic-y += clkdev.h | 3 | generic-y += clkdev.h |
4 | generic-y += cputime.h | 4 | generic-y += cputime.h |
5 | generic-y += device.h | ||
5 | generic-y += exec.h | 6 | generic-y += exec.h |
6 | generic-y += hash.h | 7 | generic-y += hash.h |
7 | generic-y += mcs_spinlock.h | 8 | generic-y += mcs_spinlock.h |
diff --git a/arch/microblaze/include/asm/device.h b/arch/microblaze/include/asm/device.h deleted file mode 100644 index 123b2fe72d01..000000000000 --- a/arch/microblaze/include/asm/device.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /* | ||
2 | * Arch specific extensions to struct device | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License v2. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | */ | ||
8 | |||
9 | #ifndef _ASM_MICROBLAZE_DEVICE_H | ||
10 | #define _ASM_MICROBLAZE_DEVICE_H | ||
11 | |||
12 | struct device_node; | ||
13 | |||
14 | struct dev_archdata { | ||
15 | /* DMA operations on that device */ | ||
16 | struct dma_map_ops *dma_ops; | ||
17 | void *dma_data; | ||
18 | }; | ||
19 | |||
20 | struct pdev_archdata { | ||
21 | u64 dma_mask; | ||
22 | }; | ||
23 | |||
24 | #endif /* _ASM_MICROBLAZE_DEVICE_H */ | ||
25 | |||
26 | |||
diff --git a/arch/microblaze/include/asm/dma-mapping.h b/arch/microblaze/include/asm/dma-mapping.h index 46460f1c49c4..ab353723076a 100644 --- a/arch/microblaze/include/asm/dma-mapping.h +++ b/arch/microblaze/include/asm/dma-mapping.h | |||
@@ -35,16 +35,6 @@ | |||
35 | #define __dma_alloc_coherent(dev, gfp, size, handle) NULL | 35 | #define __dma_alloc_coherent(dev, gfp, size, handle) NULL |
36 | #define __dma_free_coherent(size, addr) ((void)0) | 36 | #define __dma_free_coherent(size, addr) ((void)0) |
37 | 37 | ||
38 | static inline unsigned long device_to_mask(struct device *dev) | ||
39 | { | ||
40 | if (dev->dma_mask && *dev->dma_mask) | ||
41 | return *dev->dma_mask; | ||
42 | /* Assume devices without mask can take 32 bit addresses */ | ||
43 | return 0xfffffffful; | ||
44 | } | ||
45 | |||
46 | extern struct dma_map_ops *dma_ops; | ||
47 | |||
48 | /* | 38 | /* |
49 | * Available generic sets of operations | 39 | * Available generic sets of operations |
50 | */ | 40 | */ |
@@ -52,20 +42,7 @@ extern struct dma_map_ops dma_direct_ops; | |||
52 | 42 | ||
53 | static inline struct dma_map_ops *get_dma_ops(struct device *dev) | 43 | static inline struct dma_map_ops *get_dma_ops(struct device *dev) |
54 | { | 44 | { |
55 | /* We don't handle the NULL dev case for ISA for now. We could | 45 | return &dma_direct_ops; |
56 | * do it via an out of line call but it is not needed for now. The | ||
57 | * only ISA DMA device we support is the floppy and we have a hack | ||
58 | * in the floppy driver directly to get a device for us. | ||
59 | */ | ||
60 | if (unlikely(!dev) || !dev->archdata.dma_ops) | ||
61 | return NULL; | ||
62 | |||
63 | return dev->archdata.dma_ops; | ||
64 | } | ||
65 | |||
66 | static inline void set_dma_ops(struct device *dev, struct dma_map_ops *ops) | ||
67 | { | ||
68 | dev->archdata.dma_ops = ops; | ||
69 | } | 46 | } |
70 | 47 | ||
71 | static inline int dma_supported(struct device *dev, u64 mask) | 48 | static inline int dma_supported(struct device *dev, u64 mask) |
diff --git a/arch/microblaze/include/asm/io.h b/arch/microblaze/include/asm/io.h index 1e4c3329f62e..433751b2a003 100644 --- a/arch/microblaze/include/asm/io.h +++ b/arch/microblaze/include/asm/io.h | |||
@@ -19,17 +19,14 @@ | |||
19 | #ifndef CONFIG_PCI | 19 | #ifndef CONFIG_PCI |
20 | #define _IO_BASE 0 | 20 | #define _IO_BASE 0 |
21 | #define _ISA_MEM_BASE 0 | 21 | #define _ISA_MEM_BASE 0 |
22 | #define PCI_DRAM_OFFSET 0 | ||
23 | #else | 22 | #else |
24 | #define _IO_BASE isa_io_base | 23 | #define _IO_BASE isa_io_base |
25 | #define _ISA_MEM_BASE isa_mem_base | 24 | #define _ISA_MEM_BASE isa_mem_base |
26 | #define PCI_DRAM_OFFSET pci_dram_offset | ||
27 | struct pci_dev; | 25 | struct pci_dev; |
28 | extern void pci_iounmap(struct pci_dev *dev, void __iomem *); | 26 | extern void pci_iounmap(struct pci_dev *dev, void __iomem *); |
29 | #define pci_iounmap pci_iounmap | 27 | #define pci_iounmap pci_iounmap |
30 | 28 | ||
31 | extern unsigned long isa_io_base; | 29 | extern unsigned long isa_io_base; |
32 | extern unsigned long pci_dram_offset; | ||
33 | extern resource_size_t isa_mem_base; | 30 | extern resource_size_t isa_mem_base; |
34 | #endif | 31 | #endif |
35 | 32 | ||
diff --git a/arch/microblaze/include/asm/pci.h b/arch/microblaze/include/asm/pci.h index 335524040fff..468aca8cec0d 100644 --- a/arch/microblaze/include/asm/pci.h +++ b/arch/microblaze/include/asm/pci.h | |||
@@ -45,14 +45,6 @@ struct pci_dev; | |||
45 | #define pcibios_assign_all_busses() 0 | 45 | #define pcibios_assign_all_busses() 0 |
46 | 46 | ||
47 | #ifdef CONFIG_PCI | 47 | #ifdef CONFIG_PCI |
48 | extern void set_pci_dma_ops(struct dma_map_ops *dma_ops); | ||
49 | extern struct dma_map_ops *get_pci_dma_ops(void); | ||
50 | #else /* CONFIG_PCI */ | ||
51 | #define set_pci_dma_ops(d) | ||
52 | #define get_pci_dma_ops() NULL | ||
53 | #endif | ||
54 | |||
55 | #ifdef CONFIG_PCI | ||
56 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, | 48 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, |
57 | enum pci_dma_burst_strategy *strat, | 49 | enum pci_dma_burst_strategy *strat, |
58 | unsigned long *strategy_parameter) | 50 | unsigned long *strategy_parameter) |