mem_map.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. * Common Blackfin memory map
  3. *
  4. * Copyright 2004-2009 Analog Devices Inc.
  5. * Licensed under the GPL-2 or later.
  6. */
  7. #ifndef __BFIN_MEM_MAP_H__
  8. #define __BFIN_MEM_MAP_H__
  9. #include <mach/mem_map.h>
  10. /* Every Blackfin so far has MMRs like this */
  11. #ifndef COREMMR_BASE
  12. # define COREMMR_BASE 0xFFE00000
  13. #endif
  14. #ifndef SYSMMR_BASE
  15. # define SYSMMR_BASE 0xFFC00000
  16. #endif
  17. /* Every Blackfin so far has on-chip Scratch Pad SRAM like this */
  18. #ifndef L1_SCRATCH_START
  19. # define L1_SCRATCH_START 0xFFB00000
  20. # define L1_SCRATCH_LENGTH 0x1000
  21. #endif
  22. /* Most parts lack on-chip L2 SRAM */
  23. #ifndef L2_START
  24. # define L2_START 0
  25. # define L2_LENGTH 0
  26. #endif
  27. /* Most parts lack on-chip L1 ROM */
  28. #ifndef L1_ROM_START
  29. # define L1_ROM_START 0
  30. # define L1_ROM_LENGTH 0
  31. #endif
  32. /* Allow wonky SMP ports to override this */
  33. #ifndef GET_PDA_SAFE
  34. # define GET_PDA_SAFE(preg) \
  35. preg.l = _cpu_pda; \
  36. preg.h = _cpu_pda;
  37. # define GET_PDA(preg, dreg) GET_PDA_SAFE(preg)
  38. # ifndef __ASSEMBLY__
  39. static inline unsigned long get_l1_scratch_start_cpu(int cpu)
  40. {
  41. return L1_SCRATCH_START;
  42. }
  43. static inline unsigned long get_l1_code_start_cpu(int cpu)
  44. {
  45. return L1_CODE_START;
  46. }
  47. static inline unsigned long get_l1_data_a_start_cpu(int cpu)
  48. {
  49. return L1_DATA_A_START;
  50. }
  51. static inline unsigned long get_l1_data_b_start_cpu(int cpu)
  52. {
  53. return L1_DATA_B_START;
  54. }
  55. static inline unsigned long get_l1_scratch_start(void)
  56. {
  57. return get_l1_scratch_start_cpu(0);
  58. }
  59. static inline unsigned long get_l1_code_start(void)
  60. {
  61. return get_l1_code_start_cpu(0);
  62. }
  63. static inline unsigned long get_l1_data_a_start(void)
  64. {
  65. return get_l1_data_a_start_cpu(0);
  66. }
  67. static inline unsigned long get_l1_data_b_start(void)
  68. {
  69. return get_l1_data_b_start_cpu(0);
  70. }
  71. # endif /* __ASSEMBLY__ */
  72. #endif /* !GET_PDA_SAFE */
  73. #endif