bf527.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /*
  2. * Copyright 2007-2009 Analog Devices Inc.
  3. *
  4. * Licensed under the GPL-2 or later.
  5. */
  6. #ifndef __MACH_BF527_H__
  7. #define __MACH_BF527_H__
  8. #define OFFSET_(x) ((x) & 0x0000FFFF)
  9. /*some misc defines*/
  10. #define IMASK_IVG15 0x8000
  11. #define IMASK_IVG14 0x4000
  12. #define IMASK_IVG13 0x2000
  13. #define IMASK_IVG12 0x1000
  14. #define IMASK_IVG11 0x0800
  15. #define IMASK_IVG10 0x0400
  16. #define IMASK_IVG9 0x0200
  17. #define IMASK_IVG8 0x0100
  18. #define IMASK_IVG7 0x0080
  19. #define IMASK_IVGTMR 0x0040
  20. #define IMASK_IVGHW 0x0020
  21. /***************************/
  22. #define BFIN_DSUBBANKS 4
  23. #define BFIN_DWAYS 2
  24. #define BFIN_DLINES 64
  25. #define BFIN_ISUBBANKS 4
  26. #define BFIN_IWAYS 4
  27. #define BFIN_ILINES 32
  28. #define WAY0_L 0x1
  29. #define WAY1_L 0x2
  30. #define WAY01_L 0x3
  31. #define WAY2_L 0x4
  32. #define WAY02_L 0x5
  33. #define WAY12_L 0x6
  34. #define WAY012_L 0x7
  35. #define WAY3_L 0x8
  36. #define WAY03_L 0x9
  37. #define WAY13_L 0xA
  38. #define WAY013_L 0xB
  39. #define WAY32_L 0xC
  40. #define WAY320_L 0xD
  41. #define WAY321_L 0xE
  42. #define WAYALL_L 0xF
  43. #define DMC_ENABLE (2<<2) /*yes, 2, not 1 */
  44. /********************************* EBIU Settings ************************************/
  45. #define AMBCTL0VAL ((CONFIG_BANK_1 << 16) | CONFIG_BANK_0)
  46. #define AMBCTL1VAL ((CONFIG_BANK_3 << 16) | CONFIG_BANK_2)
  47. #ifdef CONFIG_C_AMBEN_ALL
  48. #define V_AMBEN AMBEN_ALL
  49. #endif
  50. #ifdef CONFIG_C_AMBEN
  51. #define V_AMBEN 0x0
  52. #endif
  53. #ifdef CONFIG_C_AMBEN_B0
  54. #define V_AMBEN AMBEN_B0
  55. #endif
  56. #ifdef CONFIG_C_AMBEN_B0_B1
  57. #define V_AMBEN AMBEN_B0_B1
  58. #endif
  59. #ifdef CONFIG_C_AMBEN_B0_B1_B2
  60. #define V_AMBEN AMBEN_B0_B1_B2
  61. #endif
  62. #ifdef CONFIG_C_AMCKEN
  63. #define V_AMCKEN AMCKEN
  64. #else
  65. #define V_AMCKEN 0x0
  66. #endif
  67. #ifdef CONFIG_C_CDPRIO
  68. #define V_CDPRIO 0x100
  69. #else
  70. #define V_CDPRIO 0x0
  71. #endif
  72. #define AMGCTLVAL (V_AMBEN | V_AMCKEN | V_CDPRIO)
  73. #ifdef CONFIG_BF527
  74. #define CPU "BF527"
  75. #define CPUID 0x27e0
  76. #endif
  77. #ifdef CONFIG_BF526
  78. #define CPU "BF526"
  79. #define CPUID 0x27e4
  80. #endif
  81. #ifdef CONFIG_BF525
  82. #define CPU "BF525"
  83. #define CPUID 0x27e0
  84. #endif
  85. #ifdef CONFIG_BF524
  86. #define CPU "BF524"
  87. #define CPUID 0x27e4
  88. #endif
  89. #ifdef CONFIG_BF523
  90. #define CPU "BF523"
  91. #define CPUID 0x27e0
  92. #endif
  93. #ifdef CONFIG_BF522
  94. #define CPU "BF522"
  95. #define CPUID 0x27e4
  96. #endif
  97. #ifndef CPU
  98. #error "Unknown CPU type - This kernel doesn't seem to be configured properly"
  99. #endif
  100. #endif /* __MACH_BF527_H__ */