cs8900.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. #ifndef _CDCS_CS8900_H_
  2. #define _CDCS_CS8900_H_
  3. /*
  4. * Copyright (C) 2002 by Call Direct Cellular Solutions Pty. Ltd. All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions
  8. * are met:
  9. *
  10. * 1. Redistributions of source code must retain the above copyright
  11. * notice, this list of conditions and the following disclaimer.
  12. * 2. Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in the
  14. * documentation and/or other materials provided with the distribution.
  15. * 3. All advertising materials mentioning features or use of this
  16. * software must display the following acknowledgement:
  17. *
  18. * This product includes software developed by Call Direct Cellular Solutions Pty. Ltd.
  19. * and its contributors.
  20. *
  21. * THIS SOFTWARE IS PROVIDED BY CALL DIRECT CELLULAR SOLUTIONS AND CONTRIBUTORS
  22. * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  24. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CALL DIRECT
  25. * CELLULAR SOLUTIONS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  26. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  27. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  28. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  29. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  30. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  31. * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  32. * SUCH DAMAGE.
  33. *
  34. * For additional information see http://www.calldirect.com.au/
  35. */
  36. /*!
  37. * \file arch/avr/dev/cs8900.c
  38. * \brief Cirrus Logic CS8900a I/O registers.
  39. *
  40. * \verbatim
  41. * $Id: cs8900.h 4706 2012-10-06 17:42:01Z haraldkipp $
  42. * \endverbatim
  43. */
  44. #ifdef NUT_CS8900_OLD
  45. #define CS_DATA_P0 0x1100
  46. #define CS_DATA_P1 0x1102
  47. #define CS_TX_CMD_I 0x1104
  48. #define CS_TX_LEN_I 0x1106
  49. #define CS_INT_STAT 0x1108
  50. #define CS_PP_PTR 0x110A
  51. #define CS_PP_DATA0 0x110C
  52. #define CS_PP_DATA1 0x110E
  53. #else
  54. #define CS_DATA_P0 (cs_base + 0x0000)
  55. #define CS_DATA_P1 (cs_base + 0x0002)
  56. #define CS_TX_CMD_I (cs_base + 0x0004)
  57. #define CS_TX_LEN_I (cs_base + 0x0006)
  58. #define CS_INT_STAT (cs_base + 0x0008)
  59. #define CS_PP_PTR (cs_base + 0x000A)
  60. #define CS_PP_DATA0 (cs_base + 0x000C)
  61. #define CS_PP_DATA1 (cs_base + 0x000E)
  62. #endif
  63. // Cirrus Logic CS8900a Packet Page registers
  64. #define CS_PROD_ID 0x0000
  65. #define CS_IO_BASE 0x0020
  66. #define CS_INT_NUM 0x0022
  67. #define CS_DMA_CHAN 0x0024
  68. #define CS_DMA_SOF 0x0026
  69. #define CS_DMA_FCNT 0x0028
  70. #define CS_DMA_RXCNT 0x002A
  71. #define CS_MEM_BASE 0x002C
  72. #define CS_BOOT_BASE 0x0030
  73. #define CS_BOOT_MASK 0x0034
  74. #define CS_EE_CMD 0x0040
  75. #define CS_EE_DATA 0x0042
  76. #define CS_RX_FRM_CNT 0x0050
  77. #define CS_ISQ 0x0120
  78. #define CS_RX_CFG 0x0102
  79. #define CS_RX_EVENT 0x0124
  80. #define CS_RX_CTL 0x0104
  81. #define CS_TX_CFG 0x0106
  82. #define CS_TX_EVENT 0x0128
  83. #define CS_TX_CMD_P 0x0108
  84. #define CS_BUF_CFG 0x010A
  85. #define CS_BUF_EVENT 0x012C
  86. #define CS_RX_MISS 0x0130
  87. #define CS_TX_COLL 0x0132
  88. #define CS_LINE_CTRL 0x0112
  89. #define CS_LINE_STAT 0x0134
  90. #define CS_SELF_CTRL 0x0114
  91. #define CS_SELF_STAT 0x0136
  92. #define CS_BUS_CTRL 0x0116
  93. #define CS_BUS_STAT 0x0138
  94. #define CS_TEST_CTRL 0x0118
  95. #define CS_AUI_TDR 0x013C
  96. #define CS_PP_TX_CMD 0x0144
  97. #define CS_PP_TX_LEN 0x0146
  98. #define CS_IEEE_ADDR 0x0158
  99. #define RESETE 0x80
  100. #endif