summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bd4a635)
raw | patch | inline | side by side (parent: bd4a635)
author | vwan@ti.com <vwan@ti.com> | |
Wed, 4 Jun 2014 16:30:34 +0000 (09:30 -0700) | ||
committer | Robert 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>
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>
diff --git a/ipc-qnx.mak b/ipc-qnx.mak
index 9025702023596a711115a193f831726ef0ed729f..ad18e546ebca9140cb1556b3f95e90dbeb849d6d 100644 (file)
--- a/ipc-qnx.mak
+++ b/ipc-qnx.mak
@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 ..."
diff --git a/products.mak b/products.mak
index 33fbdcea07676f4f6b423271f8e6c34954ac2705..757935597d407e64fd75714815c9fce45d0f4b9e 100644 (file)
--- a/products.mak
+++ b/products.mak
#
QNX_INSTALL_DIR =
+# Optional: Any additional compile options
+#
+QNX_CFLAGS =
#################### IPC Bios ####################
diff --git a/qnx/Makefile b/qnx/Makefile
index 5ff806c198f73f25d2f1f9db164e4c81f9c34f13..59fdf66f69f654362fd75b1bc85cdf6213cb0175 100644 (file)
--- a/qnx/Makefile
+++ b/qnx/Makefile
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) \
diff --git a/qnx/src/ipc3x_dev/ti/syslink/build/Qnx/lib/common.mk b/qnx/src/ipc3x_dev/ti/syslink/build/Qnx/lib/common.mk
index a19b51b32271518c6ebf945223f6c2356341473c..38ebfa34bb562d258d1bce726e01b599c23d2aec 100644 (file)
#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
diff --git a/qnx/src/ipc3x_dev/ti/syslink/build/Qnx/resmgr/common.mk b/qnx/src/ipc3x_dev/ti/syslink/build/Qnx/resmgr/common.mk
index bbc467d145891d829305878eff591eebe59298e8..5b34d2511e5cf532353b0842000fe6ebfd862774 100644 (file)
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
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/omap5430/ipu/ipu_pm.c b/qnx/src/ipc3x_dev/ti/syslink/family/omap5430/ipu/ipu_pm.c
index 9ff332c09bcf119a6511369ffaf6f671b32c66a4..9c3e2bf8df14770e91042a94b62eb52215820171 100644 (file)
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
GPT6ClkCtrl = NULL;
}
-#ifdef BENELLI_WATCHDOG_TIMER
+#ifndef IPC_DISABLE_WATCHDOG
/* Interrupt clear function*/
static Bool ipu_pm_clr_gptimer_interrupt(Ptr fxnArgs)
}
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);
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);
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);
}
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);
int ipu_pm_attach(int proc_id)
{
int retval = EOK;
-#ifdef BENELLI_WATCHDOG_TIMER
+#ifndef IPC_DISABLE_WATCHDOG
OsalIsr_Params isrParams;
#endif
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;
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;
}
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;
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);
#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;
}
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;
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;
diff --git a/qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/Ipc.c b/qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/Ipc.c
index 08010f7a7f0facdb107c937237af4e1c492ea6f0..d6998c0e386906c5f561000fb66d495961e0b5d7 100644 (file)
}
#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) {
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