net/bnxt: add functions to get shared table increments
[dpdk.git] / drivers / net / bnxt / tf_core / tf_device.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2019-2021 Broadcom
3  * All rights reserved.
4  */
5
6 #ifndef _TF_DEVICE_H_
7 #define _TF_DEVICE_H_
8
9 #include "tf_core.h"
10 #include "tf_identifier.h"
11 #include "tf_tbl.h"
12 #include "tf_tcam.h"
13 #ifdef TF_TCAM_SHARED
14 #include "tf_tcam_shared.h"
15 #endif
16 #include "tf_if_tbl.h"
17 #include "tf_global_cfg.h"
18
19 struct tf;
20 struct tf_session;
21
22 /**
23  * The Device module provides a general device template. A supported
24  * device type should implement one or more of the listed function
25  * pointers according to its capabilities.
26  *
27  * If a device function pointer is NULL the device capability is not
28  * supported.
29  */
30
31 /**
32  * TF device information
33  */
34 struct tf_dev_info {
35         enum tf_device_type type;
36         const struct tf_dev_ops *ops;
37 };
38
39 /**
40  * @page device Device
41  *
42  * @ref tf_dev_bind
43  *
44  * @ref tf_dev_unbind
45  */
46
47 /**
48  * Device bind handles the initialization of the specified device
49  * type.
50  *
51  * [in] tfp
52  *   Pointer to TF handle
53  *
54  * [in] type
55  *   Device type
56  *
57  * [in] resources
58  *   Pointer to resource allocation information
59  *
60  * [out] dev_handle
61  *   Device handle
62  *
63  * Returns
64  *   - (0) if successful.
65  *   - (-EINVAL) parameter failure.
66  *   - (-ENODEV) no such device supported.
67  */
68 int tf_dev_bind(struct tf *tfp,
69                 enum tf_device_type type,
70                 bool shadow_copy,
71                 struct tf_session_resources *resources,
72                 struct tf_dev_info *dev_handle);
73
74 /**
75  * Device release handles cleanup of the device specific information.
76  *
77  * [in] tfp
78  *   Pointer to TF handle
79  *
80  * [in] dev_handle
81  *   Device handle
82  *
83  * Returns
84  *   - (0) if successful.
85  *   - (-EINVAL) parameter failure.
86  *   - (-ENODEV) no such device supported.
87  */
88 int tf_dev_unbind(struct tf *tfp,
89                   struct tf_dev_info *dev_handle);
90
91 int
92 tf_dev_bind_ops(enum tf_device_type type,
93                 struct tf_dev_info *dev_handle);
94
95 /**
96  * Truflow device specific function hooks structure
97  *
98  * The following device hooks can be defined; unless noted otherwise,
99  * they are optional and can be filled with a null pointer. The
100  * purpose of these hooks is to support Truflow device operations for
101  * different device variants.
102  */
103 struct tf_dev_ops {
104         /**
105          * Retrieves the MAX number of resource types that the device
106          * supports.
107          *
108          * [in] tfp
109          *   Pointer to TF handle
110          *
111          * [out] max_types
112          *   Pointer to MAX number of types the device supports
113          *
114          * Returns
115          *   - (0) if successful.
116          *   - (-EINVAL) on failure.
117          */
118         int (*tf_dev_get_max_types)(struct tf *tfp,
119                                     uint16_t *max_types);
120
121         /**
122          * Retrieves the string description for the CFA resource
123          * type
124          *
125          * [in] tfp
126          *   Pointer to TF handle
127          *
128          * [in] resource_id
129          *   HCAPI cfa resource type id
130          *
131          * [out] resource_str
132          *   Pointer to a string
133          *
134          * Returns
135          *   - (0) if successful.
136          *   - (-EINVAL) on failure.
137          */
138         int (*tf_dev_get_resource_str)(struct tf *tfp,
139                                        uint16_t resource_id,
140                                        const char **resource_str);
141
142         /**
143          * Retrieves the WC TCAM slice information that the device
144          * supports.
145          *
146          * [in] tfp
147          *   Pointer to TF handle
148          *
149          * [in] type
150          *   TCAM table type
151          *
152          * [in] key_sz
153          *   Key size
154          *
155          * [out] num_slices_per_row
156          *   Pointer to number of slices per row the device supports
157          *
158          * Returns
159          *   - (0) if successful.
160          *   - (-EINVAL) on failure.
161          */
162         int (*tf_dev_get_tcam_slice_info)(struct tf *tfp,
163                                           enum tf_tcam_tbl_type type,
164                                           uint16_t key_sz,
165                                           uint16_t *num_slices_per_row);
166
167         /**
168          * Allocation of an identifier element.
169          *
170          * This API allocates the specified identifier element from a
171          * device specific identifier DB. The allocated element is
172          * returned.
173          *
174          * [in] tfp
175          *   Pointer to TF handle
176          *
177          * [in] parms
178          *   Pointer to identifier allocation parameters
179          *
180          * Returns
181          *   - (0) if successful.
182          *   - (-EINVAL) on failure.
183          */
184         int (*tf_dev_alloc_ident)(struct tf *tfp,
185                                   struct tf_ident_alloc_parms *parms);
186
187         /**
188          * Free of an identifier element.
189          *
190          * This API free's a previous allocated identifier element from a
191          * device specific identifier DB.
192          *
193          * [in] tfp
194          *   Pointer to TF handle
195          *
196          * [in] parms
197          *   Pointer to identifier free parameters
198          *
199          * Returns
200          *   - (0) if successful.
201          *   - (-EINVAL) on failure.
202          */
203         int (*tf_dev_free_ident)(struct tf *tfp,
204                                  struct tf_ident_free_parms *parms);
205
206         /**
207          * Search of an identifier element.
208          *
209          * This API search the specified identifier element from a
210          * device specific identifier shadow DB. The allocated element
211          * is returned.
212          *
213          * [in] tfp
214          *   Pointer to TF handle
215          *
216          * [in] parms
217          *   Pointer to identifier search parameters
218          *
219          * Returns
220          *   - (0) if successful.
221          *   - (-EINVAL) on failure.
222          */
223         int (*tf_dev_search_ident)(struct tf *tfp,
224                                    struct tf_ident_search_parms *parms);
225
226         /**
227          * Retrieves the identifier resource info.
228          *
229          * This API retrieves the identifier resource info from the rm db.
230          *
231          * [in] tfp
232          *   Pointer to TF handle
233          *
234          * [in] parms
235          *   Pointer to identifier info
236          *
237          * Returns
238          *   - (0) if successful.
239          *   - (-EINVAL) on failure.
240          */
241         int (*tf_dev_get_ident_resc_info)(struct tf *tfp,
242                                           struct tf_identifier_resource_info *parms);
243
244         /**
245          * Get SRAM table information.
246          *
247          * Converts an internal RM allocated element offset to
248          * a user address and vice versa.
249          *
250          * [in] tfp
251          *   Pointer to TF handle
252          *
253          * [in] type
254          *   Truflow index table type, e.g. TF_TYPE_FULL_ACT_RECORD
255          *
256          * [in/out] base
257          *   Pointer to the base address of the associated table type.
258          *
259          * [in/out] shift
260          *   Pointer to any shift required for the associated table type.
261          *
262          * Returns
263          *   - (0) if successful.
264          *   - (-EINVAL) on failure.
265          */
266         int (*tf_dev_get_tbl_info)(struct tf *tfp,
267                                    void *tbl_db,
268                                    enum tf_tbl_type type,
269                                    uint16_t *base,
270                                    uint16_t *shift);
271
272         /**
273          * Allocation of an index table type element.
274          *
275          * This API allocates the specified table type element from a
276          * device specific table type DB. The allocated element is
277          * returned.
278          *
279          * [in] tfp
280          *   Pointer to TF handle
281          *
282          * [in] parms
283          *   Pointer to table allocation parameters
284          *
285          * Returns
286          *   - (0) if successful.
287          *   - (-EINVAL) on failure.
288          */
289         int (*tf_dev_alloc_tbl)(struct tf *tfp,
290                                 struct tf_tbl_alloc_parms *parms);
291
292         /**
293          * Allocation of a external table type element.
294          *
295          * This API allocates the specified table type element from a
296          * device specific table type DB. The allocated element is
297          * returned.
298          *
299          * [in] tfp
300          *   Pointer to TF handle
301          *
302          * [in] parms
303          *   Pointer to table allocation parameters
304          *
305          * Returns
306          *   - (0) if successful.
307          *   - (-EINVAL) on failure.
308          */
309         int (*tf_dev_alloc_ext_tbl)(struct tf *tfp,
310                                     struct tf_tbl_alloc_parms *parms);
311
312         /**
313          * Free of a table type element.
314          *
315          * This API free's a previous allocated table type element from a
316          * device specific table type DB.
317          *
318          * [in] tfp
319          *   Pointer to TF handle
320          *
321          * [in] parms
322          *   Pointer to table free parameters
323          *
324          * Returns
325          *   - (0) if successful.
326          *   - (-EINVAL) on failure.
327          */
328         int (*tf_dev_free_tbl)(struct tf *tfp,
329                                struct tf_tbl_free_parms *parms);
330
331         /**
332          * Free of a external table type element.
333          *
334          * This API free's a previous allocated table type element from a
335          * device specific table type DB.
336          *
337          * [in] tfp
338          *   Pointer to TF handle
339          *
340          * [in] parms
341          *   Pointer to table free parameters
342          *
343          * Returns
344          *   - (0) if successful.
345          *   - (-EINVAL) on failure.
346          */
347         int (*tf_dev_free_ext_tbl)(struct tf *tfp,
348                                    struct tf_tbl_free_parms *parms);
349
350         /**
351          * Searches for the specified table type element in a shadow DB.
352          *
353          * This API searches for the specified table type element in a
354          * device specific shadow DB. If the element is found the
355          * reference count for the element is updated. If the element
356          * is not found a new element is allocated from the table type
357          * DB and then inserted into the shadow DB.
358          *
359          * [in] tfp
360          *   Pointer to TF handle
361          *
362          * [in] parms
363          *   Pointer to table allocation and search parameters
364          *
365          * Returns
366          *   - (0) if successful.
367          *   - (-EINVAL) on failure.
368          */
369         int (*tf_dev_alloc_search_tbl)(struct tf *tfp,
370                                        struct tf_tbl_alloc_search_parms *parms);
371
372         /**
373          * Sets the specified table type element.
374          *
375          * This API sets the specified element data by invoking the
376          * firmware.
377          *
378          * [in] tfp
379          *   Pointer to TF handle
380          *
381          * [in] parms
382          *   Pointer to table set parameters
383          *
384          * Returns
385          *   - (0) if successful.
386          *   - (-EINVAL) on failure.
387          */
388         int (*tf_dev_set_tbl)(struct tf *tfp,
389                               struct tf_tbl_set_parms *parms);
390
391         /**
392          * Sets the specified external table type element.
393          *
394          * This API sets the specified element data by invoking the
395          * firmware.
396          *
397          * [in] tfp
398          *   Pointer to TF handle
399          *
400          * [in] parms
401          *   Pointer to table set parameters
402          *
403          * Returns
404          *   - (0) if successful.
405          *   - (-EINVAL) on failure.
406          */
407         int (*tf_dev_set_ext_tbl)(struct tf *tfp,
408                                   struct tf_tbl_set_parms *parms);
409
410         /**
411          * Retrieves the specified table type element.
412          *
413          * This API retrieves the specified element data by invoking the
414          * firmware.
415          *
416          * [in] tfp
417          *   Pointer to TF handle
418          *
419          * [in] parms
420          *   Pointer to table get parameters
421          *
422          * Returns
423          *   - (0) if successful.
424          *   - (-EINVAL) on failure.
425          */
426         int (*tf_dev_get_tbl)(struct tf *tfp,
427                               struct tf_tbl_get_parms *parms);
428
429         /**
430          * Retrieves the specified table type element using 'bulk'
431          * mechanism.
432          *
433          * This API retrieves the specified element data by invoking the
434          * firmware.
435          *
436          * [in] tfp
437          *   Pointer to TF handle
438          *
439          * [in] parms
440          *   Pointer to table get bulk parameters
441          *
442          * Returns
443          *   - (0) if successful.
444          *   - (-EINVAL) on failure.
445          */
446         int (*tf_dev_get_bulk_tbl)(struct tf *tfp,
447                                    struct tf_tbl_get_bulk_parms *parms);
448
449         /**
450          * Gets the increment value to add to the shared session resource
451          * start offset by for each count in the "stride"
452          *
453          * [in] tfp
454          *   Pointer to TF handle
455          *
456          * [in] parms
457          *   Pointer to get shared tbl increment parameters
458          *
459          * Returns
460          *   - (0) if successful.
461          *   - (-EINVAL) on failure.
462          */
463         int (*tf_dev_get_shared_tbl_increment)(struct tf *tfp,
464                                 struct tf_get_shared_tbl_increment_parms *parms);
465
466         /**
467          * Retrieves the table resource info.
468          *
469          * This API retrieves the table resource info from the rm db.
470          *
471          * [in] tfp
472          *   Pointer to TF handle
473          *
474          * [in] parms
475          *   Pointer to tbl info
476          *
477          * Returns
478          *   - (0) if successful.
479          *   - (-EINVAL) on failure.
480          */
481         int (*tf_dev_get_tbl_resc_info)(struct tf *tfp,
482                                          struct tf_tbl_resource_info *parms);
483
484         /**
485          * Allocation of a tcam element.
486          *
487          * This API allocates the specified tcam element from a device
488          * specific tcam DB. The allocated element is returned.
489          *
490          * [in] tfp
491          *   Pointer to TF handle
492          *
493          * [in] parms
494          *   Pointer to tcam allocation parameters
495          *
496          * Returns
497          *   - (0) if successful.
498          *   - (-EINVAL) on failure.
499          */
500         int (*tf_dev_alloc_tcam)(struct tf *tfp,
501                                  struct tf_tcam_alloc_parms *parms);
502
503         /**
504          * Free of a tcam element.
505          *
506          * This API free's a previous allocated tcam element from a
507          * device specific tcam DB.
508          *
509          * [in] tfp
510          *   Pointer to TF handle
511          *
512          * [in] parms
513          *   Pointer to tcam free parameters
514          *
515          * Returns
516          *   - (0) if successful.
517          *   - (-EINVAL) on failure.
518          */
519         int (*tf_dev_free_tcam)(struct tf *tfp,
520                                 struct tf_tcam_free_parms *parms);
521
522         /**
523          * Searches for the specified tcam element in a shadow DB.
524          *
525          * This API searches for the specified tcam element in a
526          * device specific shadow DB. If the element is found the
527          * reference count for the element is updated. If the element
528          * is not found a new element is allocated from the tcam DB
529          * and then inserted into the shadow DB.
530          *
531          * [in] tfp
532          *   Pointer to TF handle
533          *
534          * [in] parms
535          *   Pointer to tcam allocation and search parameters
536          *
537          * Returns
538          *   - (0) if successful.
539          *   - (-EINVAL) on failure.
540          */
541         int (*tf_dev_alloc_search_tcam)
542                         (struct tf *tfp,
543                         struct tf_tcam_alloc_search_parms *parms);
544
545         /**
546          * Sets the specified tcam element.
547          *
548          * This API sets the specified element data by invoking the
549          * firmware.
550          *
551          * [in] tfp
552          *   Pointer to TF handle
553          *
554          * [in] parms
555          *   Pointer to tcam set parameters
556          *
557          * Returns
558          *   - (0) if successful.
559          *   - (-EINVAL) on failure.
560          */
561         int (*tf_dev_set_tcam)(struct tf *tfp,
562                                struct tf_tcam_set_parms *parms);
563
564         /**
565          * Retrieves the specified tcam element.
566          *
567          * This API retrieves the specified element data by invoking the
568          * firmware.
569          *
570          * [in] tfp
571          *   Pointer to TF handle
572          *
573          * [in] parms
574          *   Pointer to tcam get parameters
575          *
576          * Returns
577          *   - (0) if successful.
578          *   - (-EINVAL) on failure.
579          */
580         int (*tf_dev_get_tcam)(struct tf *tfp,
581                                struct tf_tcam_get_parms *parms);
582
583 #ifdef TF_TCAM_SHARED
584         /**
585          * Move TCAM shared entries
586          *
587          * [in] tfp
588          *   Pointer to TF handle
589          *
590          * [in] parms
591          *   Pointer to parameters
592          *
593          *    returns:
594          *    0       - Success
595          *    -EINVAL - Error
596          */
597         int (*tf_dev_move_tcam)(struct tf *tfp,
598                                 struct tf_move_tcam_shared_entries_parms *parms);
599 #endif /* TF_TCAM_SHARED */
600
601         /**
602          * Retrieves the tcam resource info.
603          *
604          * This API retrieves the tcam resource info from the rm db.
605          *
606          * [in] tfp
607          *   Pointer to TF handle
608          *
609          * [in] parms
610          *   Pointer to tcam info
611          *
612          * Returns
613          *   - (0) if successful.
614          *   - (-EINVAL) on failure.
615          */
616         int (*tf_dev_get_tcam_resc_info)(struct tf *tfp,
617                                          struct tf_tcam_resource_info *parms);
618
619         /**
620          * Insert EM hash entry API
621          *
622          * [in] tfp
623          *   Pointer to TF handle
624          *
625          * [in] parms
626          *   Pointer to E/EM insert parameters
627          *
628          *  Returns:
629          *    0       - Success
630          *    -EINVAL - Error
631          */
632         int (*tf_dev_insert_int_em_entry)(struct tf *tfp,
633                                           struct tf_insert_em_entry_parms *parms);
634
635         /**
636          * Delete EM hash entry API
637          *
638          * [in] tfp
639          *   Pointer to TF handle
640          *
641          * [in] parms
642          *   Pointer to E/EM delete parameters
643          *
644          *    returns:
645          *    0       - Success
646          *    -EINVAL - Error
647          */
648         int (*tf_dev_delete_int_em_entry)(struct tf *tfp,
649                                           struct tf_delete_em_entry_parms *parms);
650
651         /**
652          * Move EM hash entry API
653          *
654          * [in] tfp
655          *   Pointer to TF handle
656          *
657          * [in] parms
658          *   Pointer to E/EM move parameters
659          *
660          *    returns:
661          *    0       - Success
662          *    -EINVAL - Error
663          */
664         int (*tf_dev_move_int_em_entry)(struct tf *tfp,
665                                         struct tf_move_em_entry_parms *parms);
666
667         /**
668          * Insert EEM hash entry API
669          *
670          * [in] tfp
671          *   Pointer to TF handle
672          *
673          * [in] parms
674          *   Pointer to E/EM insert parameters
675          *
676          *  Returns:
677          *    0       - Success
678          *    -EINVAL - Error
679          */
680         int (*tf_dev_insert_ext_em_entry)(struct tf *tfp,
681                                           struct tf_insert_em_entry_parms *parms);
682
683         /**
684          * Delete EEM hash entry API
685          *
686          * [in] tfp
687          *   Pointer to TF handle
688          *
689          * [in] parms
690          *   Pointer to E/EM delete parameters
691          *
692          *    returns:
693          *    0       - Success
694          *    -EINVAL - Error
695          */
696         int (*tf_dev_delete_ext_em_entry)(struct tf *tfp,
697                                           struct tf_delete_em_entry_parms *parms);
698
699         /**
700          * Retrieves the em resource info.
701          *
702          * This API retrieves the em resource info from the rm db.
703          *
704          * [in] tfp
705          *   Pointer to TF handle
706          *
707          * [in] parms
708          *   Pointer to em info
709          *
710          * Returns
711          *   - (0) if successful.
712          *   - (-EINVAL) on failure.
713          */
714         int (*tf_dev_get_em_resc_info)(struct tf *tfp,
715                                        struct tf_em_resource_info *parms);
716
717         /**
718          * Move EEM hash entry API
719          *
720          *   Pointer to E/EM move parameters
721          *
722          * [in] tfp
723          *   Pointer to TF handle
724          *
725          * [in] parms
726          *   Pointer to em info
727          *
728          *    returns:
729          *    0       - Success
730          *    -EINVAL - Error
731          */
732         int (*tf_dev_move_ext_em_entry)(struct tf *tfp,
733                                         struct tf_move_em_entry_parms *parms);
734
735         /**
736          * Allocate EEM table scope
737          *
738          * [in] tfp
739          *   Pointer to TF handle
740          *
741          * [in] parms
742          *   Pointer to table scope alloc parameters
743          *
744          *    returns:
745          *    0       - Success
746          *    -EINVAL - Error
747          */
748         int (*tf_dev_alloc_tbl_scope)(struct tf *tfp,
749                                       struct tf_alloc_tbl_scope_parms *parms);
750         /**
751          * Map EEM parif
752          *
753          * [in] tfp
754          *   Pointer to TF handle
755          *
756          * [in] pf
757          * PF associated with the table scope
758          *
759          * [in] parif_bitmask
760          * Bitmask of PARIFs to enable
761          *
762          * [in/out] pointer to the parif_2_pf data to be updated
763          *
764          * [in/out] pointer to the parif_2_pf mask to be updated
765          *
766          * [in] sz_in_bytes - number of bytes to be written
767          *
768          *    returns:
769          *    0       - Success
770          *    -EINVAL - Error
771          */
772         int (*tf_dev_map_parif)(struct tf *tfp,
773                                 uint16_t parif_bitmask,
774                                 uint16_t pf,
775                                 uint8_t *data,
776                                 uint8_t *mask,
777                                 uint16_t sz_in_bytes);
778         /**
779          * Map EEM table scope
780          *
781          * [in] tfp
782          *   Pointer to TF handle
783          *
784          * [in] parms
785          *   Pointer to table scope map parameters
786          *
787          *    returns:
788          *    0       - Success
789          *    -EINVAL - Error
790          */
791         int (*tf_dev_map_tbl_scope)(struct tf *tfp,
792                                     struct tf_map_tbl_scope_parms *parms);
793
794         /**
795          * Free EEM table scope
796          *
797          * [in] tfp
798          *   Pointer to TF handle
799          *
800          * [in] parms
801          *   Pointer to table scope free parameters
802          *
803          *    returns:
804          *    0       - Success
805          *    -EINVAL - Error
806          */
807         int (*tf_dev_free_tbl_scope)(struct tf *tfp,
808                                      struct tf_free_tbl_scope_parms *parms);
809
810         /**
811          * Sets the specified interface table type element.
812          *
813          * This API sets the specified element data by invoking the
814          * firmware.
815          *
816          * [in] tfp
817          *   Pointer to TF handle
818          *
819          * [in] parms
820          *   Pointer to interface table set parameters
821          *
822          * Returns
823          *   - (0) if successful.
824          *   - (-EINVAL) on failure.
825          */
826         int (*tf_dev_set_if_tbl)(struct tf *tfp,
827                                  struct tf_if_tbl_set_parms *parms);
828
829         /**
830          * Retrieves the specified interface table type element.
831          *
832          * This API retrieves the specified element data by invoking the
833          * firmware.
834          *
835          * [in] tfp
836          *   Pointer to TF handle
837          *
838          * [in] parms
839          *   Pointer to table get parameters
840          *
841          * Returns
842          *   - (0) if successful.
843          *   - (-EINVAL) on failure.
844          */
845         int (*tf_dev_get_if_tbl)(struct tf *tfp,
846                                  struct tf_if_tbl_get_parms *parms);
847
848         /**
849          * Update global cfg
850          *
851          * [in] tfp
852          *   Pointer to TF handle
853          *
854          * [in] parms
855          *   Pointer to global cfg parameters
856          *
857          *    returns:
858          *    0       - Success
859          *    -EINVAL - Error
860          */
861         int (*tf_dev_set_global_cfg)(struct tf *tfp,
862                                      struct tf_global_cfg_parms *parms);
863
864         /**
865          * Get global cfg
866          *
867          * [in] tfp
868          *   Pointer to TF handle
869          *
870          * [in] parms
871          *   Pointer to global cfg parameters
872          *
873          *    returns:
874          *    0       - Success
875          *    -EINVAL - Error
876          */
877         int (*tf_dev_get_global_cfg)(struct tf *tfp,
878                                      struct tf_global_cfg_parms *parms);
879
880         /**
881          * Get mailbox
882          *
883          *    returns:
884          *      mailbox
885          */
886         int (*tf_dev_get_mailbox)(void);
887
888         /**
889          * Convert length in bit to length in byte and align to word.
890          * The word length depends on device type.
891          *
892          * [in] size
893          *   Size in bit
894          *
895          * Returns
896          *   Size in byte
897          */
898         int (*tf_dev_word_align)(uint16_t size);
899
900         /**
901          * Hash key using crc32 and lookup3
902          *
903          * [in] key_data
904          *   Pointer to key
905          *
906          * [in] bitlen
907          *   Number of key bits
908          *
909          * Returns
910          *   Hashes
911          */
912         uint64_t (*tf_dev_cfa_key_hash)(uint64_t *key_data,
913                                           uint16_t bitlen);
914 };
915
916 /**
917  * Supported device operation structures
918  */
919 extern const struct tf_dev_ops tf_dev_ops_p4_init;
920 extern const struct tf_dev_ops tf_dev_ops_p4;
921 extern const struct tf_dev_ops tf_dev_ops_p58_init;
922 extern const struct tf_dev_ops tf_dev_ops_p58;
923
924 #endif /* _TF_DEVICE_H_ */