public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: chee.hong.ang at intel.com <chee.hong.ang@intel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v5 1/4] arm: socfpga: stratix10: Add macros for mailbox's arguments
Date: Thu, 29 Nov 2018 01:40:12 -0800	[thread overview]
Message-ID: <1543484415-26499-2-git-send-email-chee.hong.ang@intel.com> (raw)
In-Reply-To: <1543484415-26499-1-git-send-email-chee.hong.ang@intel.com>

From: "Ang, Chee Hong" <chee.hong.ang@intel.com>

Add macros for specifying number of arguments in mailbox command.

Signed-off-by: Ang, Chee Hong <chee.hong.ang@intel.com>
---
 arch/arm/mach-socfpga/include/mach/mailbox_s10.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/mach-socfpga/include/mach/mailbox_s10.h b/arch/arm/mach-socfpga/include/mach/mailbox_s10.h
index 660df35..ae728a5 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
-- 
2.7.4

  reply	other threads:[~2018-11-29  9:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-29  9:40 [U-Boot] [PATCH v5 0/4] Stratix10 FPGA reconfiguration support chee.hong.ang at intel.com
2018-11-29  9:40 ` chee.hong.ang at intel.com [this message]
2018-11-29  9:40 ` [U-Boot] [PATCH v5 2/4] arm: socfpga: stratix10: Add Stratix 10 FPGA Reconfiguration Driver chee.hong.ang at intel.com
2018-11-29  9:40 ` [U-Boot] [PATCH v5 3/4] arm: socfpga: stratix10: Add Stratix10 FPGA into FPGA device table chee.hong.ang at intel.com
2018-11-29 11:28   ` Marek Vasut
2018-12-17  6:38     ` Ang, Chee Hong
2018-12-17 13:04       ` Marek Vasut
2018-11-29  9:40 ` [U-Boot] [PATCH v5 4/4] arm: socfpga: stratix10: Enable Stratix10 FPGA Reconfiguration chee.hong.ang at intel.com
2018-11-29 11:25 ` [U-Boot] [PATCH v5 0/4] Stratix10 FPGA reconfiguration support Marek Vasut
2018-12-17  6:36   ` Ang, Chee Hong
2018-12-17 13:12     ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1543484415-26499-2-git-send-email-chee.hong.ang@intel.com \
    --to=chee.hong.ang@intel.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox