pl310.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. * (C) Copyright 2010
  3. * Texas Instruments, <www.ti.com>
  4. * Aneesh V <aneesh@ti.com>
  5. *
  6. * SPDX-License-Identifier: GPL-2.0+
  7. */
  8. #ifndef _PL310_H_
  9. #define _PL310_H_
  10. #include <linux/types.h>
  11. /* Register bit fields */
  12. #define PL310_AUX_CTRL_ASSOCIATIVITY_MASK (1 << 16)
  13. #define L2X0_DYNAMIC_CLK_GATING_EN (1 << 1)
  14. #define L2X0_STNDBY_MODE_EN (1 << 0)
  15. #define L2X0_CTRL_EN 1
  16. #define L310_SHARED_ATT_OVERRIDE_ENABLE (1 << 22)
  17. struct pl310_regs {
  18. u32 pl310_cache_id;
  19. u32 pl310_cache_type;
  20. u32 pad1[62];
  21. u32 pl310_ctrl;
  22. u32 pl310_aux_ctrl;
  23. u32 pl310_tag_latency_ctrl;
  24. u32 pl310_data_latency_ctrl;
  25. u32 pad2[60];
  26. u32 pl310_event_cnt_ctrl;
  27. u32 pl310_event_cnt1_cfg;
  28. u32 pl310_event_cnt0_cfg;
  29. u32 pl310_event_cnt1_val;
  30. u32 pl310_event_cnt0_val;
  31. u32 pl310_intr_mask;
  32. u32 pl310_masked_intr_stat;
  33. u32 pl310_raw_intr_stat;
  34. u32 pl310_intr_clear;
  35. u32 pad3[323];
  36. u32 pl310_cache_sync;
  37. u32 pad4[15];
  38. u32 pl310_inv_line_pa;
  39. u32 pad5[2];
  40. u32 pl310_inv_way;
  41. u32 pad6[12];
  42. u32 pl310_clean_line_pa;
  43. u32 pad7[1];
  44. u32 pl310_clean_line_idx;
  45. u32 pl310_clean_way;
  46. u32 pad8[12];
  47. u32 pl310_clean_inv_line_pa;
  48. u32 pad9[1];
  49. u32 pl310_clean_inv_line_idx;
  50. u32 pl310_clean_inv_way;
  51. u32 pad10[64];
  52. u32 pl310_lockdown_dbase;
  53. u32 pl310_lockdown_ibase;
  54. u32 pad11[190];
  55. u32 pl310_addr_filter_start;
  56. u32 pl310_addr_filter_end;
  57. u32 pad12[190];
  58. u32 pl310_test_operation;
  59. u32 pad13[3];
  60. u32 pl310_line_data;
  61. u32 pad14[7];
  62. u32 pl310_line_tag;
  63. u32 pad15[3];
  64. u32 pl310_debug_ctrl;
  65. u32 pad16[7];
  66. u32 pl310_prefetch_ctrl;
  67. u32 pad17[7];
  68. u32 pl310_power_ctrl;
  69. };
  70. void pl310_inval_all(void);
  71. void pl310_clean_inval_all(void);
  72. void pl310_inval_range(u32 start, u32 end);
  73. void pl310_clean_inval_range(u32 start, u32 end);
  74. #endif