.. | .. |
---|
38 | 38 | }; |
---|
39 | 39 | |
---|
40 | 40 | /** |
---|
41 | | - * llcc_slice_config - Data associated with the llcc slice |
---|
42 | | - * @usecase_id: usecase id for which the llcc slice is used |
---|
43 | | - * @slice_id: llcc slice id assigned to each slice |
---|
44 | | - * @max_cap: maximum capacity of the llcc slice |
---|
45 | | - * @priority: priority of the llcc slice |
---|
46 | | - * @fixed_size: whether the llcc slice can grow beyond its size |
---|
47 | | - * @bonus_ways: bonus ways associated with llcc slice |
---|
48 | | - * @res_ways: reserved ways associated with llcc slice |
---|
49 | | - * @cache_mode: mode of the llcc slice |
---|
50 | | - * @probe_target_ways: Probe only reserved and bonus ways on a cache miss |
---|
51 | | - * @dis_cap_alloc: Disable capacity based allocation |
---|
52 | | - * @retain_on_pc: Retain through power collapse |
---|
53 | | - * @activate_on_init: activate the slice on init |
---|
| 41 | + * llcc_edac_reg_data - llcc edac registers data for each error type |
---|
| 42 | + * @name: Name of the error |
---|
| 43 | + * @synd_reg: Syndrome register address |
---|
| 44 | + * @count_status_reg: Status register address to read the error count |
---|
| 45 | + * @ways_status_reg: Status register address to read the error ways |
---|
| 46 | + * @reg_cnt: Number of registers |
---|
| 47 | + * @count_mask: Mask value to get the error count |
---|
| 48 | + * @ways_mask: Mask value to get the error ways |
---|
| 49 | + * @count_shift: Shift value to get the error count |
---|
| 50 | + * @ways_shift: Shift value to get the error ways |
---|
54 | 51 | */ |
---|
55 | | -struct llcc_slice_config { |
---|
56 | | - u32 usecase_id; |
---|
57 | | - u32 slice_id; |
---|
58 | | - u32 max_cap; |
---|
59 | | - u32 priority; |
---|
60 | | - bool fixed_size; |
---|
61 | | - u32 bonus_ways; |
---|
62 | | - u32 res_ways; |
---|
63 | | - u32 cache_mode; |
---|
64 | | - u32 probe_target_ways; |
---|
65 | | - bool dis_cap_alloc; |
---|
66 | | - bool retain_on_pc; |
---|
67 | | - bool activate_on_init; |
---|
| 52 | +struct llcc_edac_reg_data { |
---|
| 53 | + char *name; |
---|
| 54 | + u64 synd_reg; |
---|
| 55 | + u64 count_status_reg; |
---|
| 56 | + u64 ways_status_reg; |
---|
| 57 | + u32 reg_cnt; |
---|
| 58 | + u32 count_mask; |
---|
| 59 | + u32 ways_mask; |
---|
| 60 | + u8 count_shift; |
---|
| 61 | + u8 ways_shift; |
---|
68 | 62 | }; |
---|
69 | 63 | |
---|
70 | 64 | /** |
---|
71 | 65 | * llcc_drv_data - Data associated with the llcc driver |
---|
72 | 66 | * @regmap: regmap associated with the llcc device |
---|
| 67 | + * @bcast_regmap: regmap associated with llcc broadcast offset |
---|
73 | 68 | * @cfg: pointer to the data structure for slice configuration |
---|
74 | 69 | * @lock: mutex associated with each slice |
---|
75 | 70 | * @cfg_size: size of the config data table |
---|
76 | 71 | * @max_slices: max slices as read from device tree |
---|
77 | | - * @bcast_off: Offset of the broadcast bank |
---|
78 | 72 | * @num_banks: Number of llcc banks |
---|
79 | 73 | * @bitmap: Bit map to track the active slice ids |
---|
80 | 74 | * @offsets: Pointer to the bank offsets array |
---|
| 75 | + * @ecc_irq: interrupt for llcc cache error detection and reporting |
---|
81 | 76 | */ |
---|
82 | 77 | struct llcc_drv_data { |
---|
83 | 78 | struct regmap *regmap; |
---|
| 79 | + struct regmap *bcast_regmap; |
---|
84 | 80 | const struct llcc_slice_config *cfg; |
---|
85 | 81 | struct mutex lock; |
---|
86 | 82 | u32 cfg_size; |
---|
87 | 83 | u32 max_slices; |
---|
88 | | - u32 bcast_off; |
---|
89 | 84 | u32 num_banks; |
---|
90 | 85 | unsigned long *bitmap; |
---|
91 | 86 | u32 *offsets; |
---|
| 87 | + int ecc_irq; |
---|
92 | 88 | }; |
---|
93 | 89 | |
---|
94 | 90 | #if IS_ENABLED(CONFIG_QCOM_LLCC) |
---|
.. | .. |
---|
128 | 124 | */ |
---|
129 | 125 | int llcc_slice_deactivate(struct llcc_slice_desc *desc); |
---|
130 | 126 | |
---|
131 | | -/** |
---|
132 | | - * qcom_llcc_probe - program the sct table |
---|
133 | | - * @pdev: platform device pointer |
---|
134 | | - * @table: soc sct table |
---|
135 | | - * @sz: Size of the config table |
---|
136 | | - */ |
---|
137 | | -int qcom_llcc_probe(struct platform_device *pdev, |
---|
138 | | - const struct llcc_slice_config *table, u32 sz); |
---|
139 | 127 | #else |
---|
140 | 128 | static inline struct llcc_slice_desc *llcc_slice_getd(u32 uid) |
---|
141 | 129 | { |
---|
.. | .. |
---|
164 | 152 | static inline int llcc_slice_deactivate(struct llcc_slice_desc *desc) |
---|
165 | 153 | { |
---|
166 | 154 | return -EINVAL; |
---|
167 | | -} |
---|
168 | | -static inline int qcom_llcc_probe(struct platform_device *pdev, |
---|
169 | | - const struct llcc_slice_config *table, u32 sz) |
---|
170 | | -{ |
---|
171 | | - return -ENODEV; |
---|
172 | | -} |
---|
173 | | - |
---|
174 | | -static inline int qcom_llcc_remove(struct platform_device *pdev) |
---|
175 | | -{ |
---|
176 | | - return -ENODEV; |
---|
177 | 155 | } |
---|
178 | 156 | #endif |
---|
179 | 157 | |
---|