1 /* SPDX-License-Identifier: GPL-2.0 */
2 #define CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE 512
5 # define XKPHYS_TO_PHYS(p) (p)
8 #define OCTEON_IRQ_WORKQ0 0
9 #define OCTEON_IRQ_RML 0
10 #define OCTEON_IRQ_TIMER1 0
11 #define OCTEON_IS_MODEL(x) 0
12 #define octeon_has_feature(x) 0
13 #define octeon_get_clock_rate() 0
15 #define CVMX_SYNCIOBDMA do { } while (0)
17 #define CVMX_HELPER_INPUT_TAG_TYPE 0
18 #define CVMX_HELPER_FIRST_MBUFF_SKIP 7
19 #define CVMX_FAU_REG_END (2048)
20 #define CVMX_FPA_OUTPUT_BUFFER_POOL (2)
21 #define CVMX_FPA_OUTPUT_BUFFER_POOL_SIZE 16
22 #define CVMX_FPA_PACKET_POOL (0)
23 #define CVMX_FPA_PACKET_POOL_SIZE 16
24 #define CVMX_FPA_WQE_POOL (1)
25 #define CVMX_FPA_WQE_POOL_SIZE 16
26 #define CVMX_GMXX_RXX_ADR_CAM_EN(a, b) ((a) + (b))
27 #define CVMX_GMXX_RXX_ADR_CTL(a, b) ((a) + (b))
28 #define CVMX_GMXX_PRTX_CFG(a, b) ((a) + (b))
29 #define CVMX_GMXX_RXX_FRM_MAX(a, b) ((a) + (b))
30 #define CVMX_GMXX_RXX_JABBER(a, b) ((a) + (b))
31 #define CVMX_IPD_CTL_STATUS 0
32 #define CVMX_PIP_FRM_LEN_CHKX(a) (a)
33 #define CVMX_PIP_NUM_INPUT_PORTS 1
34 #define CVMX_SCR_SCRATCH 0
35 #define CVMX_PKO_QUEUES_PER_PORT_INTERFACE0 2
36 #define CVMX_PKO_QUEUES_PER_PORT_INTERFACE1 2
37 #define CVMX_IPD_SUB_PORT_FCS 0
38 #define CVMX_SSO_WQ_IQ_DIS 0
39 #define CVMX_SSO_WQ_INT 0
40 #define CVMX_POW_WQ_INT 0
41 #define CVMX_SSO_WQ_INT_PC 0
42 #define CVMX_NPI_RSL_INT_BLOCKS 0
43 #define CVMX_POW_WQ_INT_PC 0
45 union cvmx_pip_wqe_word2
{
50 uint64_t vlan_valid
:1;
51 uint64_t vlan_stacked
:1;
52 uint64_t unassigned
:1;
56 uint64_t unassigned2
:8;
57 uint64_t dec_ipcomp
:1;
58 uint64_t tcp_or_udp
:1;
74 uint64_t vlan_valid
:1;
75 uint64_t vlan_stacked
:1;
76 uint64_t unassigned
:1;
80 uint64_t dec_ipcomp
:1;
81 uint64_t tcp_or_udp
:1;
103 uint64_t vlan_valid
:1;
104 uint64_t vlan_stacked
:1;
105 uint64_t unassigned
:1;
109 uint64_t unassigned2
:12;
111 uint64_t unassigned3
:1;
117 uint64_t rcv_error
:1;
123 union cvmx_pip_wqe_word0
{
125 uint64_t next_ptr
:40;
130 uint64_t pknd
:6; /* 0..5 */
131 uint64_t unused2
:2; /* 6..7 */
132 uint64_t bpid
:6; /* 8..13 */
133 uint64_t unused1
:18; /* 14..31 */
134 uint64_t l2ptr
:8; /* 32..39 */
135 uint64_t l3ptr
:8; /* 40..47 */
136 uint64_t unused0
:8; /* 48..55 */
137 uint64_t l4ptr
:8; /* 56..63 */
141 union cvmx_wqe_word0
{
143 union cvmx_pip_wqe_word0 pip
;
146 union cvmx_wqe_word1
{
188 union cvmx_wqe_word0 word0
;
189 union cvmx_wqe_word1 word1
;
190 union cvmx_pip_wqe_word2 word2
;
191 union cvmx_buf_ptr packet_ptr
;
192 uint8_t packet_data
[96];
195 union cvmx_helper_link_info
{
198 uint64_t reserved_20_63
:44;
199 uint64_t link_up
:1; /**< Is the physical link up? */
200 uint64_t full_duplex
:1; /**< 1 if the link is full duplex */
201 uint64_t speed
:18; /**< Speed of the link in Mbps */
205 enum cvmx_fau_reg_32
{
206 CVMX_FAU_REG_32_START
= 0,
209 enum cvmx_fau_op_size
{
210 CVMX_FAU_OP_SIZE_8
= 0,
211 CVMX_FAU_OP_SIZE_16
= 1,
212 CVMX_FAU_OP_SIZE_32
= 2,
213 CVMX_FAU_OP_SIZE_64
= 3
217 CVMX_SPI_MODE_UNKNOWN
= 0,
218 CVMX_SPI_MODE_TX_HALFPLEX
= 1,
219 CVMX_SPI_MODE_RX_HALFPLEX
= 2,
220 CVMX_SPI_MODE_DUPLEX
= 3
224 CVMX_HELPER_INTERFACE_MODE_DISABLED
,
225 CVMX_HELPER_INTERFACE_MODE_RGMII
,
226 CVMX_HELPER_INTERFACE_MODE_GMII
,
227 CVMX_HELPER_INTERFACE_MODE_SPI
,
228 CVMX_HELPER_INTERFACE_MODE_PCIE
,
229 CVMX_HELPER_INTERFACE_MODE_XAUI
,
230 CVMX_HELPER_INTERFACE_MODE_SGMII
,
231 CVMX_HELPER_INTERFACE_MODE_PICMG
,
232 CVMX_HELPER_INTERFACE_MODE_NPI
,
233 CVMX_HELPER_INTERFACE_MODE_LOOP
,
234 } cvmx_helper_interface_mode_t
;
238 CVMX_POW_NO_WAIT
= 0,
242 CVMX_PKO_LOCK_NONE
= 0,
243 CVMX_PKO_LOCK_ATOMIC_TAG
= 1,
244 CVMX_PKO_LOCK_CMD_QUEUE
= 2,
249 CVMX_PKO_INVALID_PORT
,
250 CVMX_PKO_INVALID_QUEUE
,
251 CVMX_PKO_INVALID_PRIORITY
,
253 CVMX_PKO_PORT_ALREADY_SETUP
,
254 CVMX_PKO_CMD_QUEUE_INIT_ERROR
257 enum cvmx_pow_tag_type
{
258 CVMX_POW_TAG_TYPE_ORDERED
= 0L,
259 CVMX_POW_TAG_TYPE_ATOMIC
= 1L,
260 CVMX_POW_TAG_TYPE_NULL
= 2L,
261 CVMX_POW_TAG_TYPE_NULL_NULL
= 3L
264 union cvmx_ipd_ctl_status
{
266 struct cvmx_ipd_ctl_status_s
{
267 uint64_t reserved_18_63
:46;
286 struct cvmx_ipd_ctl_status_cn30xx
{
287 uint64_t reserved_10_63
:54;
298 struct cvmx_ipd_ctl_status_cn38xxp2
{
299 uint64_t reserved_9_63
:55;
309 struct cvmx_ipd_ctl_status_cn50xx
{
310 uint64_t reserved_15_63
:49;
326 struct cvmx_ipd_ctl_status_cn58xx
{
327 uint64_t reserved_12_63
:52;
340 struct cvmx_ipd_ctl_status_cn63xxp1
{
341 uint64_t reserved_16_63
:48;
360 union cvmx_ipd_sub_port_fcs
{
362 struct cvmx_ipd_sub_port_fcs_s
{
363 uint64_t port_bit
:32;
364 uint64_t reserved_32_35
:4;
365 uint64_t port_bit2
:4;
366 uint64_t reserved_40_63
:24;
368 struct cvmx_ipd_sub_port_fcs_cn30xx
{
370 uint64_t reserved_3_63
:61;
372 struct cvmx_ipd_sub_port_fcs_cn38xx
{
373 uint64_t port_bit
:32;
374 uint64_t reserved_32_63
:32;
378 union cvmx_ipd_sub_port_qos_cnt
{
380 struct cvmx_ipd_sub_port_qos_cnt_s
{
383 uint64_t reserved_41_63
:23;
388 uint32_t dropped_octets
;
389 uint32_t dropped_packets
;
390 uint32_t pci_raw_packets
;
393 uint32_t multicast_packets
;
394 uint32_t broadcast_packets
;
395 uint32_t len_64_packets
;
396 uint32_t len_65_127_packets
;
397 uint32_t len_128_255_packets
;
398 uint32_t len_256_511_packets
;
399 uint32_t len_512_1023_packets
;
400 uint32_t len_1024_1518_packets
;
401 uint32_t len_1519_max_packets
;
402 uint32_t fcs_align_err_packets
;
403 uint32_t runt_packets
;
404 uint32_t runt_crc_packets
;
405 uint32_t oversize_packets
;
406 uint32_t oversize_crc_packets
;
407 uint32_t inb_packets
;
410 } cvmx_pip_port_status_t
;
416 } cvmx_pko_port_status_t
;
418 union cvmx_pip_frm_len_chkx
{
420 struct cvmx_pip_frm_len_chkx_s
{
421 uint64_t reserved_32_63
:32;
427 union cvmx_gmxx_rxx_frm_ctl
{
429 struct cvmx_gmxx_rxx_frm_ctl_s
{
439 uint64_t pre_align
:1;
441 uint64_t reserved_11_11
:1;
443 uint64_t reserved_13_63
:51;
445 struct cvmx_gmxx_rxx_frm_ctl_cn30xx
{
455 uint64_t reserved_9_63
:55;
457 struct cvmx_gmxx_rxx_frm_ctl_cn31xx
{
466 uint64_t reserved_8_63
:56;
468 struct cvmx_gmxx_rxx_frm_ctl_cn50xx
{
476 uint64_t reserved_7_8
:2;
477 uint64_t pre_align
:1;
479 uint64_t reserved_11_63
:53;
481 struct cvmx_gmxx_rxx_frm_ctl_cn56xxp1
{
489 uint64_t reserved_7_8
:2;
490 uint64_t pre_align
:1;
491 uint64_t reserved_10_63
:54;
493 struct cvmx_gmxx_rxx_frm_ctl_cn58xx
{
503 uint64_t pre_align
:1;
505 uint64_t reserved_11_63
:53;
507 struct cvmx_gmxx_rxx_frm_ctl_cn61xx
{
515 uint64_t reserved_7_8
:2;
516 uint64_t pre_align
:1;
518 uint64_t reserved_11_11
:1;
520 uint64_t reserved_13_63
:51;
524 union cvmx_gmxx_rxx_int_reg
{
526 struct cvmx_gmxx_rxx_int_reg_s
{
546 uint64_t pause_drp
:1;
547 uint64_t loc_fault
:1;
548 uint64_t rem_fault
:1;
556 uint64_t reserved_29_63
:35;
558 struct cvmx_gmxx_rxx_int_reg_cn30xx
{
578 uint64_t reserved_19_63
:45;
580 struct cvmx_gmxx_rxx_int_reg_cn50xx
{
581 uint64_t reserved_0_0
:1;
583 uint64_t reserved_2_2
:1;
587 uint64_t reserved_6_6
:1;
600 uint64_t pause_drp
:1;
601 uint64_t reserved_20_63
:44;
603 struct cvmx_gmxx_rxx_int_reg_cn52xx
{
604 uint64_t reserved_0_0
:1;
606 uint64_t reserved_2_2
:1;
609 uint64_t reserved_5_6
:2;
612 uint64_t reserved_9_9
:1;
619 uint64_t reserved_16_18
:3;
620 uint64_t pause_drp
:1;
621 uint64_t loc_fault
:1;
622 uint64_t rem_fault
:1;
630 uint64_t reserved_29_63
:35;
632 struct cvmx_gmxx_rxx_int_reg_cn56xxp1
{
633 uint64_t reserved_0_0
:1;
635 uint64_t reserved_2_2
:1;
638 uint64_t reserved_5_6
:2;
641 uint64_t reserved_9_9
:1;
648 uint64_t reserved_16_18
:3;
649 uint64_t pause_drp
:1;
650 uint64_t loc_fault
:1;
651 uint64_t rem_fault
:1;
657 uint64_t reserved_27_63
:37;
659 struct cvmx_gmxx_rxx_int_reg_cn58xx
{
679 uint64_t pause_drp
:1;
680 uint64_t reserved_20_63
:44;
682 struct cvmx_gmxx_rxx_int_reg_cn61xx
{
685 uint64_t reserved_2_2
:1;
688 uint64_t reserved_5_6
:2;
691 uint64_t reserved_9_9
:1;
698 uint64_t reserved_16_18
:3;
699 uint64_t pause_drp
:1;
700 uint64_t loc_fault
:1;
701 uint64_t rem_fault
:1;
709 uint64_t reserved_29_63
:35;
713 union cvmx_gmxx_prtx_cfg
{
715 struct cvmx_gmxx_prtx_cfg_s
{
716 uint64_t reserved_22_63
:42;
718 uint64_t reserved_14_15
:2;
721 uint64_t reserved_9_11
:3;
722 uint64_t speed_msb
:1;
723 uint64_t reserved_4_7
:4;
729 struct cvmx_gmxx_prtx_cfg_cn30xx
{
730 uint64_t reserved_4_63
:60;
736 struct cvmx_gmxx_prtx_cfg_cn52xx
{
737 uint64_t reserved_14_63
:50;
740 uint64_t reserved_9_11
:3;
741 uint64_t speed_msb
:1;
742 uint64_t reserved_4_7
:4;
750 union cvmx_gmxx_rxx_adr_ctl
{
752 struct cvmx_gmxx_rxx_adr_ctl_s
{
753 uint64_t reserved_4_63
:60;
760 union cvmx_pip_prt_tagx
{
762 struct cvmx_pip_prt_tagx_s
{
763 uint64_t reserved_54_63
:10;
764 uint64_t portadd_en
:1;
765 uint64_t inc_hwchk
:1;
766 uint64_t reserved_50_51
:2;
767 uint64_t grptagbase_msb
:2;
768 uint64_t reserved_46_47
:2;
769 uint64_t grptagmask_msb
:2;
770 uint64_t reserved_42_43
:2;
772 uint64_t grptagbase
:4;
773 uint64_t grptagmask
:4;
775 uint64_t grptag_mskip
:1;
779 uint64_t inc_prt_flag
:1;
780 uint64_t ip6_dprt_flag
:1;
781 uint64_t ip4_dprt_flag
:1;
782 uint64_t ip6_sprt_flag
:1;
783 uint64_t ip4_sprt_flag
:1;
784 uint64_t ip6_nxth_flag
:1;
785 uint64_t ip4_pctl_flag
:1;
786 uint64_t ip6_dst_flag
:1;
787 uint64_t ip4_dst_flag
:1;
788 uint64_t ip6_src_flag
:1;
789 uint64_t ip4_src_flag
:1;
790 uint64_t tcp6_tag_type
:2;
791 uint64_t tcp4_tag_type
:2;
792 uint64_t ip6_tag_type
:2;
793 uint64_t ip4_tag_type
:2;
794 uint64_t non_tag_type
:2;
797 struct cvmx_pip_prt_tagx_cn30xx
{
798 uint64_t reserved_40_63
:24;
799 uint64_t grptagbase
:4;
800 uint64_t grptagmask
:4;
802 uint64_t reserved_30_30
:1;
806 uint64_t inc_prt_flag
:1;
807 uint64_t ip6_dprt_flag
:1;
808 uint64_t ip4_dprt_flag
:1;
809 uint64_t ip6_sprt_flag
:1;
810 uint64_t ip4_sprt_flag
:1;
811 uint64_t ip6_nxth_flag
:1;
812 uint64_t ip4_pctl_flag
:1;
813 uint64_t ip6_dst_flag
:1;
814 uint64_t ip4_dst_flag
:1;
815 uint64_t ip6_src_flag
:1;
816 uint64_t ip4_src_flag
:1;
817 uint64_t tcp6_tag_type
:2;
818 uint64_t tcp4_tag_type
:2;
819 uint64_t ip6_tag_type
:2;
820 uint64_t ip4_tag_type
:2;
821 uint64_t non_tag_type
:2;
824 struct cvmx_pip_prt_tagx_cn50xx
{
825 uint64_t reserved_40_63
:24;
826 uint64_t grptagbase
:4;
827 uint64_t grptagmask
:4;
829 uint64_t grptag_mskip
:1;
833 uint64_t inc_prt_flag
:1;
834 uint64_t ip6_dprt_flag
:1;
835 uint64_t ip4_dprt_flag
:1;
836 uint64_t ip6_sprt_flag
:1;
837 uint64_t ip4_sprt_flag
:1;
838 uint64_t ip6_nxth_flag
:1;
839 uint64_t ip4_pctl_flag
:1;
840 uint64_t ip6_dst_flag
:1;
841 uint64_t ip4_dst_flag
:1;
842 uint64_t ip6_src_flag
:1;
843 uint64_t ip4_src_flag
:1;
844 uint64_t tcp6_tag_type
:2;
845 uint64_t tcp4_tag_type
:2;
846 uint64_t ip6_tag_type
:2;
847 uint64_t ip4_tag_type
:2;
848 uint64_t non_tag_type
:2;
853 union cvmx_spxx_int_reg
{
855 struct cvmx_spxx_int_reg_s
{
856 uint64_t reserved_32_63
:32;
858 uint64_t reserved_12_30
:19;
867 uint64_t reserved_2_3
:2;
873 union cvmx_spxx_int_msk
{
875 struct cvmx_spxx_int_msk_s
{
876 uint64_t reserved_12_63
:52;
885 uint64_t reserved_2_3
:2;
891 union cvmx_pow_wq_int
{
893 struct cvmx_pow_wq_int_s
{
896 uint64_t reserved_32_63
:32;
900 union cvmx_sso_wq_int_thrx
{
904 uint64_t reserved_12_13
:2;
906 uint64_t reserved_26_27
:2;
909 uint64_t reserved_33_63
:31;
913 union cvmx_stxx_int_reg
{
915 struct cvmx_stxx_int_reg_s
{
916 uint64_t reserved_9_63
:55;
929 union cvmx_stxx_int_msk
{
931 struct cvmx_stxx_int_msk_s
{
932 uint64_t reserved_8_63
:56;
944 union cvmx_pow_wq_int_pc
{
946 struct cvmx_pow_wq_int_pc_s
{
947 uint64_t reserved_0_7
:8;
949 uint64_t reserved_28_31
:4;
951 uint64_t reserved_60_63
:4;
955 union cvmx_pow_wq_int_thrx
{
957 struct cvmx_pow_wq_int_thrx_s
{
958 uint64_t reserved_29_63
:35;
961 uint64_t reserved_23_23
:1;
963 uint64_t reserved_11_11
:1;
966 struct cvmx_pow_wq_int_thrx_cn30xx
{
967 uint64_t reserved_29_63
:35;
970 uint64_t reserved_18_23
:6;
972 uint64_t reserved_6_11
:6;
975 struct cvmx_pow_wq_int_thrx_cn31xx
{
976 uint64_t reserved_29_63
:35;
979 uint64_t reserved_20_23
:4;
981 uint64_t reserved_8_11
:4;
984 struct cvmx_pow_wq_int_thrx_cn52xx
{
985 uint64_t reserved_29_63
:35;
988 uint64_t reserved_21_23
:3;
990 uint64_t reserved_9_11
:3;
993 struct cvmx_pow_wq_int_thrx_cn63xx
{
994 uint64_t reserved_29_63
:35;
997 uint64_t reserved_22_23
:2;
999 uint64_t reserved_10_11
:2;
1004 union cvmx_npi_rsl_int_blocks
{
1006 struct cvmx_npi_rsl_int_blocks_s
{
1007 uint64_t reserved_32_63
:32;
1010 uint64_t reserved_28_29
:2;
1024 uint64_t reserved_13_14
:2;
1039 struct cvmx_npi_rsl_int_blocks_cn30xx
{
1040 uint64_t reserved_32_63
:32;
1074 struct cvmx_npi_rsl_int_blocks_cn38xx
{
1075 uint64_t reserved_32_63
:32;
1109 struct cvmx_npi_rsl_int_blocks_cn50xx
{
1110 uint64_t reserved_31_63
:33;
1114 uint64_t reserved_24_27
:4;
1117 uint64_t reserved_21_21
:1;
1123 uint64_t reserved_15_15
:1;
1130 uint64_t reserved_8_8
:1;
1142 union cvmx_pko_command_word0
{
1145 uint64_t total_bytes
:16;
1147 uint64_t dontfree
:1;
1148 uint64_t ignore_i
:1;
1164 union cvmx_ciu_timx
{
1166 struct cvmx_ciu_timx_s
{
1167 uint64_t reserved_37_63
:27;
1168 uint64_t one_shot
:1;
1173 union cvmx_gmxx_rxx_rx_inbnd
{
1175 struct cvmx_gmxx_rxx_rx_inbnd_s
{
1179 uint64_t reserved_4_63
:60;
1183 static inline int32_t cvmx_fau_fetch_and_add32(enum cvmx_fau_reg_32 reg
,
1189 static inline void cvmx_fau_atomic_add32(enum cvmx_fau_reg_32 reg
,
1193 static inline void cvmx_fau_atomic_write32(enum cvmx_fau_reg_32 reg
,
1197 static inline uint64_t cvmx_scratch_read64(uint64_t address
)
1202 static inline void cvmx_scratch_write64(uint64_t address
, uint64_t value
)
1205 static inline int cvmx_wqe_get_grp(struct cvmx_wqe
*work
)
1210 static inline void *cvmx_phys_to_ptr(uint64_t physical_address
)
1212 return (void *)(uintptr_t)(physical_address
);
1215 static inline phys_addr_t
cvmx_ptr_to_phys(void *ptr
)
1217 return (unsigned long)ptr
;
1220 static inline int cvmx_helper_get_interface_num(int ipd_port
)
1225 static inline int cvmx_helper_get_interface_index_num(int ipd_port
)
1230 static inline void cvmx_fpa_enable(void)
1233 static inline uint64_t cvmx_read_csr(uint64_t csr_addr
)
1238 static inline void cvmx_write_csr(uint64_t csr_addr
, uint64_t val
)
1241 static inline int cvmx_helper_setup_red(int pass_thresh
, int drop_thresh
)
1246 static inline void *cvmx_fpa_alloc(uint64_t pool
)
1251 static inline void cvmx_fpa_free(void *ptr
, uint64_t pool
,
1252 uint64_t num_cache_lines
)
1255 static inline int octeon_is_simulation(void)
1260 static inline void cvmx_pip_get_port_status(uint64_t port_num
, uint64_t clear
,
1261 cvmx_pip_port_status_t
*status
)
1264 static inline void cvmx_pko_get_port_status(uint64_t port_num
, uint64_t clear
,
1265 cvmx_pko_port_status_t
*status
)
1268 static inline cvmx_helper_interface_mode_t
cvmx_helper_interface_get_mode(int
1274 static inline union cvmx_helper_link_info
cvmx_helper_link_get(int ipd_port
)
1276 union cvmx_helper_link_info ret
= { .u64
= 0 };
1281 static inline int cvmx_helper_link_set(int ipd_port
,
1282 union cvmx_helper_link_info link_info
)
1287 static inline int cvmx_helper_initialize_packet_io_global(void)
1292 static inline int cvmx_helper_get_number_of_interfaces(void)
1297 static inline int cvmx_helper_ports_on_interface(int interface
)
1302 static inline int cvmx_helper_get_ipd_port(int interface
, int port
)
1307 static inline int cvmx_helper_ipd_and_packet_input_enable(void)
1312 static inline void cvmx_ipd_disable(void)
1315 static inline void cvmx_ipd_free_ptr(void)
1318 static inline void cvmx_pko_disable(void)
1321 static inline void cvmx_pko_shutdown(void)
1324 static inline int cvmx_pko_get_base_queue_per_core(int port
, int core
)
1329 static inline int cvmx_pko_get_base_queue(int port
)
1334 static inline int cvmx_pko_get_num_queues(int port
)
1339 static inline unsigned int cvmx_get_core_num(void)
1344 static inline void cvmx_pow_work_request_async_nocheck(int scr_addr
,
1345 cvmx_pow_wait_t wait
)
1348 static inline void cvmx_pow_work_request_async(int scr_addr
,
1349 cvmx_pow_wait_t wait
)
1352 static inline struct cvmx_wqe
*cvmx_pow_work_response_async(int scr_addr
)
1354 struct cvmx_wqe
*wqe
= (void *)(unsigned long)scr_addr
;
1359 static inline struct cvmx_wqe
*cvmx_pow_work_request_sync(cvmx_pow_wait_t wait
)
1361 return (void *)(unsigned long)wait
;
1364 static inline int cvmx_spi_restart_interface(int interface
,
1365 cvmx_spi_mode_t mode
, int timeout
)
1370 static inline void cvmx_fau_async_fetch_and_add32(uint64_t scraddr
,
1371 enum cvmx_fau_reg_32 reg
,
1375 static inline union cvmx_gmxx_rxx_rx_inbnd
cvmx_spi4000_check_speed(int interface
, int port
)
1377 union cvmx_gmxx_rxx_rx_inbnd r
;
1383 static inline void cvmx_pko_send_packet_prepare(uint64_t port
, uint64_t queue
,
1384 cvmx_pko_lock_t use_locking
)
1387 static inline cvmx_pko_status_t
cvmx_pko_send_packet_finish(uint64_t port
,
1388 uint64_t queue
, union cvmx_pko_command_word0 pko_command
,
1389 union cvmx_buf_ptr packet
, cvmx_pko_lock_t use_locking
)
1394 static inline void cvmx_wqe_set_port(struct cvmx_wqe
*work
, int port
)
1397 static inline void cvmx_wqe_set_qos(struct cvmx_wqe
*work
, int qos
)
1400 static inline int cvmx_wqe_get_qos(struct cvmx_wqe
*work
)
1405 static inline void cvmx_wqe_set_grp(struct cvmx_wqe
*work
, int grp
)
1408 static inline void cvmx_pow_work_submit(struct cvmx_wqe
*wqp
, uint32_t tag
,
1409 enum cvmx_pow_tag_type tag_type
,
1410 uint64_t qos
, uint64_t grp
)
1413 #define CVMX_ASXX_RX_CLK_SETX(a, b) ((a) + (b))
1414 #define CVMX_ASXX_TX_CLK_SETX(a, b) ((a) + (b))
1415 #define CVMX_CIU_TIMX(a) (a)
1416 #define CVMX_GMXX_RXX_ADR_CAM0(a, b) ((a) + (b))
1417 #define CVMX_GMXX_RXX_ADR_CAM1(a, b) ((a) + (b))
1418 #define CVMX_GMXX_RXX_ADR_CAM2(a, b) ((a) + (b))
1419 #define CVMX_GMXX_RXX_ADR_CAM3(a, b) ((a) + (b))
1420 #define CVMX_GMXX_RXX_ADR_CAM4(a, b) ((a) + (b))
1421 #define CVMX_GMXX_RXX_ADR_CAM5(a, b) ((a) + (b))
1422 #define CVMX_GMXX_RXX_FRM_CTL(a, b) ((a) + (b))
1423 #define CVMX_GMXX_RXX_INT_REG(a, b) ((a) + (b))
1424 #define CVMX_GMXX_SMACX(a, b) ((a) + (b))
1425 #define CVMX_PIP_PRT_TAGX(a) (a)
1426 #define CVMX_POW_PP_GRP_MSKX(a) (a)
1427 #define CVMX_POW_WQ_INT_THRX(a) (a)
1428 #define CVMX_SPXX_INT_MSK(a) (a)
1429 #define CVMX_SPXX_INT_REG(a) (a)
1430 #define CVMX_SSO_PPX_GRP_MSK(a) (a)
1431 #define CVMX_SSO_WQ_INT_THRX(a) (a)
1432 #define CVMX_STXX_INT_MSK(a) (a)
1433 #define CVMX_STXX_INT_REG(a) (a)