bf537.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /*
  2. * System MMR Register and memory map for ADSP-BF537
  3. *
  4. * Copyright 2005-2008 Analog Devices Inc.
  5. *
  6. * Licensed under the GPL-2 or later.
  7. */
  8. #ifndef __MACH_BF537_H__
  9. #define __MACH_BF537_H__
  10. /* Masks for generic ERROR IRQ demultiplexing used in int-priority-sc.c */
  11. #define SPI_ERR_MASK (TXCOL | RBSY | MODF | TXE) /* SPI_STAT */
  12. #define SPORT_ERR_MASK (ROVF | RUVF | TOVF | TUVF) /* SPORTx_STAT */
  13. #define PPI_ERR_MASK (0xFFFF & ~FLD) /* PPI_STATUS */
  14. #define EMAC_ERR_MASK (PHYINT | MMCINT | RXFSINT | TXFSINT | WAKEDET | RXDMAERR | TXDMAERR | STMDONE) /* EMAC_SYSTAT */
  15. #define UART_ERR_MASK_STAT1 (0x4) /* UARTx_IIR */
  16. #define UART_ERR_MASK_STAT0 (0x2) /* UARTx_IIR */
  17. #define CAN_ERR_MASK (EWTIF | EWRIF | EPIF | BOIF | WUIF | UIAIF | AAIF | RMLIF | UCEIF | EXTIF | ADIF) /* CAN_GIF */
  18. #define OFFSET_(x) ((x) & 0x0000FFFF)
  19. /*some misc defines*/
  20. #define IMASK_IVG15 0x8000
  21. #define IMASK_IVG14 0x4000
  22. #define IMASK_IVG13 0x2000
  23. #define IMASK_IVG12 0x1000
  24. #define IMASK_IVG11 0x0800
  25. #define IMASK_IVG10 0x0400
  26. #define IMASK_IVG9 0x0200
  27. #define IMASK_IVG8 0x0100
  28. #define IMASK_IVG7 0x0080
  29. #define IMASK_IVGTMR 0x0040
  30. #define IMASK_IVGHW 0x0020
  31. /***************************/
  32. #define BFIN_DSUBBANKS 4
  33. #define BFIN_DWAYS 2
  34. #define BFIN_DLINES 64
  35. #define BFIN_ISUBBANKS 4
  36. #define BFIN_IWAYS 4
  37. #define BFIN_ILINES 32
  38. #define WAY0_L 0x1
  39. #define WAY1_L 0x2
  40. #define WAY01_L 0x3
  41. #define WAY2_L 0x4
  42. #define WAY02_L 0x5
  43. #define WAY12_L 0x6
  44. #define WAY012_L 0x7
  45. #define WAY3_L 0x8
  46. #define WAY03_L 0x9
  47. #define WAY13_L 0xA
  48. #define WAY013_L 0xB
  49. #define WAY32_L 0xC
  50. #define WAY320_L 0xD
  51. #define WAY321_L 0xE
  52. #define WAYALL_L 0xF
  53. #define DMC_ENABLE (2<<2) /*yes, 2, not 1 */
  54. /********************************* EBIU Settings ************************************/
  55. #define AMBCTL0VAL ((CONFIG_BANK_1 << 16) | CONFIG_BANK_0)
  56. #define AMBCTL1VAL ((CONFIG_BANK_3 << 16) | CONFIG_BANK_2)
  57. #ifdef CONFIG_C_AMBEN_ALL
  58. #define V_AMBEN AMBEN_ALL
  59. #endif
  60. #ifdef CONFIG_C_AMBEN
  61. #define V_AMBEN 0x0
  62. #endif
  63. #ifdef CONFIG_C_AMBEN_B0
  64. #define V_AMBEN AMBEN_B0
  65. #endif
  66. #ifdef CONFIG_C_AMBEN_B0_B1
  67. #define V_AMBEN AMBEN_B0_B1
  68. #endif
  69. #ifdef CONFIG_C_AMBEN_B0_B1_B2
  70. #define V_AMBEN AMBEN_B0_B1_B2
  71. #endif
  72. #ifdef CONFIG_C_AMCKEN
  73. #define V_AMCKEN AMCKEN
  74. #else
  75. #define V_AMCKEN 0x0
  76. #endif
  77. #ifdef CONFIG_C_CDPRIO
  78. #define V_CDPRIO 0x100
  79. #else
  80. #define V_CDPRIO 0x0
  81. #endif
  82. #define AMGCTLVAL (V_AMBEN | V_AMCKEN | V_CDPRIO)
  83. #ifdef CONFIG_BF537
  84. #define CPU "BF537"
  85. #define CPUID 0x27c8
  86. #endif
  87. #ifdef CONFIG_BF536
  88. #define CPU "BF536"
  89. #define CPUID 0x27c8
  90. #endif
  91. #ifdef CONFIG_BF534
  92. #define CPU "BF534"
  93. #define CPUID 0x27c6
  94. #endif
  95. #ifndef CPU
  96. #error "Unknown CPU type - This kernel doesn't seem to be configured properly"
  97. #endif
  98. #endif /* __MACH_BF537_H__ */