diff options
author | Ang, Chee Hong <chee.hong.ang@intel.com> | 2018-12-19 18:35:13 -0800 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2018-12-20 17:12:25 +0100 |
commit | 8b36ba27ad5c62af93e8158632966c2484e8f105 (patch) | |
tree | f5296b0b489c36a7e3d4dc912cbbb107ed427eb9 /arch | |
parent | d99f1e92a20b4e7025da76bcad6ec18bab9d14be (diff) |
arm: socfpga: stratix10: Add macros for mailbox's arguments
Add macros for specifying number of arguments in mailbox command.
Signed-off-by: Ang, Chee Hong <chee.hong.ang@intel.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-socfpga/include/mach/mailbox_s10.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/mach-socfpga/include/mach/mailbox_s10.h b/arch/arm/mach-socfpga/include/mach/mailbox_s10.h index 660df35ab25..ae728a5df5f 100644 --- a/arch/arm/mach-socfpga/include/mach/mailbox_s10.h +++ b/arch/arm/mach-socfpga/include/mach/mailbox_s10.h @@ -107,6 +107,12 @@ enum ALT_SDM_MBOX_RESP_CODE { #define RECONFIG_STATUS_PIN_STATUS 2 #define RECONFIG_STATUS_SOFTFUNC_STATUS 3 +/* Macros for specifying number of arguments in mailbox command */ +#define MBOX_NUM_ARGS(n, b) (((n) & 0xFF) << (b)) +#define MBOX_DIRECT_COUNT(n) MBOX_NUM_ARGS((n), 0) +#define MBOX_ARG_DESC_COUNT(n) MBOX_NUM_ARGS((n), 8) +#define MBOX_RESP_DESC_COUNT(n) MBOX_NUM_ARGS((n), 16) + #define MBOX_CFGSTAT_STATE_IDLE 0x00000000 #define MBOX_CFGSTAT_STATE_CONFIG 0x10000000 #define MBOX_CFGSTAT_STATE_FAILACK 0x08000000 |