summaryrefslogtreecommitdiff
path: root/cleopatre/plcdrv/arm/inc/hal.h
diff options
context:
space:
mode:
Diffstat (limited to 'cleopatre/plcdrv/arm/inc/hal.h')
-rw-r--r--cleopatre/plcdrv/arm/inc/hal.h27
1 files changed, 25 insertions, 2 deletions
diff --git a/cleopatre/plcdrv/arm/inc/hal.h b/cleopatre/plcdrv/arm/inc/hal.h
index 26bac8e6f6..b4b648b800 100644
--- a/cleopatre/plcdrv/arm/inc/hal.h
+++ b/cleopatre/plcdrv/arm/inc/hal.h
@@ -20,15 +20,38 @@
#include "hal_utests.h"
#endif
+#define A2L_RING_MASK (A2L_RING_SIZE-1)
+#define L2A_RING_MASK (L2A_RING_SIZE-1)
+
+/** hal layer context structure */
+struct halctx {
+ uint32_t *A2L_ptr;
+ uint32_t *L2A_ptr;
+ const uint32_t *A2L_head;
+ uint32_t *A2L_tail;
+ uint32_t *L2A_head;
+ const uint32_t *L2A_tail;
+ uint32_t *A2L_it;
+ uint32_t *L2A_it;
+ uint32_t *L2A_it_mask;
+ uint32_t (*virt_to_phys)(uint32_t);
+ uint32_t (*phys_to_virt)(uint32_t);
+};
+
/**
* Initialize the hal layer
+ *
+ * \param init user information.
+ * \return hal context.
*/
-void halmbx_init(void);
+struct halctx* halmbx_init(struct init_info *info);
/**
* UnInitialize the hal layer
+ *
+ * \param ctx hal context.
*/
-void halmbx_uninit(void);
+void halmbx_uninit(struct halctx *ctx);
/**
* Check if Leon to Arm mailbox queue is empty.