diff options
author | Manuel Lauss <mlau@msc-ge.com> | 2008-05-07 07:45:23 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-06-05 13:13:14 -0400 |
commit | ccdb0034f8d5321be42c479dd7fc872ba2a46adb (patch) | |
tree | 0259d6f41a41959e407a514cb712839e7466960e | |
parent | b1fb05cdb9096e3fe1af4474e108dedce2515801 (diff) |
[MIPS] Alchemy: dbdma: add API to delete custom DDMA device ids.
Add API to delete custom DDMA device ids create with
au1xxx_ddma_device_add().
Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/au1000/common/dbdma.c | 11 | ||||
-rw-r--r-- | include/asm-mips/mach-au1x00/au1xxx_dbdma.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/arch/mips/au1000/common/dbdma.c b/arch/mips/au1000/common/dbdma.c index 42d555236de1..601ee9180ee4 100644 --- a/arch/mips/au1000/common/dbdma.c +++ b/arch/mips/au1000/common/dbdma.c | |||
@@ -216,6 +216,17 @@ u32 au1xxx_ddma_add_device(dbdev_tab_t *dev) | |||
216 | } | 216 | } |
217 | EXPORT_SYMBOL(au1xxx_ddma_add_device); | 217 | EXPORT_SYMBOL(au1xxx_ddma_add_device); |
218 | 218 | ||
219 | void au1xxx_ddma_del_device(u32 devid) | ||
220 | { | ||
221 | dbdev_tab_t *p = find_dbdev_id(devid); | ||
222 | |||
223 | if (p != NULL) { | ||
224 | memset(p, 0, sizeof(dbdev_tab_t)); | ||
225 | p->dev_id = ~0; | ||
226 | } | ||
227 | } | ||
228 | EXPORT_SYMBOL(au1xxx_ddma_del_device); | ||
229 | |||
219 | /* Allocate a channel and return a non-zero descriptor if successful. */ | 230 | /* Allocate a channel and return a non-zero descriptor if successful. */ |
220 | u32 au1xxx_dbdma_chan_alloc(u32 srcid, u32 destid, | 231 | u32 au1xxx_dbdma_chan_alloc(u32 srcid, u32 destid, |
221 | void (*callback)(int, void *), void *callparam) | 232 | void (*callback)(int, void *), void *callparam) |
diff --git a/include/asm-mips/mach-au1x00/au1xxx_dbdma.h b/include/asm-mips/mach-au1x00/au1xxx_dbdma.h index ad17d7ce516a..44a67bf05dc1 100644 --- a/include/asm-mips/mach-au1x00/au1xxx_dbdma.h +++ b/include/asm-mips/mach-au1x00/au1xxx_dbdma.h | |||
@@ -355,6 +355,7 @@ void au1xxx_dbdma_dump(u32 chanid); | |||
355 | u32 au1xxx_dbdma_put_dscr(u32 chanid, au1x_ddma_desc_t *dscr); | 355 | u32 au1xxx_dbdma_put_dscr(u32 chanid, au1x_ddma_desc_t *dscr); |
356 | 356 | ||
357 | u32 au1xxx_ddma_add_device(dbdev_tab_t *dev); | 357 | u32 au1xxx_ddma_add_device(dbdev_tab_t *dev); |
358 | extern void au1xxx_ddma_del_device(u32 devid); | ||
358 | void *au1xxx_ddma_get_nextptr_virt(au1x_ddma_desc_t *dp); | 359 | void *au1xxx_ddma_get_nextptr_virt(au1x_ddma_desc_t *dp); |
359 | 360 | ||
360 | /* | 361 | /* |