]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/blobdiff - qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/Ipc.c
Add support for watchdog timer interrupts on DRA7xx IPU
[ipc/ipcdev.git] / qnx / src / ipc3x_dev / ti / syslink / ipc / hlos / knl / Ipc.c
index 3723e27eee5eb081022c8036c047afc8d7a61772..8a954098f88f9d7a6ef0da6738c120e60f648607 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2008-2013, Texas Instruments Incorporated
+ *  Copyright (c) 2008-2014, Texas Instruments Incorporated
  *
  *  Redistribution and use in source and binary forms, with or without
  *  modification, are permitted provided that the following conditions
 #include <_MessageQCopy.h>
 #include <ti/ipc/MessageQCopy.h>
 
+#if defined(SYSLINK_PLATFORM_VAYU)
+#include <gptimers.h>
+#endif
+
 /*  ----------------------------------- SysLink utils Headers   */
 #include <ti/syslink/inc/_MultiProc.h>
 #include <ti/ipc/MultiProc.h>
@@ -200,7 +204,7 @@ Int Ipc_attach (UInt16 remoteProcId)
             ProcMgr_close(&procHandle);
         }
 
-#if defined(SYSLINK_USE_IPU_PM)
+#if defined(SYSLINK_USE_IPU_PM) && defined(SYSLINK_PLATFORM_OMAP5)
         if (status >= 0) {
             status = ipu_pm_attach(remoteProcId);
             if (status < 0) {
@@ -209,6 +213,15 @@ Int Ipc_attach (UInt16 remoteProcId)
         }
 #endif
 
+#if defined(SYSLINK_PLATFORM_VAYU)
+        if (status >= 0) {
+            status = gpt_wdt_attach(remoteProcId);
+            if (status < 0) {
+                MessageQCopy_detach(remoteProcId);
+            }
+        }
+#endif
+
         if (status >= 0) {
             key = Gate_enterSystem ();
             Ipc_module->procEntry[remoteProcId].isAttached++;
@@ -243,10 +256,14 @@ Int Ipc_detach (UInt16 remoteProcId)
     else {
         Gate_leaveSystem (key);
 
-#if defined(SYSLINK_USE_IPU_PM)
+#if defined(SYSLINK_USE_IPU_PM) && defined(SYSLINK_PLATFORM_OMAP5)
         status = ipu_pm_detach (remoteProcId);
 #endif
 
+#if defined(SYSLINK_PLATFORM_VAYU)
+        status = gpt_wdt_detach(remoteProcId);
+#endif
+
         status = MessageQCopy_detach (remoteProcId);
 
         key = Gate_enterSystem ();