pl310.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * (C) Copyright 2010
  3. * Texas Instruments, <www.ti.com>
  4. * Aneesh V <aneesh@ti.com>
  5. *
  6. * See file CREDITS for list of people who contributed to this
  7. * project.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2 of
  12. * the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  22. * MA 02111-1307 USA
  23. */
  24. #ifndef _PL310_H_
  25. #define _PL310_H_
  26. #include <linux/types.h>
  27. /* Register bit fields */
  28. #define PL310_AUX_CTRL_ASSOCIATIVITY_MASK (1 << 16)
  29. struct pl310_regs {
  30. u32 pl310_cache_id;
  31. u32 pl310_cache_type;
  32. u32 pad1[62];
  33. u32 pl310_ctrl;
  34. u32 pl310_aux_ctrl;
  35. u32 pl310_tag_latency_ctrl;
  36. u32 pl310_data_latency_ctrl;
  37. u32 pad2[60];
  38. u32 pl310_event_cnt_ctrl;
  39. u32 pl310_event_cnt1_cfg;
  40. u32 pl310_event_cnt0_cfg;
  41. u32 pl310_event_cnt1_val;
  42. u32 pl310_event_cnt0_val;
  43. u32 pl310_intr_mask;
  44. u32 pl310_masked_intr_stat;
  45. u32 pl310_raw_intr_stat;
  46. u32 pl310_intr_clear;
  47. u32 pad3[323];
  48. u32 pl310_cache_sync;
  49. u32 pad4[15];
  50. u32 pl310_inv_line_pa;
  51. u32 pad5[2];
  52. u32 pl310_inv_way;
  53. u32 pad6[12];
  54. u32 pl310_clean_line_pa;
  55. u32 pad7[1];
  56. u32 pl310_clean_line_idx;
  57. u32 pl310_clean_way;
  58. u32 pad8[12];
  59. u32 pl310_clean_inv_line_pa;
  60. u32 pad9[1];
  61. u32 pl310_clean_inv_line_idx;
  62. u32 pl310_clean_inv_way;
  63. };
  64. void pl310_inval_all(void);
  65. void pl310_clean_inval_all(void);
  66. void pl310_inval_range(u32 start, u32 end);
  67. void pl310_clean_inval_range(u32 start, u32 end);
  68. #endif