New upstream version 17.11-rc3
[deb_dpdk.git] / drivers / bus / fslmc / mc / fsl_dpci.h
index 1e155dd..f4aa6e5 100644 (file)
@@ -62,42 +62,14 @@ struct fsl_mc_io;
  */
 #define DPCI_ALL_QUEUES                (uint8_t)(-1)
 
-/**
- * dpci_open() - Open a control session for the specified object
- * @mc_io:     Pointer to MC portal's I/O object
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @dpci_id:   DPCI unique ID
- * @token:     Returned token; use in subsequent API calls
- *
- * This function can be used to open a control session for an
- * already created object; an object may have been declared in
- * the DPL or by calling the dpci_create() function.
- * This function returns a unique authentication token,
- * associated with the specific object ID and the specific MC
- * portal; this token must be used in all subsequent commands for
- * this specific object.
- *
- * Return:     '0' on Success; Error code otherwise.
- */
 int dpci_open(struct fsl_mc_io *mc_io,
-             uint32_t          cmd_flags,
-             int               dpci_id,
-             uint16_t          *token);
+             uint32_t cmd_flags,
+             int dpci_id,
+             uint16_t *token);
 
-/**
- * dpci_close() - Close the control session of the object
- * @mc_io:     Pointer to MC portal's I/O object
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @token:     Token of DPCI object
- *
- * After this function is called, no further operations are
- * allowed on the object without opening a new control session.
- *
- * Return:     '0' on Success; Error code otherwise.
- */
-int dpci_close(struct fsl_mc_io        *mc_io,
-              uint32_t         cmd_flags,
-              uint16_t         token);
+int dpci_close(struct fsl_mc_io *mc_io,
+              uint32_t cmd_flags,
+              uint16_t token);
 
 /**
  * Enable the Order Restoration support
@@ -124,107 +96,37 @@ struct dpci_cfg {
        uint8_t num_of_priorities;
 };
 
-/**
- * dpci_create() - Create the DPCI object.
- * @mc_io:     Pointer to MC portal's I/O object
- * @dprc_token:        Parent container token; '0' for default container
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @cfg:       Configuration structure
- * @obj_id: returned object id
- *
- * Create the DPCI object, allocate required resources and perform required
- * initialization.
- *
- * The object can be created either by declaring it in the
- * DPL file, or by calling this function.
- *
- * The function accepts an authentication token of a parent
- * container that this object should be assigned to. The token
- * can be '0' so the object will be assigned to the default container.
- * The newly created object can be opened with the returned
- * object id and using the container's associated tokens and MC portals.
- *
- * Return:     '0' on Success; Error code otherwise.
- */
-int dpci_create(struct fsl_mc_io       *mc_io,
-               uint16_t                dprc_token,
-               uint32_t                cmd_flags,
-               const struct dpci_cfg   *cfg,
-               uint32_t                *obj_id);
+int dpci_create(struct fsl_mc_io *mc_io,
+               uint16_t dprc_token,
+               uint32_t cmd_flags,
+               const struct dpci_cfg *cfg,
+               uint32_t *obj_id);
 
-/**
- * dpci_destroy() - Destroy the DPCI object and release all its resources.
- * @mc_io:     Pointer to MC portal's I/O object
- * @dprc_token: Parent container token; '0' for default container
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @object_id: The object id; it must be a valid id within the container that
- * created this object;
- *
- * The function accepts the authentication token of the parent container that
- * created the object (not the one that currently owns the object). The object
- * is searched within parent using the provided 'object_id'.
- * All tokens to the object must be closed before calling destroy.
- *
- * Return:     '0' on Success; error code otherwise.
- */
-int dpci_destroy(struct fsl_mc_io      *mc_io,
-                uint16_t               dprc_token,
-               uint32_t                cmd_flags,
-               uint32_t                object_id);
+int dpci_destroy(struct fsl_mc_io *mc_io,
+                uint16_t dprc_token,
+                uint32_t cmd_flags,
+                uint32_t object_id);
 
-/**
- * dpci_enable() - Enable the DPCI, allow sending and receiving frames.
- * @mc_io:     Pointer to MC portal's I/O object
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @token:     Token of DPCI object
- *
- * Return:     '0' on Success; Error code otherwise.
- */
-int dpci_enable(struct fsl_mc_io       *mc_io,
-               uint32_t                cmd_flags,
-               uint16_t                token);
+int dpci_enable(struct fsl_mc_io *mc_io,
+               uint32_t cmd_flags,
+               uint16_t token);
 
-/**
- * dpci_disable() - Disable the DPCI, stop sending and receiving frames.
- * @mc_io:     Pointer to MC portal's I/O object
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @token:     Token of DPCI object
- *
- * Return:     '0' on Success; Error code otherwise.
- */
-int dpci_disable(struct fsl_mc_io      *mc_io,
-                uint32_t               cmd_flags,
-                uint16_t               token);
+int dpci_disable(struct fsl_mc_io *mc_io,
+                uint32_t cmd_flags,
+                uint16_t token);
 
-/**
- * dpci_is_enabled() - Check if the DPCI is enabled.
- * @mc_io:     Pointer to MC portal's I/O object
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @token:     Token of DPCI object
- * @en:                Returns '1' if object is enabled; '0' otherwise
- *
- * Return:     '0' on Success; Error code otherwise.
- */
-int dpci_is_enabled(struct fsl_mc_io   *mc_io,
-                   uint32_t            cmd_flags,
-                   uint16_t            token,
-                   int                 *en);
+int dpci_is_enabled(struct fsl_mc_io *mc_io,
+                   uint32_t cmd_flags,
+                   uint16_t token,
+                   int *en);
 
