@@ -13,21 +13,21 @@ static void cptlf_do_set_done_time_wait(struct otx2_cptlf_info *lf,
1313{
1414 union otx2_cptx_lf_done_wait done_wait ;
1515
16- done_wait .u = otx2_cpt_read64 (lf -> lfs -> reg_base , BLKADDR_CPT0 , lf -> slot ,
17- OTX2_CPT_LF_DONE_WAIT );
16+ done_wait .u = otx2_cpt_read64 (lf -> lfs -> reg_base , lf -> lfs -> blkaddr ,
17+ lf -> slot , OTX2_CPT_LF_DONE_WAIT );
1818 done_wait .s .time_wait = time_wait ;
19- otx2_cpt_write64 (lf -> lfs -> reg_base , BLKADDR_CPT0 , lf -> slot ,
19+ otx2_cpt_write64 (lf -> lfs -> reg_base , lf -> lfs -> blkaddr , lf -> slot ,
2020 OTX2_CPT_LF_DONE_WAIT , done_wait .u );
2121}
2222
2323static void cptlf_do_set_done_num_wait (struct otx2_cptlf_info * lf , int num_wait )
2424{
2525 union otx2_cptx_lf_done_wait done_wait ;
2626
27- done_wait .u = otx2_cpt_read64 (lf -> lfs -> reg_base , BLKADDR_CPT0 , lf -> slot ,
28- OTX2_CPT_LF_DONE_WAIT );
27+ done_wait .u = otx2_cpt_read64 (lf -> lfs -> reg_base , lf -> lfs -> blkaddr ,
28+ lf -> slot , OTX2_CPT_LF_DONE_WAIT );
2929 done_wait .s .num_wait = num_wait ;
30- otx2_cpt_write64 (lf -> lfs -> reg_base , BLKADDR_CPT0 , lf -> slot ,
30+ otx2_cpt_write64 (lf -> lfs -> reg_base , lf -> lfs -> blkaddr , lf -> slot ,
3131 OTX2_CPT_LF_DONE_WAIT , done_wait .u );
3232}
3333
@@ -147,7 +147,7 @@ static void cptlf_set_misc_intrs(struct otx2_cptlfs_info *lfs, u8 enable)
147147 irq_misc .s .nwrp = 0x1 ;
148148
149149 for (slot = 0 ; slot < lfs -> lfs_num ; slot ++ )
150- otx2_cpt_write64 (lfs -> reg_base , BLKADDR_CPT0 , slot , reg ,
150+ otx2_cpt_write64 (lfs -> reg_base , lfs -> blkaddr , slot , reg ,
151151 irq_misc .u );
152152}
153153
@@ -157,7 +157,7 @@ static void cptlf_enable_intrs(struct otx2_cptlfs_info *lfs)
157157
158158 /* Enable done interrupts */
159159 for (slot = 0 ; slot < lfs -> lfs_num ; slot ++ )
160- otx2_cpt_write64 (lfs -> reg_base , BLKADDR_CPT0 , slot ,
160+ otx2_cpt_write64 (lfs -> reg_base , lfs -> blkaddr , slot ,
161161 OTX2_CPT_LF_DONE_INT_ENA_W1S , 0x1 );
162162 /* Enable Misc interrupts */
163163 cptlf_set_misc_intrs (lfs , true);
@@ -168,7 +168,7 @@ static void cptlf_disable_intrs(struct otx2_cptlfs_info *lfs)
168168 int slot ;
169169
170170 for (slot = 0 ; slot < lfs -> lfs_num ; slot ++ )
171- otx2_cpt_write64 (lfs -> reg_base , BLKADDR_CPT0 , slot ,
171+ otx2_cpt_write64 (lfs -> reg_base , lfs -> blkaddr , slot ,
172172 OTX2_CPT_LF_DONE_INT_ENA_W1C , 0x1 );
173173 cptlf_set_misc_intrs (lfs , false);
174174}
@@ -177,7 +177,7 @@ static inline int cptlf_read_done_cnt(struct otx2_cptlf_info *lf)
177177{
178178 union otx2_cptx_lf_done irq_cnt ;
179179
180- irq_cnt .u = otx2_cpt_read64 (lf -> lfs -> reg_base , BLKADDR_CPT0 , lf -> slot ,
180+ irq_cnt .u = otx2_cpt_read64 (lf -> lfs -> reg_base , lf -> lfs -> blkaddr , lf -> slot ,
181181 OTX2_CPT_LF_DONE );
182182 return irq_cnt .s .done ;
183183}
@@ -189,8 +189,8 @@ static irqreturn_t cptlf_misc_intr_handler(int __always_unused irq, void *arg)
189189 struct device * dev ;
190190
191191 dev = & lf -> lfs -> pdev -> dev ;
192- irq_misc .u = otx2_cpt_read64 (lf -> lfs -> reg_base , BLKADDR_CPT0 , lf -> slot ,
193- OTX2_CPT_LF_MISC_INT );
192+ irq_misc .u = otx2_cpt_read64 (lf -> lfs -> reg_base , lf -> lfs -> blkaddr ,
193+ lf -> slot , OTX2_CPT_LF_MISC_INT );
194194 irq_misc_ack .u = 0x0 ;
195195
196196 if (irq_misc .s .fault ) {
@@ -222,7 +222,7 @@ static irqreturn_t cptlf_misc_intr_handler(int __always_unused irq, void *arg)
222222 }
223223
224224 /* Acknowledge interrupts */
225- otx2_cpt_write64 (lf -> lfs -> reg_base , BLKADDR_CPT0 , lf -> slot ,
225+ otx2_cpt_write64 (lf -> lfs -> reg_base , lf -> lfs -> blkaddr , lf -> slot ,
226226 OTX2_CPT_LF_MISC_INT , irq_misc_ack .u );
227227
228228 return IRQ_HANDLED ;
@@ -237,13 +237,13 @@ static irqreturn_t cptlf_done_intr_handler(int irq, void *arg)
237237 /* Read the number of completed requests */
238238 irq_cnt = cptlf_read_done_cnt (lf );
239239 if (irq_cnt ) {
240- done_wait .u = otx2_cpt_read64 (lf -> lfs -> reg_base , BLKADDR_CPT0 ,
240+ done_wait .u = otx2_cpt_read64 (lf -> lfs -> reg_base , lf -> lfs -> blkaddr ,
241241 lf -> slot , OTX2_CPT_LF_DONE_WAIT );
242242 /* Acknowledge the number of completed requests */
243- otx2_cpt_write64 (lf -> lfs -> reg_base , BLKADDR_CPT0 , lf -> slot ,
243+ otx2_cpt_write64 (lf -> lfs -> reg_base , lf -> lfs -> blkaddr , lf -> slot ,
244244 OTX2_CPT_LF_DONE_ACK , irq_cnt );
245245
246- otx2_cpt_write64 (lf -> lfs -> reg_base , BLKADDR_CPT0 , lf -> slot ,
246+ otx2_cpt_write64 (lf -> lfs -> reg_base , lf -> lfs -> blkaddr , lf -> slot ,
247247 OTX2_CPT_LF_DONE_WAIT , done_wait .u );
248248 if (unlikely (!lf -> wqe )) {
249249 dev_err (& lf -> lfs -> pdev -> dev , "No work for LF %d\n" ,
@@ -393,7 +393,7 @@ int otx2_cptlf_init(struct otx2_cptlfs_info *lfs, u8 eng_grp_mask, int pri,
393393 OTX2_CPT_LMT_LF_LMTLINEX (0 ));
394394
395395 lfs -> lf [slot ].ioreg = lfs -> reg_base +
396- OTX2_CPT_RVU_FUNC_ADDR_S (BLKADDR_CPT0 , slot ,
396+ OTX2_CPT_RVU_FUNC_ADDR_S (lfs -> blkaddr , slot ,
397397 OTX2_CPT_LF_NQX (0 ));
398398 }
399399 /* Send request to attach LFs */
0 commit comments