]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/commitdiff
Add option IPC_DISABLE_WATCHDOG to prevent plug of watchdog interrupt handlers 3.22.01.06_eng
authorvwan@ti.com <vwan@ti.com>
Wed, 4 Jun 2014 16:30:34 +0000 (09:30 -0700)
committerRobert Tivy <rtivy@ti.com>
Wed, 4 Jun 2014 16:57:43 +0000 (09:57 -0700)
This commit adds a compile option, IPC_DISABLE_WATCHDOG, that allows non-deh
users in need of GP timers to prevent watchdog interrupt handlers to be
plugged on the host in QNX. This option can be specified via the variable
QNX_CFLAGS in products.mak.

Signed-off-by: VW <vwan@ti.com>
ipc-qnx.mak
products.mak
qnx/Makefile
qnx/src/ipc3x_dev/ti/syslink/build/Qnx/lib/common.mk
qnx/src/ipc3x_dev/ti/syslink/build/Qnx/resmgr/common.mk
qnx/src/ipc3x_dev/ti/syslink/family/omap5430/ipu/ipu_pm.c
qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/Ipc.c

index 9025702023596a711115a193f831726ef0ed729f..ad18e546ebca9140cb1556b3f95e90dbeb849d6d 100644 (file)
@@ -57,7 +57,8 @@ all: .qnx
        @echo "building Qnx user libraries for \"$(PLATFORM)\" platform..."
        @make -C qnx \
                 IPC_REPO=`pwd` \
-                PLATFORM=$(PLATFORM)
+                PLATFORM=$(PLATFORM) \
+                QNX_CFLAGS=$(QNX_CFLAGS)
 
 clean:
        @echo "cleaning Qnx user libraries ..."
index 33fbdcea07676f4f6b423271f8e6c34954ac2705..757935597d407e64fd75714815c9fce45d0f4b9e 100644 (file)
@@ -82,6 +82,9 @@ CMEM_INSTALL_DIR =
 #
 QNX_INSTALL_DIR =
 
+# Optional: Any additional compile options
+#
+QNX_CFLAGS =
 
 #################### IPC Bios ####################
 
index 5ff806c198f73f25d2f1f9db164e4c81f9c34f13..59fdf66f69f654362fd75b1bc85cdf6213cb0175 100644 (file)
@@ -54,7 +54,7 @@ tests: libs
 
 ipc3x_dev: utils
        @cd src/ipc3x_dev; \
-            make SYSLINK_PLATFORM=$(SYSLINK_PLATFORM) SMP=1
+            make SYSLINK_PLATFORM=$(SYSLINK_PLATFORM) SMP=1 QNX_CFLAGS=$(QNX_CFLAGS)
 
 install:
        @cd src/ipc3x_dev; make SYSLINK_PLATFORM=$(SYSLINK_PLATFORM) \
index a19b51b32271518c6ebf945223f6c2356341473c..38ebfa34bb562d258d1bce726e01b599c23d2aec 100644 (file)
@@ -60,7 +60,7 @@ EXTRA_SRCVPATH+=$(SYSLINK_ROOT)/ti/syslink/ipc/hlos/usr \
 
 #Using the default build rules TODO: to selective pick and choose the compiler/linker/archiver & build rules
 include $(MKFILES_ROOT)/qtargets.mk
-CCOPTS += -DSYSLINK_BUILDOS_QNX -DSYSLINK_BUILD_DEBUG
+CCOPTS += -DSYSLINK_BUILDOS_QNX -DSYSLINK_BUILD_DEBUG $(QNX_CFLAGS)
 ifeq ("$(SYSLINK_DEBUG)", "1")
 #enable debug build
 CCOPTS += -g -O0
index bbc467d145891d829305878eff591eebe59298e8..5b34d2511e5cf532353b0842000fe6ebfd862774 100644 (file)
@@ -41,7 +41,7 @@ PINFO DESCRIPTION=IPC Resource Manager
 endef
 NAME=ipc
 
