dma.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* arch/arm/mach-s3c2410/dma.h
  2. *
  3. * Copyright (C) 2006 Simtec Electronics
  4. * Ben Dooks <ben@simtec.co.uk>
  5. *
  6. * Samsung S3C24XX DMA support
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. extern struct sysdev_class dma_sysclass;
  13. extern struct s3c2410_dma_chan s3c2410_chans[S3C2410_DMA_CHANNELS];
  14. #define DMA_CH_VALID (1<<31)
  15. struct s3c24xx_dma_addr {
  16. unsigned long from;
  17. unsigned long to;
  18. };
  19. /* struct s3c24xx_dma_map
  20. *
  21. * this holds the mapping information for the channel selected
  22. * to be connected to the specified device
  23. */
  24. struct s3c24xx_dma_map {
  25. const char *name;
  26. struct s3c24xx_dma_addr hw_addr;
  27. unsigned long channels[S3C2410_DMA_CHANNELS];
  28. };
  29. struct s3c24xx_dma_selection {
  30. struct s3c24xx_dma_map *map;
  31. unsigned long map_size;
  32. unsigned long dcon_mask;
  33. void (*select)(struct s3c2410_dma_chan *chan,
  34. struct s3c24xx_dma_map *map);
  35. };
  36. extern int s3c24xx_dma_init_map(struct s3c24xx_dma_selection *sel);