1 #define CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE 512
4 # define XKPHYS_TO_PHYS(p) (p)
7 #define OCTEON_IRQ_WORKQ0 0
8 #define OCTEON_IRQ_RML 0
9 #define OCTEON_IRQ_TIMER1 0
10 #define OCTEON_IS_MODEL(x) 0
11 #define octeon_has_feature(x) 0
12 #define octeon_get_clock_rate() 0
14 #define CVMX_SYNCIOBDMA do { } while (0)
16 #define CVMX_HELPER_INPUT_TAG_TYPE 0
17 #define CVMX_HELPER_FIRST_MBUFF_SKIP 7
18 #define CVMX_FAU_REG_END (2048)
19 #define CVMX_FPA_OUTPUT_BUFFER_POOL (2)
20 #define CVMX_FPA_OUTPUT_BUFFER_POOL_SIZE 16
21 #define CVMX_FPA_PACKET_POOL (0)
22 #define CVMX_FPA_PACKET_POOL_SIZE 16
23 #define CVMX_FPA_WQE_POOL (1)
24 #define CVMX_FPA_WQE_POOL_SIZE 16
25 #define CVMX_GMXX_RXX_ADR_CAM_EN(a, b) ((a) + (b))
26 #define CVMX_GMXX_RXX_ADR_CTL(a, b) ((a) + (b))
27 #define CVMX_GMXX_PRTX_CFG(a, b) ((a) + (b))
28 #define CVMX_GMXX_RXX_FRM_MAX(a, b) ((a) + (b))
29 #define CVMX_GMXX_RXX_JABBER(a, b) ((a) + (b))
30 #define CVMX_IPD_CTL_STATUS 0
31 #define CVMX_PIP_FRM_LEN_CHKX(a) (a)
32 #define CVMX_PIP_NUM_INPUT_PORTS 1
33 #define CVMX_SCR_SCRATCH 0
34 #define CVMX_PKO_QUEUES_PER_PORT_INTERFACE0 2
35 #define CVMX_PKO_QUEUES_PER_PORT_INTERFACE1 2
36 #define CVMX_IPD_SUB_PORT_FCS 0
37 #define CVMX_SSO_WQ_IQ_DIS 0
38 #define CVMX_SSO_WQ_INT 0
39 #define CVMX_POW_WQ_INT 0
40 #define CVMX_SSO_WQ_INT_PC 0
41 #define CVMX_NPI_RSL_INT_BLOCKS 0
42 #define CVMX_POW_WQ_INT_PC 0
44 union cvmx_pip_wqe_word2
{
49 uint64_t vlan_valid
:1;
50 uint64_t vlan_stacked
:1;
51 uint64_t unassigned
:1;
55 uint64_t unassigned2
:8;
56 uint64_t dec_ipcomp
:1;
57 uint64_t tcp_or_udp
:1;
73 uint64_t vlan_valid
:1;
74 uint64_t vlan_stacked
:1;
75 uint64_t unassigned
:1;
79 uint64_t dec_ipcomp
:1;
80 uint64_t tcp_or_udp
:1;
102 uint64_t vlan_valid
:1;
103 uint64_t vlan_stacked
:1;
104 uint64_t unassigned
:1;
108 uint64_t unassigned2
:12;
110 uint64_t unassigned3
:1;
116 uint64_t rcv_error
:1;
122 union cvmx_pip_wqe_word0
{
124 uint64_t next_ptr
:40;
129 uint64_t pknd
:6; /* 0..5 */
130 uint64_t unused2
:2; /* 6..7 */
131 uint64_t bpid
:6; /* 8..13 */
132 uint64_t unused1
:18; /* 14..31 */
133 uint64_t l2ptr
:8; /* 32..39 */
134 uint64_t l3ptr
:8; /* 40..47 */
135 uint64_t unused0
:8; /* 48..55 */
136 uint64_t l4ptr
:8; /* 56..63 */
140 union cvmx_wqe_word0
{
142 union cvmx_pip_wqe_word0 pip
;
145 union cvmx_wqe_word1
{
187 union cvmx_wqe_word0 word0
;
188 union cvmx_wqe_word1 word1
;
189 union cvmx_pip_wqe_word2 word2
;
190 union cvmx_buf_ptr packet_ptr
;
191 uint8_t packet_data
[96];
194 union cvmx_helper_link_info
{
197 uint64_t reserved_20_63
:44;
198 uint64_t link_up
:1; /**< Is the physical link up? */
199 uint64_t full_duplex
:1; /**< 1 if the link is full duplex */
200 uint64_t speed
:18; /**< Speed of the link in Mbps */
204 enum cvmx_fau_reg_32
{
205 CVMX_FAU_REG_32_START
= 0,
208 enum cvmx_fau_op_size
{
209 CVMX_FAU_OP_SIZE_8
= 0,
210 CVMX_FAU_OP_SIZE_16
= 1,
211 CVMX_FAU_OP_SIZE_32
= 2,
212 CVMX_FAU_OP_SIZE_64
= 3
216 CVMX_SPI_MODE_UNKNOWN
= 0,
217 CVMX_SPI_MODE_TX_HALFPLEX
= 1,
218 CVMX_SPI_MODE_RX_HALFPLEX
= 2,
219 CVMX_SPI_MODE_DUPLEX
= 3
223 CVMX_HELPER_INTERFACE_MODE_DISABLED
,
224 CVMX_HELPER_INTERFACE_MODE_RGMII
,
225 CVMX_HELPER_INTERFACE_MODE_GMII
,
226 CVMX_HELPER_INTERFACE_MODE_SPI
,
227 CVMX_HELPER_INTERFACE_MODE_PCIE
,
228 CVMX_HELPER_INTERFACE_MODE_XAUI
,
229 CVMX_HELPER_INTERFACE_MODE_SGMII
,
230 CVMX_HELPER_INTERFACE_MODE_PICMG
,
231 CVMX_HELPER_INTERFACE_MODE_NPI
,
232 CVMX_HELPER_INTERFACE_MODE_LOOP
,
233 } cvmx_helper_interface_mode_t
;
237 CVMX_POW_NO_WAIT
= 0,
241 CVMX_PKO_LOCK_NONE
= 0,
242 CVMX_PKO_LOCK_ATOMIC_TAG
= 1,
243 CVMX_PKO_LOCK_CMD_QUEUE
= 2,
248 CVMX_PKO_INVALID_PORT
,
249 CVMX_PKO_INVALID_QUEUE
,
250 CVMX_PKO_INVALID_PRIORITY
,
252 CVMX_PKO_PORT_ALREADY_SETUP
,
253 CVMX_PKO_CMD_QUEUE_INIT_ERROR
256 enum cvmx_pow_tag_type
{
257 CVMX_POW_TAG_TYPE_ORDERED
= 0L,
258 CVMX_POW_TAG_TYPE_ATOMIC
= 1L,
259 CVMX_POW_TAG_TYPE_NULL
= 2L,
260 CVMX_POW_TAG_TYPE_NULL_NULL
= 3L
263 union cvmx_ipd_ctl_status
{
265 struct cvmx_ipd_ctl_status_s
{
266 uint64_t reserved_18_63
:46;
285 struct cvmx_ipd_ctl_status_cn30xx
{
286 uint64_t reserved_10_63
:54;
297 struct cvmx_ipd_ctl_status_cn38xxp2
{
298 uint64_t reserved_9_63
:55;
308 struct cvmx_ipd_ctl_status_cn50xx
{
309 uint64_t reserved_15_63
:49;
325 struct cvmx_ipd_ctl_status_cn58xx
{
326 uint64_t reserved_12_63
:52;
339 struct cvmx_ipd_ctl_status_cn63xxp1
{
340 uint64_t reserved_16_63
:48;
359 union cvmx_ipd_sub_port_fcs
{
361 struct cvmx_ipd_sub_port_fcs_s
{
362 uint64_t port_bit
:32;
363 uint64_t reserved_32_35
:4;
364 uint64_t port_bit2
:4;
365 uint64_t reserved_40_63
:24;
367 struct cvmx_ipd_sub_port_fcs_cn30xx
{
369 uint64_t reserved_3_63
:61;
371 struct cvmx_ipd_sub_port_fcs_cn38xx
{
372 uint64_t port_bit
:32;
373 uint64_t reserved_32_63
:32;
377 union cvmx_ipd_sub_port_qos_cnt
{
379 struct cvmx_ipd_sub_port_qos_cnt_s
{
382 uint64_t reserved_41_63
:23;
387 uint32_t dropped_octets
;
388 uint32_t dropped_packets
;
389 uint32_t pci_raw_packets
;
392 uint32_t multicast_packets
;
393 uint32_t broadcast_packets
;
394 uint32_t len_64_packets
;
395 uint32_t len_65_127_packets
;
396 uint32_t len_128_255_packets
;
397 uint32_t len_256_511_packets
;
398 uint32_t len_512_1023_packets
;
399 uint32_t len_1024_1518_packets
;
400 uint32_t len_1519_max_packets
;
401 uint32_t fcs_align_err_packets
;
402 uint32_t runt_packets
;
403 uint32_t runt_crc_packets
;
404 uint32_t oversize_packets
;
405 uint32_t oversize_crc_packets
;
406 uint32_t inb_packets
;
409 } cvmx_pip_port_status_t
;
415 } cvmx_pko_port_status_t
;
417 union cvmx_pip_frm_len_chkx
{
419 struct cvmx_pip_frm_len_chkx_s
{
420 uint64_t reserved_32_63
:32;
426 union cvmx_gmxx_rxx_frm_ctl
{
428 struct cvmx_gmxx_rxx_frm_ctl_s
{
438 uint64_t pre_align
:1;
440 uint64_t reserved_11_11
:1;
442 uint64_t reserved_13_63
:51;
444 struct cvmx_gmxx_rxx_frm_ctl_cn30xx
{
454 uint64_t reserved_9_63
:55;
456 struct cvmx_gmxx_rxx_frm_ctl_cn31xx
{
465 uint64_t reserved_8_63
:56;
467 struct cvmx_gmxx_rxx_frm_ctl_cn50xx
{
475 uint64_t reserved_7_8
:2;
476 uint64_t pre_align
:1;
478 uint64_t reserved_11_63
:53;
480 struct cvmx_gmxx_rxx_frm_ctl_cn56xxp1
{
488 uint64_t reserved_7_8
:2;
489 uint64_t pre_align
:1;
490 uint64_t reserved_10_63
:54;
492 struct cvmx_gmxx_rxx_frm_ctl_cn58xx
{
502 uint64_t pre_align
:1;
504 uint64_t reserved_11_63
:53;
506 struct cvmx_gmxx_rxx_frm_ctl_cn61xx
{
514 uint64_t reserved_7_8
:2;
515 uint64_t pre_align
:1;
517 uint64_t reserved_11_11
:1;
519 uint64_t reserved_13_63
:51;
523 union cvmx_gmxx_rxx_int_reg
{
525 struct cvmx_gmxx_rxx_int_reg_s
{
545 uint64_t pause_drp
:1;
546 uint64_t loc_fault
:1;
547 uint64_t rem_fault
:1;
555 uint64_t reserved_29_63
:35;
557 struct cvmx_gmxx_rxx_int_reg_cn30xx
{
577 uint64_t reserved_19_63
:45;
579 struct cvmx_gmxx_rxx_int_reg_cn50xx
{
580 uint64_t reserved_0_0
:1;
582 uint64_t reserved_2_2
:1;
586 uint64_t reserved_6_6
:1;
599 uint64_t pause_drp
:1;
600 uint64_t reserved_20_63
:44;
602 struct cvmx_gmxx_rxx_int_reg_cn52xx
{
603 uint64_t reserved_0_0
:1;
605 uint64_t reserved_2_2
:1;
608 uint64_t reserved_5_6
:2;
611 uint64_t reserved_9_9
:1;
618 uint64_t reserved_16_18
:3;
619 uint64_t pause_drp
:1;
620 uint64_t loc_fault
:1;
621 uint64_t rem_fault
:1;
629 uint64_t reserved_29_63
:35;
631 struct cvmx_gmxx_rxx_int_reg_cn56xxp1
{
632 uint64_t reserved_0_0
:1;
634 uint64_t reserved_2_2
:1;
637 uint64_t reserved_5_6
:2;
640 uint64_t reserved_9_9
:1;
647 uint64_t reserved_16_18
:3;
648 uint64_t pause_drp
:1;
649 uint64_t loc_fault
:1;
650 uint64_t rem_fault
:1;
656 uint64_t reserved_27_63
:37;
658 struct cvmx_gmxx_rxx_int_reg_cn58xx
{
678 uint64_t pause_drp
:1;
679 uint64_t reserved_20_63
:44;
681 struct cvmx_gmxx_rxx_int_reg_cn61xx
{
684 uint64_t reserved_2_2
:1;
687 uint64_t reserved_5_6
:2;
690 uint64_t reserved_9_9
:1;
697 uint64_t reserved_16_18
:3;
698 uint64_t pause_drp
:1;
699 uint64_t loc_fault
:1;
700 uint64_t rem_fault
:1;
708 uint64_t reserved_29_63
:35;
712 union cvmx_gmxx_prtx_cfg
{
714 struct cvmx_gmxx_prtx_cfg_s
{
715 uint64_t reserved_22_63
:42;
717 uint64_t reserved_14_15
:2;
720 uint64_t reserved_9_11
:3;
721 uint64_t speed_msb
:1;
722 uint64_t reserved_4_7
:4;
728 struct cvmx_gmxx_prtx_cfg_cn30xx
{
729 uint64_t reserved_4_63
:60;
735 struct cvmx_gmxx_prtx_cfg_cn52xx
{
736 uint64_t reserved_14_63
:50;
739 uint64_t reserved_9_11
:3;
740 uint64_t speed_msb
:1;
741 uint64_t reserved_4_7
:4;
749 union cvmx_gmxx_rxx_adr_ctl
{
751 struct cvmx_gmxx_rxx_adr_ctl_s
{
752 uint64_t reserved_4_63
:60;
759 union cvmx_pip_prt_tagx
{
761 struct cvmx_pip_prt_tagx_s
{
762 uint64_t reserved_54_63
:10;
763 uint64_t portadd_en
:1;
764 uint64_t inc_hwchk
:1;
765 uint64_t reserved_50_51
:2;
766 uint64_t grptagbase_msb
:2;
767 uint64_t reserved_46_47
:2;
768 uint64_t grptagmask_msb
:2;
769 uint64_t reserved_42_43
:2;
771 uint64_t grptagbase
:4;
772 uint64_t grptagmask
:4;
774 uint64_t grptag_mskip
:1;
778 uint64_t inc_prt_flag
:1;
779 uint64_t ip6_dprt_flag
:1;
780 uint64_t ip4_dprt_flag
:1;
781 uint64_t ip6_sprt_flag
:1;
782 uint64_t ip4_sprt_flag
:1;
783 uint64_t ip6_nxth_flag
:1;
784 uint64_t ip4_pctl_flag
:1;
785 uint64_t ip6_dst_flag
:1;
786 uint64_t ip4_dst_flag
:1;
787 uint64_t ip6_src_flag
:1;
788 uint64_t ip4_src_flag
:1;
789 uint64_t tcp6_tag_type
:2;
790 uint64_t tcp4_tag_type
:2;
791 uint64_t ip6_tag_type
:2;
792 uint64_t ip4_tag_type
:2;
793 uint64_t non_tag_type
:2;
796 struct cvmx_pip_prt_tagx_cn30xx
{
797 uint64_t reserved_40_63
:24;
798 uint64_t grptagbase
:4;
799 uint64_t grptagmask
:4;
801 uint64_t reserved_30_30
:1;
805 uint64_t inc_prt_flag
:1;
806 uint64_t ip6_dprt_flag
:1;
807 uint64_t ip4_dprt_flag
:1;
808 uint64_t ip6_sprt_flag
:1;
809 uint64_t ip4_sprt_flag
:1;
810 uint64_t ip6_nxth_flag
:1;
811 uint64_t ip4_pctl_flag
:1;
812 uint64_t ip6_dst_flag
:1;
813 uint64_t ip4_dst_flag
:1;
814 uint64_t ip6_src_flag
:1;
815 uint64_t ip4_src_flag
:1;
816 uint64_t tcp6_tag_type
:2;
817 uint64_t tcp4_tag_type
:2;
818 uint64_t ip6_tag_type
:2;
819 uint64_t ip4_tag_type
:2;
820 uint64_t non_tag_type
:2;
823 struct cvmx_pip_prt_tagx_cn50xx
{
824 uint64_t reserved_40_63
:24;
825 uint64_t grptagbase
:4;
826 uint64_t grptagmask
:4;
828 uint64_t grptag_mskip
:1;
832 uint64_t inc_prt_flag
:1;
833 uint64_t ip6_dprt_flag
:1;
834 uint64_t ip4_dprt_flag
:1;
835 uint64_t ip6_sprt_flag
:1;
836 uint64_t ip4_sprt_flag
:1;
837 uint64_t ip6_nxth_flag
:1;
838 uint64_t ip4_pctl_flag
:1;
839 uint64_t ip6_dst_flag
:1;
840 uint64_t ip4_dst_flag
:1;
841 uint64_t ip6_src_flag
:1;
842 uint64_t ip4_src_flag
:1;
843 uint64_t tcp6_tag_type
:2;
844 uint64_t tcp4_tag_type
:2;
845 uint64_t ip6_tag_type
:2;
846 uint64_t ip4_tag_type
:2;
847 uint64_t non_tag_type
:2;
852 union cvmx_spxx_int_reg
{
854 struct cvmx_spxx_int_reg_s
{
855 uint64_t reserved_32_63
:32;
857 uint64_t reserved_12_30
:19;
866 uint64_t reserved_2_3
:2;
872 union cvmx_spxx_int_msk
{
874 struct cvmx_spxx_int_msk_s
{
875 uint64_t reserved_12_63
:52;
884 uint64_t reserved_2_3
:2;
890 union cvmx_pow_wq_int
{
892 struct cvmx_pow_wq_int_s
{
895 uint64_t reserved_32_63
:32;
899 union cvmx_sso_wq_int_thrx
{
903 uint64_t reserved_12_13
:2;
905 uint64_t reserved_26_27
:2;
908 uint64_t reserved_33_63
:31;
912 union cvmx_stxx_int_reg
{
914 struct cvmx_stxx_int_reg_s
{
915 uint64_t reserved_9_63
:55;
928 union cvmx_stxx_int_msk
{
930 struct cvmx_stxx_int_msk_s
{
931 uint64_t reserved_8_63
:56;
943 union cvmx_pow_wq_int_pc
{
945 struct cvmx_pow_wq_int_pc_s
{
946 uint64_t reserved_0_7
:8;
948 uint64_t reserved_28_31
:4;
950 uint64_t reserved_60_63
:4;
954 union cvmx_pow_wq_int_thrx
{
956 struct cvmx_pow_wq_int_thrx_s
{
957 uint64_t reserved_29_63
:35;
960 uint64_t reserved_23_23
:1;
962 uint64_t reserved_11_11
:1;
965 struct cvmx_pow_wq_int_thrx_cn30xx
{
966 uint64_t reserved_29_63
:35;
969 uint64_t reserved_18_23
:6;
971 uint64_t reserved_6_11
:6;
974 struct cvmx_pow_wq_int_thrx_cn31xx
{
975 uint64_t reserved_29_63
:35;
978 uint64_t reserved_20_23
:4;
980 uint64_t reserved_8_11
:4;
983 struct cvmx_pow_wq_int_thrx_cn52xx
{
984 uint64_t reserved_29_63
:35;
987 uint64_t reserved_21_23
:3;
989 uint64_t reserved_9_11
:3;
992 struct cvmx_pow_wq_int_thrx_cn63xx
{
993 uint64_t reserved_29_63
:35;
996 uint64_t reserved_22_23
:2;
998 uint64_t reserved_10_11
:2;
1003 union cvmx_npi_rsl_int_blocks
{
1005 struct cvmx_npi_rsl_int_blocks_s
{
1006 uint64_t reserved_32_63
:32;
1009 uint64_t reserved_28_29
:2;
1023 uint64_t reserved_13_14
:2;
1038 struct cvmx_npi_rsl_int_blocks_cn30xx
{
1039 uint64_t reserved_32_63
:32;
1073 struct cvmx_npi_rsl_int_blocks_cn38xx
{
1074 uint64_t reserved_32_63
:32;
1108 struct cvmx_npi_rsl_int_blocks_cn50xx
{
1109 uint64_t reserved_31_63
:33;
1113 uint64_t reserved_24_27
:4;
1116 uint64_t reserved_21_21
:1;
1122 uint64_t reserved_15_15
:1;
1129 uint64_t reserved_8_8
:1;
1141 union cvmx_pko_command_word0
{
1144 uint64_t total_bytes
:16;
1146 uint64_t dontfree
:1;
1147 uint64_t ignore_i
:1;
1163 union cvmx_ciu_timx
{
1165 struct cvmx_ciu_timx_s
{
1166 uint64_t reserved_37_63
:27;
1167 uint64_t one_shot
:1;
1172 union cvmx_gmxx_rxx_rx_inbnd
{
1174 struct cvmx_gmxx_rxx_rx_inbnd_s
{
1178 uint64_t reserved_4_63
:60;
1182 static inline int32_t cvmx_fau_fetch_and_add32(enum cvmx_fau_reg_32 reg
,
1188 static inline void cvmx_fau_atomic_add32(enum cvmx_fau_reg_32 reg
,
1192 static inline void cvmx_fau_atomic_write32(enum cvmx_fau_reg_32 reg
,
1196 static inline uint64_t cvmx_scratch_read64(uint64_t address
)
1201 static inline void cvmx_scratch_write64(uint64_t address
, uint64_t value
)
1204 static inline int cvmx_wqe_get_grp(struct cvmx_wqe
*work
)
1209 static inline void *cvmx_phys_to_ptr(uint64_t physical_address
)
1211 return (void *)(uintptr_t)(physical_address
);
1214 static inline uint64_t cvmx_ptr_to_phys(void *ptr
)
1216 return (unsigned long)ptr
;
1219 static inline int cvmx_helper_get_interface_num(int ipd_port
)
1224 static inline int cvmx_helper_get_interface_index_num(int ipd_port
)
1229 static inline void cvmx_fpa_enable(void)
1232 static inline uint64_t cvmx_read_csr(uint64_t csr_addr
)
1237 static inline void cvmx_write_csr(uint64_t csr_addr
, uint64_t val
)
1240 static inline int cvmx_helper_setup_red(int pass_thresh
, int drop_thresh
)
1245 static inline void *cvmx_fpa_alloc(uint64_t pool
)
1250 static inline void cvmx_fpa_free(void *ptr
, uint64_t pool
,
1251 uint64_t num_cache_lines
)
1254 static inline int octeon_is_simulation(void)
1259 static inline void cvmx_pip_get_port_status(uint64_t port_num
, uint64_t clear
,
1260 cvmx_pip_port_status_t
*status
)
1263 static inline void cvmx_pko_get_port_status(uint64_t port_num
, uint64_t clear
,
1264 cvmx_pko_port_status_t
*status
)
1267 static inline cvmx_helper_interface_mode_t
cvmx_helper_interface_get_mode(int
1273 static inline union cvmx_helper_link_info
cvmx_helper_link_get(int ipd_port
)
1275 union cvmx_helper_link_info ret
= { .u64
= 0 };
1280 static inline int cvmx_helper_link_set(int ipd_port
,
1281 union cvmx_helper_link_info link_info
)
1286 static inline int cvmx_helper_initialize_packet_io_global(void)
1291 static inline int cvmx_helper_get_number_of_interfaces(void)
1296 static inline int cvmx_helper_ports_on_interface(int interface
)
1301 static inline int cvmx_helper_get_ipd_port(int interface
, int port
)
1306 static inline int cvmx_helper_ipd_and_packet_input_enable(void)
1311 static inline void cvmx_ipd_disable(void)
1314 static inline void cvmx_ipd_free_ptr(void)
1317 static inline void cvmx_pko_disable(void)
1320 static inline void cvmx_pko_shutdown(void)
1323 static inline int cvmx_pko_get_base_queue_per_core(int port
, int core
)
1328 static inline int cvmx_pko_get_base_queue(int port
)
1333 static inline int cvmx_pko_get_num_queues(int port
)
1338 static inline unsigned int cvmx_get_core_num(void)
1343 static inline void cvmx_pow_work_request_async_nocheck(int scr_addr
,
1344 cvmx_pow_wait_t wait
)
1347 static inline void cvmx_pow_work_request_async(int scr_addr
,
1348 cvmx_pow_wait_t wait
)
1351 static inline struct cvmx_wqe
*cvmx_pow_work_response_async(int scr_addr
)
1353 struct cvmx_wqe
*wqe
= (void *)(unsigned long)scr_addr
;
1358 static inline struct cvmx_wqe
*cvmx_pow_work_request_sync(cvmx_pow_wait_t wait
)
1360 return (void *)(unsigned long)wait
;
1363 static inline int cvmx_spi_restart_interface(int interface
,
1364 cvmx_spi_mode_t mode
, int timeout
)
1369 static inline void cvmx_fau_async_fetch_and_add32(uint64_t scraddr
,
1370 enum cvmx_fau_reg_32 reg
,
1374 static inline union cvmx_gmxx_rxx_rx_inbnd
cvmx_spi4000_check_speed(
1378 union cvmx_gmxx_rxx_rx_inbnd r
;
1384 static inline void cvmx_pko_send_packet_prepare(uint64_t port
, uint64_t queue
,
1385 cvmx_pko_lock_t use_locking
)
1388 static inline cvmx_pko_status_t
cvmx_pko_send_packet_finish(uint64_t port
,
1389 uint64_t queue
, union cvmx_pko_command_word0 pko_command
,
1390 union cvmx_buf_ptr packet
, cvmx_pko_lock_t use_locking
)
1395 static inline void cvmx_wqe_set_port(struct cvmx_wqe
*work
, int port
)
1398 static inline void cvmx_wqe_set_qos(struct cvmx_wqe
*work
, int qos
)
1401 static inline int cvmx_wqe_get_qos(struct cvmx_wqe
*work
)
1406 static inline void cvmx_wqe_set_grp(struct cvmx_wqe
*work
, int grp
)
1409 static inline void cvmx_pow_work_submit(struct cvmx_wqe
*wqp
, uint32_t tag
,
1410 enum cvmx_pow_tag_type tag_type
,
1411 uint64_t qos
, uint64_t grp
)
1414 #define CVMX_ASXX_RX_CLK_SETX(a, b) ((a) + (b))
1415 #define CVMX_ASXX_TX_CLK_SETX(a, b) ((a) + (b))
1416 #define CVMX_CIU_TIMX(a) (a)
1417 #define CVMX_GMXX_RXX_ADR_CAM0(a, b) ((a) + (b))
1418 #define CVMX_GMXX_RXX_ADR_CAM1(a, b) ((a) + (b))
1419 #define CVMX_GMXX_RXX_ADR_CAM2(a, b) ((a) + (b))
1420 #define CVMX_GMXX_RXX_ADR_CAM3(a, b) ((a) + (b))
1421 #define CVMX_GMXX_RXX_ADR_CAM4(a, b) ((a) + (b))
1422 #define CVMX_GMXX_RXX_ADR_CAM5(a, b) ((a) + (b))
1423 #define CVMX_GMXX_RXX_FRM_CTL(a, b) ((a) + (b))
1424 #define CVMX_GMXX_RXX_INT_REG(a, b) ((a) + (b))
1425 #define CVMX_GMXX_SMACX(a, b) ((a) + (b))
1426 #define CVMX_PIP_PRT_TAGX(a) (a)
1427 #define CVMX_POW_PP_GRP_MSKX(a) (a)
1428 #define CVMX_POW_WQ_INT_THRX(a) (a)
1429 #define CVMX_SPXX_INT_MSK(a) (a)
1430 #define CVMX_SPXX_INT_REG(a) (a)
1431 #define CVMX_SSO_PPX_GRP_MSK(a) (a)
1432 #define CVMX_SSO_WQ_INT_THRX(a) (a)
1433 #define CVMX_STXX_INT_MSK(a) (a)
1434 #define CVMX_STXX_INT_REG(a) (a)