-CCOPTS += -DSYSLINK_BUILDOS_QNX -DSYSLINK_BUILD_DEBUG -DSYSLINK_BUILD_HLOS
+CCOPTS += -DSYSLINK_BUILDOS_QNX -DSYSLINK_BUILD_DEBUG -DSYSLINK_BUILD_HLOS $(QNX_CFLAGS)
 
 ifeq ("$(SYSLINK_DEBUG)", "1")
 #enable debug build
index 9ff332c09bcf119a6511369ffaf6f671b32c66a4..9c3e2bf8df14770e91042a94b62eb52215820171 100644 (file)
@@ -122,7 +122,6 @@ extern pthread_mutex_t syslink_hib_mutex;
 extern pthread_cond_t syslink_hib_cond;
 
 #undef BENELLI_SELF_HIBERNATION
-#define BENELLI_WATCHDOG_TIMER
 
 /* A9 state flag 0000 | 0000 Benelli internal use*/
 #define CORE0_PROC_DOWN        0x00010000
@@ -542,7 +541,7 @@ void unmap_gpt_regs(void)
     GPT6ClkCtrl = NULL;
 }
 
-#ifdef BENELLI_WATCHDOG_TIMER
+#ifndef IPC_DISABLE_WATCHDOG
 
 /* Interrupt clear function*/
 static Bool ipu_pm_clr_gptimer_interrupt(Ptr fxnArgs)
@@ -1952,7 +1951,7 @@ int ipu_pm_save_ctx(int proc_id)
         }
 
         if (core1_loaded) {
-#ifdef BENELLI_WATCHDOG_TIMER
+#ifndef IPC_DISABLE_WATCHDOG
             save_gpt_context(GPTIMER_11);
             ipu_pm_gpt_stop(GPTIMER_11);
             ipu_pm_gpt_disable(GPTIMER_11);
@@ -1970,7 +1969,7 @@ int ipu_pm_save_ctx(int proc_id)
             GT_0trace(curTrace, GT_4CLASS, "Sleep CORE1");
         }
 
-#ifdef BENELLI_WATCHDOG_TIMER
+#ifndef IPC_DISABLE_WATCHDOG
         save_gpt_context(GPTIMER_9);
         ipu_pm_gpt_stop(GPTIMER_9);
         ipu_pm_gpt_disable(GPTIMER_9);
@@ -2087,7 +2086,7 @@ int ipu_pm_restore_ctx(int proc_id)
             goto error;
         }
 
-#ifdef BENELLI_WATCHDOG_TIMER
+#ifndef IPC_DISABLE_WATCHDOG
         ipu_pm_gpt_enable(GPTIMER_9);
         restore_gpt_context(GPTIMER_9);
         ipu_pm_gpt_start(GPTIMER_9);
