alarmDataOperation.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * include/asm-alpha/dma.h
  3. *
  4. * This is essentially the same as the i386 DMA stuff, as the AlphaPCs
  5. * use ISA-compatible dma. The only extension is support for high-page
  6. * registers that allow to set the top 8 bits of a 32-bit DMA address.
  7. * This register should be written last when setting up a DMA address
  8. * as this will also enable DMA across 64 KB boundaries.
  9. */
  10. /* $Id: dma.h,v 1.7 1992/12/14 00:29:34 root Exp root $
  11. * linux/include/asm/dma.h: Defines for using and allocating dma channels.
  12. * Written by Hennus Bergman, 1992.
  13. * High DMA channel support & info by Hannu Savolainen
  14. * and John Boyd, Nov. 1992.
  15. */
  16. #ifndef _ASM_DMA_H
  17. #define _ASM_DMA_H
  18. #include <linux/spinlock.h>
  19. #include <asm/io.h>
  20. #define dma_outb outb
  21. #define dma_inb inb
  22. /*
  23. * NOTES about DMA transfers:
  24. *
  25. * controller 1: channels 0-3, byte operations, ports 00-1F
  26. * controller 2: channels 4-7, word operations, ports C0-DF
  27. *
  28. * - ALL registers are 8 bits only, regardless of transfer size
  29. * - channel 4 is not used - cascades 1 into 2.
  30. * - channels 0-3 are byte - addresses/counts are for physical bytes
  31. * - channels 5-7 are word - addresses/counts are for physical words
  32. * - transfers must not cross physical 64K (0-3) or 128K (5-7) boundaries
  33. * - transfer count loaded to registers is 1 less than actual count
  34. * - controller 2 offsets are all even (2x offsets for controller 1)
  35. * - page registers for 5-7 don't use data bit 0, represent 128K pages
  36. * - page registers for 0-3 use bit 0, represent 64K pages
  37. *
  38. * DMA transfers are limited to the lower 16MB of _physical_ memory.
  39. * Note that addresses loaded into registers must be _physical_ addresses,
  40. * not logical addresses (which may differ if paging is active).
  41. *
  42. * Address mapping for channels 0-3:
  43. *
  44. * A23 ... A16 A15 ... A8 A7 ... A0 (Physical addresses)
  45. * | ... | | ... | | ... |
  46. * | ... | | ... | | ... |
  47. * | ... | | ... | | ... |
  48. * P7 ... P0 A7 ... A0 A7 ... A0
  49. * | Page | Addr MSB | Addr LSB | (DMA registers)
  50. *