summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorSimon Que <sque@ti.com>2010-03-21 16:01:11 -0600
committerHari Kanigeri <h-kanigeri2@ti.com>2010-07-09 17:57:37 -0500
commitd39e5d1b0ae9f0a4364057f0056414d234605582 (patch)
tree9d0873457b09fb882a30c96619a87be8cfeccfd5 /arch/arm
parent30474627977f1e67d33e2b1dafc7324c8a7b79d6 (diff)
SYSLINK: ipc - added transportshm module
Added transportshm module for SysLink 2.0. This module replaces the older messageq_transportshm module. Major changes: - No longer closely associated w/ messageq module -- it is independent now. - Has function to open by shared memory address, and corresponding close func. - IOCTL layer has been removed. This module is no longer callable from user space. - Updated params and functions to reflect improvements to notify module. - transportshm_params_init no longer accepts a handle argument. - This module will not have any userspace interface. Signed-off-by: Simon Que <sque@ti.com> Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/plat-omap/include/syslink/messageq_transportshm.h283
-rw-r--r--arch/arm/plat-omap/include/syslink/messageq_transportshm_ioctl.h160
-rw-r--r--arch/arm/plat-omap/include/syslink/transportshm.h220
3 files changed, 220 insertions, 443 deletions
diff --git a/arch/arm/plat-omap/include/syslink/messageq_transportshm.h b/arch/arm/plat-omap/include/syslink/messageq_transportshm.h
deleted file mode 100644
index e2b55f6b0b4d..000000000000
--- a/arch/arm/plat-omap/include/syslink/messageq_transportshm.h
+++ /dev/null
@@ -1,283 +0,0 @@
-/*
- * messageq_transportshm.h
- *
- * MessageQ shared memory based physical transport for
- * communication with the remote processor.
- *
- * This file contains the declarations of types and APIs as part
- * of interface of the MessageQ shared memory transport.
- *
- * Copyright (C) 2008-2009 Texas Instruments, Inc.
- *
- * This package is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE.
- */
-
-#ifndef _MESSAGEQ_TRANSPORTSHM_H_
-#define _MESSAGEQ_TRANSPORTSHM_H_
-
-/* Standard headers */
-#include <linux/types.h>
-
-/* Utilities headers */
-#include <linux/list.h>
-
-/* =============================================================================
- * All success and failure codes for the module
- * =============================================================================
- */
-/*!
- * @def MESSAGEQ_TRANSPORTSHM_MODULEID
- * @brief Unique module ID.
- */
-#define MESSAGEQ_TRANSPORTSHM_MODULEID (0x0a7a)
-
-/* =============================================================================
- * All success and failure codes for the module
- * =============================================================================
- */
-/*!
- * @def MESSAGEQ_TRANSPORTSHM_STATUSCODEBASE
- * @brief Error code base for MessageQ.
- */
-#define MESSAGEQ_TRANSPORTSHM_STATUSCODEBASE \
- (MESSAGEQ_TRANSPORTSHM_MODULEID << 12)
-
-/*!
- * @def MESSAGEQ_TRANSPORTSHM_MAKE_FAILURE
- * @brief Macro to make error code.
- */
-#define MESSAGEQ_TRANSPORTSHM_MAKE_FAILURE(x) ((int) (0x80000000 \
- + (MESSAGEQ_TRANSPORTSHM_STATUSCODEBASE \
- + (x))))
-
-/*!
- * @def MESSAGEQ_TRANSPORTSHM_MAKE_SUCCESS
- * @brief Macro to make success code.
- */
-#define MESSAGEQ_TRANSPORTSHM_MAKE_SUCCESS(x) \
- (MESSAGEQ_TRANSPORTSHM_STATUSCODEBASE + (x))
-
-/*!
- * @def MESSAGEQ_TRANSPORTSHM_E_INVALIDARG
- * @brief Argument passed to a function is invalid.
- */
-#define MESSAGEQ_TRANSPORTSHM_E_INVALIDARG \
- MESSAGEQ_TRANSPORTSHM_MAKE_FAILURE(1)
-
-/*!
- * @def MESSAGEQ_TRANSPORTSHM_E_INVALIDSIZE
- * @brief Invalid shared address size
- */
-#define MESSAGEQ_TRANSPORTSHM_E_INVALIDSIZE \
- MESSAGEQ_TRANSPORTSHM_MAKE_FAILURE(2)
-
-/*!
- * @def MESSAGEQ_TRANSPORTSHM_E_INVALIDSTATE
- * @brief Module is not initialized.
- */
-#define MESSAGEQ_TRANSPORTSHM_E_INVALIDSTATE \
- MESSAGEQ_TRANSPORTSHM_MAKE_FAILURE(3)
-
-/*!
- * @def MESSAGEQ_TRANSPORTSHM_E_BADVERSION
- * @brief Versions don't match
- */
-#define MESSAGEQ_TRANSPORTSHM_E_BADVERSION \
- MESSAGEQ_TRANSPORTSHM_MAKE_FAILURE(4)
-
-/*!
- * @def MESSAGEQ_TRANSPORTSHM_E_FAIL
- * @brief General Failure
-*/
-#define MESSAGEQ_TRANSPORTSHM_E_FAIL \
- MESSAGEQ_TRANSPORTSHM_MAKE_FAILURE(5)
-
-/*!
- * @def MESSAGEQ_TRANSPORTSHM_E_MEMORY
- * @brief Memory allocation failed
- */
-#define MESSAGEQ_TRANSPORTSHM_E_MEMORY \
- MESSAGEQ_TRANSPORTSHM_MAKE_FAILURE(6)
-
-/*!
- * @def MESSAGEQ_TRANSPORTSHM_E_OSFAILURE
- * @brief Failure in OS call.
- */
-#define MESSAGEQ_TRANSPORTSHM_E_OSFAILURE \
- MESSAGEQ_TRANSPORTSHM_MAKE_FAILURE(7)
-
-/*!
- * @def MESSAGEQ_TRANSPORTSHM_E_HANDLE
- * @brief Invalid handle specified.
- */
-#define MESSAGEQ_TRANSPORTSHM_E_HANDLE \
- MESSAGEQ_TRANSPORTSHM_MAKE_FAILURE(8)
-
-/*!
- * @def MESSAGEQTRANSPORTSHM_E_NOTSUPPORTED
- * @brief The specified operation is not supported.
- */
-#define MESSAGEQTRANSPORTSHM_E_NOTSUPPORTED \
- MESSAGEQ_TRANSPORTSHM_MAKE_FAILURE(9)
-
-/*!
- * @def MESSAGEQ_TRANSPORTSHM_SUCCESS
- * @brief Operation successful.
- */
-#define MESSAGEQ_TRANSPORTSHM_SUCCESS \
- MESSAGEQ_TRANSPORTSHM_MAKE_SUCCESS(0)
-
-/*!
- * @def MESSAGETRANSPORTSHM_S_ALREADYSETUP
- * @brief The MESSAGETRANSPORTSHM module has
- * already been setup in this process.
- */
-#define MESSAGEQ_TRANSPORTSHM_S_ALREADYSETUP \
- MESSAGEQ_TRANSPORTSHM_MAKE_SUCCESS(1)
-
-
-/* =============================================================================
- * Structures & Enums
- * =============================================================================
- */
-
-/*!
- * @brief Structure defining the reason for error function being called
- */
-enum MessageQTransportShm_Reason {
- MessageQTransportShm_Reason_FAILEDPUT,
- /*!< Failed to send the message. */
- MessageQTransportShm_Reason_INTERNALERR,
- /*!< An internal error occurred in the transport */
- MessageQTransportShm_Reason_PHYSICALERR,
- /*!< An error occurred in the physical link in the transport */
- MessageQTransportShm_Reason_FAILEDALLOC
- /*!< Failed to allocate a message. */
-};
-
-/*!
- * @brief transport error callback function.
- *
- * First parameter: Why the error function is being called.
- *
- * Second parameter: Handle of transport that had the error. NULL denotes
- * that it is a system error, not a specific transport.
- *
- * Third parameter: Pointer to the message. This is only valid for
- * #MessageQTransportShm_Reason_FAILEDPUT.
- *
- * Fourth parameter: Transport specific information. Refer to individual
- * transports for more details.
- */
-
-/*!
- * @brief Module configuration structure.
- */
-struct messageq_transportshm_config {
- void (*err_fxn)(enum MessageQTransportShm_Reason reason,
- void *handle,
- void *msg,
- u32 info);
- /*!< Asynchronous error function for the transport module */
-};
-
-/*!
- * @brief Structure defining config parameters for the MessageQ transport
- * instances.
- */
-struct messageq_transportshm_params {
- u32 priority;
- /*!< Priority of messages supported by this transport */
- void *gate;
- /*!< Gate used for critical region management of the shared memory */
- void *shared_addr;
- /*!< Address of the shared memory. The creator must supply the shared
- * memory that this will use for maintain shared state information.
- */
- u32 shared_addr_size;
- /*!< Size of shared region provided. */
- u32 notify_event_no;
- /*!< Notify event number to be used by the transport */
- void *notify_driver;
- /*!< Notify driver to be used by the transport */
-};
-
-/*!
- * @brief Structure defining Transport status values
- */
-enum messageq_transportshm_status {
- messageq_transportshm_status_INIT,
- /*!< MessageQ transport Shm instance has not not completed
- * initialization. */
- messageq_transportshm_status_UP,
- /*!< MessageQ transport Shm instance is up and functional. */
- messageq_transportshm_status_DOWN,
- /*!< MessageQ transport Shm instance is down and not functional. */
- messageq_transportshm_status_RESETTING
- /*!< MessageQ transport Shm instance was up at one point and is in
- * process of resetting.
- */
-};
-
-
-/* =============================================================================
- * APIs called by applications
- * =============================================================================
- */
-/* Function to get the default configuration for the MessageQTransportShm
- * module. */
-void messageq_transportshm_get_config(struct messageq_transportshm_config *cfg);
-
-/* Function to setup the MessageQTransportShm module. */
-int messageq_transportshm_setup(const struct messageq_transportshm_config *cfg);
-
-/* Function to destroy the MessageQTransportShm module. */
-int messageq_transportshm_destroy(void);
-
-/* Get the default parameters for the NotifyShmDriver. */
-void messageq_transportshm_params_init(void *mqtshm_handle,
- struct messageq_transportshm_params *params);
-
-/* Create an instance of the MessageQTransportShm. */
-void *messageq_transportshm_create(u16 proc_id,
- const struct messageq_transportshm_params *params);
-
-/* Delete an instance of the MessageQTransportShm. */
-int messageq_transportshm_delete(void **mqtshm_handleptr);
-
-/* Get the shared memory requirements for the MessageQTransportShm. */
-u32 messageq_transportshm_shared_mem_req(const
- struct messageq_transportshm_params *params);
-
-/* Set the asynchronous error function for the transport module */
-void messageq_transportshm_set_err_fxn(
- void (*err_fxn)(
- enum MessageQTransportShm_Reason reason,
- void *handle,
- void *msg,
- u32 info));
-
-
-/* =============================================================================
- * APIs called internally by MessageQ module.
- * =============================================================================
- */
-/* Put msg to remote list */
-int messageq_transportshm_put(void *mqtshm_handle, void *msg);
-
-/* Control Function */
-int messageq_transportshm_control(void *mqtshm_handle, u32 cmd,
- u32 *cmd_arg);
-
-/* Get current status of the MessageQTransportShm */
-enum messageq_transportshm_status messageq_transportshm_get_status(
- void *mqtshm_handle);
-
-#endif /* _MESSAGEQ_TRANSPORTSHM_H_ */
diff --git a/arch/arm/plat-omap/include/syslink/messageq_transportshm_ioctl.h b/arch/arm/plat-omap/include/syslink/messageq_transportshm_ioctl.h
deleted file mode 100644
index 3790dc0d22e8..000000000000
--- a/arch/arm/plat-omap/include/syslink/messageq_transportshm_ioctl.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * messageq_transportshm_ioctl.h
- *
- * Definitions of messageq_transportshm driver types and structures.
- *
- * Copyright (C) 2008-2009 Texas Instruments, Inc.
- *
- * This package is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE.
- */
-
-#ifndef _MESSAGEQ_TRANSPORTSHM_IOCTL_H_
-#define _MESSAGEQ_TRANSPORTSHM_IOCTL_H_
-
-/* Standard headers */
-#include <linux/types.h>
-
-/* Syslink headers */
-#include <ipc_ioctl.h>
-#include <messageq_transportshm.h>
-#include <sharedregion.h>
-
-
-/* =============================================================================
- * Macros and types
- * =============================================================================
- */
-/* Base command ID for messageq_transportshm */
-#define MESSAGEQ_TRANSPORTSHM_IOC_MAGIC IPC_IOC_MAGIC
-enum messageq_transportshm_drv_cmd {
- MESSAGEQ_TRANSPORTSHM_GETCONFIG = MESSAGEQ_TRANSPORTSHM_BASE_CMD,
- MESSAGEQ_TRANSPORTSHM_SETUP,
- MESSAGEQ_TRANSPORTSHM_DESTROY,
- MESSAGEQ_TRANSPORTSHM_PARAMS_INIT,
- MESSAGEQ_TRANSPORTSHM_CREATE,
- MESSAGEQ_TRANSPORTSHM_DELETE,
- MESSAGEQ_TRANSPORTSHM_PUT,
- MESSAGEQ_TRANSPORTSHM_SHAREDMEMREQ,
- MESSAGEQ_TRANSPORTSHM_GETSTATUS
-};
-
-/* ----------------------------------------------------------------------------
- * IOCTL command IDs for messageq_transportshm
- * ----------------------------------------------------------------------------
- */
-/* Base command ID for messageq_transportshm */
-#define MESSAGEQ_TRANSPORTSHM_BASE_CMD 0x0
-
-/* Command for messageq_transportshm_get_config */
-#define CMD_MESSAGEQ_TRANSPORTSHM_GETCONFIG \
- _IOWR(MESSAGEQ_TRANSPORTSHM_IOC_MAGIC, \
- MESSAGEQ_TRANSPORTSHM_GETCONFIG, struct messageq_transportshm_cmd_args)
-
-/* Command for messageq_transportshm_setup */
-#define CMD_MESSAGEQ_TRANSPORTSHM_SETUP \
- _IOWR(MESSAGEQ_TRANSPORTSHM_IOC_MAGIC, MESSAGEQ_TRANSPORTSHM_SETUP, \
- struct messageq_transportshm_cmd_args)
-
-/* Command for messageq_transportshm_setup */
-#define CMD_MESSAGEQ_TRANSPORTSHM_DESTROY \
- _IOWR(MESSAGEQ_TRANSPORTSHM_IOC_MAGIC, MESSAGEQ_TRANSPORTSHM_DESTROY, \
- struct messageq_transportshm_cmd_args)
-
-/* Command for messageq_transportshm_destroy */
-#define CMD_MESSAGEQ_TRANSPORTSHM_PARAMS_INIT \
- _IOWR(MESSAGEQ_TRANSPORTSHM_IOC_MAGIC, \
- MESSAGEQ_TRANSPORTSHM_PARAMS_INIT, \
- struct messageq_transportshm_cmd_args)
-
-/* Command for messageq_transportshm_create */
-#define CMD_MESSAGEQ_TRANSPORTSHM_CREATE \
- _IOWR(MESSAGEQ_TRANSPORTSHM_IOC_MAGIC, MESSAGEQ_TRANSPORTSHM_CREATE, \
- struct messageq_transportshm_cmd_args)
-
-/* Command for messageq_transportshm_delete */
-#define CMD_MESSAGEQ_TRANSPORTSHM_DELETE \
- _IOWR(MESSAGEQ_TRANSPORTSHM_IOC_MAGIC, MESSAGEQ_TRANSPORTSHM_DELETE, \
- struct messageq_transportshm_cmd_args)
-
-/* Command for messageq_transportshm_put */
-#define CMD_MESSAGEQ_TRANSPORTSHM_PUT \
- _IOWR(MESSAGEQ_TRANSPORTSHM_IOC_MAGIC, MESSAGEQ_TRANSPORTSHM_PUT, \
- struct messageq_transportshm_cmd_args)
-
-/* Command for messageq_transportshm_shared_memreq */
-#define CMD_MESSAGEQ_TRANSPORTSHM_SHAREDMEMREQ \
- _IOWR(MESSAGEQ_TRANSPORTSHM_IOC_MAGIC, \
- MESSAGEQ_TRANSPORTSHM_SHAREDMEMREQ, \
- struct messageq_transportshm_cmd_args)
-
-/* Command for messageq_transportshm_get_status */
-#define CMD_MESSAGEQ_TRANSPORTSHM_GETSTATUS \
- _IOWR(MESSAGEQ_TRANSPORTSHM_IOC_MAGIC, \
- MESSAGEQ_TRANSPORTSHM_GETSTATUS, struct messageq_transportshm_cmd_args)
-
-/* Command arguments for messageq_transportshm */
-struct messageq_transportshm_cmd_args {
- union {
- struct {
- struct messageq_transportshm_config *config;
- } get_config;
-
- struct {
- struct messageq_transportshm_config *config;
- } setup;
-
- struct {
- void *messageq_transportshm_handle;
- struct messageq_transportshm_params *params;
- } params_init;
-
- struct {
- void *messageq_transportshm_handle;
- u16 proc_id;
- struct messageq_transportshm_params *params;
- u32 shared_addr_srptr;
- void *knl_lock_handle;
- void *knl_notify_driver;
- } create;
-
- struct {
- void *messageq_transportshm_handle;
- } delete_transport;
-
- struct {
- void *messageq_transportshm_handle;
- u32 *msg_srptr;
- } put;
-
- struct {
- void *messageq_transportshm_handle;
- enum messageq_transportshm_status status;
- } get_status;
-
- struct {
- struct messageq_transportshm_params *params;
- u32 bytes;
- } shared_memreq;
- } args;
-
- int api_status;
-};
-
-/* ----------------------------------------------------------------------------
- * IOCTL functions for messageq_transportshm module
- * ----------------------------------------------------------------------------
- */
-/*
- * ioctl interface function for messageq_transportshm
- */
-int messageq_transportshm_ioctl(struct inode *inode, struct file *filp,
- unsigned int cmd, unsigned long args);
-
-#endif /* _MESSAGEQ_TRANSPORTSHM_IOCTL_H_ */
diff --git a/arch/arm/plat-omap/include/syslink/transportshm.h b/arch/arm/plat-omap/include/syslink/transportshm.h
new file mode 100644
index 000000000000..02a2b6a80c90
--- /dev/null
+++ b/arch/arm/plat-omap/include/syslink/transportshm.h
@@ -0,0 +1,220 @@
+/*
+ * transportshm.h
+ *
+ * Shared memory based physical transport for
+ * communication with the remote processor.
+ *
+ * This file contains the declarations of types and APIs as part
+ * of interface of the shared memory transport.
+ *
+ * Copyright (C) 2008-2009 Texas Instruments, Inc.
+ *
+ * This package is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+#ifndef _TRANSPORTSHM_H_
+#define _TRANSPORTSHM_H_
+
+/* Standard headers */
+#include <linux/types.h>
+
+/* Utilities headers */
+#include <linux/list.h>
+
+/* =============================================================================
+ * All success and failure codes for the module
+ * =============================================================================
+ */
+/* Unique module ID. */
+#define TRANSPORTSHM_MODULEID (0x0a7a)
+
+/* =============================================================================
+ * All success and failure codes for the module
+ * =============================================================================
+ */
+/* Error code base for TransportShm. */
+#define TRANSPORTSHM_STATUSCODEBASE (TRANSPORTSHM_MODULEID << 12)
+
+/* Macro to make error code. */
+#define TRANSPORTSHM_MAKE_FAILURE(x) ((int) (0x80000000 \
+ + (TRANSPORTSHM_STATUSCODEBASE \
+ + (x))))
+
+/* Macro to make success code. */
+#define TRANSPORTSHM_MAKE_SUCCESS(x) (TRANSPORTSHM_STATUSCODEBASE + (x))
+
+/* Argument passed to a function is invalid. */
+#define TRANSPORTSHM_E_INVALIDARG TRANSPORTSHM_MAKE_FAILURE(1)
+
+/* Invalid shared address size */
+#define TRANSPORTSHM_E_INVALIDSIZE TRANSPORTSHM_MAKE_FAILURE(2)
+
+/* Module is not initialized. */
+#define TRANSPORTSHM_E_INVALIDSTATE TRANSPORTSHM_MAKE_FAILURE(3)
+
+/* Versions don't match */
+#define TRANSPORTSHM_E_BADVERSION TRANSPORTSHM_MAKE_FAILURE(4)
+
+/* General Failure */
+#define TRANSPORTSHM_E_FAIL TRANSPORTSHM_MAKE_FAILURE(5)
+
+/* Memory allocation failed */
+#define TRANSPORTSHM_E_MEMORY TRANSPORTSHM_MAKE_FAILURE(6)
+
+/* Failure in OS call. */
+#define TRANSPORTSHM_E_OSFAILURE TRANSPORTSHM_MAKE_FAILURE(7)
+
+/* Invalid handle specified. */
+#define TRANSPORTSHM_E_HANDLE TRANSPORTSHM_MAKE_FAILURE(8)
+
+/* The specified operation is not supported. */
+#define TRANSPORTSHM_E_NOTSUPPORTED TRANSPORTSHM_MAKE_FAILURE(9)
+
+/* Operation successful. */
+#define TRANSPORTSHM_SUCCESS TRANSPORTSHM_MAKE_SUCCESS(0)
+
+/* The MESSAGETRANSPORTSHM module has already been setup in this process. */
+#define TRANSPORTSHM_S_ALREADYSETUP TRANSPORTSHM_MAKE_SUCCESS(1)
+
+
+/* =============================================================================
+ * Structures & Enums
+ * =============================================================================
+ */
+
+/*
+ * Structure defining the reason for error function being called
+ */
+enum transportshm_reason {
+ TRANSPORTSHM_REASON_FAILEDPUT,
+ /* Failed to send the message. */
+ TRANSPORTSHM_REASON_INTERNALERR,
+ /* An internal error occurred in the transport */
+ TRANSPORTSHM_REASON_PHYSICALERR,
+ /* An error occurred in the physical link in the transport */
+ TRANSPORTSHM_REASON_FAILEDALLOC
+ /* Failed to allocate a message. */
+};
+
+/*
+ * transport error callback function.
+ *
+ * First parameter: Why the error function is being called.
+ *
+ * Second parameter: Handle of transport that had the error. NULL denotes
+ * that it is a system error, not a specific transport.
+ *
+ * Third parameter: Pointer to the message. This is only valid for
+ * #TRANSPORTSHM_REASON_FAILEDPUT.
+ *
+ * Fourth parameter: Transport specific information. Refer to individual
+ * transports for more details.
+ */
+
+/*
+ * Module configuration structure.
+ */
+struct transportshm_config {
+ void (*err_fxn)(enum transportshm_reason reason,
+ void *handle,
+ void *msg,
+ u32 info);
+ /* Asynchronous error function for the transport module */
+};
+
+/*
+ * Structure defining config parameters for the transport
+ * instances.
+ */
+struct transportshm_params {
+ u32 priority;
+ /*< Priority of messages supported by this transport */
+ void *gate;
+ /*< Gate used for critical region management of the shared memory */
+ void *shared_addr;
+ /*< Address of the shared memory. The creator must supply the shared
+ * memory that this will use for maintain shared state information.
+ */
+ u32 notify_event_id;
+ /*< Notify event number to be used by the transport */
+};
+
+/*
+ * Structure defining Transport status values
+ */
+enum transportshm_status {
+ transportshm_status_INIT,
+ /*< Transport Shm instance has not not completed
+ * initialization. */
+ transportshm_status_UP,
+ /*< Transport Shm instance is up and functional. */
+ transportshm_status_DOWN,
+ /*< Transport Shm instance is down and not functional. */
+ transportshm_status_RESETTING
+ /*< Transport Shm instance was up at one point and is in
+ * process of resetting.
+ */
+};
+
+
+/* =============================================================================
+ * APIs called by applications
+ * =============================================================================
+ */
+/* Function to get the default configuration for the TransportShm
+ * module. */
+void transportshm_get_config(struct transportshm_config *cfg);
+
+/* Function to setup the TransportShm module. */
+int transportshm_setup(const struct transportshm_config *cfg);
+
+/* Function to destroy the TransportShm module. */
+int transportshm_destroy(void);
+
+/* Get the default parameters for the NotifyShmDriver. */
+void transportshm_params_init(struct transportshm_params *params);
+
+/* Create an instance of the TransportShm. */
+void *transportshm_create(u16 proc_id,
+ const struct transportshm_params *params);
+
+/* Delete an instance of the TransportShm. */
+int transportshm_delete(void **handle_ptr);
+
+/* Open a created TransportShm instance by address */
+int transportshm_open_by_addr(void *shared_addr, void **handle_ptr);
+
+/* Close an opened instance */
+int transportshm_close(void **handle_ptr);
+
+/* Get the shared memory requirements for the TransportShm. */
+u32 transportshm_shared_mem_req(const struct transportshm_params *params);
+
+/* Set the asynchronous error function for the transport module */
+void transportshm_set_err_fxn(void (*err_fxn)(enum transportshm_reason reason,
+ void *handle,
+ void *msg,
+ u32 info));
+
+
+/* =============================================================================
+ * APIs called internally by TransportShm module.
+ * =============================================================================
+ */
+/* Put msg to remote list */
+int transportshm_put(void *handle, void *msg);
+
+/* Control Function */
+int transportshm_control(void *handle, u32 cmd, u32 *cmd_arg);
+
+/* Get current status of the TransportShm */
+enum transportshm_status transportshm_get_status(void *handle);
+
+#endif /* _TRANSPORTSHM_H_ */