summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorAngela Stegmaier <angelabaker@ti.com>2010-06-07 17:03:23 -0500
committerHari Kanigeri <h-kanigeri2@ti.com>2010-07-09 17:58:42 -0500
commit11c5fd5b2d2c107f73215fd512d4b2414b9fce4b (patch)
treef5d26a3182968a7f8cc35dff54adbfd3a34c3fb3 /arch/arm
parentd28137ac1f2b7d70e10977b49b0d4c14a32e812c (diff)
SYSLINK: ipc - Make syslink loadable modules for SysLink 2.0
In order to make SysLink into loadable/unloadable modules, the notify, notify_ducatidriver, and syslink_ipc modules were combined into one module. This needed to be done because of the circular dependencies that exist between the three modules. Also, the platform_mem file had to be moved to its own module. There are corresponding user-space changes needed with this patch. Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/plat-omap/include/syslink/drv_notify.h43
-rw-r--r--arch/arm/plat-omap/include/syslink/ipc_ioctl.h9
-rw-r--r--arch/arm/plat-omap/include/syslink/notify_ioctl.h98
3 files changed, 107 insertions, 43 deletions
diff --git a/arch/arm/plat-omap/include/syslink/drv_notify.h b/arch/arm/plat-omap/include/syslink/drv_notify.h
new file mode 100644
index 000000000000..2f386170e311
--- /dev/null
+++ b/arch/arm/plat-omap/include/syslink/drv_notify.h
@@ -0,0 +1,43 @@
+/*
+ * drv_notify.h
+ *
+ * Notify driver support for OMAP Processors.
+ *
+ * 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.
+ */
+
+
+#if !defined _DRV_NOTIFY_H_
+#define _DRV_NOTIFY_H_
+
+
+/* Module includes */
+#include <syslink/notify_driverdefs.h>
+#include <syslink/_notify.h>
+
+
+/* read function for of Notify driver.*/
+int notify_drv_read(struct file *filp, char *dst, size_t size,
+ loff_t *offset);
+
+/* Linux driver function to map memory regions to user space. */
+int notify_drv_mmap(struct file *filp, struct vm_area_struct *vma);
+
+/* ioctl function for of Linux Notify driver.*/
+int notify_drv_ioctl(struct inode *inode, struct file *filp, u32 cmd,
+ unsigned long args);
+
+void _notify_drv_setup(void);
+
+void _notify_drv_destroy(void);
+
+
+#endif /* !defined (_DRV_NOTIFY_H_) */
diff --git a/arch/arm/plat-omap/include/syslink/ipc_ioctl.h b/arch/arm/plat-omap/include/syslink/ipc_ioctl.h
index 9e78978d6e88..6c16a3d22e12 100644
--- a/arch/arm/plat-omap/include/syslink/ipc_ioctl.h
+++ b/arch/arm/plat-omap/include/syslink/ipc_ioctl.h
@@ -37,7 +37,8 @@ enum ipc_command_count {
MESSAGEQ_CMD_NOS = 18,
IPC_CMD_NOS = 5,
SYSMEMMGR_CMD_NOS = 6,
- HEAPMEMMP_CMD_NOS = 15
+ HEAPMEMMP_CMD_NOS = 15,
+ NOTIFY_CMD_NOS = 18
};
enum ipc_command_ranges {
@@ -79,7 +80,11 @@ enum ipc_command_ranges {
HEAPMEMMP_BASE_CMD = 150,
HEAPMEMMP_END_CMD = (HEAPMEMMP_BASE_CMD + \
- HEAPMEMMP_CMD_NOS - 1)
+ HEAPMEMMP_CMD_NOS - 1),
+
+ NOTIFY_BASE_CMD = 170,
+ NOTIFY_END_CMD = (NOTIFY_BASE_CMD + \
+ NOTIFY_CMD_NOS - 1)
};
int ipc_ioc_router(u32 cmd, ulong arg);
diff --git a/arch/arm/plat-omap/include/syslink/notify_ioctl.h b/arch/arm/plat-omap/include/syslink/notify_ioctl.h
index ad36e97c56fd..9d1dcadd4ba3 100644
--- a/arch/arm/plat-omap/include/syslink/notify_ioctl.h
+++ b/arch/arm/plat-omap/include/syslink/notify_ioctl.h
@@ -25,103 +25,119 @@
#include <syslink/host_os.h>
/* Module headers */
+#include <ipc_ioctl.h>
#include <syslink/notify.h>
#include <syslink/notify_ducatidriver.h>
#include <syslink/notifydefs.h>
-/* Base command ID for Notify */
-#define NOTIFYCMDBASE (0xE0)
-
-/* Base command ID for Notify */
-#define NOTIFY_BASE_CMD (0x170)
+enum CMD_NOTIFY {
+ NOTIFY_GETCONFIG = NOTIFY_BASE_CMD,
+ NOTIFY_SETUP,
+ NOTIFY_DESTROY,
+ NOTIFY_REGISTEREVENT,
+ NOTIFY_UNREGISTEREVENT,
+ NOTIFY_SENDEVENT,
+ NOTIFY_DISABLE,
+ NOTIFY_RESTORE,
+ NOTIFY_DISABLEEVENT,
+ NOTIFY_ENABLEEVENT,
+ NOTIFY_ATTACH,
+ NOTIFY_DETACH,
+ NOTIFY_THREADATTACH,
+ NOTIFY_THREADDETACH,
+ NOTIFY_ISREGISTERED,
+ NOTIFY_SHAREDMEMREQ,
+ NOTIFY_REGISTEREVENTSINGLE,
+ NOTIFY_UNREGISTEREVENTSINGLE
+};
/* Command for notify_get_config */
-#define CMD_NOTIFY_GETCONFIG _IOWR(NOTIFYCMDBASE, \
- NOTIFY_BASE_CMD + 1u, \
+#define CMD_NOTIFY_GETCONFIG _IOWR(IPC_IOC_MAGIC, \
+ NOTIFY_GETCONFIG, \
struct notify_cmd_args_get_config)
/* Command for notify_setup */
-#define CMD_NOTIFY_SETUP _IOWR(NOTIFYCMDBASE, \
- NOTIFY_BASE_CMD + 2u, \
+#define CMD_NOTIFY_SETUP _IOWR(IPC_IOC_MAGIC, \
+ NOTIFY_SETUP, \
struct notify_cmd_args_setup)
/* Command for notify_destroy */
-#define CMD_NOTIFY_DESTROY _IOWR(NOTIFYCMDBASE, \
- NOTIFY_BASE_CMD + 3u, \
+#define CMD_NOTIFY_DESTROY _IOWR(IPC_IOC_MAGIC, \
+ NOTIFY_DESTROY, \
struct notify_cmd_args_destroy)
/* Command for notify_register_event */
-#define CMD_NOTIFY_REGISTEREVENT _IOWR(NOTIFYCMDBASE, \
- NOTIFY_BASE_CMD + 4u, \
+#define CMD_NOTIFY_REGISTEREVENT _IOWR(IPC_IOC_MAGIC, \
+ NOTIFY_REGISTEREVENT, \
struct notify_cmd_args_register_event)
/* Command for notify_unregister_event */
-#define CMD_NOTIFY_UNREGISTEREVENT _IOWR(NOTIFYCMDBASE, \
- NOTIFY_BASE_CMD + 5u, \
+#define CMD_NOTIFY_UNREGISTEREVENT _IOWR(IPC_IOC_MAGIC, \
+ NOTIFY_UNREGISTEREVENT, \
struct notify_cmd_args_unregister_event)
/* Command for notify_send_event */
-#define CMD_NOTIFY_SENDEVENT _IOWR(NOTIFYCMDBASE, \
- NOTIFY_BASE_CMD + 6u, \
+#define CMD_NOTIFY_SENDEVENT _IOWR(IPC_IOC_MAGIC, \
+ NOTIFY_SENDEVENT, \
struct notify_cmd_args_send_event)
/* Command for notify_disable */
-#define CMD_NOTIFY_DISABLE _IOWR(NOTIFYCMDBASE, \
- NOTIFY_BASE_CMD + 7u, \
+#define CMD_NOTIFY_DISABLE _IOWR(IPC_IOC_MAGIC, \
+ NOTIFY_DISABLE, \
struct notify_cmd_args_disable)
/* Command for notify_restore */
-#define CMD_NOTIFY_RESTORE _IOWR(NOTIFYCMDBASE, \
- NOTIFY_BASE_CMD + 8u, \
+#define CMD_NOTIFY_RESTORE _IOWR(IPC_IOC_MAGIC, \
+ NOTIFY_RESTORE, \
struct notify_cmd_args_restore)
/* Command for notify_disable_event */
-#define CMD_NOTIFY_DISABLEEVENT _IOWR(NOTIFYCMDBASE, \
- NOTIFY_BASE_CMD + 9u, \
+#define CMD_NOTIFY_DISABLEEVENT _IOWR(IPC_IOC_MAGIC, \
+ NOTIFY_DISABLEEVENT, \
struct notify_cmd_args_disable_event)
/* Command for notify_enable_event */
-#define CMD_NOTIFY_ENABLEEVENT _IOWR(NOTIFYCMDBASE, \
- NOTIFY_BASE_CMD + 10u, \
+#define CMD_NOTIFY_ENABLEEVENT _IOWR(IPC_IOC_MAGIC, \
+ NOTIFY_ENABLEEVENT, \
struct notify_cmd_args_enable_event)
/* Command for notify_attach */
-#define CMD_NOTIFY_ATTACH _IOWR(NOTIFYCMDBASE, \
- NOTIFY_BASE_CMD + 11u, \
+#define CMD_NOTIFY_ATTACH _IOWR(IPC_IOC_MAGIC, \
+ NOTIFY_ATTACH, \
struct notify_cmd_args_attach)
/* Command for notify_detach */
-#define CMD_NOTIFY_DETACH _IOWR(NOTIFYCMDBASE, \
- NOTIFY_BASE_CMD + 12u, \
+#define CMD_NOTIFY_DETACH _IOWR(IPC_IOC_MAGIC, \
+ NOTIFY_DETACH, \
struct notify_cmd_args_detach)
/* Command for notify_thread_attach */
-#define CMD_NOTIFY_THREADATTACH _IOWR(NOTIFYCMDBASE, \
- NOTIFY_BASE_CMD + 13u, \
+#define CMD_NOTIFY_THREADATTACH _IOWR(IPC_IOC_MAGIC, \
+ NOTIFY_THREADATTACH, \
struct notify_cmd_args)
/* Command for notify_thread_detach */
-#define CMD_NOTIFY_THREADDETACH _IOWR(NOTIFYCMDBASE, \
- NOTIFY_BASE_CMD + 14u, \
+#define CMD_NOTIFY_THREADDETACH _IOWR(IPC_IOC_MAGIC, \
+ NOTIFY_THREADDETACH, \
struct notify_cmd_args)
/* Command for notify_is_registered */
-#define CMD_NOTIFY_ISREGISTERED _IOWR(NOTIFYCMDBASE, \
- NOTIFY_BASE_CMD + 15u, \
+#define CMD_NOTIFY_ISREGISTERED _IOWR(IPC_IOC_MAGIC, \
+ NOTIFY_ISREGISTERED, \
struct notify_cmd_args_is_registered)
/* Command for notify_shared_mem_req */
-#define CMD_NOTIFY_SHAREDMEMREQ _IOWR(NOTIFYCMDBASE, \
- NOTIFY_BASE_CMD + 16u, \
+#define CMD_NOTIFY_SHAREDMEMREQ _IOWR(IPC_IOC_MAGIC, \
+ NOTIFY_SHAREDMEMREQ, \
struct notify_cmd_args_shared_mem_req)
/* Command for notify_register_event_single */
-#define CMD_NOTIFY_REGISTEREVENTSINGLE _IOWR(NOTIFYCMDBASE, \
- NOTIFY_BASE_CMD + 17u, \
+#define CMD_NOTIFY_REGISTEREVENTSINGLE _IOWR(IPC_IOC_MAGIC, \
+ NOTIFY_REGISTEREVENTSINGLE, \
struct notify_cmd_args_register_event)
/* Command for notify_unregister_event_single */
-#define CMD_NOTIFY_UNREGISTEREVENTSINGLE _IOWR(NOTIFYCMDBASE, \
- NOTIFY_BASE_CMD + 18u, \
+#define CMD_NOTIFY_UNREGISTEREVENTSINGLE _IOWR(IPC_IOC_MAGIC, \
+ NOTIFY_UNREGISTEREVENTSINGLE, \
struct notify_cmd_args_unregister_event)