-/**
- * dpci_reset() - Reset the DPCI, returns the object to initial state.
- * @mc_io:     Pointer to MC portal's I/O object
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @token:     Token of DPCI object
- *
- * Return:     '0' on Success; Error code otherwise.
- */
 int dpci_reset(struct fsl_mc_io *mc_io,
-              uint32_t cmd_flags,
-              uint16_t token);
+              uint32_t cmd_flags,
+              uint16_t token);
 
 /**
  * struct dpci_attr - Structure representing DPCI attributes
- * @id:                DPCI object ID
+ * @id:                        DPCI object ID
  * @num_of_priorities: Number of receive priorities
  */
 struct dpci_attr {
@@ -232,19 +134,10 @@ struct dpci_attr {
        uint8_t num_of_priorities;
 };
 
-/**
- * dpci_get_attributes() - Retrieve DPCI attributes.
- * @mc_io:     Pointer to MC portal's I/O object
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @token:     Token of DPCI object
- * @attr:      Returned object's attributes
- *
- * Return:     '0' on Success; Error code otherwise.
- */
-int dpci_get_attributes(struct fsl_mc_io       *mc_io,
-                       uint32_t                cmd_flags,
-                       uint16_t                token,
-                       struct dpci_attr        *attr);
+int dpci_get_attributes(struct fsl_mc_io *mc_io,
+                       uint32_t cmd_flags,
+                       uint16_t token,
+                       struct dpci_attr *attr);
 
 /**
  * enum dpci_dest - DPCI destination types
@@ -310,24 +203,11 @@ struct dpci_rx_queue_cfg {
        struct dpci_dest_cfg dest_cfg;
 };
 
-/**
- * dpci_set_rx_queue() - Set Rx queue configuration
- * @mc_io:     Pointer to MC portal's I/O object
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @token:     Token of DPCI object
- * @priority:  Select the queue relative to number of
- *                     priorities configured at DPCI creation; use
- *                     DPCI_ALL_QUEUES to configure all Rx queues
- *                     identically.
- * @cfg:       Rx queue configuration
- *
- * Return:     '0' on Success; Error code otherwise.
- */
-int dpci_set_rx_queue(struct fsl_mc_io                 *mc_io,
-                     uint32_t                          cmd_flags,
-                     uint16_t                          token,
-                     uint8_t                           priority,
-                     const struct dpci_rx_queue_cfg    *cfg);
+int dpci_set_rx_queue(struct fsl_mc_io *mc_io,
+                     uint32_t cmd_flags,
+                     uint16_t token,
+                     uint8_t priority,
+                     const struct dpci_rx_queue_cfg *cfg);
 
 /**
  * struct dpci_rx_queue_attr - Structure representing Rx queue attributes
@@ -337,26 +217,15 @@ int dpci_set_rx_queue(struct fsl_mc_io                    *mc_io,
  * @fqid:      Virtual FQID value to be used for dequeue operations
  */
 struct dpci_rx_queue_attr {
-       uint64_t                user_ctx;
-       struct dpci_dest_cfg    dest_cfg;
-       uint32_t                fqid;
+       uint64_t user_ctx;
+       struct dpci_dest_cfg dest_cfg;
+       uint32_t fqid;
 };
 
-/**
- * dpci_get_rx_queue() - Retrieve Rx queue attributes.
- * @mc_io:     Pointer to MC portal's I/O object
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @token:             Token of DPCI object
- * @priority:          Select the queue relative to number of
- *                     priorities configured at DPCI creation
- * @attr:              Returned Rx queue attributes
- *
- * Return:     '0' on Success; Error code otherwise.
- */
-int dpci_get_rx_queue(struct fsl_mc_io         *mc_io,
-                     uint32_t                  cmd_flags,
-                     uint16_t                  token,
-                     uint8_t                   priority,
+int dpci_get_rx_queue(struct fsl_mc_io *mc_io,
+                     uint32_t cmd_flags,
+                     uint16_t token,
+                     uint8_t priority,
                      struct dpci_rx_queue_attr *attr);
 
 /**
@@ -370,35 +239,15 @@ struct dpci_tx_queue_attr {
        uint32_t fqid;
 };
 
-/**
- * dpci_get_tx_queue() - Retrieve Tx queue attributes.
- * @mc_io:     Pointer to MC portal's I/O object
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @token:     Token of DPCI object
- * @priority:  Select the queue relative to number of
- *                             priorities of the peer DPCI object
- * @attr:              Returned Tx queue attributes
- *
- * Return:     '0' on Success; Error code otherwise.
- */
-int dpci_get_tx_queue(struct fsl_mc_io         *mc_io,
-                     uint32_t                  cmd_flags,
-                     uint16_t                  token,
-                     uint8_t                   priority,
-                     struct dpci_tx_queue_attr *attr);
+int dpci_get_tx_queue(struct fsl_mc_io *mc_io,
+                     uint32_t cmd_flags,
+                     uint16_t token,
+                     uint8_t priority,
+                     struct dpci_tx_queue_attr *attr);
 
-/**
- * dpci_get_api_version() - Get communication interface API version
- * @mc_io:  Pointer to MC portal's I/O object
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @major_ver: Major version of data path communication interface API
- * @minor_ver: Minor version of data path communication interface API
- *
- * Return:  '0' on Success; Error code otherwise.
- */
-int dpci_get_api_version(struct fsl_mc_io      *mc_io,
-                        uint32_t               cmd_flags,
-                        uint16_t               *major_ver,
-                        uint16_t               *minor_ver);
+int dpci_get_api_version(struct fsl_mc_io *mc_io,
+                        uint32_t cmd_flags,
+                        uint16_t *major_ver,
+                        uint16_t *minor_ver);
 
 #endif /* __FSL_DPCI_H */