1 From fa245614c92ffbdaec6a56552032432b5343b1dc Mon Sep 17 00:00:00 2001
2 From: Stuart Yoder <stuart.yoder@nxp.com>
3 Date: Mon, 11 Apr 2016 11:48:48 -0500
4 Subject: [PATCH 167/226] staging: fsl-mc: update dpmcp binary interface to
7 Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
8 Acked-by: German Rivera <german.rivera@nxp.com>
9 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 drivers/staging/fsl-mc/bus/dpmcp-cmd.h | 5 ++---
12 drivers/staging/fsl-mc/bus/dpmcp.c | 35 ++------------------------------
13 drivers/staging/fsl-mc/bus/dpmcp.h | 10 ++-------
14 3 files changed, 6 insertions(+), 44 deletions(-)
16 --- a/drivers/staging/fsl-mc/bus/dpmcp-cmd.h
17 +++ b/drivers/staging/fsl-mc/bus/dpmcp-cmd.h
19 #define _FSL_DPMCP_CMD_H
22 -#define DPMCP_VER_MAJOR 2
23 -#define DPMCP_VER_MINOR 1
24 +#define DPMCP_VER_MAJOR 3
25 +#define DPMCP_VER_MINOR 0
28 #define DPMCP_CMDID_CLOSE 0x800
30 #define DPMCP_CMDID_SET_IRQ_MASK 0x014
31 #define DPMCP_CMDID_GET_IRQ_MASK 0x015
32 #define DPMCP_CMDID_GET_IRQ_STATUS 0x016
33 -#define DPMCP_CMDID_CLEAR_IRQ_STATUS 0x017
35 #endif /* _FSL_DPMCP_CMD_H */
36 --- a/drivers/staging/fsl-mc/bus/dpmcp.c
37 +++ b/drivers/staging/fsl-mc/bus/dpmcp.c
38 @@ -213,7 +213,7 @@ int dpmcp_set_irq(struct fsl_mc_io *mc_i
39 cmd.params[0] |= mc_enc(0, 8, irq_index);
40 cmd.params[0] |= mc_enc(32, 32, irq_cfg->val);
41 cmd.params[1] |= mc_enc(0, 64, irq_cfg->paddr);
42 - cmd.params[2] |= mc_enc(0, 32, irq_cfg->user_irq_id);
43 + cmd.params[2] |= mc_enc(0, 32, irq_cfg->irq_num);
45 /* send command to mc*/
46 return mc_send_command(mc_io, &cmd);
47 @@ -254,7 +254,7 @@ int dpmcp_get_irq(struct fsl_mc_io *mc_i
48 /* retrieve response parameters */
49 irq_cfg->val = (u32)mc_dec(cmd.params[0], 0, 32);
50 irq_cfg->paddr = (u64)mc_dec(cmd.params[1], 0, 64);
51 - irq_cfg->user_irq_id = (int)mc_dec(cmd.params[2], 0, 32);
52 + irq_cfg->irq_num = (int)mc_dec(cmd.params[2], 0, 32);
53 *type = (int)mc_dec(cmd.params[2], 32, 32);
56 @@ -435,37 +435,6 @@ int dpmcp_get_irq_status(struct fsl_mc_i
60 - * dpmcp_clear_irq_status() - Clear a pending interrupt's status
62 - * @mc_io: Pointer to MC portal's I/O object
63 - * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
64 - * @token: Token of DPMCP object
65 - * @irq_index: The interrupt index to configure
66 - * @status: Bits to clear (W1C) - one bit per cause:
68 - * 1 = clear status bit
70 - * Return: '0' on Success; Error code otherwise.
72 -int dpmcp_clear_irq_status(struct fsl_mc_io *mc_io,
78 - struct mc_command cmd = { 0 };
80 - /* prepare command */
81 - cmd.header = mc_encode_cmd_header(DPMCP_CMDID_CLEAR_IRQ_STATUS,
83 - cmd.params[0] |= mc_enc(0, 32, status);
84 - cmd.params[0] |= mc_enc(32, 8, irq_index);
86 - /* send command to mc*/
87 - return mc_send_command(mc_io, &cmd);
91 * dpmcp_get_attributes - Retrieve DPMCP attributes.
93 * @mc_io: Pointer to MC portal's I/O object
94 --- a/drivers/staging/fsl-mc/bus/dpmcp.h
95 +++ b/drivers/staging/fsl-mc/bus/dpmcp.h
96 @@ -82,12 +82,12 @@ int dpmcp_reset(struct fsl_mc_io *mc_io,
97 * struct dpmcp_irq_cfg - IRQ configuration
98 * @paddr: Address that must be written to signal a message-based interrupt
99 * @val: Value to write into irq_addr address
100 - * @user_irq_id: A user defined number associated with this IRQ
101 + * @irq_num: A user defined number associated with this IRQ
103 struct dpmcp_irq_cfg {
110 int dpmcp_set_irq(struct fsl_mc_io *mc_io,
111 @@ -133,12 +133,6 @@ int dpmcp_get_irq_status(struct fsl_mc_i
115 -int dpmcp_clear_irq_status(struct fsl_mc_io *mc_io,
116 - uint32_t cmd_flags,
122 * struct dpmcp_attr - Structure representing DPMCP attributes
123 * @id: DPMCP object ID