Commit 759ee81be6d87c150ea2b300c221b4fec8b5f646
1 parent
12b1c03df1
Exists in
master
and in
39 other branches
alsa: Remove special SBUS dma support code.
No longer used. Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 4 changed files with 2 additions and 56 deletions Side-by-side Diff
Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
... | ... | @@ -5073,8 +5073,7 @@ |
5073 | 5073 | with <constant>SNDRV_DMA_TYPE_CONTINUOUS</constant> type and the |
5074 | 5074 | <function>snd_dma_continuous_data(GFP_KERNEL)</function> device pointer, |
5075 | 5075 | where <constant>GFP_KERNEL</constant> is the kernel allocation flag to |
5076 | - use. For the SBUS, <constant>SNDRV_DMA_TYPE_SBUS</constant> and | |
5077 | - <function>snd_dma_sbus_data(sbus_dev)</function> are used instead. | |
5076 | + use. | |
5078 | 5077 | For the PCI scatter-gather buffers, use |
5079 | 5078 | <constant>SNDRV_DMA_TYPE_DEV_SG</constant> with |
5080 | 5079 | <function>snd_dma_pci_data(pci)</function> |
include/sound/core.h
include/sound/memalloc.h
... | ... | @@ -37,7 +37,6 @@ |
37 | 37 | #ifndef snd_dma_pci_data |
38 | 38 | #define snd_dma_pci_data(pci) (&(pci)->dev) |
39 | 39 | #define snd_dma_isa_data() NULL |
40 | -#define snd_dma_sbus_data(sbus) ((struct device *)(sbus)) | |
41 | 40 | #define snd_dma_continuous_data(x) ((struct device *)(unsigned long)(x)) |
42 | 41 | #endif |
43 | 42 | |
... | ... | @@ -49,7 +48,6 @@ |
49 | 48 | #define SNDRV_DMA_TYPE_CONTINUOUS 1 /* continuous no-DMA memory */ |
50 | 49 | #define SNDRV_DMA_TYPE_DEV 2 /* generic device continuous */ |
51 | 50 | #define SNDRV_DMA_TYPE_DEV_SG 3 /* generic device SG-buffer */ |
52 | -#define SNDRV_DMA_TYPE_SBUS 4 /* SBUS continuous */ | |
53 | 51 | |
54 | 52 | /* |
55 | 53 | * info for buffer allocation |
sound/core/memalloc.c
... | ... | @@ -33,9 +33,6 @@ |
33 | 33 | #include <linux/moduleparam.h> |
34 | 34 | #include <linux/mutex.h> |
35 | 35 | #include <sound/memalloc.h> |
36 | -#ifdef CONFIG_SBUS | |
37 | -#include <asm/sbus.h> | |
38 | -#endif | |
39 | 36 | |
40 | 37 | |
41 | 38 | MODULE_AUTHOR("Takashi Iwai <tiwai@suse.de>, Jaroslav Kysela <perex@perex.cz>"); |
... | ... | @@ -180,41 +177,6 @@ |
180 | 177 | } |
181 | 178 | #endif /* CONFIG_HAS_DMA */ |
182 | 179 | |
183 | -#ifdef CONFIG_SBUS | |
184 | - | |
185 | -static void *snd_malloc_sbus_pages(struct device *dev, size_t size, | |
186 | - dma_addr_t *dma_addr) | |
187 | -{ | |
188 | - struct sbus_dev *sdev = (struct sbus_dev *)dev; | |
189 | - int pg; | |
190 | - void *res; | |
191 | - | |
192 | - snd_assert(size > 0, return NULL); | |
193 | - snd_assert(dma_addr != NULL, return NULL); | |
194 | - pg = get_order(size); | |
195 | - res = dma_alloc_coherent(&sdev->ofdev.dev, PAGE_SIZE * (1 << pg), | |
196 | - dma_addr, GFP_ATOMIC); | |
197 | - if (res != NULL) | |
198 | - inc_snd_pages(pg); | |
199 | - return res; | |
200 | -} | |
201 | - | |
202 | -static void snd_free_sbus_pages(struct device *dev, size_t size, | |
203 | - void *ptr, dma_addr_t dma_addr) | |
204 | -{ | |
205 | - struct sbus_dev *sdev = (struct sbus_dev *)dev; | |
206 | - int pg; | |
207 | - | |
208 | - if (ptr == NULL) | |
209 | - return; | |
210 | - pg = get_order(size); | |
211 | - dec_snd_pages(pg); | |
212 | - dma_free_coherent(&sdev->ofdev.dev, PAGE_SIZE * (1 << pg), | |
213 | - ptr, dma_addr); | |
214 | -} | |
215 | - | |
216 | -#endif /* CONFIG_SBUS */ | |
217 | - | |
218 | 180 | /* |
219 | 181 | * |
220 | 182 | * ALSA generic memory management |
... | ... | @@ -249,11 +211,6 @@ |
249 | 211 | dmab->area = snd_malloc_pages(size, (unsigned long)device); |
250 | 212 | dmab->addr = 0; |
251 | 213 | break; |
252 | -#ifdef CONFIG_SBUS | |
253 | - case SNDRV_DMA_TYPE_SBUS: | |
254 | - dmab->area = snd_malloc_sbus_pages(device, size, &dmab->addr); | |
255 | - break; | |
256 | -#endif | |
257 | 214 | #ifdef CONFIG_HAS_DMA |
258 | 215 | case SNDRV_DMA_TYPE_DEV: |
259 | 216 | dmab->area = snd_malloc_dev_pages(device, size, &dmab->addr); |
... | ... | @@ -322,11 +279,6 @@ |
322 | 279 | case SNDRV_DMA_TYPE_CONTINUOUS: |
323 | 280 | snd_free_pages(dmab->area, dmab->bytes); |
324 | 281 | break; |
325 | -#ifdef CONFIG_SBUS | |
326 | - case SNDRV_DMA_TYPE_SBUS: | |
327 | - snd_free_sbus_pages(dmab->dev.dev, dmab->bytes, dmab->area, dmab->addr); | |
328 | - break; | |
329 | -#endif | |
330 | 282 | #ifdef CONFIG_HAS_DMA |
331 | 283 | case SNDRV_DMA_TYPE_DEV: |
332 | 284 | snd_free_dev_pages(dmab->dev.dev, dmab->bytes, dmab->area, dmab->addr); |
... | ... | @@ -433,7 +385,7 @@ |
433 | 385 | long pages = snd_allocated_pages >> (PAGE_SHIFT-12); |
434 | 386 | struct snd_mem_list *mem; |
435 | 387 | int devno; |
436 | - static char *types[] = { "UNKNOWN", "CONT", "DEV", "DEV-SG", "SBUS" }; | |
388 | + static char *types[] = { "UNKNOWN", "CONT", "DEV", "DEV-SG" }; | |
437 | 389 | |
438 | 390 | mutex_lock(&list_mutex); |
439 | 391 | seq_printf(seq, "pages : %li bytes (%li pages per %likB)\n", |