mem_map.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*
  2. * mem_map.h
  3. * Common header file for blackfin family of processors.
  4. *
  5. */
  6. #ifndef _MEM_MAP_H_
  7. #define _MEM_MAP_H_
  8. #include <mach/mem_map.h>
  9. #ifndef __ASSEMBLY__
  10. #ifdef CONFIG_SMP
  11. static inline ulong get_l1_scratch_start_cpu(int cpu)
  12. {
  13. return (cpu) ? COREB_L1_SCRATCH_START : COREA_L1_SCRATCH_START;
  14. }
  15. static inline ulong get_l1_code_start_cpu(int cpu)
  16. {
  17. return (cpu) ? COREB_L1_CODE_START : COREA_L1_CODE_START;
  18. }
  19. static inline ulong get_l1_data_a_start_cpu(int cpu)
  20. {
  21. return (cpu) ? COREB_L1_DATA_A_START : COREA_L1_DATA_A_START;
  22. }
  23. static inline ulong get_l1_data_b_start_cpu(int cpu)
  24. {
  25. return (cpu) ? COREB_L1_DATA_B_START : COREA_L1_DATA_B_START;
  26. }
  27. static inline ulong get_l1_scratch_start(void)
  28. {
  29. return get_l1_scratch_start_cpu(blackfin_core_id());
  30. }
  31. static inline ulong get_l1_code_start(void)
  32. {
  33. return get_l1_code_start_cpu(blackfin_core_id());
  34. }
  35. static inline ulong get_l1_data_a_start(void)
  36. {
  37. return get_l1_data_a_start_cpu(blackfin_core_id());
  38. }
  39. static inline ulong get_l1_data_b_start(void)
  40. {
  41. return get_l1_data_b_start_cpu(blackfin_core_id());
  42. }
  43. #else /* !CONFIG_SMP */
  44. static inline ulong get_l1_scratch_start_cpu(int cpu)
  45. {
  46. return L1_SCRATCH_START;
  47. }
  48. static inline ulong get_l1_code_start_cpu(int cpu)
  49. {
  50. return L1_CODE_START;
  51. }
  52. static inline ulong get_l1_data_a_start_cpu(int cpu)
  53. {
  54. return L1_DATA_A_START;
  55. }
  56. static inline ulong get_l1_data_b_start_cpu(int cpu)
  57. {
  58. return L1_DATA_B_START;
  59. }
  60. static inline ulong get_l1_scratch_start(void)
  61. {
  62. return get_l1_scratch_start_cpu(0);
  63. }
  64. static inline ulong get_l1_code_start(void)
  65. {
  66. return get_l1_code_start_cpu(0);
  67. }
  68. static inline ulong get_l1_data_a_start(void)
  69. {
  70. return get_l1_data_a_start_cpu(0);
  71. }
  72. static inline ulong get_l1_data_b_start(void)
  73. {
  74. return get_l1_data_b_start_cpu(0);
  75. }
  76. #endif /* CONFIG_SMP */
  77. #endif /* __ASSEMBLY__ */
  78. #endif /* _MEM_MAP_H_ */