summaryrefslogtreecommitdiff
path: root/include/fsl-mc/fsl_dpbp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/fsl-mc/fsl_dpbp.h')
-rw-r--r--include/fsl-mc/fsl_dpbp.h62
1 files changed, 35 insertions, 27 deletions
diff --git a/include/fsl-mc/fsl_dpbp.h b/include/fsl-mc/fsl_dpbp.h
index b1ad46e..5401e86 100644
--- a/include/fsl-mc/fsl_dpbp.h
+++ b/include/fsl-mc/fsl_dpbp.h
@@ -1,8 +1,8 @@
/*
* Freescale Layerscape MC I/O wrapper
*
- * Copyright (C) 2013-2015 Freescale Semiconductor, Inc.
- * Author: German Rivera <German.Rivera@freescale.com>
+ * Copyright (C) 2013-2016 Freescale Semiconductor, Inc.
+ * Copyright 2017 NXP
*
* SPDX-License-Identifier: GPL-2.0+
*/
@@ -14,19 +14,21 @@
#define __FSL_DPBP_H
/* DPBP Version */
-#define DPBP_VER_MAJOR 2
-#define DPBP_VER_MINOR 2
+#define DPBP_VER_MAJOR 3
+#define DPBP_VER_MINOR 3
/* Command IDs */
-#define DPBP_CMDID_CLOSE 0x800
-#define DPBP_CMDID_OPEN 0x804
-#define DPBP_CMDID_CREATE 0x904
-#define DPBP_CMDID_DESTROY 0x900
-
-#define DPBP_CMDID_ENABLE 0x002
-#define DPBP_CMDID_DISABLE 0x003
-#define DPBP_CMDID_GET_ATTR 0x004
-#define DPBP_CMDID_RESET 0x005
+#define DPBP_CMDID_CLOSE 0x8001
+#define DPBP_CMDID_OPEN 0x8041
+#define DPBP_CMDID_CREATE 0x9041
+#define DPBP_CMDID_DESTROY 0x9841
+#define DPBP_CMDID_GET_API_VERSION 0xa041
+
+#define DPBP_CMDID_ENABLE 0x0021
+#define DPBP_CMDID_DISABLE 0x0031
+#define DPBP_CMDID_GET_ATTR 0x0041
+#define DPBP_CMDID_RESET 0x0051
+#define DPBP_CMDID_IS_ENABLED 0x0061
/* cmd, param, offset, width, type, arg_name */
#define DPBP_CMD_OPEN(cmd, dpbp_id) \
@@ -37,8 +39,6 @@
do { \
MC_RSP_OP(cmd, 0, 16, 16, uint16_t, attr->bpid); \
MC_RSP_OP(cmd, 0, 32, 32, int, attr->id);\
- MC_RSP_OP(cmd, 1, 0, 16, uint16_t, attr->version.major);\
- MC_RSP_OP(cmd, 1, 16, 16, uint16_t, attr->version.minor);\
} while (0)
/* Data Path Buffer Pool API
@@ -114,9 +114,10 @@ struct dpbp_cfg {
* Return: '0' on Success; Error code otherwise.
*/
int dpbp_create(struct fsl_mc_io *mc_io,
+ uint16_t dprc_token,
uint32_t cmd_flags,
const struct dpbp_cfg *cfg,
- uint16_t *token);
+ uint32_t *obj_id);
/**
* dpbp_destroy() - Destroy the DPBP object and release all its resources.
@@ -127,8 +128,9 @@ int dpbp_create(struct fsl_mc_io *mc_io,
* Return: '0' on Success; error code otherwise.
*/
int dpbp_destroy(struct fsl_mc_io *mc_io,
+ uint16_t dprc_token,
uint32_t cmd_flags,
- uint16_t token);
+ uint32_t obj_id);
/**
* dpbp_enable() - Enable the DPBP.
@@ -189,16 +191,7 @@ int dpbp_reset(struct fsl_mc_io *mc_io,
* acquire/release operations on buffers
*/
struct dpbp_attr {
- int id;
- /**
- * struct version - Structure representing DPBP version
- * @major: DPBP major version
- * @minor: DPBP minor version
- */
- struct {
- uint16_t major;
- uint16_t minor;
- } version;
+ uint32_t id;
uint16_t bpid;
};
@@ -217,6 +210,21 @@ int dpbp_get_attributes(struct fsl_mc_io *mc_io,
uint16_t token,
struct dpbp_attr *attr);
+/**
+ * dpbp_get_api_version - Retrieve DPBP Major and Minor version info.
+ *
+ * @mc_io: Pointer to MC portal's I/O object
+ * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
+ * @major_ver: DPBP major version
+ * @minor_ver: DPBP minor version
+ *
+ * Return: '0' on Success; Error code otherwise.
+ */
+int dpbp_get_api_version(struct fsl_mc_io *mc_io,
+ u32 cmd_flags,
+ u16 *major_ver,
+ u16 *minor_ver);
+
/** @} */
#endif /* __FSL_DPBP_H */