bf548.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. /*
  2. * Copyright 2007-2009 Analog Devices Inc.
  3. *
  4. * Licensed under the GPL-2 or later.
  5. */
  6. #ifndef __MACH_BF548_H__
  7. #define __MACH_BF548_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. #define AMGCTLVAL (V_AMBEN | V_AMCKEN)
  68. #if defined(CONFIG_BF542)
  69. # define CPU "BF542"
  70. # define CPUID 0x27de
  71. #elif defined(CONFIG_BF544)
  72. # define CPU "BF544"
  73. # define CPUID 0x27de
  74. #elif defined(CONFIG_BF547)
  75. # define CPU "BF547"
  76. # define CPUID 0x27de
  77. #elif defined(CONFIG_BF548)
  78. # define CPU "BF548"
  79. # define CPUID 0x27de
  80. #elif defined(CONFIG_BF549)
  81. # define CPU "BF549"
  82. # define CPUID 0x27de
  83. #endif
  84. #ifndef CPU
  85. #error "Unknown CPU type - This kernel doesn't seem to be configured properly"
  86. #endif
  87. #endif /* __MACH_BF48_H__ */