regs-lan.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. * arch/arm/mach-ks8695/include/mach/regs-lan.h
  3. *
  4. * Copyright (C) 2006 Andrew Victor
  5. *
  6. * KS8695 - LAN Registers and bit definitions.
  7. *
  8. * This file is licensed under the terms of the GNU General Public
  9. * License version 2. This program is licensed "as is" without any
  10. * warranty of any kind, whether express or implied.
  11. */
  12. #ifndef KS8695_LAN_H
  13. #define KS8695_LAN_H
  14. #define KS8695_LAN_OFFSET (0xF0000 + 0x8000)
  15. #define KS8695_LAN_VA (KS8695_IO_VA + KS8695_LAN_OFFSET)
  16. #define KS8695_LAN_PA (KS8695_IO_PA + KS8695_LAN_OFFSET)
  17. /*
  18. * LAN registers
  19. */
  20. #define KS8695_LMDTXC (0x00) /* DMA Transmit Control */
  21. #define KS8695_LMDRXC (0x04) /* DMA Receive Control */
  22. #define KS8695_LMDTSC (0x08) /* DMA Transmit Start Command */
  23. #define KS8695_LMDRSC (0x0c) /* DMA Receive Start Command */
  24. #define KS8695_LTDLB (0x10) /* Transmit Descriptor List Base Address */
  25. #define KS8695_LRDLB (0x14) /* Receive Descriptor List Base Address */
  26. #define KS8695_LMAL (0x18) /* MAC Station Address Low */
  27. #define KS8695_LMAH (0x1c) /* MAC Station Address High */
  28. #define KS8695_LMAAL(n) (0x80 + ((n)*8)) /* MAC Additional Station Address (0..15) Low */
  29. #define KS8695_LMAAH(n) (0x84 + ((n)*8)) /* MAC Additional Station Address (0..15) High */
  30. /* DMA Transmit Control Register */
  31. #define LMDTXC_LMTRST (1 << 31) /* Soft Reset */
  32. #define LMDTXC_LMTBS (0x3f << 24) /* Transmit Burst Size */
  33. #define LMDTXC_LMTUCG (1 << 18) /* Transmit UDP Checksum Generate */
  34. #define LMDTXC_LMTTCG (1 << 17) /* Transmit TCP Checksum Generate */
  35. #define LMDTXC_LMTICG (1 << 16) /* Transmit IP Checksum Generate */
  36. #define LMDTXC_LMTFCE (1 << 9) /* Transmit Flow Control Enable */
  37. #define LMDTXC_LMTLB (1 << 8) /* Loopback mode */
  38. #define LMDTXC_LMTEP (1 << 2) /* Transmit Enable Padding */
  39. #define LMDTXC_LMTAC (1 << 1) /* Transmit Add CRC */
  40. #define LMDTXC_LMTE (1 << 0) /* TX Enable */
  41. /* DMA Receive Control Register */
  42. #define LMDRXC_LMRBS (0x3f << 24) /* Receive Burst Size */
  43. #define LMDRXC_LMRUCC (1 << 18) /* Receive UDP Checksum check */
  44. #define LMDRXC_LMRTCG (1 << 17) /* Receive TCP Checksum check */
  45. #define LMDRXC_LMRICG (1 << 16) /* Receive IP Checksum check */
  46. #define LMDRXC_LMRFCE (1 << 9) /* Receive Flow Control Enable */
  47. #define LMDRXC_LMRB (1 << 6) /* Receive Broadcast */
  48. #define LMDRXC_LMRM (1 << 5) /* Receive Multicast */
  49. #define LMDRXC_LMRU (1 << 4) /* Receive Unicast */
  50. #define LMDRXC_LMRERR (1 << 3) /* Receive Error Frame */
  51. #define LMDRXC_LMRA (1 << 2) /* Receive All */
  52. #define LMDRXC_LMRE (1 << 1) /* RX Enable */
  53. /* Additional Station Address High */
  54. #define LMAAH_E (1 << 31) /* Address Enabled */
  55. #endif