diff options
Diffstat (limited to 'arch/mips/include/asm/octeon/cvmx-pko.h')
| -rw-r--r-- | arch/mips/include/asm/octeon/cvmx-pko.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/arch/mips/include/asm/octeon/cvmx-pko.h b/arch/mips/include/asm/octeon/cvmx-pko.h index f18a7f24daf8..26cb26a7ff2b 100644 --- a/arch/mips/include/asm/octeon/cvmx-pko.h +++ b/arch/mips/include/asm/octeon/cvmx-pko.h @@ -80,7 +80,7 @@ #define CVMX_PKO_ILLEGAL_QUEUE 0xFFFF #define CVMX_PKO_MAX_QUEUE_DEPTH 0 -typedef enum { +enum cvmx_pko_status { CVMX_PKO_SUCCESS, CVMX_PKO_INVALID_PORT, CVMX_PKO_INVALID_QUEUE, @@ -88,12 +88,12 @@ typedef enum { CVMX_PKO_NO_MEMORY, CVMX_PKO_PORT_ALREADY_SETUP, CVMX_PKO_CMD_QUEUE_INIT_ERROR -} cvmx_pko_status_t; +}; /** * This enumeration represents the different locking modes supported by PKO. */ -typedef enum { +enum cvmx_pko_lock { /* * PKO doesn't do any locking. It is the responsibility of the * application to make sure that no other core is accessing @@ -112,13 +112,13 @@ typedef enum { * ll/sc. This is the most portable locking mechanism. */ CVMX_PKO_LOCK_CMD_QUEUE = 2, -} cvmx_pko_lock_t; +}; -typedef struct { +struct cvmx_pko_port_status { uint32_t packets; uint64_t octets; uint64_t doorbell; -} cvmx_pko_port_status_t; +}; /** * This structure defines the address to use on a packet enqueue @@ -306,7 +306,7 @@ extern void cvmx_pko_shutdown(void); * of a value of 1. There must be num_queues elements in the * array. */ -extern cvmx_pko_status_t cvmx_pko_config_port(uint64_t port, +extern enum cvmx_pko_status cvmx_pko_config_port(uint64_t port, uint64_t base_queue, uint64_t num_queues, const uint64_t priority[]); @@ -374,7 +374,7 @@ static inline void cvmx_pko_doorbell(uint64_t port, uint64_t queue, */ static inline void cvmx_pko_send_packet_prepare(uint64_t port, uint64_t queue, - cvmx_pko_lock_t use_locking) + enum cvmx_pko_lock use_locking) { if (use_locking == CVMX_PKO_LOCK_ATOMIC_TAG) { /* @@ -414,12 +414,12 @@ static inline void cvmx_pko_send_packet_prepare(uint64_t port, uint64_t queue, * Returns: CVMX_PKO_SUCCESS on success, or error code on * failure of output */ -static inline cvmx_pko_status_t cvmx_pko_send_packet_finish( +static inline enum cvmx_pko_status cvmx_pko_send_packet_finish( uint64_t port, uint64_t queue, union cvmx_pko_command_word0 pko_command, union cvmx_buf_ptr packet, - cvmx_pko_lock_t use_locking) + enum cvmx_pko_lock use_locking) { cvmx_cmd_queue_result_t result; if (use_locking == CVMX_PKO_LOCK_ATOMIC_TAG) @@ -457,13 +457,13 @@ static inline cvmx_pko_status_t cvmx_pko_send_packet_finish( * Returns: CVMX_PKO_SUCCESS on success, or error code on * failure of output */ -static inline cvmx_pko_status_t cvmx_pko_send_packet_finish3( +static inline enum cvmx_pko_status cvmx_pko_send_packet_finish3( uint64_t port, uint64_t queue, union cvmx_pko_command_word0 pko_command, union cvmx_buf_ptr packet, uint64_t addr, - cvmx_pko_lock_t use_locking) + enum cvmx_pko_lock use_locking) { cvmx_cmd_queue_result_t result; if (use_locking == CVMX_PKO_LOCK_ATOMIC_TAG) @@ -574,7 +574,7 @@ static inline int cvmx_pko_get_num_queues(int port) * @status: Where to put the results. */ static inline void cvmx_pko_get_port_status(uint64_t port_num, uint64_t clear, - cvmx_pko_port_status_t *status) + struct cvmx_pko_port_status *status) { union cvmx_pko_reg_read_idx pko_reg_read_idx; union cvmx_pko_mem_count0 pko_mem_count0; |
