58 #ifndef __CVMX_PKO_H__
59 #define __CVMX_PKO_H__
69 #define CVMX_PKO_COMMAND_BUFFER_SIZE_ADJUST (1)
71 #define CVMX_PKO_MAX_OUTPUT_QUEUES_STATIC 256
72 #define CVMX_PKO_MAX_OUTPUT_QUEUES ((OCTEON_IS_MODEL(OCTEON_CN31XX) || \
73 OCTEON_IS_MODEL(OCTEON_CN3010) || OCTEON_IS_MODEL(OCTEON_CN3005) || \
74 OCTEON_IS_MODEL(OCTEON_CN50XX)) ? 32 : \
75 (OCTEON_IS_MODEL(OCTEON_CN58XX) || \
76 OCTEON_IS_MODEL(OCTEON_CN56XX)) ? 256 : 128)
77 #define CVMX_PKO_NUM_OUTPUT_PORTS 40
79 #define CVMX_PKO_MEM_QUEUE_PTRS_ILLEGAL_PID 63
80 #define CVMX_PKO_QUEUE_STATIC_PRIORITY 9
81 #define CVMX_PKO_ILLEGAL_QUEUE 0xFFFF
82 #define CVMX_PKO_MAX_QUEUE_DEPTH 0
311 cvmx_write_io(ptr.
u64, len);
366 cvmx_pow_tag_sw_full((cvmx_wqe_t *) cvmx_phys_to_ptr(0x80), tag,
397 cvmx_pow_tag_sw_wait();
400 pko_command.
u64, packet.
u64);
402 cvmx_pko_doorbell(port, queue, 2);
441 cvmx_pow_tag_sw_wait();
444 pko_command.
u64, packet.
u64, addr);
446 cvmx_pko_doorbell(port, queue, 3);
466 static inline int cvmx_pko_get_base_queue_per_core(
int port,
int core)
468 #ifndef CVMX_HELPER_PKO_MAX_PORTS_INTERFACE0
469 #define CVMX_HELPER_PKO_MAX_PORTS_INTERFACE0 16
471 #ifndef CVMX_HELPER_PKO_MAX_PORTS_INTERFACE1
472 #define CVMX_HELPER_PKO_MAX_PORTS_INTERFACE1 16
482 else if ((port >= 32) && (port < 36))
489 else if ((port >= 36) && (port < 40))
512 static inline int cvmx_pko_get_base_queue(
int port)
514 return cvmx_pko_get_base_queue_per_core(port, 0);
523 static inline int cvmx_pko_get_num_queues(
int port)
551 pko_reg_read_idx.
u64 = 0;
552 pko_reg_read_idx.s.index =
port_num;
556 status->
packets = pko_mem_count0.s.count;
563 status->
octets = pko_mem_count1.s.count;
571 pko_reg_read_idx.
s.index = cvmx_pko_get_base_queue(port_num);
574 status->
doorbell = debug9.cn38xx.doorbell;
577 pko_reg_read_idx.
s.index = cvmx_pko_get_base_queue(port_num);
580 status->
doorbell = debug8.cn58xx.doorbell;