hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/include/linux/soc/qcom/llcc-qcom.h
....@@ -38,57 +38,53 @@
3838 };
3939
4040 /**
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
5451 */
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;
6862 };
6963
7064 /**
7165 * llcc_drv_data - Data associated with the llcc driver
7266 * @regmap: regmap associated with the llcc device
67
+ * @bcast_regmap: regmap associated with llcc broadcast offset
7368 * @cfg: pointer to the data structure for slice configuration
7469 * @lock: mutex associated with each slice
7570 * @cfg_size: size of the config data table
7671 * @max_slices: max slices as read from device tree
77
- * @bcast_off: Offset of the broadcast bank
7872 * @num_banks: Number of llcc banks
7973 * @bitmap: Bit map to track the active slice ids
8074 * @offsets: Pointer to the bank offsets array
75
+ * @ecc_irq: interrupt for llcc cache error detection and reporting
8176 */
8277 struct llcc_drv_data {
8378 struct regmap *regmap;
79
+ struct regmap *bcast_regmap;
8480 const struct llcc_slice_config *cfg;
8581 struct mutex lock;
8682 u32 cfg_size;
8783 u32 max_slices;
88
- u32 bcast_off;
8984 u32 num_banks;
9085 unsigned long *bitmap;
9186 u32 *offsets;
87
+ int ecc_irq;
9288 };
9389
9490 #if IS_ENABLED(CONFIG_QCOM_LLCC)
....@@ -128,14 +124,6 @@
128124 */
129125 int llcc_slice_deactivate(struct llcc_slice_desc *desc);
130126
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);
139127 #else
140128 static inline struct llcc_slice_desc *llcc_slice_getd(u32 uid)
141129 {
....@@ -164,16 +152,6 @@
164152 static inline int llcc_slice_deactivate(struct llcc_slice_desc *desc)
165153 {
166154 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;
177155 }
178156 #endif
179157