@@ -2108,7 +2107,7 @@ int ipu_pm_restore_ctx(int proc_id)
         }
 
         if (core1_loaded) {
-#ifdef BENELLI_WATCHDOG_TIMER
+#ifndef IPC_DISABLE_WATCHDOG
             ipu_pm_gpt_enable(GPTIMER_11);
             restore_gpt_context(GPTIMER_11);
             ipu_pm_gpt_start(GPTIMER_11);
@@ -2166,7 +2165,7 @@ int ipu_pm_restore_ctx(int proc_id)
 int ipu_pm_attach(int proc_id)
 {
     int retval = EOK;
-#ifdef BENELLI_WATCHDOG_TIMER
+#ifndef IPC_DISABLE_WATCHDOG
     OsalIsr_Params isrParams;
 #endif
 
@@ -2176,7 +2175,7 @@ int ipu_pm_attach(int proc_id)
 
     if (proc_id == MultiProc_getId(CORE0)) {
         ipu_pm_state.loaded_procs |= CORE0_LOADED;
-#ifdef BENELLI_WATCHDOG_TIMER
+#ifndef IPC_DISABLE_WATCHDOG
         ipu_pm_gpt_enable(GPTIMER_9);
         isrParams.checkAndClearFxn = ipu_pm_clr_gptimer_interrupt;
         isrParams.fxnArgs = (Ptr)GPTIMER_9;
@@ -2199,7 +2198,7 @@ int ipu_pm_attach(int proc_id)
     else if (proc_id == MultiProc_getId("CORE1")) {
 #endif
         ipu_pm_state.loaded_procs |= CORE1_LOADED;
-#ifdef BENELLI_WATCHDOG_TIMER
+#ifndef IPC_DISABLE_WATCHDOG
         ipu_pm_gpt_enable(GPTIMER_11);
         isrParams.checkAndClearFxn = ipu_pm_clr_gptimer_interrupt;
         isrParams.fxnArgs = (Ptr)GPTIMER_11;
@@ -2220,7 +2219,7 @@ int ipu_pm_attach(int proc_id)
     }
     else if (proc_id == MultiProc_getId("DSP")) {
         ipu_pm_state.loaded_procs |= DSP_LOADED;
-#ifdef BENELLI_WATCHDOG_TIMER
+#ifndef IPC_DISABLE_WATCHDOG
         ipu_pm_gpt_enable(GPTIMER_6);
         isrParams.checkAndClearFxn = ipu_pm_clr_gptimer_interrupt;
         isrParams.fxnArgs = (Ptr)GPTIMER_6;
@@ -2244,7 +2243,7 @@ int ipu_pm_attach(int proc_id)
         retval = ProcMgr_open(&ipu_pm_state.proc_handles[proc_id], proc_id);
 
     if (retval < 0) {
-#ifdef BENELLI_WATCHDOG_TIMER
+#ifndef IPC_DISABLE_WATCHDOG
         if (proc_id == MultiProc_getId(CORE0)) {
             if (ipu_pm_state.gpt9IsrObject) {
                 OsalIsr_uninstall(ipu_pm_state.gpt9IsrObject);
@@ -2303,7 +2302,7 @@ int ipu_pm_detach(int proc_id)
 #endif
 
     if (proc_id == MultiProc_getId(CORE0)) {
-#ifdef BENELLI_WATCHDOG_TIMER
+#ifndef IPC_DISABLE_WATCHDOG
         OsalIsr_uninstall(ipu_pm_state.gpt9IsrObject);
         OsalIsr_delete(&ipu_pm_state.gpt9IsrObject);
         ipu_pm_state.gpt9IsrObject = NULL;
@@ -2315,7 +2314,7 @@ int ipu_pm_detach(int proc_id)
     }
     else if (proc_id == MultiProc_getId("CORE1")) {
 #endif
-#ifdef BENELLI_WATCHDOG_TIMER
+#ifndef IPC_DISABLE_WATCHDOG
         OsalIsr_uninstall(ipu_pm_state.gpt11IsrObject);
         OsalIsr_delete(&ipu_pm_state.gpt11IsrObject);
         ipu_pm_state.gpt11IsrObject = NULL;
@@ -2325,7 +2324,7 @@ int ipu_pm_detach(int proc_id)
         ipu_pm_state.loaded_procs &= ~CORE1_LOADED;
     }
     else if (proc_id == MultiProc_getId("DSP")) {
-#ifdef BENELLI_WATCHDOG_TIMER
+#ifndef IPC_DISABLE_WATCHDOG
         OsalIsr_uninstall(ipu_pm_state.gpt6IsrObject);
         OsalIsr_delete(&ipu_pm_state.gpt6IsrObject);
         ipu_pm_state.gpt6IsrObject = NULL;
index 08010f7a7f0facdb107c937237af4e1c492ea6f0..d6998c0e386906c5f561000fb66d495961e0b5d7 100644 (file)
@@ -213,7 +213,7 @@ Int Ipc_attach (UInt16 remoteProcId)
         }
 #endif
 
-#if defined(SYSLINK_PLATFORM_VAYU)
+#if !defined(IPC_DISABLE_WATCHDOG) && defined(SYSLINK_PLATFORM_VAYU)
         if (status >= 0) {
             status = gpt_wdt_attach(remoteProcId);
             if (status < 0) {
@@ -260,7 +260,7 @@ Int Ipc_detach (UInt16 remoteProcId)
         status = ipu_pm_detach (remoteProcId);
 #endif
 
-#if defined(SYSLINK_PLATFORM_VAYU)
+#if !defined(IPC_DISABLE_WATCHDOG) && defined(SYSLINK_PLATFORM_VAYU)
         status = gpt_wdt_detach(remoteProcId);
 #endif