diff options
| -rw-r--r-- | arch/sparc64/defconfig | 5 | ||||
| -rw-r--r-- | include/asm-sparc64/dma.h | 4 | ||||
| -rw-r--r-- | include/asm-sparc64/parport.h | 22 |
3 files changed, 25 insertions, 6 deletions
diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig index 59eef403c60a..860b8b60526c 100644 --- a/arch/sparc64/defconfig +++ b/arch/sparc64/defconfig | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | # | 1 | # |
| 2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
| 3 | # Linux kernel version: 2.6.21-rc1 | 3 | # Linux kernel version: 2.6.21-rc2 |
| 4 | # Mon Feb 26 10:45:21 2007 | 4 | # Wed Feb 28 09:50:51 2007 |
| 5 | # | 5 | # |
| 6 | CONFIG_SPARC=y | 6 | CONFIG_SPARC=y |
| 7 | CONFIG_SPARC64=y | 7 | CONFIG_SPARC64=y |
| @@ -1219,6 +1219,7 @@ CONFIG_USB_HIDDEV=y | |||
| 1219 | # CONFIG_USB_SISUSBVGA is not set | 1219 | # CONFIG_USB_SISUSBVGA is not set |
| 1220 | # CONFIG_USB_LD is not set | 1220 | # CONFIG_USB_LD is not set |
| 1221 | # CONFIG_USB_TRANCEVIBRATOR is not set | 1221 | # CONFIG_USB_TRANCEVIBRATOR is not set |
| 1222 | # CONFIG_USB_IOWARRIOR is not set | ||
| 1222 | # CONFIG_USB_TEST is not set | 1223 | # CONFIG_USB_TEST is not set |
| 1223 | 1224 | ||
| 1224 | # | 1225 | # |
diff --git a/include/asm-sparc64/dma.h b/include/asm-sparc64/dma.h index 93e5a062df88..1bf4f7a8fbe1 100644 --- a/include/asm-sparc64/dma.h +++ b/include/asm-sparc64/dma.h | |||
| @@ -205,10 +205,6 @@ do { u32 tmp = sbus_readl((__regs) + DMA_CSR); \ | |||
| 205 | #define for_each_dvma(dma) \ | 205 | #define for_each_dvma(dma) \ |
| 206 | for((dma) = dma_chain; (dma); (dma) = (dma)->next) | 206 | for((dma) = dma_chain; (dma); (dma) = (dma)->next) |
| 207 | 207 | ||
| 208 | extern int get_dma_list(char *); | ||
| 209 | extern int request_dma(unsigned int, __const__ char *); | ||
| 210 | extern void free_dma(unsigned int); | ||
| 211 | |||
| 212 | /* From PCI */ | 208 | /* From PCI */ |
| 213 | 209 | ||
| 214 | #ifdef CONFIG_PCI | 210 | #ifdef CONFIG_PCI |
diff --git a/include/asm-sparc64/parport.h b/include/asm-sparc64/parport.h index d3895873e4c7..be9509c8f8c1 100644 --- a/include/asm-sparc64/parport.h +++ b/include/asm-sparc64/parport.h | |||
| @@ -23,8 +23,30 @@ static struct sparc_ebus_info { | |||
| 23 | struct ebus_dma_info info; | 23 | struct ebus_dma_info info; |
| 24 | unsigned int addr; | 24 | unsigned int addr; |
| 25 | unsigned int count; | 25 | unsigned int count; |
| 26 | int lock; | ||
| 26 | } sparc_ebus_dmas[PARPORT_PC_MAX_PORTS]; | 27 | } sparc_ebus_dmas[PARPORT_PC_MAX_PORTS]; |
| 27 | 28 | ||
| 29 | static __inline__ int request_dma(unsigned int dmanr, const char *device_id) | ||
| 30 | { | ||
| 31 | if (dmanr >= PARPORT_PC_MAX_PORTS) | ||
| 32 | return -EINVAL; | ||
| 33 | if (xchg(&sparc_ebus_dmas[dmanr].lock, 1) != 0) | ||
| 34 | return -EBUSY; | ||
| 35 | return 0; | ||
| 36 | } | ||
| 37 | |||
| 38 | static __inline__ void free_dma(unsigned int dmanr) | ||
| 39 | { | ||
| 40 | if (dmanr >= PARPORT_PC_MAX_PORTS) { | ||
| 41 | printk(KERN_WARNING "Trying to free DMA%d\n", dmanr); | ||
| 42 | return; | ||
| 43 | } | ||
| 44 | if (xchg(&sparc_ebus_dmas[dmanr].lock, 0) == 0) { | ||
| 45 | printk(KERN_WARNING "Trying to free free DMA%d\n", dmanr); | ||
| 46 | return; | ||
| 47 | } | ||
| 48 | } | ||
| 49 | |||
| 28 | static __inline__ void enable_dma(unsigned int dmanr) | 50 | static __inline__ void enable_dma(unsigned int dmanr) |
| 29 | { | 51 | { |
| 30 | ebus_dma_enable(&sparc_ebus_dmas[dmanr].info, 1); | 52 | ebus_dma_enable(&sparc_ebus_dmas[dmanr].info, 1); |
