diff options
-rw-r--r-- | arch/sparc/include/asm/ebus_64.h | 31 | ||||
-rw-r--r-- | arch/sparc/include/asm/ebus_dma.h | 35 | ||||
-rw-r--r-- | arch/sparc/include/asm/floppy_64.h | 1 | ||||
-rw-r--r-- | arch/sparc/include/asm/parport.h | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/ebus.c | 1 | ||||
-rw-r--r-- | sound/sparc/cs4231.c | 1 |
6 files changed, 39 insertions, 32 deletions
diff --git a/arch/sparc/include/asm/ebus_64.h b/arch/sparc/include/asm/ebus_64.h index 14c6a111f60c..cd102b8e28d3 100644 --- a/arch/sparc/include/asm/ebus_64.h +++ b/arch/sparc/include/asm/ebus_64.h | |||
@@ -48,37 +48,6 @@ struct linux_ebus { | |||
48 | }; | 48 | }; |
49 | #define to_ebus(d) container_of(d, struct linux_ebus, ofdev.dev) | 49 | #define to_ebus(d) container_of(d, struct linux_ebus, ofdev.dev) |
50 | 50 | ||
51 | struct ebus_dma_info { | ||
52 | spinlock_t lock; | ||
53 | void __iomem *regs; | ||
54 | |||
55 | unsigned int flags; | ||
56 | #define EBUS_DMA_FLAG_USE_EBDMA_HANDLER 0x00000001 | ||
57 | #define EBUS_DMA_FLAG_TCI_DISABLE 0x00000002 | ||
58 | |||
59 | /* These are only valid is EBUS_DMA_FLAG_USE_EBDMA_HANDLER is | ||
60 | * set. | ||
61 | */ | ||
62 | void (*callback)(struct ebus_dma_info *p, int event, void *cookie); | ||
63 | void *client_cookie; | ||
64 | unsigned int irq; | ||
65 | #define EBUS_DMA_EVENT_ERROR 1 | ||
66 | #define EBUS_DMA_EVENT_DMA 2 | ||
67 | #define EBUS_DMA_EVENT_DEVICE 4 | ||
68 | |||
69 | unsigned char name[64]; | ||
70 | }; | ||
71 | |||
72 | extern int ebus_dma_register(struct ebus_dma_info *p); | ||
73 | extern int ebus_dma_irq_enable(struct ebus_dma_info *p, int on); | ||
74 | extern void ebus_dma_unregister(struct ebus_dma_info *p); | ||
75 | extern int ebus_dma_request(struct ebus_dma_info *p, dma_addr_t bus_addr, | ||
76 | size_t len); | ||
77 | extern void ebus_dma_prepare(struct ebus_dma_info *p, int write); | ||
78 | extern unsigned int ebus_dma_residue(struct ebus_dma_info *p); | ||
79 | extern unsigned int ebus_dma_addr(struct ebus_dma_info *p); | ||
80 | extern void ebus_dma_enable(struct ebus_dma_info *p, int on); | ||
81 | |||
82 | extern struct linux_ebus *ebus_chain; | 51 | extern struct linux_ebus *ebus_chain; |
83 | 52 | ||
84 | extern void ebus_init(void); | 53 | extern void ebus_init(void); |
diff --git a/arch/sparc/include/asm/ebus_dma.h b/arch/sparc/include/asm/ebus_dma.h new file mode 100644 index 000000000000..f07a5b541c98 --- /dev/null +++ b/arch/sparc/include/asm/ebus_dma.h | |||
@@ -0,0 +1,35 @@ | |||
1 | #ifndef __ASM_SPARC_EBUS_DMA_H | ||
2 | #define __ASM_SPARC_EBUS_DMA_H | ||
3 | |||
4 | struct ebus_dma_info { | ||
5 | spinlock_t lock; | ||
6 | void __iomem *regs; | ||
7 | |||
8 | unsigned int flags; | ||
9 | #define EBUS_DMA_FLAG_USE_EBDMA_HANDLER 0x00000001 | ||
10 | #define EBUS_DMA_FLAG_TCI_DISABLE 0x00000002 | ||
11 | |||
12 | /* These are only valid is EBUS_DMA_FLAG_USE_EBDMA_HANDLER is | ||
13 | * set. | ||
14 | */ | ||
15 | void (*callback)(struct ebus_dma_info *p, int event, void *cookie); | ||
16 | void *client_cookie; | ||
17 | unsigned int irq; | ||
18 | #define EBUS_DMA_EVENT_ERROR 1 | ||
19 | #define EBUS_DMA_EVENT_DMA 2 | ||
20 | #define EBUS_DMA_EVENT_DEVICE 4 | ||
21 | |||
22 | unsigned char name[64]; | ||
23 | }; | ||
24 | |||
25 | extern int ebus_dma_register(struct ebus_dma_info *p); | ||
26 | extern int ebus_dma_irq_enable(struct ebus_dma_info *p, int on); | ||
27 | extern void ebus_dma_unregister(struct ebus_dma_info *p); | ||
28 | extern int ebus_dma_request(struct ebus_dma_info *p, dma_addr_t bus_addr, | ||
29 | size_t len); | ||
30 | extern void ebus_dma_prepare(struct ebus_dma_info *p, int write); | ||
31 | extern unsigned int ebus_dma_residue(struct ebus_dma_info *p); | ||
32 | extern unsigned int ebus_dma_addr(struct ebus_dma_info *p); | ||
33 | extern void ebus_dma_enable(struct ebus_dma_info *p, int on); | ||
34 | |||
35 | #endif /* __ASM_SPARC_EBUS_DMA_H */ | ||
diff --git a/arch/sparc/include/asm/floppy_64.h b/arch/sparc/include/asm/floppy_64.h index d8fb0602745e..8c7a06e88249 100644 --- a/arch/sparc/include/asm/floppy_64.h +++ b/arch/sparc/include/asm/floppy_64.h | |||
@@ -294,6 +294,7 @@ static int sun_fd_eject(int drive) | |||
294 | 294 | ||
295 | #ifdef CONFIG_PCI | 295 | #ifdef CONFIG_PCI |
296 | #include <asm/ebus.h> | 296 | #include <asm/ebus.h> |
297 | #include <asm/ebus_dma.h> | ||
297 | #include <asm/ns87303.h> | 298 | #include <asm/ns87303.h> |
298 | 299 | ||
299 | static struct ebus_dma_info sun_pci_fd_ebus_dma; | 300 | static struct ebus_dma_info sun_pci_fd_ebus_dma; |
diff --git a/arch/sparc/include/asm/parport.h b/arch/sparc/include/asm/parport.h index d9830621c906..70dce0273f99 100644 --- a/arch/sparc/include/asm/parport.h +++ b/arch/sparc/include/asm/parport.h | |||
@@ -8,7 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/of_device.h> | 9 | #include <linux/of_device.h> |
10 | 10 | ||
11 | #include <asm/ebus.h> | 11 | #include <asm/ebus_dma.h> |
12 | #include <asm/ns87303.h> | 12 | #include <asm/ns87303.h> |
13 | #include <asm/prom.h> | 13 | #include <asm/prom.h> |
14 | 14 | ||
diff --git a/arch/sparc64/kernel/ebus.c b/arch/sparc64/kernel/ebus.c index 214da1bd8a51..88408741c320 100644 --- a/arch/sparc64/kernel/ebus.c +++ b/arch/sparc64/kernel/ebus.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <asm/system.h> | 19 | #include <asm/system.h> |
20 | #include <asm/page.h> | 20 | #include <asm/page.h> |
21 | #include <asm/ebus.h> | 21 | #include <asm/ebus.h> |
22 | #include <asm/ebus_dma.h> | ||
22 | #include <asm/oplib.h> | 23 | #include <asm/oplib.h> |
23 | #include <asm/prom.h> | 24 | #include <asm/prom.h> |
24 | #include <asm/irq.h> | 25 | #include <asm/irq.h> |
diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c index 271b0420f8be..e6dba4f7169c 100644 --- a/sound/sparc/cs4231.c +++ b/sound/sparc/cs4231.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #define EBUS_SUPPORT | 36 | #define EBUS_SUPPORT |
37 | #include <linux/pci.h> | 37 | #include <linux/pci.h> |
38 | #include <asm/ebus.h> | 38 | #include <asm/ebus.h> |
39 | #include <asm/ebus_dma.h> | ||
39 | #endif | 40 | #endif |
40 | 41 | ||
41 | static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ | 42 | static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ |