Commit ee9d0606 authored by Laurentiu Tudor's avatar Laurentiu Tudor Committed by Greg Kroah-Hartman

staging: fsl-mc: dpmcp: drop unused APIs

These APIs are not used yet, so drop the dead code.
The patch is mostly mechanical, with a couple exceptions:
 - getters/setters were not removed even if only one of
   them is being used
 - versioning API was also left in place
Also in this patch, add missing prototype for
version query function.
Signed-off-by: default avatarLaurentiu Tudor <laurentiu.tudor@nxp.com>
Acked-by: default avatarStuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9b65332e
......@@ -45,107 +45,12 @@
/* Command IDs */
#define DPMCP_CMDID_CLOSE DPMCP_CMD(0x800)
#define DPMCP_CMDID_OPEN DPMCP_CMD(0x80b)
#define DPMCP_CMDID_CREATE DPMCP_CMD(0x90b)
#define DPMCP_CMDID_DESTROY DPMCP_CMD(0x98b)
#define DPMCP_CMDID_GET_API_VERSION DPMCP_CMD(0xa0b)
#define DPMCP_CMDID_GET_ATTR DPMCP_CMD(0x004)
#define DPMCP_CMDID_RESET DPMCP_CMD(0x005)
#define DPMCP_CMDID_SET_IRQ DPMCP_CMD(0x010)
#define DPMCP_CMDID_GET_IRQ DPMCP_CMD(0x011)
#define DPMCP_CMDID_SET_IRQ_ENABLE DPMCP_CMD(0x012)
#define DPMCP_CMDID_GET_IRQ_ENABLE DPMCP_CMD(0x013)
#define DPMCP_CMDID_SET_IRQ_MASK DPMCP_CMD(0x014)
#define DPMCP_CMDID_GET_IRQ_MASK DPMCP_CMD(0x015)
#define DPMCP_CMDID_GET_IRQ_STATUS DPMCP_CMD(0x016)
struct dpmcp_cmd_open {
__le32 dpmcp_id;
};
struct dpmcp_cmd_create {
__le32 portal_id;
};
struct dpmcp_cmd_destroy {
__le32 object_id;
};
struct dpmcp_cmd_set_irq {
/* cmd word 0 */
u8 irq_index;
u8 pad[3];
__le32 irq_val;
/* cmd word 1 */
__le64 irq_addr;
/* cmd word 2 */
__le32 irq_num;
};
struct dpmcp_cmd_get_irq {
__le32 pad;
u8 irq_index;
};
struct dpmcp_rsp_get_irq {
/* cmd word 0 */
__le32 irq_val;
__le32 pad;
/* cmd word 1 */
__le64 irq_paddr;
/* cmd word 2 */
__le32 irq_num;
__le32 type;
};
#define DPMCP_ENABLE 0x1
struct dpmcp_cmd_set_irq_enable {
u8 enable;
u8 pad[3];
u8 irq_index;
};
struct dpmcp_cmd_get_irq_enable {
__le32 pad;
u8 irq_index;
};
struct dpmcp_rsp_get_irq_enable {
u8 enabled;
};
struct dpmcp_cmd_set_irq_mask {
__le32 mask;
u8 irq_index;
};
struct dpmcp_cmd_get_irq_mask {
__le32 pad;
u8 irq_index;
};
struct dpmcp_rsp_get_irq_mask {
__le32 mask;
};
struct dpmcp_cmd_get_irq_status {
__le32 status;
u8 irq_index;
};
struct dpmcp_rsp_get_irq_status {
__le32 status;
};
struct dpmcp_rsp_get_attributes {
/* response word 0 */
__le32 pad;
__le32 id;
/* response word 1 */
__le16 version_major;
__le16 version_minor;
};
#endif /* _FSL_DPMCP_CMD_H */
This diff is collapsed.
......@@ -44,109 +44,17 @@ int dpmcp_open(struct fsl_mc_io *mc_io,
int dpmcp_id,
u16 *token);
/* Get portal ID from pool */
#define DPMCP_GET_PORTAL_ID_FROM_POOL (-1)
int dpmcp_close(struct fsl_mc_io *mc_io,
u32 cmd_flags,
u16 token);
/**
* struct dpmcp_cfg - Structure representing DPMCP configuration
* @portal_id: Portal ID; 'DPMCP_GET_PORTAL_ID_FROM_POOL' to get the portal ID
* from pool
*/
struct dpmcp_cfg {
int portal_id;
};
int dpmcp_create(struct fsl_mc_io *mc_io,
u16 dprc_token,
u32 cmd_flags,
const struct dpmcp_cfg *cfg,
u32 *obj_id);
int dpmcp_destroy(struct fsl_mc_io *mc_io,
u16 dprc_token,
u32 cmd_flags,
u32 obj_id);
int dpmcp_get_api_version(struct fsl_mc_io *mc_io,
u32 cmd_flags,
u16 *major_ver,
u16 *minor_ver);
int dpmcp_reset(struct fsl_mc_io *mc_io,
u32 cmd_flags,
u16 token);
/* IRQ */
/* IRQ Index */
#define DPMCP_IRQ_INDEX 0
/* irq event - Indicates that the link state changed */
#define DPMCP_IRQ_EVENT_CMD_DONE 0x00000001
/**
* struct dpmcp_irq_cfg - IRQ configuration
* @paddr: Address that must be written to signal a message-based interrupt
* @val: Value to write into irq_addr address
* @irq_num: A user defined number associated with this IRQ
*/
struct dpmcp_irq_cfg {
u64 paddr;
u32 val;
int irq_num;
};
int dpmcp_set_irq(struct fsl_mc_io *mc_io,
u32 cmd_flags,
u16 token,
u8 irq_index,
struct dpmcp_irq_cfg *irq_cfg);
int dpmcp_get_irq(struct fsl_mc_io *mc_io,
u32 cmd_flags,
u16 token,
u8 irq_index,
int *type,
struct dpmcp_irq_cfg *irq_cfg);
int dpmcp_set_irq_enable(struct fsl_mc_io *mc_io,
u32 cmd_flags,
u16 token,
u8 irq_index,
u8 en);
int dpmcp_get_irq_enable(struct fsl_mc_io *mc_io,
u32 cmd_flags,
u16 token,
u8 irq_index,
u8 *en);
int dpmcp_set_irq_mask(struct fsl_mc_io *mc_io,
u32 cmd_flags,
u16 token,
u8 irq_index,
u32 mask);
int dpmcp_get_irq_mask(struct fsl_mc_io *mc_io,
u32 cmd_flags,
u16 token,
u8 irq_index,
u32 *mask);
int dpmcp_get_irq_status(struct fsl_mc_io *mc_io,
u32 cmd_flags,
u16 token,
u8 irq_index,
u32 *status);
/**
* struct dpmcp_attr - Structure representing DPMCP attributes
* @id: DPMCP object ID
*/
struct dpmcp_attr {
int id;
};
int dpmcp_get_attributes(struct fsl_mc_io *mc_io,
u32 cmd_flags,
u16 token,
struct dpmcp_attr *attr);
#endif /* __FSL_DPMCP_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment