Aneesh V | 93bc219 | 2011-06-16 23:30:51 +0000 | [diff] [blame^] | 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 | |
| 27 | #include <linux/types.h> |
| 28 | |
| 29 | /* Register bit fields */ |
| 30 | #define PL310_AUX_CTRL_ASSOCIATIVITY_MASK (1 << 16) |
| 31 | |
| 32 | struct pl310_regs { |
| 33 | u32 pl310_cache_id; |
| 34 | u32 pl310_cache_type; |
| 35 | u32 pad1[62]; |
| 36 | u32 pl310_ctrl; |
| 37 | u32 pl310_aux_ctrl; |
| 38 | u32 pl310_tag_latency_ctrl; |
| 39 | u32 pl310_data_latency_ctrl; |
| 40 | u32 pad2[60]; |
| 41 | u32 pl310_event_cnt_ctrl; |
| 42 | u32 pl310_event_cnt1_cfg; |
| 43 | u32 pl310_event_cnt0_cfg; |
| 44 | u32 pl310_event_cnt1_val; |
| 45 | u32 pl310_event_cnt0_val; |
| 46 | u32 pl310_intr_mask; |
| 47 | u32 pl310_masked_intr_stat; |
| 48 | u32 pl310_raw_intr_stat; |
| 49 | u32 pl310_intr_clear; |
| 50 | u32 pad3[323]; |
| 51 | u32 pl310_cache_sync; |
| 52 | u32 pad4[15]; |
| 53 | u32 pl310_inv_line_pa; |
| 54 | u32 pad5[2]; |
| 55 | u32 pl310_inv_way; |
| 56 | u32 pad6[12]; |
| 57 | u32 pl310_clean_line_pa; |
| 58 | u32 pad7[1]; |
| 59 | u32 pl310_clean_line_idx; |
| 60 | u32 pl310_clean_way; |
| 61 | u32 pad8[12]; |
| 62 | u32 pl310_clean_inv_line_pa; |
| 63 | u32 pad9[1]; |
| 64 | u32 pl310_clean_inv_line_idx; |
| 65 | u32 pl310_clean_inv_way; |
| 66 | }; |
| 67 | |
| 68 | void pl310_inval_all(void); |
| 69 | void pl310_clean_inval_all(void); |
| 70 | void pl310_inval_range(u32 start, u32 end); |
| 71 | void pl310_clean_inval_range(u32 start, u32 end); |
| 72 | |
| 73 | #endif |