Removes all references to OMAP4 and TI81xx devices in QNX codebase
authorvwan@ti.com <vwan@ti.com>
Sat, 23 Nov 2013 01:03:28 +0000 (17:03 -0800)
committerChris Ring <cring@ti.com>
Thu, 5 Dec 2013 23:05:24 +0000 (15:05 -0800)
This is to address SDOCM00101830.

Signed-off-by: VW <vwan@ti.com>
69 files changed:
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/build/Qnx/resmgr/syslink_main.c
qnx/src/ipc3x_dev/ti/syslink/family/common/ClockOps.c
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxdsp/Dm8168DspHal.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxdsp/Dm8168DspHalBoot.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxdsp/Dm8168DspHalReset.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxdsp/Dm8168DspPhyShmem.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxdsp/Dm8168DspProc.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxdsp/Dm8168DspPwr.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/Dm8168DucatiMmu.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/Dm8168DucatiPwr.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvideom3/Dm8168M3VideoHal.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvideom3/Dm8168M3VideoHalBoot.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvideom3/Dm8168M3VideoHalReset.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvideom3/Dm8168M3VideoPhyShmem.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvideom3/Dm8168M3VideoProc.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvpssm3/Dm8168M3DssHal.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvpssm3/Dm8168M3DssHalBoot.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvpssm3/Dm8168M3DssHalReset.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvpssm3/Dm8168M3DssPhyShmem.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvpssm3/Dm8168M3DssProc.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/common/vayu/vayuipu/VAYUIpuMmu.c
qnx/src/ipc3x_dev/ti/syslink/family/hlos/knl/ti81xx/Platform.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/hlos/knl/ti81xx/Qnx/Cache.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/hlos/knl/ti81xx/ti81xxdsp/Dm8168DspHalMmu.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/hlos/knl/ti81xx/ti81xxducati/ti81xxvideom3/Dm8168M3VideoHalMmu.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/hlos/knl/ti81xx/ti81xxducati/ti81xxvpssm3/Dm8168M3DssHalMmu.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/omap5430/ipu/ipu_pm.c
qnx/src/ipc3x_dev/ti/syslink/family/omap5430/ipu/omap5430BenelliEnabler.c
qnx/src/ipc3x_dev/ti/syslink/family/omap5430/ipu/omap5430BenelliHalReset.c
qnx/src/ipc3x_dev/ti/syslink/family/omap5430/ipu/omap5430Dmm.c
qnx/src/ipc3x_dev/ti/syslink/family/vayu/vayudsp/VAYUDspEnabler.c
qnx/src/ipc3x_dev/ti/syslink/family/vayu/vayuipu/VAYUIpuEnabler.c
qnx/src/ipc3x_dev/ti/syslink/inc/Dm8168Clock.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/_MultiProcPlat.h
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168DspHal.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168DspHalBoot.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168DspHalMmu.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168DspHalReset.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168DspPhyShmem.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168DspProc.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168DspPwr.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168DucatiPwr.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168IpcInt.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168M3DssHal.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168M3DssHalBoot.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168M3DssHalMmu.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168M3DssHalReset.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168M3DssPhyShmem.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168M3DssProc.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168M3VideoHal.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168M3VideoHalBoot.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168M3VideoHalMmu.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168M3VideoHalReset.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168M3VideoPhyShmem.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Dm8168M3VideoProc.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Linux/Dm8168DucatiMmu.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OMAP4430Dmm.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/_Dm8168DspProc.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/_Dm8168DspPwr.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/_Dm8168DucatiPwr.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/_Dm8168IpcInt.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/_Dm8168M3DssProc.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/_Dm8168M3VideoProc.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/_VAYUDspPwr.h
qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/arch/omap5430/Omap5430IpcInt.c
qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/arch/ti81xx/Dm8168IpcInt.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/samples/hlos/MessageQCopy/usr/common.mk

index 2e8daa843ccb5dedc6036185ab4ee0e7c3f7a3cb..a19b51b32271518c6ebf945223f6c2356341473c 100644 (file)
@@ -24,14 +24,6 @@ SYSLINK_BUILD_DEBUG := 0
 #To override the TRACE flag
 SYSLINK_TRACE_ENABLE := 0
 
-ifeq ("$(SYSLINK_PLATFORM)", "")
-#default value
-SYSLINK_PLATFORM=omap4430
-endif # ifeq ("$(SYSLINK_PLATFORM)", "")
-
-ifeq ("$(SYSLINK_PLATFORM)", "omap4430")
-CCOPTS += -DSYSLINK_PLATFORM_OMAP4430
-endif # ifeq ("$(SYSLINK_PLATFORM)", "omap4430")
 ifeq ("$(SYSLINK_PLATFORM)", "omap5430")
 CCOPTS += -DSYSLINK_PLATFORM_OMAP5430
 endif # ifeq ("$(SYSLINK_PLATFORM)", "omap5430")
index 3adc25bcbc7ec0e4feb76de7a65a99f3d20339d2..0de8f9e8bf109ae6b0cff40d2b320e098621999f 100644 (file)
@@ -50,15 +50,6 @@ ifeq ("$(SYSLINK_DEBUG)", "1")
 CCOPTS += -g -O0
 endif # ifeq ("$(SYSLINK_DEBUG)", "1")
 
-ifeq ("$(SYSLINK_PLATFORM)", "")
-#default value
-SYSLINK_PLATFORM=omap4430
-endif # ifeq ("$(SYSLINK_PLATFORM)", "")
-
-ifeq ("$(SYSLINK_PLATFORM)", "omap4430")
-CCOPTS += -DSYSLINK_PLATFORM_OMAP4430 -DARM_TARGET -DC60_TARGET -DSYSLINK_USE_IPU_PM
-endif # ifeq ("$(SYSLINK_PLATFORM)", "omap4430")
-
 ifeq ("$(SYSLINK_PLATFORM)", "omap5430")
 ifeq ("$(VIRTIO)", "true")
 CCOPTS += -DOMAP5430_VIRTIO
@@ -69,19 +60,6 @@ endif # ifeq ("$(SMP)", "1")
 CCOPTS += -DSYSLINK_PLATFORM_OMAP5430 -DARM_TARGET -DC60_TARGET -DSYSLINK_USE_IPU_PM
 endif # ifeq ("$(SYSLINK_PLATFORM)", "omap5430")
 
-ifeq ("$(SYSLINK_PLATFORM)", "ti81xx")
-CCOPTS += -DSYSLINK_PLATFORM_TI81XX -DARM_TARGET -DC60_TARGET
-
-ifeq ("$(SYSLINK_VARIANT)", "TI814X")
-CCOPTS += -DSYSLINK_VARIANT_TI814X
-endif
-
-ifeq ("$(SYSLINK_VARIANT)", "TI811X")
-CCOPTS += -DSYSLINK_VARIANT_TI811X
-endif
-
-endif # ifeq ("$(SYSLINK_PLATFORM)", "ti81xx")
-
 ifeq ("$(SYSLINK_PLATFORM)", "vayu")
 ifeq ("$(VIRTIO)", "true")
 CCOPTS += -DVAYU_VIRTIO
@@ -152,11 +130,6 @@ EXTRA_SRCVPATH+=$(SYSLINK_ROOT)/ti/syslink/procMgr/hlos/knl        \
                $(SYSLINK_ROOT)/ti/syslink/rpmsg-resmgr/hlos/knl/$(SYSLINK_BUILDOS)/family/$(SYSLINK_PLATFORM)  \
                $(SYSLINK_ROOT)/ti/syslink/rpmsg-resmgr/hlos/knl/$(SYSLINK_BUILDOS)
 
-ifeq ("$(SYSLINK_PLATFORM)", "omap4430")
-EXTRA_SRCVPATH+=$(SYSLINK_ROOT)/ti/syslink/family/$(SYSLINK_PLATFORM)  \
-               $(SYSLINK_ROOT)/ti/syslink/family/$(SYSLINK_PLATFORM)/ipu
-endif
-
 ifeq ("$(SYSLINK_PLATFORM)", "omap5430")
 EXTRA_SRCVPATH+=$(SYSLINK_ROOT)/ti/syslink/family/$(SYSLINK_PLATFORM)  \
                $(SYSLINK_ROOT)/ti/syslink/family/$(SYSLINK_PLATFORM)/ipu
@@ -164,19 +137,6 @@ EXTRA_SRCVPATH+=$(SYSLINK_ROOT)/ti/syslink/family/$(SYSLINK_PLATFORM)      \
 EXCLUDE_OBJS = GateMP_daemon.o gatemp_devctl.o
 endif
 
-ifeq ("$(SYSLINK_PLATFORM)", "ti81xx")
-EXTRA_SRCVPATH+=$(SYSLINK_ROOT)/ti/syslink/family/common       \
-               $(SYSLINK_ROOT)/ti/syslink/family/common/$(SYSLINK_PLATFORM)/$(SYSLINK_PLATFORM)dsp     \
-               $(SYSLINK_ROOT)/ti/syslink/family/common/$(SYSLINK_PLATFORM)/$(SYSLINK_PLATFORM)ducati  \
-               $(SYSLINK_ROOT)/ti/syslink/family/common/$(SYSLINK_PLATFORM)/$(SYSLINK_PLATFORM)ducati/$(SYSLINK_PLATFORM)videom3       \
-               $(SYSLINK_ROOT)/ti/syslink/family/common/$(SYSLINK_PLATFORM)/$(SYSLINK_PLATFORM)ducati/$(SYSLINK_PLATFORM)vpssm3        \
-               $(SYSLINK_ROOT)/ti/syslink/family/hlos/knl/$(SYSLINK_PLATFORM)  \
-               $(SYSLINK_ROOT)/ti/syslink/family/hlos/knl/$(SYSLINK_PLATFORM)/Qnx      \
-               $(SYSLINK_ROOT)/ti/syslink/family/hlos/knl/$(SYSLINK_PLATFORM)/$(SYSLINK_PLATFORM)dsp   \
-               $(SYSLINK_ROOT)/ti/syslink/family/hlos/knl/$(SYSLINK_PLATFORM)/$(SYSLINK_PLATFORM)ducati/$(SYSLINK_PLATFORM)videom3     \
-               $(SYSLINK_ROOT)/ti/syslink/family/hlos/knl/$(SYSLINK_PLATFORM)/$(SYSLINK_PLATFORM)ducati/$(SYSLINK_PLATFORM)vpssm3
-endif
-
 ifeq ("$(SYSLINK_PLATFORM)", "vayu")
 EXTRA_SRCVPATH+=$(SYSLINK_ROOT)/ti/syslink/family/common       \
                $(SYSLINK_ROOT)/ti/syslink/family/common/$(SYSLINK_PLATFORM)/$(SYSLINK_PLATFORM)dsp     \
@@ -205,7 +165,3 @@ else
 EXTRA_LIBVPATH += $(IPC_REPO)/qnx/src/utils/arm/a.le.v7
 LIBS += utils
 endif # ifeq ("$(SYSLINK_DEBUG)", "1")
-
-ifeq ("$(SYSLINK_PLATFORM)", "omap4430")
-LIBS += powman camdrv login slog2
-endif
index 182d1873ec37000fe49ac07875a47329852b52bd..aeda4ebedd31f0415cb51aa923e647b79550338d 100644 (file)
@@ -57,9 +57,6 @@
 #include <sys/siginfo.h>
 #include <signal.h>
 #include <stdbool.h>
-#if defined(SYSLINK_PLATFORM_OMAP4430)
-#include <login.h>
-#endif
 
 #include <IpcKnl.h>
 
@@ -73,7 +70,7 @@
 #include <_GateMP_daemon.h>
 #include <OsalSemaphore.h>
 #include <ti/syslink/utils/OsalPrint.h>
-#if defined(SYSLINK_PLATFORM_OMAP4430) || defined(SYSLINK_PLATFORM_OMAP5430)
+#if defined(SYSLINK_PLATFORM_OMAP5430)
 #include <_ipu_pm.h>
 #endif
 #include <ti/syslink/utils/Trace.h>
@@ -99,7 +96,7 @@ static bool gatempEnabled = false;
 
 // Syslink hibernation global variables
 Bool syslink_hib_enable = TRUE;
-#if !defined(SYSLINK_PLATFORM_OMAP4430) && !defined(SYSLINK_PLATFORM_OMAP5430)
+#if !defined(SYSLINK_PLATFORM_OMAP5430)
 #define PM_HIB_DEFAULT_TIME 5000
 #endif
 uint32_t syslink_hib_timeout = PM_HIB_DEFAULT_TIME;
@@ -534,18 +531,6 @@ Int syslink_error_cb (UInt16 procId, ProcMgr_Handle handle,
     return ret;
 }
 
-#if defined(SYSLINK_PLATFORM_OMAP4430)
-#define SYSLINK_CARVEOUT
-#ifdef SYSLINK_CARVEOUT
-#define IPU_MEM_SIZE  49 * 1024 * 1024
-#define IPU_MEM_PHYS  0x97F00000
-#else
-#define IPU_MEM_SIZE  104 * 1024 * 1024
-#define IPU_MEM_ALIGN 0x1000000
-#endif
-#endif
-
-
 /*
  * Initialize the syslink ipc
  *
@@ -556,75 +541,12 @@ Int syslink_error_cb (UInt16 procId, ProcMgr_Handle handle,
 int init_ipc(syslink_dev_t * dev, syslink_firmware_info * firmware, bool recover)
 {
     int status = 0;
-#if defined(SYSLINK_PLATFORM_OMAP4430)
-    int32_t ret = 0;
-    uint32_t len = 0;
-#ifndef SYSLINK_CARVEOUT
-    int64_t pa = 0;
-    void * da;
-#endif
-    int64_t paddr = 0;
-#endif
     Ipc_Config iCfg;
     OsalThread_Params threadParams;
     ProcMgr_AttachParams attachParams;
     UInt16 procId;
     int i;
 
-#if defined(SYSLINK_PLATFORM_OMAP4430)
-    /* Map a contiguous memory section for ipu - currently hard-coded */
-    if (!recover) {
-#ifdef SYSLINK_CARVEOUT
-        dev->da_virt = mmap64(NULL, IPU_MEM_SIZE,
-                              PROT_NOCACHE | PROT_READ | PROT_WRITE,
-                              MAP_PHYS,
-                              NOFD,
-                              IPU_MEM_PHYS);
-#else
-        dev->da_virt = mmap64(NULL, IPU_MEM_SIZE + IPU_MEM_ALIGN,
-                              PROT_NOCACHE | PROT_READ | PROT_WRITE,
-                              MAP_ANON | MAP_PHYS | MAP_SHARED,
-                              NOFD,
-                              0);
-
-#endif
-
-        if (dev->da_virt == MAP_FAILED) {
-            status = ENOMEM;
-            goto exit;
-        }
-    }
-
-    if (status >= 0) {
-#ifdef SYSLINK_CARVEOUT
-        /* Make sure the memory is contiguous */
-        ret = mem_offset64(dev->da_virt, NOFD, IPU_MEM_SIZE, &paddr, &len);
-        if (ret)
-            status = ret;
-        else if (len != IPU_MEM_SIZE)
-            status = ENOMEM;
-#else
-        /* Make sure the memory is contiguous */
-        ret = mem_offset64(dev->da_virt, NOFD, IPU_MEM_SIZE + IPU_MEM_ALIGN,
-                           &paddr, &len);
-        if (ret)
-            status = ret;
-        else if (len != IPU_MEM_SIZE + IPU_MEM_ALIGN)
-            status = ENOMEM;
-        else {
-            pa = (paddr + IPU_MEM_ALIGN - 1) / IPU_MEM_ALIGN * IPU_MEM_ALIGN;
-            if ((pa - paddr) < 0x900000)
-                pa += 0x900000;
-            else
-                pa -= 0x700000;
-            da = dev->da_virt + (pa - paddr);
-        }
-#endif
-        if (status != 0)
-            goto memoryos_fail;
-    }
-#endif
-
     if (status >= 0) {
         if (!recover) {
             /* Set up the MemoryOS module */
@@ -634,15 +556,6 @@ int init_ipc(syslink_dev_t * dev, syslink_firmware_info * firmware, bool recover
         }
 
         /* Setup IPC and platform-specific items */
-#if defined(SYSLINK_PLATFORM_OMAP4430)
-#ifdef SYSLINK_CARVEOUT
-        iCfg.vAddr = (uint32_t)dev->da_virt;
-        iCfg.pAddr = (uint32_t)paddr;
-#else
-        iCfg.vAddr = (uint32_t)da;
-        iCfg.pAddr = (uint32_t)pa;
-#endif
-#endif
         status = Ipc_setup (&iCfg);
         if (status < 0)
             goto ipcsetup_fail;
@@ -831,14 +744,6 @@ osalthreadcreate_fail:
 ipcsetup_fail:
     MemoryOS_destroy();
 memoryos_fail:
-#if defined(SYSLINK_PLATFORM_OMAP4430)
-    if (dev->da_virt != MAP_FAILED)
-#ifdef SYSLINK_CARVEOUT
-        munmap(dev->da_virt, IPU_MEM_SIZE);
-#else
-        munmap(dev->da_virt, IPU_MEM_SIZE + IPU_MEM_ALIGN);
-#endif
-#endif
 exit:
     return status;
 }
@@ -935,18 +840,6 @@ int deinit_ipc(syslink_dev_t * dev, bool recover)
         if (status < 0) {
             printf("MemoryOS_destroy() failed 0x%x", status);
         }
-#if defined(SYSLINK_PLATFORM_OMAP4430)
-        if (dev->da_virt != MAP_FAILED) {
-#ifdef SYSLINK_CARVEOUT
-            status = munmap(dev->da_virt, IPU_MEM_SIZE);
-#else
-            status = munmap(dev->da_virt, IPU_MEM_SIZE + IPU_MEM_ALIGN);
-#endif
-            if (status < 0) {
-               printf("munmap failed %d", errno);
-            }
-        }
-#endif
     }
 
     return status;
index dab0536bf2b7ecd0830deb0a00c43768abf6b3ed..cb449f57b4bbca6def26e4b2249c1e04cf2bd02c 100644 (file)
@@ -6,7 +6,7 @@
  *
  *  ============================================================================
  *
- *  Copyright (c) 2008-2012, Texas Instruments Incorporated
+ *  Copyright (c) 2008-2013, Texas Instruments Incorporated
  *
  *  Redistribution and use in source and binary forms, with or without
  *  modification, are permitted provided that the following conditions
@@ -56,7 +56,6 @@
 #include <sys/mman.h>
 #include <hw/inout.h>
 
-#include <ti/syslink/inc/Dm8168Clock.h>
 //#include <ti/syslink/inc/ClockOps.h>
 #include <ti/syslink/utils/Trace.h>
 #include <ti/syslink/utils/String.h>
@@ -191,17 +190,12 @@ UInt32 refGptimer4fck = 0;
 UInt32 refDSP = 0;
 UInt32 refDucati = 0;
 
-/* =============================================================================
- * APIs called by DM8168VIDEOM3PROC module
- * =============================================================================
- */
 /*!
  *  @brief      Function returns the clock handle .
  *
  *  @clkHandle   clk handle returned to corresponding clk name
  *  @clkname     name of clk for which handle is to be obtained
  *
- *  @sa         DM8168CLOCK_put
  */
 Ptr
 ClockOps_get (ClockOps_Handle handle, String clkName)
@@ -246,7 +240,6 @@ ClockOps_get (ClockOps_Handle handle, String clkName)
  *  @clkHandle   clk handle returned to corresponding clk name
  *  @clkname     name of clk for which handle is to be obtained
  *
- *  @sa         DM8168CLOCK_put
  */
 Void
 ClockOps_put(ClockOps_Handle handle, Ptr clkHandle)
@@ -264,99 +257,6 @@ ClockOps_put(ClockOps_Handle handle, Ptr clkHandle)
 Int32
 ClockOps_enable(ClockOps_Handle handle, Ptr clkHandle)
 {
-#if defined(SYSLINK_PLATFORM_TI81XX)
-    switch ((UInt32)clkHandle){
-
-            case SPINBOX:
-                if (refSpinCount == 0) {
-                    /*Enable Clock to SPIN box*/
-                    prcm_enable(0, PRCM_BASE_ADDR+CM_ALWON_SPINBOX_CLKCTRL, 0 , 2, 0x0, 0x100, TRUE, FALSE);
-                    refSpinCount++;
-                }
-                else if(refSpinCount > 0) {
-                    refSpinCount++;
-                }
-                else {
-                    /* refSpinCount should not be less than zero */
-                }
-                break;
-            case MAILBOX:
-                if (refMboxCount == 0) {
-                    /*Enable Clock to mail box*/
-                    prcm_enable(0, PRCM_BASE_ADDR+CM_ALWON_MAILBOX_CLKCTRL, 0 , 2, 0x0, 0x100, TRUE, FALSE);
-                    refMboxCount++;
-                }
-                else if(refMboxCount > 0) {
-                    refMboxCount++;
-                }
-                else {
-                    /* refMboxCount should not be less than zero */
-                }
-                break;
-            case IGPTIMER4:
-                if (refGptimer4ick == 0) {
-                    prcm_enable(PRCM_BASE_ADDR+CM_ALWON_L3_SLOW_CLKSTCTRL , PRCM_BASE_ADDR+CM_ALWON_TIMER_4_CLKCTRL, 2, 2, 0x0, 0x100, TRUE, TRUE);
-                    refGptimer4ick++;
-                }
-                else if(refGptimer4ick > 0) {
-                    refGptimer4ick++;
-                }
-                else {
-                    /* refGptimer4ick should not be less than zero */
-                }
-                break;
-            case FGPTIMER4:
-                if (refGptimer4fck == 0) {
-#ifdef CLOCK_FIX
-                    uintptr_t sysclk18ClksrcPtr = REMAP(SYSCLK18_CLKSRC);
-                    uintptr_t clkselPtr = REMAP(CM_DPLL_SYSCLK18_CLKSEL);
-                    uintptr_t dmtimerClksrcPtr = REMAP(DMTIMER_CLKSRC);
-
-                    /* CLKIN32/RTCDIVIDER multiplexor */
-                    REGRDMWR(sysclk18ClksrcPtr, 0xFFFFFFFE, 0);
-
-                    /* sysclk18 */
-                    REGRDMWR(clkselPtr, 0xFFFFFFFE, 0);
-
-                    /* timer4 */
-                    REGRDMWR(dmtimerClksrcPtr, 0xFFF8FFFF, 0);
-
-                    UNMAP(sysclk18ClksrcPtr);
-                    UNMAP(clkselPtr);
-                    UNMAP(dmtimerClksrcPtr);
-#endif
-                    refGptimer4fck++;
-                }
-                else if(refGptimer4fck > 0) {
-                    refGptimer4fck++;
-                }
-                else {
-                    /* refGptimer4fck should not be less than zero */
-                }
-                break;
-            case MMU:
-                /* required config is done as a part of the case DSP */
-                break;
-            case MMUCFG:
-                /* required config is done as a part of the case DSP */
-                break;
-            case DSP:
-                if (refDSP == 0) {
-                    GEMSSClkEnable();
-                    refDSP++;
-                }
-                break;
-            case DUCATI:
-                if (refDucati == 0) {
-                    DucatiClkEnable();
-                    refDucati++;
-                }
-                break;
-            default:
-                break;
-
-            }
-#endif
     return 1;
 }
 /*!
@@ -370,71 +270,6 @@ ClockOps_enable(ClockOps_Handle handle, Ptr clkHandle)
 Void
 ClockOps_disable(ClockOps_Handle handle, Ptr clkHandle)
 {
-#if defined(SYSLINK_PLATFORM_TI81XX)
-   switch ((UInt32)clkHandle){
-
-            case SPINBOX:
-                /*disable Clock to SPIN box*/
-                if (refSpinCount == LAST_CORE) {
-                    prcm_disable_spinbox();
-                    refSpinCount = 0;
-                }
-                else if(refSpinCount > LAST_CORE) {
-                    refSpinCount--;
-                }
-                else {
-                    /* refSpinCount is less that or equal to zero */
-                }
-                break;
-            case MAILBOX:
-                /*disable Clock to MAIL box*/
-                if (refMboxCount == LAST_CORE) {
-                    prcm_disable_mailbox();
-                    refMboxCount = 0;
-                }
-                else if(refMboxCount > LAST_CORE) {
-                    refMboxCount--;
-                }
-                else {
-                    /* refMboxCount is less that or equal to zero */
-                }
-                break;
-            case IGPTIMER4:
-                if ( refGptimer4ick == LAST_CORE) {
-                    prcm_disable_gptimer4();
-                    refGptimer4ick = 0;
-                    refGptimer4fck = 0;
-                }
-                else if(refGptimer4ick > LAST_CORE) {
-                    refGptimer4ick--;
-                }
-                else {
-                    /* refGptimer4ick is less that or equal to zero */
-                }
-                break;
-            case FGPTIMER4:
-                break;
-            case MMU:
-                break;
-            case MMUCFG:
-                break;
-            case DSP:
-                if (refDSP > 0 ) {
-                    GEMSSClkDisable();
-                    refDSP = 0;
-                }
-                break;
-            case DUCATI:
-                if (refDucati > 0) {
-                    DucatiClkDisable();
-                    refDucati = 0;
-                }
-                break;
-            default:
-                break;
-
-            }
-#endif
 }
 
 /*!
@@ -469,247 +304,9 @@ ClockOps_setRate(ClockOps_Handle handle, Ptr clkHandle, ULong rate)
 
 void PLL_Clocks_Config(UInt32 Base_Address,UInt32 OSC_FREQ,UInt32 N,UInt32 M,UInt32 M2,UInt32 CLKCTRL_VAL)
 {
-#if defined(SYSLINK_PLATFORM_TI81XX)
-    UInt32 m2nval,mn2val,read_clkctrl;
-    Int32 i = 0;
-
-    uintptr_t m2ndivPtr = REMAP(Base_Address+M2NDIV);
-    uintptr_t mn2divPtr = REMAP(Base_Address+MN2DIV);
-    uintptr_t tenabledivPtr = REMAP(Base_Address+TENABLEDIV);
-    uintptr_t tenablePtr = REMAP(Base_Address+TENABLE);
-    uintptr_t clkctrlPtr = REMAP(Base_Address+CLKCTRL);
-    uintptr_t statusPtr = REMAP(Base_Address+STATUS);
-
-    m2nval = (M2<<16) | N;
-    mn2val =  M;
-
-    REGWR(m2ndivPtr, m2nval);
-    REGWR(mn2divPtr, mn2val);
-    REGWR(tenabledivPtr, 0x1);
-    REGWR(tenabledivPtr, 0x0);
-    REGWR(tenablePtr, 0x1);
-    REGWR(tenablePtr, 0x0);
-
-    read_clkctrl = REGRD(clkctrlPtr);
-
-    //configure the TINITZ(bit0) and CLKDCO BITS IF REQUIRED
-    REGWR(clkctrlPtr, ((read_clkctrl & 0xff7fe3ff) | CLKCTRL_VAL));
-
-    read_clkctrl = REGRD(clkctrlPtr);
-
-    // poll for the freq,phase lock to occur
-    while ((REGRD(statusPtr) & 0x00000600) != 0x00000600);
-
-    //wait fot the clocks to get stabized
-    for (i = 0; i <1000; i++)
-    {
-        ;
-    }
-
-    UNMAP(m2ndivPtr);
-    UNMAP(mn2divPtr);
-    UNMAP(tenabledivPtr);
-    UNMAP(tenablePtr);
-    UNMAP(clkctrlPtr);
-    UNMAP(statusPtr);
-#endif
-}
-
-#if defined(SYSLINK_PLATFORM_TI81XX)
-void prcm_enable(UInt32 clkstctrl, UInt32 clkctrl, UInt32 regVal1, UInt32 regVal2, UInt32 cmpVal1, UInt32 cmpVal2, UInt32 wait1, UInt32 wait2){
-    uintptr_t clkstctrlPtr = REMAP(PRCM_BASE_ADDR+CM_GEM_CLKSTCTRL);
-
-    if (clkstctrl != 0) {
-        uintptr_t clkstctrlArgPtr = REMAP(clkstctrl);
-
-        /*reg write using out */
-        REGWR(clkstctrlArgPtr, regVal1);
-
-        UNMAP(clkstctrlArgPtr);
-    }
-
-    if (clkstctrl == REGRD(clkstctrlPtr)) {
-        uintptr_t pwrststPtr = REMAP(PRCM_BASE_ADDR+PM_ACTIVE_PWRSTST);
-        while (REGRD(pwrststPtr)!= 0x37);    /*Check Power is ON*/
-        UNMAP(pwrststPtr);
-    }
-    UNMAP(clkstctrlPtr);
-
-    if (clkctrl != 0) {
-        /*reg write using out */
-        uintptr_t clkctrlArgPtr = REMAP(clkctrl);
-        REGWR(clkctrlArgPtr, regVal2);
-        UNMAP(clkctrlArgPtr);
-    }
-
-    if (wait1) {
-        uintptr_t clkctrlArgPtr = REMAP(clkctrl);
-        while ((REGRD(clkctrlArgPtr)&cmpVal1)!=cmpVal1);
-        UNMAP(clkctrlArgPtr);
-    }
-
-    if (wait2) {
-        uintptr_t clkstctrlArgPtr = REMAP(clkstctrl);
-        while ((REGRD(clkstctrlArgPtr)&cmpVal2)!=cmpVal2);
-        UNMAP(clkstctrlArgPtr);
-    }
-}
-
-void prcm_disable_spinbox(void){
-    uintptr_t clkctrlPtr = REMAP(PRCM_BASE_ADDR+CM_ALWON_SPINBOX_CLKCTRL);
-    REGRDMWR(clkctrlPtr, 0xFFFFFFFD, 0);
-    UNMAP(clkctrlPtr);
-}
-
-void prcm_disable_mailbox(void){
-    uintptr_t clkctrlPtr = REMAP(PRCM_BASE_ADDR+CM_ALWON_MAILBOX_CLKCTRL);
-    REGRDMWR(clkctrlPtr, 0xFFFFFFFD, 0);
-    UNMAP(clkctrlPtr);
-}
-
-void prcm_disable_gptimer4(void){
-    uintptr_t clkctrlPtr = REMAP(PRCM_BASE_ADDR+CM_ALWON_TIMER_4_CLKCTRL);
-    uintptr_t clkstctrlPtr = REMAP(PRCM_BASE_ADDR+CM_ALWON_L3_SLOW_CLKSTCTRL);
-
-    REGRDMWR(clkctrlPtr, 0xFFFFFFFD, 0);
-
-    REGRDMWR(clkstctrlPtr, 0xFFFFFFFD, 0);
-    UNMAP(clkctrlPtr);
-    UNMAP(clkstctrlPtr);
-}
-
-void prcm_disable_gem(void){
-    uintptr_t clkctrlPtr = REMAP(PRCM_BASE_ADDR+CM_ACTIVE_GEM_CLKCTRL);
-    uintptr_t clkstctrlPtr = REMAP(PRCM_BASE_ADDR+CM_GEM_CLKSTCTRL);
-
-    REGRDMWR(clkctrlPtr, 0xFFFFFFFD, 0);
-
-    REGRDMWR(clkstctrlPtr, 0xFFFFFFFD, 0);
-    UNMAP(clkctrlPtr);
-    UNMAP(clkstctrlPtr);
-}
-
-void prcm_disable_mmu(void){
-    uintptr_t clkctrlPtr = REMAP(PRCM_BASE_ADDR+CM_ALWON_MMUDATA_CLKCTRL);
-    uintptr_t clkstctrlPtr = REMAP(PRCM_BASE_ADDR+CM_MMU_CLKSTCTRL);
-
-    REGRDMWR(clkctrlPtr, 0xFFFFFFFD, 0);
-
-    REGRDMWR(clkstctrlPtr, 0xFFFFFFFD, 0);
-    UNMAP(clkctrlPtr);
-    UNMAP(clkstctrlPtr);
-}
-
-void prcm_disable_mmuconfig(void){
-    uintptr_t clkctrlPtr = REMAP(PRCM_BASE_ADDR+CM_ALWON_MMUCFG_CLKCTRL);
-    uintptr_t clkstctrlPtr = REMAP(PRCM_BASE_ADDR+CM_MMUCFG_CLKSTCTRL);
-
-    REGRDMWR(clkctrlPtr, 0xFFFFFFFD, 0);
-
-    REGRDMWR(clkstctrlPtr, 0xFFFFFFFD, 0);
-    UNMAP(clkctrlPtr);
-    UNMAP(clkstctrlPtr);
-}
-
-
-void DucatiClkEnable(void)
-{
-    UInt32 val;
-    uintptr_t rstctrlPtr = REMAP(PRCM_BASE_ADDR+RM_DEFAULT_RSTCTRL);
-    uintptr_t clkstctrlPtr = REMAP(PRCM_BASE_ADDR+CM_DEFAULT_DUCATI_CLKSTCTRL);
-    uintptr_t clkctrlPtr = REMAP(PRCM_BASE_ADDR+CM_DEFAULT_DUCATI_CLKCTRL);
-
-#ifdef CLOCK_FIX
-    /* set the ISS PLL before the clock enable */
-    PLL_Clocks_Config(ISS_PLL_BASE, OSC_0, 19, 800, 2, ADPLLJ_CLKCRTL_HS2);
-#endif
-
-    /* enable the ducati logic */
-    val = REGRD(rstctrlPtr);
-    val &= (~(0x1 << 4));
-    REGWR(rstctrlPtr,   val);
-
-    /* enable power domain transition */
-    REGWR(clkstctrlPtr, 2);
-
-    /* enable ducati clocks */
-    REGWR(clkctrlPtr,   2);
-
-    /* wait for clocks CLKIN200TR and CLKINTR to become active */
-    do {
-        val = REGRD(clkstctrlPtr);
-    } while ((val & 0x300) != 0x300);
-
-    /* wait for module to be fully functional */
-    do {
-        val = REGRD(clkctrlPtr);
-    } while ((val & 0x30000) != 0);
-
-    UNMAP(rstctrlPtr);
-    UNMAP(clkstctrlPtr);
-    UNMAP(clkctrlPtr);
-
-}
-
-void DucatiClkDisable(void)
-{
-    uintptr_t rstctrlPtr = REMAP(PRCM_BASE_ADDR+RM_DEFAULT_RSTCTRL);
-    uintptr_t clkctrlPtr = REMAP(PRCM_BASE_ADDR+CM_DEFAULT_DUCATI_CLKCTRL);
-    uintptr_t clkstctrlPtr = REMAP(PRCM_BASE_ADDR+CM_DEFAULT_DUCATI_CLKSTCTRL);
-    UInt32 val;
-
-    /* assert reset for cores m3_0 and m3_1 */
-    val = REGRD(rstctrlPtr);
-    val |= (0x3 << 2);
-    REGWR(rstctrlPtr, val);
-
-    /* disable ducati clocks */
-    REGWR(clkctrlPtr, 0);
-
-    /* disable power domain transition */
-    REGWR(clkstctrlPtr, 0);
-
-    /* disable the ducati logic */
-    val = REGRD(rstctrlPtr);
-    val |= (0x1 << 4);
-    REGWR(rstctrlPtr, val);
-
-    /* ensure posted write has completed */
-    do {
-        val = REGRD(rstctrlPtr);
-    } while ((val & (0x1 << 4)) == 0);
-
-    UNMAP(rstctrlPtr);
-    UNMAP(clkctrlPtr);
-    UNMAP(clkstctrlPtr);
 }
 
 
-void GEMSSClkEnable(void)
-{
-
-    /* set the DSP PLL before clock enable */
-    PLL_Clocks_Config(DSP_PLL_BASE,OSC_0,19,500,1,ADPLLJ_CLKCRTL_HS2);
-
-    /*Enable Clock to MMU CFG*/
-    prcm_enable(PRCM_BASE_ADDR+CM_MMUCFG_CLKSTCTRL, PRCM_BASE_ADDR+CM_ALWON_MMUCFG_CLKCTRL, 2 , 2, 0x0, 0x100, TRUE, TRUE);
-
-    /*Enable Clock to Data*/
-    prcm_enable(PRCM_BASE_ADDR+CM_MMU_CLKSTCTRL, PRCM_BASE_ADDR+CM_ALWON_MMUDATA_CLKCTRL, 2 , 2, 0x0, 0x100, TRUE, TRUE);
-
-    /*Enable Clock to GEMSS*/
-    prcm_enable(PRCM_BASE_ADDR+CM_GEM_CLKSTCTRL, PRCM_BASE_ADDR+CM_ACTIVE_GEM_CLKCTRL, 2 , 2, 0x0, 0x700, FALSE, TRUE);
-
-}
-
-void GEMSSClkDisable(void)
-{
-    prcm_disable_gem();
-    prcm_disable_mmu();
-    prcm_disable_mmuconfig();
-}
-#endif
-
 #if defined (__cplusplus)
 
 }
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxdsp/Dm8168DspHal.c b/qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxdsp/Dm8168DspHal.c
deleted file mode 100644 (file)
index d277aa1..0000000
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- *  @file   Dm8168DspHal.c
- *
- *  @brief      Top-level Hardware Abstraction Module implementation
- *
- *              This module implements the top-level Hardware Abstraction Layer
- *              for DM8168DSP.
- *              The implementation is specific to DM8168DSP.
- *
- *
- *  ============================================================================
- *
- *  Copyright (c) 2008-2012, Texas Instruments Incorporated
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *  *  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *  *  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- *  *  Neither the name of Texas Instruments Incorporated nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  Contact information for paper mail:
- *  Texas Instruments
- *  Post Office Box 655303
- *  Dallas, Texas 75265
- *  Contact information:
- *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
- *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
- *  ============================================================================
- *
- */
-
-
-
-#if defined(SYSLINK_BUILD_RTOS)
-#include <xdc/std.h>
-#include <xdc/runtime/Memory.h>
-#include <xdc/runtime/Error.h>
-#endif /* #if defined(SYSLINK_BUILD_RTOS) */
-
-#if defined(SYSLINK_BUILD_HLOS)
-#include <ti/syslink/Std.h>
-/* OSAL & Utils headers */
-#include <ti/syslink/utils/Memory.h>
-#endif /* #if defined(SYSLINK_BUILD_HLOS) */
-
-#include <ti/syslink/utils/Trace.h>
-/* Hardware Abstraction Layer headers */
-#include <_ProcDefs.h>
-#include <Processor.h>
-#include <Dm8168DspHal.h>
-#include <Dm8168DspHalBoot.h>
-#include <Dm8168DspPhyShmem.h>
-
-
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
-
-/* =============================================================================
- *  Macros and types
- * =============================================================================
- */
-
-/* =============================================================================
- * APIs called by DM8168DSPPROC module
- * =============================================================================
- */
-/*!
- *  @brief      Function to initialize the HAL object
- *
- *  @param      halObj      Return parameter: Pointer to the HAL object
- *  @param      initParams  Optional initialization parameters
- *
- *  @sa         DM8168DSP_halExit
- *              DM8168DSP_phyShmemInit
- */
-Int
-DM8168DSP_halInit (Ptr * halObj, Ptr params)
-{
-    Int                  status    = PROCESSOR_SUCCESS;
-    DM8168DSP_HalObject * halObject = NULL;
-
-    GT_2trace(curTrace, GT_ENTER,
-        "--> DM8168DSP_halInit: halObj=0x%x, params=0x%x", halObj, params);
-
-    GT_assert (curTrace, (halObj != NULL));
-
-    halObject = (DM8168DSP_HalObject *) halObj ;
-
-    (Void) params ; /* Not used. */
-
-    *halObj = Memory_calloc (NULL, sizeof (DM8168DSP_HalObject), 0, NULL);
-    if (halObject == NULL) {
-        /*! @retval PROCESSOR_E_MEMORY Memory allocation failed */
-        status = PROCESSOR_E_MEMORY;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSP_halInit",
-                             status,
-                             "Memory allocation failed for HAL object!");
-    }
-    else {
-        status = DM8168DSP_phyShmemInit (*halObj);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "DM8168DSP_halInit",
-                                 status,
-                                 "DM8168DSP_phyShmemInit failed!");
-            Memory_free (NULL, *halObj, sizeof (DM8168DSP_HalObject));
-            *halObj = NULL;
-        }
-#endif
-    }
-
-
-    GT_1trace(curTrace, GT_LEAVE, "<-- DM8168DSP_halInit: 0x%x", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-/*!
- *  @brief      Function to finalize the HAL object
- *
- *  @param      halObj      Pointer to the HAL object
- *
- *  @sa         DM8168DSP_halInit
- *              DM8168DSP_phyShmemExit
- */
-Int
-DM8168DSP_halExit (Ptr halObj)
-{
-    Int                  status    = PROCESSOR_SUCCESS;
-
-    GT_1trace (curTrace, GT_ENTER, "DM8168DSP_halExit", halObj);
-
-    GT_assert (curTrace, (halObj != NULL));
-
-    status = DM8168DSP_phyShmemExit (halObj);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (status < 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSP_halExit",
-                             status,
-                             "DM8168DSP_phyShmemExit failed!");
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-    if (halObj != NULL) {
-        /* Free the memory for the HAL object. */
-        Memory_free (NULL, halObj, sizeof (DM8168DSP_HalObject));
-    }
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DSP_halExit", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-#if defined (__cplusplus)
-}
-#endif
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxdsp/Dm8168DspHalBoot.c b/qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxdsp/Dm8168DspHalBoot.c
deleted file mode 100644 (file)
index 3648e77..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- *  @file   Dm8168DspHalBoot.c
- *
- *  @brief      Boot control module.
- *
- *              This module is responsible for handling boot-related hardware-
- *              specific operations.
- *              The implementation is specific to DM8168DSP.
- *
- *
- *  ============================================================================
- *
- *  Copyright (c) 2008-2012, Texas Instruments Incorporated
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *  *  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *  *  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- *  *  Neither the name of Texas Instruments Incorporated nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  Contact information for paper mail:
- *  Texas Instruments
- *  Post Office Box 655303
- *  Dallas, Texas 75265
- *  Contact information:
- *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
- *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
- *  ============================================================================
- *
- */
-
-
-#if defined(SYSLINK_BUILD_RTOS)
-#include <xdc/std.h>
-#include <xdc/runtime/Error.h>
-#endif /* #if defined(SYSLINK_BUILD_RTOS) */
-
-#if defined(SYSLINK_BUILD_HLOS)
-#include <ti/syslink/Std.h>
-#endif /* #if defined(SYSLINK_BUILD_HLOS) */
-
-
-/* OSAL & Utils headers */
-#include <ti/syslink/utils/Trace.h>
-
-/* Module headers */
-#include <_ProcDefs.h>
-#include <Processor.h>
-
-/* Hardware Abstraction Layer headers */
-#include <Dm8168DspHal.h>
-#include <Dm8168DspHalBoot.h>
-
-
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
-
-/* =============================================================================
- *  Macros and types
- * =============================================================================
- */
-/*!
- *  @brief  Offsets of the DSP BOOT ADDR register
- */
-#define CONTROL_IVA2_BOOTADDR_OFFSET  0x190
-#define CONTROL_IVA2_BOOTMOD_OFFSET   0x194
-
-
-/* =============================================================================
- * APIs called by DM8168DSPPROC module
- * =============================================================================
- */
-/*!
- *  @brief      Function to control boot operations
- *
- *  @param      halObj  Pointer to the HAL object
- *  @param      cmd     Boot command
- *  @param      arg     Arguments specific to the boot command
- *
- *  @sa
- */
-Int
-DM8168DSP_halBootCtrl (Ptr halObj, Processor_BootCtrlCmd cmd, Ptr args)
-{
-    Int                  status    = PROCESSOR_SUCCESS;
-    DM8168DSP_HalObject * halObject = NULL;
-
-    GT_3trace (curTrace, GT_ENTER, "DM8168DSP_halBootCtrl", halObj, cmd, args);
-
-    GT_assert (curTrace, (halObj != NULL));
-    GT_assert (curTrace, (cmd < Processor_BootCtrlCmd_EndValue));
-
-    halObject = (DM8168DSP_HalObject *) halObj;
-
-    switch (cmd) {
-        case Processor_BootCtrlCmd_SetEntryPoint:
-        {
-            /* copy _c_int00 addresses to dsp boot address*/
-            REG (halObject->generalCtrlBase) = ((UInt32) args & 0xFFFFFC00);
-        }
-        break ;
-
-        case Processor_BootCtrlCmd_SetBootComplete:
-        {
-            /* set boot complete bit in boot stat reg */
-            REG (halObject->bootStatBase) |= 0x1;
-        }
-        break ;
-
-        case Processor_BootCtrlCmd_ResetBootComplete:
-        {
-            /* Do nothing here for DM8168DSP gem */
-        }
-        break ;
-
-        default:
-        {
-            /*! @retval PROCESSOR_E_INVALIDARG Invalid argument */
-            status = PROCESSOR_E_INVALIDARG;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "DM8168DSP_halBootCtrl",
-                                 status,
-                                 "Unsupported boot ctrl cmd specified");
-        }
-        break ;
-    }
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DSP_halBootCtrl",status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-#if defined (__cplusplus)
-}
-#endif
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxdsp/Dm8168DspHalReset.c b/qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxdsp/Dm8168DspHalReset.c
deleted file mode 100644 (file)
index 4bdc2d6..0000000
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- *  @file   Dm8168DspHalReset.c
- *
- *  @brief      Reset control module.
- *
- *              This module is responsible for handling reset-related hardware-
- *              specific operations.
- *              The implementation is specific to DM8168DSP.
- *
- *
- *  ============================================================================
- *
- *  Copyright (c) 2008-2012, Texas Instruments Incorporated
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *  *  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *  *  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- *  *  Neither the name of Texas Instruments Incorporated nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  Contact information for paper mail:
- *  Texas Instruments
- *  Post Office Box 655303
- *  Dallas, Texas 75265
- *  Contact information:
- *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
- *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
- *  ============================================================================
- *
- */
-
-
-
-#if defined(SYSLINK_BUILD_RTOS)
-#include <xdc/std.h>
-#include <xdc/runtime/Error.h>
-#endif /* #if defined(SYSLINK_BUILD_RTOS) */
-
-#if defined(SYSLINK_BUILD_HLOS)
-#include <ti/syslink/Std.h>
-#endif /* #if defined(SYSLINK_BUILD_HLOS) */
-
-#include <ti/syslink/utils/Trace.h>
-
-
-#include <Bitops.h>
-/* Module level headers */
-#include <_ProcDefs.h>
-#include <Processor.h>
-
-/* Hardware Abstraction Layer headers */
-#include <Dm8168DspHal.h>
-#include <Dm8168DspHalReset.h>
-
-
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
-
-/* =============================================================================
- *  Macros and types
- * =============================================================================
- */
-/*!
- *  @brief  PRM address for GEM
- */
-#define CM_GEM_CLKSTCTRL      0x400
-/*!
- *  @brief  Clock mgmt for GEM
- */
-#define CM_ACTIVE_GEM_CLKCTRL 0x420
-/*!
- *  @brief  Reset control for GEM
- */
-#define RM_ACTIVE_RSTCTRL     0xA10
-/*!
- *  @brief  Reset status for GEM
- */
-#define RM_ACTIVE_RSTST       0xA14
-
-/* =============================================================================
- * APIs called by DM8168DSPPROC module
- * =============================================================================
- */
-/*!
- *  @brief      Function to control reset operations
- *
- *  @param      halObj  Pointer to the HAL object
- *  @param      cmd     Reset control command
- *  @param      arg     Arguments specific to the reset control command
- *
- *  @sa
- */
-Int
-Dm8168DspHal_reset(Ptr halObj, Dm8168DspHal_ResetCmd cmd)
-{
-    Int                     status = PROCESSOR_SUCCESS;
-    DM8168DSP_HalObject *   halObject;
-    UInt32                  prcmBase;
-    UInt32                  addr;
-    UInt32                  val;
-
-    GT_2trace(curTrace, GT_ENTER, "--> Dm8168DspHal_reset", halObj, cmd);
-
-    GT_assert(curTrace, (halObj != NULL));
-    GT_assert(curTrace, (cmd < Dm8168DspHal_Reset_EndValue));
-
-    halObject = (DM8168DSP_HalObject *)halObj;
-    prcmBase = halObject->prcmBase;
-
-    switch (cmd) {
-        case Dm8168DspHal_Reset_Attach:
-        {
-            /* assert GEM global and cpu resets */
-            addr = prcmBase + RM_ACTIVE_RSTCTRL;
-            REG(addr) = 0x3;
-
-            /* clear status bit, write-1 to clear bit */
-            addr = prcmBase + RM_ACTIVE_RSTST;
-            REG(addr) = 0x2;
-
-            /* release GEM global reset */
-            addr = prcmBase + RM_ACTIVE_RSTCTRL;
-            val = REG(addr);
-            val &= ~(0x2);
-            REG(addr) = val;
-
-            /* wait for reset done flag */
-            addr = prcmBase + RM_ACTIVE_RSTST;
-            do {
-                val = REG(addr);
-                val &= 0x2;
-            } while(val != 0x2);
-        }
-        break;
-
-        case Dm8168DspHal_Reset_Start:
-        {
-            /* clear status bit, write-1 to clear bit */
-            addr = prcmBase + RM_ACTIVE_RSTST;
-            REG(addr) = 1;
-
-            /* release cpu reset (and global to ensure proper boot) */
-            addr = prcmBase + RM_ACTIVE_RSTCTRL;
-            REG(addr) = 0;
-
-            /* wait for reset done flag */
-            addr = prcmBase + RM_ACTIVE_RSTST;
-            do {
-                val = REG(addr);
-                val &= 0x1;
-            } while(val != 0x1);
-        }
-        break;
-
-        case Dm8168DspHal_Reset_Stop:
-        {
-            /* assert only cpu reset */
-            addr = prcmBase + RM_ACTIVE_RSTCTRL;
-            REG(addr) = 0x1;
-        }
-        break;
-
-        case Dm8168DspHal_Reset_Detach:
-        {
-            /* assert both GEM global and cpu resets */
-            addr = prcmBase + RM_ACTIVE_RSTCTRL;
-            REG(addr) = 0x3;
-        }
-        break;
-
-        default:
-        {
-            /*! @retval PROCESSOR_E_INVALIDARG Invalid argument */
-            status = PROCESSOR_E_INVALIDARG;
-            GT_setFailureReason(curTrace, GT_4CLASS,
-                "DM8168DSP_halResetCtrl", status,
-                "Unsupported reset ctrl cmd specified");
-        }
-        break;
-    }
-
-    GT_1trace(curTrace, GT_LEAVE, "<-- Dm8168DspHal_reset", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-#if defined (__cplusplus)
-}
-#endif
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxdsp/Dm8168DspPhyShmem.c b/qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxdsp/Dm8168DspPhyShmem.c
deleted file mode 100644 (file)
index 0e1cf2f..0000000
+++ /dev/null
@@ -1,304 +0,0 @@
-/*
- *  @file   Dm8168DspPhyShmem.c
- *
- *  @brief      Linux shared memory physical interface file for DM8168DSP.
- *
- *              This module is responsible for handling boot-related hardware-
- *              specific operations.
- *              The implementation is specific to DM8168DSP.
- *
- *
- *  ============================================================================
- *
- *  Copyright (c) 2008-2012, Texas Instruments Incorporated
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *  *  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *  *  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- *  *  Neither the name of Texas Instruments Incorporated nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  Contact information for paper mail:
- *  Texas Instruments
- *  Post Office Box 655303
- *  Dallas, Texas 75265
- *  Contact information:
- *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
- *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
- *  ============================================================================
- *
- */
-
-
-
-
-
-#if defined(SYSLINK_BUILD_HLOS)
-/* Standard headers */
-#include <ti/syslink/Std.h>
-
-/* OSAL and utils */
-#include <ti/syslink/utils/Memory.h>
-#endif /* #if defined(SYSLINK_BUILD_HLOS) */
-
-#if defined(SYSLINK_BUILD_RTOS)
-#include <xdc/std.h>
-#include <xdc/runtime/Memory.h>
-#include <xdc/runtime/Error.h>
-#include <ti/syslink/utils/_Memory.h>
-#endif /* #if defined(SYSLINK_BUILD_RTOS) */
-
-#include <ti/syslink/utils/Trace.h>
-
-/* Module headers */
-#include <_ProcDefs.h>
-#include <Processor.h>
-
-
-/* Hardware Abstraction Layer headers */
-#include <Dm8168DspHal.h>
-#include <Dm8168DspHalBoot.h>
-#include <Dm8168DspHalReset.h>
-#include <Dm8168DspPhyShmem.h>
-#include <Dm8168DspHalMmu.h>
-
-
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
-
-/* =============================================================================
- *  Macros and types
- * =============================================================================
- */
-
-
-/* =============================================================================
- * APIs called by DM8168DSPPROC module
- * =============================================================================
- */
-/*!
- *  @brief      Function to initialize Shared Driver/device.
- *
- *  @param      halObj  Pointer to the HAL object
- *
- *  @sa         DM8168DSP_phyShmemExit
- *              Memory_map
- */
-Int
-DM8168DSP_phyShmemInit (Ptr halObj)
-{
-    Int                  status    = PROCESSOR_SUCCESS;
-    DM8168DSP_HalObject * halObject = NULL;
-    Memory_MapInfo       mapInfo;
-
-    GT_1trace(curTrace, GT_ENTER,
-        "--> DM8168DSP_phyShmemInit: halObj=0x%x", halObj);
-
-    GT_assert (curTrace,(halObj != NULL));
-
-    halObject = (DM8168DSP_HalObject *) halObj;
-
-    mapInfo.src = DSP_BOOT_ADDR;
-    mapInfo.size = DSP_BOOT_ADDR_SIZE;
-    mapInfo.isCached = FALSE;
-
-    status = Memory_map (&mapInfo);
-
-    if (status < 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSP_phyShmemInit",
-                             status,
-                             "Failure in Memory_map for MMU base registers");
-        halObject->generalCtrlBase = 0;
-    }
-    else {
-        halObject->generalCtrlBase = mapInfo.dst;
-    }
-
-    mapInfo.src      = DSP_BOOT_STAT;
-    mapInfo.size     = DSP_BOOT_STAT_SIZE;
-    mapInfo.isCached = FALSE;
-    status = Memory_map (&mapInfo);
-    if (status < 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSP_phyShmemInit",
-                             status,
-                             "Failure in Memory_map for MMU base registers");
-        halObject->bootStatBase = 0;
-    }
-    else {
-        halObject->bootStatBase = mapInfo.dst;
-    }
-
-    mapInfo.src      = L2_RAM_CLK_ENABLE;
-    mapInfo.size     = L2_RAM_CLK_ENABLE_SIZE;
-    mapInfo.isCached = FALSE;
-    status = Memory_map (&mapInfo);
-    if (status < 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSP_phyShmemInit",
-                             status,
-                             "Failure in Memory_map for MMU base registers");
-        halObject->l2ClkBase = 0;
-    }
-    else {
-        halObject->l2ClkBase = mapInfo.dst;
-    }
-
-    mapInfo.src      = PRCM_BASE_ADDR;
-    mapInfo.size     = PRCM_SIZE;
-    mapInfo.isCached = FALSE;
-    status = Memory_map (&mapInfo);
-    if (status < 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSP_phyShmemInit",
-                             status,
-                             "Failure in Memory_map for MMU base registers");
-        halObject->prcmBase = 0;
-    }
-    else {
-        halObject->prcmBase = mapInfo.dst;
-    }
-/* TO BE IMPLEMENTED
-    mapInfo.src      = MMU_BASE;
-    mapInfo.size     = MMU_SIZE;
-    mapInfo.isCached = FALSE;
-    status = Memory_map (&mapInfo);
-    if (status < 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSP_phyShmemInit",
-                             status,
-                             "Failure in Memory_map for MMU base registers");
-        halObject->mmuBase = 0;
-    }
-    else {
-        halObject->mmuBase = mapInfo.dst;
-    }
-*/
-    GT_1trace(curTrace, GT_LEAVE, "<-- DM8168DSP_phyShmemInit: 0x%x", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-/*!
- *  @brief      Function to finalize Shared Driver/device.
- *
- *  @param      halObj  Pointer to the HAL object
- *
- *  @sa         DM8168DSP_phyShmemInit
- *              Memory_Unmap
- */
-Int
-DM8168DSP_phyShmemExit (Ptr halObj)
-{
-    Int                  status    = PROCESSOR_SUCCESS;
-    DM8168DSP_HalObject * halObject = NULL;
-    Memory_UnmapInfo     unmapInfo;
-
-    GT_1trace (curTrace, GT_ENTER, "DM8168DSP_phyShmemExit", halObj);
-
-    GT_assert (curTrace, (halObj != NULL));
-
-    halObject = (DM8168DSP_HalObject *) halObj;
-
-    unmapInfo.addr = halObject->prcmBase;
-    unmapInfo.size = PRCM_SIZE;
-    unmapInfo.isCached = FALSE;
-    if (unmapInfo.addr != 0) {
-        status = Memory_unmap (&unmapInfo);
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                              GT_4CLASS,
-                              "DM8168DSP_phyShmemExit",
-                              status,
-                              "Failure in Memory_Unmap for MMU base registers");
-        }
-        halObject->mmuBase = 0 ;
-    }
-
-    unmapInfo.addr = halObject->l2ClkBase;
-    unmapInfo.size = L2_RAM_CLK_ENABLE_SIZE;
-    unmapInfo.isCached = FALSE;
-    if (unmapInfo.addr != 0) {
-        status = Memory_unmap (&unmapInfo);
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                              GT_4CLASS,
-                              "DM8168DSP_phyShmemExit",
-                              status,
-                              "Failure in Memory_Unmap for MMU base registers");
-        }
-        halObject->l2ClkBase = 0 ;
-    }
-
-    unmapInfo.addr = halObject->bootStatBase;
-    unmapInfo.size = DSP_BOOT_STAT_SIZE;
-    unmapInfo.isCached = FALSE;
-    if (unmapInfo.addr != 0) {
-        status = Memory_unmap (&unmapInfo);
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                              GT_4CLASS,
-                              "DM8168DSP_phyShmemExit",
-                              status,
-                              "Failure in Memory_Unmap for MMU base registers");
-        }
-        halObject->bootStatBase = 0 ;
-    }
-
-    unmapInfo.addr = halObject->generalCtrlBase;
-    unmapInfo.size = DSP_BOOT_ADDR_SIZE;
-    unmapInfo.isCached = FALSE;
-    if (unmapInfo.addr != 0) {
-        status = Memory_unmap (&unmapInfo);
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                              GT_4CLASS,
-                              "DM8168DSP_phyShmemExit",
-                              status,
-                              "Failure in Memory_Unmap for MMU base registers");
-        }
-        halObject->generalCtrlBase = 0 ;
-    }
-
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DSP_phyShmemExit",status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-#if defined (__cplusplus)
-
-}
-#endif
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxdsp/Dm8168DspProc.c b/qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxdsp/Dm8168DspProc.c
deleted file mode 100644 (file)
index 5df20d1..0000000
+++ /dev/null
@@ -1,2035 +0,0 @@
-/*
- *  @file   Dm8168DspProc.c
- *
- * @brief       Processor implementation for DM8168DSP.
- *
- *              This module is responsible for taking care of device-specific
- *              operations for the processor. This module can be used
- *              stand-alone or as part of ProcMgr.
- *              The implementation is specific to DM8168DSP.
- *
- *
- *  ============================================================================
- *
- *  Copyright (c) 2008-2012, Texas Instruments Incorporated
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *  *  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *  *  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- *  *  Neither the name of Texas Instruments Incorporated nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  Contact information for paper mail:
- *  Texas Instruments
- *  Post Office Box 655303
- *  Dallas, Texas 75265
- *  Contact information:
- *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
- *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
- *  ============================================================================
- *
- */
-
-
-
-#if defined(SYSLINK_BUILD_RTOS)
-#include <xdc/std.h>
-#include <xdc/runtime/Error.h>
-#include <xdc/runtime/Memory.h>
-#include <xdc/runtime/System.h>
-#include <xdc/runtime/IGateProvider.h>
-#include <ti/sysbios/gates/GateMutex.h>
-#endif /* #if defined(SYSLINK_BUILD_RTOS) */
-
-#if defined(SYSLINK_BUILD_HLOS)
-#include <ti/syslink/Std.h>
-/* OSAL & Utils headers */
-#include <ti/syslink/utils/Cfg.h>
-#include <ti/syslink/utils/String.h>
-#include <ti/syslink/utils/IGateProvider.h>
-#include <ti/syslink/utils/GateMutex.h>
-#include <ti/syslink/utils/Memory.h>
-#endif /* #if defined(SYSLINK_BUILD_HLOS) */
-
-#if defined(SYSLINK_BUILDOS_LINUX)
-#include <linux/string.h>
-#else
-#include <string.h>
-#endif
-
-#include <ti/syslink/utils/Trace.h>
-/* Module level headers */
-#include <ProcDefs.h>
-#include <Processor.h>
-#include <Dm8168DspProc.h>
-#include <_Dm8168DspProc.h>
-#include <Dm8168DspHal.h>
-#include <Dm8168DspHalReset.h>
-#include <Dm8168DspHalBoot.h>
-#include <ti/ipc/MultiProc.h>
-#include <_MultiProc.h>
-#include <RscTable.h>
-
-
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
-
-/* =============================================================================
- *  Macros and types
- * =============================================================================
- */
-
-/*!
- *  @brief  Number of static entries in address translation table.
- */
-#define AddrTable_STATIC_COUNT 5
-
-/*!
- *  @brief  max entries in translation table.
- */
-#define AddrTable_SIZE 32
-
-/* number of carveouts */
-#define NumCarveouts 1
-
-/* config param for dsp mmu */
-#define PARAMS_mmuEnable "ProcMgr.proc[DSP].mmuEnable="
-#define PARAMS_carveoutAddr "ProcMgr.proc[DSP].carveoutAddr="
-#define PARAMS_carveoutSize "ProcMgr.proc[DSP].carveoutSize="
-
-
-/*!
- *  @brief  DM8168DSPPROC Module state object
- */
-typedef struct DM8168DSPPROC_ModuleObject_tag {
-    UInt32              configSize;
-    /*!< Size of configuration structure */
-    DM8168DSPPROC_Config cfg;
-    /*!< DM8168DSPPROC configuration structure */
-    DM8168DSPPROC_Config defCfg;
-    /*!< Default module configuration */
-    DM8168DSPPROC_Params      defInstParams;
-    /*!< Default parameters for the DM8168DSPPROC instances */
-    Bool                isSetup;
-    /*!< Indicates whether the DM8168DSPPROC module is setup. */
-    DM8168DSPPROC_Handle procHandles [MultiProc_MAXPROCESSORS];
-    /*!< Processor handle array. */
-    IGateProvider_Handle         gateHandle;
-    /*!< Handle of gate to be used for local thread safety */
-} DM8168DSPPROC_ModuleObject;
-
-/*!
- *  @brief  DM8168DSPPROC instance object.
- */
-typedef struct DM8168DSPPROC_Object_tag {
-    DM8168DSPPROC_Params params;
-    /*!< Instance parameters (configuration values) */
-    Ptr                 halObject;
-    /*!< Pointer to the Hardware Abstraction Layer object. */
-    ProcMgr_Handle      pmHandle;
-    /*!< Handle to proc manager */
-} DM8168DSPPROC_Object;
-
-/* Default memory regions */
-static UInt32 AddrTable_count = AddrTable_STATIC_COUNT;
-
-/* static memory regions
- * CAUTION: AddrTable_STATIC_COUNT must match number of entries below.
- */
-static ProcMgr_AddrInfo AddrTable[AddrTable_SIZE] =
-    {
-        { /* L2 RAM */
-            .addr     = { -1u, -1u, 0x40800000, 0x10800000, 0x10800000 },
-            .size     = 0x40000,
-            .isCached = FALSE,
-            .isMapped = FALSE,
-            .mapMask  = ProcMgr_MASTERKNLVIRT
-        },
-        { /* L1P RAM */
-            .addr     = { -1u, -1u, 0x40E00000, 0x10E00000, 0x10E00000 },
-            .size     = 0x8000,
-            .isCached = FALSE,
-            .isMapped = FALSE,
-            .mapMask  = ProcMgr_MASTERKNLVIRT
-        },
-        { /* L1D RAM */
-            .addr     = { -1u, -1u, 0x40F00000, 0x10F00000, 0x10F00000 },
-            .size     = 0x8000,
-            .isCached = FALSE,
-            .isMapped = FALSE,
-            .mapMask  = ProcMgr_MASTERKNLVIRT
-        },
-        { /* OCMC0, 256 KB */
-            .addr     = { -1u, -1u, 0x40300000, 0x40300000, 0x40300000 },
-            .size     = 0x40000,
-            .isCached = FALSE,
-            .isMapped = FALSE,
-            .mapMask  = (ProcMgr_MASTERKNLVIRT | ProcMgr_SLAVEVIRT)
-        },
-        { /* OCMC1, 256 KB */
-            .addr     = { -1u, -1u, 0x40400000, 0x40400000, 0x40400000 },
-            .size     = 0x40000,
-            .isCached = FALSE,
-            .isMapped = FALSE,
-            .mapMask  = (ProcMgr_MASTERKNLVIRT | ProcMgr_SLAVEVIRT)
-        }
-    };
-
-/* =============================================================================
- *  Globals
- * =============================================================================
- */
-
-/*!
- *  @var    DM8168DSPPROC_state
- *
- *  @brief  DM8168DSPPROC state object variable
- */
-#if !defined(SYSLINK_BUILD_DEBUG)
-static
-#endif /* if !defined(SYSLINK_BUILD_DEBUG) */
-DM8168DSPPROC_ModuleObject DM8168DSPPROC_state =
-{
-    .isSetup = FALSE,
-    .configSize = sizeof(DM8168DSPPROC_Config),
-    .gateHandle = NULL,
-    .defInstParams.mmuEnable = FALSE,
-    .defInstParams.numMemEntries = AddrTable_STATIC_COUNT
-};
-
-/* config override specified in SysLinkCfg.c, defined in ProcMgr.c */
-extern String ProcMgr_sysLinkCfgParams;
-
-/* =============================================================================
- * APIs directly called by applications
- * =============================================================================
- */
-/*!
- *  @brief      Function to get the default configuration for the DM8168DSPPROC
- *              module.
- *
- *              This function can be called by the application to get their
- *              configuration parameter to DM8168DSPPROC_setup filled in by the
- *              DM8168DSPPROC module with the default parameters. If the user
- *              does not wish to make any change in the default parameters, this
- *              API is not required to be called.
- *
- *  @param      cfg        Pointer to the DM8168DSPPROC module configuration
- *                         structure in which the default config is to be
- *                         returned.
- *
- *  @sa         DM8168DSPPROC_setup
- */
-Void
-DM8168DSPPROC_getConfig (DM8168DSPPROC_Config * cfg)
-{
-    GT_1trace (curTrace, GT_ENTER, "DM8168DSPPROC_getConfig", cfg);
-
-    GT_assert (curTrace, (cfg != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (cfg == NULL) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPROC_getConfig",
-                             PROCESSOR_E_INVALIDARG,
-                             "Argument of type (DM8168DSPPROC_Config *) passed "
-                             "is null!");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        memcpy (cfg,
-                     &(DM8168DSPPROC_state.defCfg),
-                     sizeof (DM8168DSPPROC_Config));
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-    GT_0trace (curTrace, GT_LEAVE, "DM8168DSPPROC_getConfig");
-}
-
-
-/*!
- *  @brief      Function to setup the DM8168DSPPROC module.
- *
- *              This function sets up the DM8168DSPPROC module. This function
- *              must be called before any other instance-level APIs can be
- *              invoked.
- *              Module-level configuration needs to be provided to this
- *              function. If the user wishes to change some specific config
- *              parameters, then DM8168DSPPROC_getConfig can be called to get the
- *              configuration filled with the default values. After this, only
- *              the required configuration values can be changed. If the user
- *              does not wish to make any change in the default parameters, the
- *              application can simply call DM8168DSPPROC_setup with NULL
- *              parameters. The default parameters would get automatically used.
- *
- *  @param      cfg   Optional DM8168DSPPROC module configuration. If provided as
- *                    NULL, default configuration is used.
- *
- *  @sa         DM8168DSPPROC_destroy
- *              GateMutex_create
- */
-Int
-DM8168DSPPROC_setup (DM8168DSPPROC_Config * cfg)
-{
-    Int                  status = PROCESSOR_SUCCESS;
-    DM8168DSPPROC_Config tmpCfg;
-    Error_Block          eb;
-
-    Error_init(&eb);
-
-    GT_1trace (curTrace, GT_ENTER, "DM8168DSPPROC_setup", cfg);
-
-    if (cfg == NULL) {
-        DM8168DSPPROC_getConfig (&tmpCfg);
-        cfg = &tmpCfg;
-    }
-
-    /* Create a default gate handle for local module protection. */
-    DM8168DSPPROC_state.gateHandle = (IGateProvider_Handle)
-                               GateMutex_create ((GateMutex_Params *)NULL, &eb);
-    if (DM8168DSPPROC_state.gateHandle == NULL) {
-        /*! @retval PROCESSOR_E_FAIL Failed to create GateMutex! */
-        status = PROCESSOR_E_FAIL;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPROC_setup",
-                             status,
-                             "Failed to create GateMutex!");
-    }
-    else {
-        /* Copy the user provided values into the state object. */
-        memcpy (&DM8168DSPPROC_state.cfg,
-                     cfg,
-                     sizeof (DM8168DSPPROC_Config));
-
-        /* Initialize the name to handles mapping array. */
-        memset (&DM8168DSPPROC_state.procHandles,
-                    0,
-                    (sizeof (DM8168DSPPROC_Handle) * MultiProc_MAXPROCESSORS));
-        DM8168DSPPROC_state.isSetup = TRUE;
-    }
-
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DSPPROC_setup", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return (status);
-}
-
-
-/*!
- *  @brief      Function to destroy the DM8168DSPPROC module.
- *
- *              Once this function is called, other DM8168DSPPROC module APIs,
- *              except for the DM8168DSPPROC_getConfig API cannot be called
- *              anymore.
- *
- *  @sa         DM8168DSPPROC_setup
- *              GateMutex_delete
- */
-Int
-DM8168DSPPROC_destroy (Void)
-{
-    Int    status = PROCESSOR_SUCCESS;
-    UInt16 i;
-
-    GT_0trace (curTrace, GT_ENTER, "DM8168DSPPROC_destroy");
-
-    /* Check if any DM8168DSPPROC instances have not been deleted so far. If not,
-     * delete them.
-     */
-    for (i = 0 ; i < MultiProc_MAXPROCESSORS ; i++) {
-        GT_assert (curTrace, (DM8168DSPPROC_state.procHandles [i] == NULL));
-        if (DM8168DSPPROC_state.procHandles [i] != NULL) {
-            DM8168DSPPROC_delete (&(DM8168DSPPROC_state.procHandles [i]));
-        }
-    }
-
-    if (DM8168DSPPROC_state.gateHandle != NULL) {
-        GateMutex_delete ((GateMutex_Handle *)
-                                &(DM8168DSPPROC_state.gateHandle));
-    }
-
-    DM8168DSPPROC_state.isSetup = FALSE;
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DSPPROC_destroy", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return (status);
-}
-
-
-/*!
- *  @brief      Function to initialize the parameters for this Processor
- *              instance.
- *
- *  @param      params  Configuration parameters to be returned
- *
- *  @sa         DM8168DSPPROC_create
- */
-Void
-DM8168DSPPROC_Params_init(
-        DM8168DSPPROC_Handle    handle,
-        DM8168DSPPROC_Params *  params)
-{
-    DM8168DSPPROC_Object * procObject = (DM8168DSPPROC_Object *) handle;
-    Int                    i          = 0;
-    ProcMgr_AddrInfo *     ai         = NULL;
-
-    GT_2trace (curTrace, GT_ENTER, "DM8168DSPPROC_Params_init", handle, params);
-
-    GT_assert (curTrace, (params != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (params == NULL) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPROC_Params_init",
-                             PROCESSOR_E_INVALIDARG,
-                             "Argument of type (DM8168DSPPROC_Params *) "
-                             "passed is null!");
-    }
-    else {
-#endif
-        if (handle == NULL) {
-
-            /* check for instance params override */
-            Cfg_propBool(PARAMS_mmuEnable, ProcMgr_sysLinkCfgParams,
-                &(DM8168DSPPROC_state.defInstParams.mmuEnable));
-
-            memcpy(params, &(DM8168DSPPROC_state.defInstParams),
-                sizeof(DM8168DSPPROC_Params));
-
-            /* initialize the translation table */
-            for (i = AddrTable_count; i < AddrTable_SIZE; i++) {
-                ai = &AddrTable[i];
-                ai->addr[ProcMgr_AddrType_MasterKnlVirt] = -1u;
-                ai->addr[ProcMgr_AddrType_MasterUsrVirt] = -1u;
-                ai->addr[ProcMgr_AddrType_MasterPhys] = -1u;
-                ai->addr[ProcMgr_AddrType_SlaveVirt] = -1u;
-                ai->addr[ProcMgr_AddrType_SlavePhys] = -1u;
-                ai->size = 0u;
-                ai->isCached = FALSE;
-                ai->mapMask = 0u;
-                ai->isMapped = FALSE;
-            }
-
-            /* initialize refCount for all entries - both static and dynamic */
-            for(i = 0; i < AddrTable_SIZE; i++) {
-                AddrTable[i].refCount = 0u;
-            }
-            memcpy((Ptr)params->memEntries, AddrTable, sizeof(AddrTable));
-        }
-        else {
-            /* return updated DM8168DSPPROC instance specific parameters */
-            memcpy(params, &(procObject->params), sizeof(DM8168DSPPROC_Params));
-        }
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif
-
-    GT_0trace (curTrace, GT_LEAVE, "DM8168DSPPROC_Params_init");
-}
-
-/*!
- *  @brief      Function to create an instance of this Processor.
- *
- *  @param      name    Name of the Processor instance.
- *  @param      params  Configuration parameters.
- *
- *  @sa         DM8168DSPPROC_delete
- */
-DM8168DSPPROC_Handle
-DM8168DSPPROC_create (      UInt16                procId,
-                     const DM8168DSPPROC_Params * params)
-{
-    Int                   status    = PROCESSOR_SUCCESS;
-    Processor_Object *    handle    = NULL;
-    DM8168DSPPROC_Object * object    = NULL;
-    IArg                  key;
-    List_Params           listParams;
-
-    GT_2trace (curTrace, GT_ENTER, "DM8168DSPPROC_create", procId, params);
-
-    GT_assert (curTrace, IS_VALID_PROCID (procId));
-    GT_assert (curTrace, (params != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (!IS_VALID_PROCID (procId)) {
-        /* Not setting status here since this function does not return status.*/
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPROC_create",
-                             PROCESSOR_E_INVALIDARG,
-                             "Invalid procId specified");
-    }
-    else if (params == NULL) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPROC_create",
-                             PROCESSOR_E_INVALIDARG,
-                             "params passed is NULL!");
-    }
-    else {
-#endif
-        /* Enter critical section protection. */
-        key = IGateProvider_enter (DM8168DSPPROC_state.gateHandle);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-        /* Check if the Processor already exists for specified procId. */
-        if (DM8168DSPPROC_state.procHandles [procId] != NULL) {
-            status = PROCESSOR_E_ALREADYEXIST;
-            GT_setFailureReason (curTrace,
-                              GT_4CLASS,
-                              "DM8168DSPPROC_create",
-                              status,
-                              "Processor already exists for specified procId!");
-        }
-        else {
-#endif
-            /* Allocate memory for the handle */
-            handle = (Processor_Object *) Memory_calloc (NULL,
-                                                      sizeof (Processor_Object),
-                                                      0,
-                                                      NULL);
-            if (handle == NULL) {
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "DM8168DSPPROC_create",
-                                     PROCESSOR_E_MEMORY,
-                                     "Memory allocation failed for handle!");
-            }
-            else {
-                /* Populate the handle fields */
-                handle->procFxnTable.attach        = &DM8168DSPPROC_attach;
-                handle->procFxnTable.detach        = &DM8168DSPPROC_detach;
-                handle->procFxnTable.start         = &DM8168DSPPROC_start;
-                handle->procFxnTable.stop          = &DM8168DSPPROC_stop;
-                handle->procFxnTable.read          = &DM8168DSPPROC_read;
-                handle->procFxnTable.write         = &DM8168DSPPROC_write;
-                handle->procFxnTable.control       = &DM8168DSPPROC_control;
-                handle->procFxnTable.map           = &DM8168DSPPROC_map;
-                handle->procFxnTable.unmap         = &DM8168DSPPROC_unmap;
-                handle->procFxnTable.translateAddr = &DM8168DSPPROC_translate;
-                handle->state = ProcMgr_State_Unknown;
-
-                /* Allocate memory for the DM8168DSPPROC handle */
-                handle->object = Memory_calloc (NULL,
-                                                sizeof (DM8168DSPPROC_Object),
-                                                0,
-                                                NULL);
-                if (handle->object == NULL) {
-                    status = PROCESSOR_E_MEMORY;
-                    GT_setFailureReason (curTrace,
-                                GT_4CLASS,
-                                "DM8168DSPPROC_create",
-                                status,
-                                "Memory allocation failed for handle->object!");
-                }
-                else {
-                    handle->procId = procId;
-                    object = (DM8168DSPPROC_Object *) handle->object;
-                    object->halObject = NULL;
-                    /* Copy params into instance object. */
-                    memcpy (&(object->params),
-                                 (Ptr) params,
-                                 sizeof (DM8168DSPPROC_Params));
-                    /* Set the handle in the state object. */
-                    DM8168DSPPROC_state.procHandles [procId] =
-                                                   (DM8168DSPPROC_Handle) handle;
-                    /* Initialize the list of listeners */
-                    List_Params_init(&listParams);
-                    handle->registeredNotifiers = List_create(&listParams);
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-                    if (handle->registeredNotifiers == NULL) {
-                        /*! @retval PROCESSOR_E_FAIL OsalIsr_create failed */
-                        status = PROCESSOR_E_FAIL;
-                        GT_setFailureReason (curTrace,
-                                             GT_4CLASS,
-                                             "DM8168DSPPROC_create",
-                                             status,
-                                             "List_create failed");
-                    }
-                    else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-                        handle->notifiersLock =
-                                 OsalMutex_create(OsalMutex_Type_Interruptible);
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-                        if (handle->notifiersLock == NULL) {
-                            /*! @retval PROCESSOR_E_FAIL OsalIsr_create failed*/
-                            status = PROCESSOR_E_FAIL;
-                            GT_setFailureReason (curTrace,
-                                                 GT_4CLASS,
-                                                 "DM8168DSPPROC_create",
-                                                 status,
-                                                 "OsalMutex_create failed");
-                        }
-                    }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-                }
-            }
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-        }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-        /* Leave critical section protection. */
-        IGateProvider_leave (DM8168DSPPROC_state.gateHandle, key);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-    if (status < 0) {
-        if (handle !=  NULL) {
-            if (handle->registeredNotifiers != NULL) {
-                List_delete (&handle->registeredNotifiers);
-            }
-            if (handle->object != NULL) {
-                Memory_free (NULL,
-                             handle->object,
-                             sizeof (DM8168DSPPROC_Object));
-            }
-            Memory_free (NULL, handle, sizeof (Processor_Object));
-        }
-        /*! @retval NULL Function failed */
-        handle = NULL;
-    }
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DSPPROC_create", handle);
-
-    /*! @retval Valid-Handle Operation successful */
-    return (DM8168DSPPROC_Handle) handle;
-}
-
-
-/*!
- *  @brief      Function to delete an instance of this Processor.
- *
- *              The user provided pointer to the handle is reset after
- *              successful completion of this function.
- *
- *  @param      handlePtr  Pointer to Handle to the Processor instance
- *
- *  @sa         DM8168DSPPROC_create
- */
-Int
-DM8168DSPPROC_delete (DM8168DSPPROC_Handle * handlePtr)
-{
-    Int                   status = PROCESSOR_SUCCESS;
-    DM8168DSPPROC_Object * object = NULL;
-    Processor_Object *    handle;
-    IArg                  key;
-    List_Elem *           elem    = NULL;
-    Processor_RegisterElem * regElem = NULL;
-
-    GT_1trace (curTrace, GT_ENTER, "DM8168DSPPROC_delete", handlePtr);
-
-    GT_assert (curTrace, (handlePtr != NULL));
-    GT_assert (curTrace, ((handlePtr != NULL) && (*handlePtr != NULL)));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (handlePtr == NULL) {
-        /*! @retval PROCESSOR_E_INVALIDARG Invalid NULL handlePtr pointer
-                                         specified*/
-        status = PROCESSOR_E_INVALIDARG;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPROC_delete",
-                             status,
-                             "Invalid NULL handlePtr pointer specified");
-    }
-    else if (*handlePtr == NULL) {
-        /*! @retval PROCESSOR_E_HANDLE Invalid NULL *handlePtr specified */
-        status = PROCESSOR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPROC_delete",
-                             status,
-                             "Invalid NULL *handlePtr specified");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        handle = (Processor_Object *) (*handlePtr);
-        /* Enter critical section protection. */
-        key = IGateProvider_enter (DM8168DSPPROC_state.gateHandle);
-
-        /* Reset handle in PwrMgr handle array. */
-        GT_assert (curTrace, IS_VALID_PROCID (handle->procId));
-        DM8168DSPPROC_state.procHandles [handle->procId] = NULL;
-
-        /* Free memory used for the DM8168DSPPROC object. */
-        if (handle->object != NULL) {
-            object = (DM8168DSPPROC_Object *) handle->object;
-            Memory_free (NULL,
-                         object,
-                         sizeof (DM8168DSPPROC_Object));
-            handle->object = NULL;
-        }
-
-        /*
-         * Check the list of listeners to see if any are remaining
-         * and reply to them
-         */
-        OsalMutex_delete(&handle->notifiersLock);
-
-        while ((elem = List_dequeue(handle->registeredNotifiers)) != NULL) {
-            regElem = (Processor_RegisterElem *)elem;
-
-            /* Check if there is an associated timer and cancel it */
-            if (regElem->timer != -1) {
-                struct itimerspec value ;
-                value.it_value.tv_sec = 0;
-                value.it_value.tv_nsec = 0;
-                value.it_interval.tv_sec = 0;
-                value.it_interval.tv_nsec = 0;
-                timer_settime(regElem->timer, 0, &value, NULL);
-
-                timer_delete(regElem->timer);
-                regElem->timer = -1;
-            }
-
-            /* Call the callback function so it can clean up. */
-            regElem->info->cbFxn(handle->procId,
-                                 NULL,
-                                 handle->state,
-                                 handle->state,
-                                 ProcMgr_EventStatus_Canceled,
-                                 regElem->info->arg);
-            /* Free the memory */
-            Memory_free(NULL, regElem, sizeof(Processor_RegisterElem));
-        }
-
-        /* Delete the list of listeners */
-        List_delete(&handle->registeredNotifiers);
-
-        /* Free memory used for the Processor object. */
-        Memory_free (NULL, handle, sizeof (Processor_Object));
-        *handlePtr = NULL;
-
-        /* Leave critical section protection. */
-        IGateProvider_leave (DM8168DSPPROC_state.gateHandle, key);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DSPPROC_delete", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return (status);
-}
-
-
-/*!
- *  @brief      Function to open a handle to an instance of this Processor. This
- *              function is called when access to the Processor is required from
- *              a different process.
- *
- *  @param      handlePtr   Handle to the Processor instance
- *  @param      procId      Processor ID addressed by this Processor instance.
- *
- *  @sa         DM8168DSPPROC_close
- */
-Int
-DM8168DSPPROC_open (DM8168DSPPROC_Handle * handlePtr, UInt16 procId)
-{
-    Int status = PROCESSOR_SUCCESS;
-
-    GT_2trace (curTrace, GT_ENTER, "DM8168DSPPROC_open", handlePtr, procId);
-
-    GT_assert (curTrace, (handlePtr != NULL));
-    GT_assert (curTrace, IS_VALID_PROCID (procId));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (handlePtr == NULL) {
-        /*! @retval PROCESSOR_E_HANDLE Invalid NULL handlePtr specified */
-        status = PROCESSOR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPROC_open",
-                             status,
-                             "Invalid NULL handlePtr specified");
-    }
-    else if (!IS_VALID_PROCID (procId)) {
-        /*! @retval PROCESSOR_E_INVALIDARG Invalid procId specified */
-        status = PROCESSOR_E_INVALIDARG;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPROC_open",
-                             status,
-                             "Invalid procId specified");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        /* Initialize return parameter handle. */
-        *handlePtr = NULL;
-
-        /* Check if the PwrMgr exists and return the handle if found. */
-        if (DM8168DSPPROC_state.procHandles [procId] == NULL) {
-            /*! @retval PROCESSOR_E_NOTFOUND Specified instance not found */
-            status = PROCESSOR_E_NOTFOUND;
-            GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPROC_open",
-                             status,
-                             "Specified DM8168DSPPROC instance does not exist!");
-        }
-        else {
-            *handlePtr = DM8168DSPPROC_state.procHandles [procId];
-        }
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DSPPROC_open", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-/*!
- *  @brief      Function to close a handle to an instance of this Processor.
- *
- *  @param      handlePtr  Pointer to Handle to the Processor instance
- *
- *  @sa         DM8168DSPPROC_open
- */
-Int
-DM8168DSPPROC_close (DM8168DSPPROC_Handle * handlePtr)
-{
-    Int status = PROCESSOR_SUCCESS;
-
-    GT_1trace (curTrace, GT_ENTER, "DM8168DSPPROC_close", handlePtr);
-
-    GT_assert (curTrace, (handlePtr != NULL));
-    GT_assert (curTrace, ((handlePtr != NULL) && (*handlePtr != NULL)));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (handlePtr == NULL) {
-        /*! @retval PROCESSOR_E_INVALIDARG Invalid NULL handlePtr pointer
-                                         specified*/
-        status = PROCESSOR_E_INVALIDARG;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPROC_close",
-                             status,
-                             "Invalid NULL handlePtr pointer specified");
-    }
-    else if (*handlePtr == NULL) {
-        /*! @retval PROCESSOR_E_HANDLE Invalid NULL *handlePtr specified */
-        status = PROCESSOR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPROC_close",
-                             status,
-                             "Invalid NULL *handlePtr specified");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        /* Nothing to be done for close. */
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DSPPROC_close", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-/* =============================================================================
- * APIs called by Processor module (part of function table interface)
- * =============================================================================
- */
-/*!
- *  @brief      Function to initialize the slave processor
- *
- *  @param      handle  Handle to the Processor instance
- *  @param      params  Attach parameters
- *
- *  @sa         DM8168DSPPROC_detach
- */
-Int
-DM8168DSPPROC_attach(
-        Processor_Handle            handle,
-        Processor_AttachParams *    params)
-{
-
-    Int                         status = PROCESSOR_SUCCESS;
-    Processor_Object *          procHandle = (Processor_Object *)handle;
-    DM8168DSPPROC_Object *      object = NULL;
-    UInt32                      i = 0;
-    UInt32                      index = 0;
-    ProcMgr_AddrInfo *          me;
-    SysLink_MemEntry *          entry;
-    SysLink_MemEntry_Block      memBlock;
-    Char                        configProp[SYSLINK_MAX_NAMELENGTH];
-//  DM8168DSP_HalMmuCtrlArgs_Enable mmuEnableArgs;
-
-    GT_2trace(curTrace, GT_ENTER,
-        "--> DM8168DSPPROC_attach: handle=0x%x, parms=0x%x", handle, params);
-    GT_assert (curTrace, (handle != NULL));
-    GT_assert (curTrace, (params != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (handle == NULL) {
-        /*! @retval PROCESSOR_E_HANDLE Invalid argument */
-        status = PROCESSOR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPROC_attach",
-                             status,
-                             "Invalid handle specified");
-    }
-    else if (params == NULL) {
-            /*! @retval PROCESSOR_E_INVALIDARG Invalid argument */
-            status = PROCESSOR_E_INVALIDARG;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "DM8168DSPPROC_attach",
-                                 status,
-                                 "Invalid params specified");
-    }
-    else {
-#endif
-        object = (DM8168DSPPROC_Object *) procHandle->object;
-        GT_assert (curTrace, (object != NULL));
-
-        params->procArch = Processor_ProcArch_C64x;
-
-        /* check for instance params override */
-        Cfg_propBool(PARAMS_mmuEnable, ProcMgr_sysLinkCfgParams,
-            &(object->params.mmuEnable));
-
-        /* check for carveout params override */
-        Cfg_prop(PARAMS_carveoutAddr, ProcMgr_sysLinkCfgParams, configProp);
-        object->params.carveoutAddr = strtoul(configProp, 0, 16);
-        Cfg_prop(PARAMS_carveoutSize, ProcMgr_sysLinkCfgParams, configProp);
-        object->params.carveoutSize = strtoul(configProp, 0, 16);
-
-        object->pmHandle = params->pmHandle;
-        GT_0trace(curTrace, GT_1CLASS,
-            "DM8168DSPPROC_attach: Mapping memory regions");
-
-        /* search for dsp memory map */
-        status = RscTable_process(procHandle->procId, object->params.mmuEnable,
-                                  NumCarveouts,
-                                  (Ptr)&object->params.carveoutAddr,
-                                  &object->params.carveoutSize, FALSE,
-                                  &memBlock.numEntries);
-        if (status < 0 || memBlock.numEntries > SYSLINK_MAX_MEMENTRIES) {
-            /*! @retval PROCESSOR_E_INVALIDARG Invalid argument */
-            status = PROCESSOR_E_INVALIDARG;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "DM8168DSPPROC_attach",
-                                 status,
-                                 "Failed to process resource table");
-        }
-        else {
-            status = RscTable_getMemEntries(procHandle->procId,
-                                            memBlock.memEntries,
-                                            &memBlock.numEntries);
-            if (status < 0) {
-                /*! @retval PROCESSOR_E_INVALIDARG Invalid argument */
-                status = PROCESSOR_E_INVALIDARG;
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "DM8168DSPPROC_attach",
-                                     status,
-                                     "Failed to get resource table memEntries");
-            }
-        }
-
-        /* update translation tables with memory map */
-        for (i = 0; (i < memBlock.numEntries)
-            && (memBlock.memEntries[i].isValid) && (status >= 0); i++) {
-
-            entry = &memBlock.memEntries[i];
-
-            if (entry->map == FALSE) {
-                /* update table with entries which don't require mapping */
-                if (AddrTable_count != AddrTable_SIZE) {
-                    me = &AddrTable[AddrTable_count];
-
-                    me->addr[ProcMgr_AddrType_MasterKnlVirt] = -1u;
-                    me->addr[ProcMgr_AddrType_MasterUsrVirt] = -1u;
-                    me->addr[ProcMgr_AddrType_MasterPhys] =
-                            entry->masterPhysAddr;
-                    me->addr[ProcMgr_AddrType_SlaveVirt] = entry->slaveVirtAddr;
-                    me->addr[ProcMgr_AddrType_SlavePhys] = -1u;
-                    me->size = entry->size;
-                    me->isCached = entry->isCached;
-                    me->mapMask = entry->mapMask;
-
-                    AddrTable_count++;
-                }
-                else {
-                    status = PROCESSOR_E_FAIL;
-                    GT_setFailureReason(curTrace, GT_4CLASS,
-                        "DM8168DSPPROC_attach", status,
-                        "AddrTable_SIZE reached!");
-                }
-            }
-            else if (entry->map == TRUE) {
-                /* send these entries back to ProcMgr for mapping */
-                index = object->params.numMemEntries;
-
-                if (index != ProcMgr_MAX_MEMORY_REGIONS) {
-                    me = &object->params.memEntries[index];
-
-                    me->addr[ProcMgr_AddrType_MasterKnlVirt] = -1u;
-                    me->addr[ProcMgr_AddrType_MasterUsrVirt] = -1u;
-                    me->addr[ProcMgr_AddrType_MasterPhys] =
-                            entry->masterPhysAddr;
-                    me->addr[ProcMgr_AddrType_SlaveVirt] = entry->slaveVirtAddr;
-                    me->addr[ProcMgr_AddrType_SlavePhys] = -1u;
-                    me->size = entry->size;
-                    me->isCached = entry->isCached;
-                    me->mapMask = entry->mapMask;
-
-                    object->params.numMemEntries++;
-                }
-                else {
-                    status = PROCESSOR_E_FAIL;
-                    GT_setFailureReason(curTrace, GT_4CLASS,
-                        "DM8168DSPPROC_attach", status,
-                        "ProcMgr_MAX_MEMORY_REGIONS reached!");
-                }
-            }
-            else {
-                status = PROCESSOR_E_INVALIDARG;
-                GT_setFailureReason(curTrace, GT_4CLASS,
-                    "DM8168DSPPROC_attach", status,
-                    "Memory map has entry with invalid 'map' value");
-            }
-        } /* for (...) */
-
-        if (status >= 0) {
-            /* populate the return params */
-            params->numMemEntries = object->params.numMemEntries;
-            memcpy((Ptr)params->memEntries, (Ptr)object->params.memEntries,
-                sizeof(ProcMgr_AddrInfo) * params->numMemEntries);
-
-            status = DM8168DSP_halInit(&(object->halObject), NULL);
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-            if (status < 0) {
-                GT_setFailureReason(curTrace, GT_4CLASS,
-                    "DM8168DSPPROC_attach", status,
-                    "DM8168DSP_halInit failed");
-            }
-            else {
-#endif
-                if ((procHandle->bootMode == ProcMgr_BootMode_Boot)
-                    || (procHandle->bootMode == ProcMgr_BootMode_NoLoad_Pwr)) {
-
-                    /* assert reset, then release global reset to enable L2 */
-                    status = Dm8168DspHal_reset(object->halObject,
-                        Dm8168DspHal_Reset_Attach);
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-                    if (status < 0) {
-                        GT_setFailureReason(curTrace, GT_4CLASS,
-                            "DM8168DSPPROC_attach", status,
-                            "Failed to reset the slave processor");
-                    }
-                    else {
-#endif
-                        GT_0trace(curTrace, GT_1CLASS,
-                            "DM8168DSPPROC_attach: slave is now in reset");
-
-                        if (object->params.mmuEnable) {
-#if 0   /* disabled because of silicon bug */
-                           mmuEnableArgs.numMemEntries = 0;
-                           status = DM8168DSP_halMmuCtrl(object->halObject,
-                               Processor_MmuCtrlCmd_Enable, &mmuEnableArgs);
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-                            if (status < 0) {
-                                GT_setFailureReason(curTrace, GT_4CLASS,
-                                    "DM8168DSPPROC_attach", status,
-                                    "Failed to enable the slave MMU");
-                            }
-#endif
-                            GT_0trace(curTrace, GT_2CLASS,
-                                "DM8168DSPPROC_attach: Slave MMU "
-                                "is configured!");
-#endif
-                        }
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-                    }
-#endif
-                }
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-            }
-#endif
-        }
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif
-
-    GT_1trace(curTrace, GT_LEAVE,
-        "<-- DM8168DSPPROC_attach: status=0x%x", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-/*!
- *  @brief      Function to detach from the Processor.
- *
- *  @param      handle  Handle to the Processor instance
- *
- *  @sa         DM8168DSPPROC_attach
- */
-Int
-DM8168DSPPROC_detach (Processor_Handle handle)
-{
-    Int                   status       = PROCESSOR_SUCCESS;
-    Int                   tmpStatus    = PROCESSOR_SUCCESS;
-    Processor_Object *    procHandle   = (Processor_Object *) handle;
-    DM8168DSPPROC_Object * object      = NULL;
-    Int i                              = 0;
-    ProcMgr_AddrInfo *    ai;
-
-    GT_1trace (curTrace, GT_ENTER, "DM8168DSPPROC_detach", handle);
-
-    GT_assert (curTrace, (handle != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (handle == NULL) {
-        /*! @retval PROCESSOR_E_HANDLE Invalid argument */
-        status = PROCESSOR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPROC_detach",
-                             PROCESSOR_E_HANDLE,
-                             "Invalid handle specified");
-    }
-    else {
-#endif
-        object = (DM8168DSPPROC_Object *) procHandle->object;
-        GT_assert (curTrace, (object != NULL));
-
-        if (    (procHandle->bootMode == ProcMgr_BootMode_Boot)
-            ||  (procHandle->bootMode == ProcMgr_BootMode_NoLoad_Pwr)) {
-
-            if (object->params.mmuEnable) {
-                GT_0trace(curTrace, GT_2CLASS,
-                    "DM8168DSPPROC_detach: Disabling Slave MMU ...");
-
-#if 0   /* disabled because of silicon bug */
-               status = DM8168DSP_halMmuCtrl(object->halObject,
-                   Processor_MmuCtrlCmd_Disable, NULL);
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-                if (status < 0) {
-                    GT_setFailureReason(curTrace, GT_4CLASS,
-                        "DM8168VPSSM3PROC_detach", status,
-                        "Failed to disable the slave MMU");
-                }
-#endif
-#endif
-            }
-
-            /* delete all dynamically added entries */
-            for (i = AddrTable_STATIC_COUNT; i < AddrTable_count; i++) {
-                ai = &AddrTable[i];
-                ai->addr[ProcMgr_AddrType_MasterKnlVirt] = -1u;
-                ai->addr[ProcMgr_AddrType_MasterUsrVirt] = -1u;
-                ai->addr[ProcMgr_AddrType_MasterPhys] = -1u;
-                ai->addr[ProcMgr_AddrType_SlaveVirt] = -1u;
-                ai->addr[ProcMgr_AddrType_SlavePhys] = -1u;
-                ai->size = 0u;
-                ai->isCached = FALSE;
-                ai->mapMask = 0u;
-                ai->isMapped = FALSE;
-                ai->refCount = 0u;
-            }
-            object->params.numMemEntries = AddrTable_STATIC_COUNT;
-            AddrTable_count = AddrTable_STATIC_COUNT;
-
-            /* assert reset on the slave processor */
-            tmpStatus = Dm8168DspHal_reset(object->halObject,
-                Dm8168DspHal_Reset_Detach);
-
-            GT_0trace(curTrace, GT_2CLASS,
-                "DM8168DSPPROC_detach: Slave processor is now in reset");
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-            if ((tmpStatus < 0) && (status >= 0)) {
-                status = tmpStatus;
-                GT_setFailureReason(curTrace,
-                                     GT_4CLASS,
-                                     "DM8168DSPPROC_detach",
-                                     status,
-                                     "Failed to reset the slave processor");
-            }
-#endif
-        }
-
-        GT_0trace (curTrace,
-                   GT_2CLASS,
-                   "    DM8168DSPPROC_detach: Unmapping memory regions\n");
-
-        tmpStatus = DM8168DSP_halExit (object->halObject);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-        if ((tmpStatus < 0) && (status >= 0)) {
-            status = tmpStatus;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "DM8168DSPPROC_detach",
-                                 status,
-                                 "Failed to finalize HAL object");
-        }
-    }
-#endif
-
-    GT_1trace(curTrace, GT_LEAVE, "DM8168DSPPROC_detach: status=0x%x", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-/*!
- *  @brief      Function to start the slave processor
- *
- *              Start the slave processor running from its entry point.
- *              Depending on the boot mode, this involves configuring the boot
- *              address and releasing the slave from reset.
- *
- *  @param      handle    Handle to the Processor instance
- *
- *  @sa         DM8168DSPPROC_stop, DM8168DSP_halBootCtrl, Dm8168DspHal_reset
- */
-Int
-DM8168DSPPROC_start (Processor_Handle        handle,
-                    UInt32                  entryPt,
-                    Processor_StartParams * params)
-{
-    Int                   status        = PROCESSOR_SUCCESS ;
-    Processor_Object *    procHandle    = (Processor_Object *) handle;
-    DM8168DSPPROC_Object * object        = NULL;
-
-    GT_3trace (curTrace, GT_ENTER, "DM8168DSPPROC_start",
-               handle, entryPt, params);
-
-    GT_assert (curTrace, (handle != NULL));
-    GT_assert (curTrace, (params != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (handle == NULL) {
-        /*! @retval PROCESSOR_E_HANDLE Invalid argument */
-        status = PROCESSOR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPROC_start",
-                             status,
-                             "Invalid handle specified");
-    }
-    else if (params == NULL) {
-            /*! @retval PROCESSOR_E_INVALIDARG Invalid argument */
-            status = PROCESSOR_E_INVALIDARG;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "DM8168DSPPROC_start",
-                                 status,
-                                 "Invalid params specified");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        object = (DM8168DSPPROC_Object *) procHandle->object;
-        GT_assert (curTrace, (object != NULL));
-        if (    (procHandle->bootMode == ProcMgr_BootMode_Boot)
-            ||  (procHandle->bootMode == ProcMgr_BootMode_NoLoad_Pwr)
-            ||  (procHandle->bootMode == ProcMgr_BootMode_NoLoad_NoPwr)) {
-            /* Slave is to be started only for Boot mode and NoLoad mode. */
-            /* Specify the DSP boot address in the boot config register */
-            status = DM8168DSP_halBootCtrl (object->halObject,
-                                        Processor_BootCtrlCmd_SetEntryPoint,
-                                        (Ptr) entryPt);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-            if (status < 0) {
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "DM8168DSPPROC_start",
-                                     status,
-                                     "Failed to set slave boot entry point");
-            }
-            else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-                /* release the slave cpu from reset */
-                status = Dm8168DspHal_reset(object->halObject,
-                    Dm8168DspHal_Reset_Start);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-                if (status < 0) {
-                    GT_setFailureReason (curTrace,
-                                         GT_4CLASS,
-                                         "DM8168DSPPROC_start",
-                                         status,
-                                         "Failed to release slave from reset");
-                }
-            }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        }
-
-        /* For NoBoot mode, send an interrupt to the slave.
-         * TBD: How should Dm8168DspProc interface with Notify for this?
-         */
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-    if (status >= 0) {
-        GT_0trace (curTrace,
-                   GT_1CLASS,
-                   "    DM8168DSPPROC_start: Slave successfully started!\n");
-    }
-    else {
-        GT_0trace (curTrace,
-                   GT_1CLASS,
-                   "    DM8168DSPPROC_start: Slave could not be started!\n");
-    }
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DSPPROC_start", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-/*!
- *  @brief      Function to stop the slave processor
- *
- *              Stop the execution of the slave processor. Depending on the boot
- *              mode, this may result in placing the slave processor in reset.
- *
- *  @param      handle    Handle to the Processor instance
- *
- *  @sa         DM8168DSPPROC_start, Dm8168DspHal_reset
- */
-Int
-DM8168DSPPROC_stop (Processor_Handle handle)
-{
-    Int                   status       = PROCESSOR_SUCCESS ;
-    Processor_Object *    procHandle   = (Processor_Object *) handle;
-    DM8168DSPPROC_Object * object       = NULL;
-
-    GT_1trace (curTrace, GT_ENTER, "DM8168DSPPROC_stop", handle);
-
-    GT_assert (curTrace, (handle != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (handle == NULL) {
-        /*! @retval PROCESSOR_E_HANDLE Invalid argument */
-        status = PROCESSOR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPROC_stop",
-                             status,
-                             "Invalid handle specified");
-    }
-    else {
-#endif
-        object = (DM8168DSPPROC_Object *) procHandle->object;
-        GT_assert (curTrace, (object != NULL));
-
-        /* Slave is to be stopped only for Boot mode and NoLoad mode. */
-        if (    (procHandle->bootMode == ProcMgr_BootMode_Boot)
-            ||  (procHandle->bootMode == ProcMgr_BootMode_NoLoad_Pwr)
-            ||  (procHandle->bootMode == ProcMgr_BootMode_NoLoad_NoPwr)) {
-            status = Dm8168DspHal_reset(object->halObject,
-                Dm8168DspHal_Reset_Stop);
-
-            GT_0trace (curTrace,
-                       GT_1CLASS,
-                       "    DM8168DSPPROC_stop: Slave is now in reset!\n");
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-            if (status < 0) {
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "DM8168DSPPROC_stop",
-                                     status,
-                                     "Failed to place slave in reset");
-            }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        }
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DSPPROC_stop", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-/*!
- *  @brief      Function to read from the slave processor's memory.
- *
- *              Read from the slave processor's memory and copy into the
- *              provided buffer.
- *
- *  @param      handle     Handle to the Processor instance
- *  @param      procAddr   Address in host processor's address space of the
- *                         memory region to read from.
- *  @param      numBytes   IN/OUT parameter. As an IN-parameter, it takes in the
- *                         number of bytes to be read. When the function
- *                         returns, this parameter contains the number of bytes
- *                         actually read.
- *  @param      buffer     User-provided buffer in which the slave processor's
- *                         memory contents are to be copied.
- *
- *  @sa         DM8168DSPPROC_write
- */
-Int
-DM8168DSPPROC_read (Processor_Handle   handle,
-                   UInt32             procAddr,
-                   UInt32 *           numBytes,
-                   Ptr                buffer)
-{
-    Int       status   = PROCESSOR_SUCCESS ;
-    UInt8  *  procPtr8 = NULL;
-
-    GT_4trace (curTrace, GT_ENTER, "DM8168DSPPROC_read",
-               handle, procAddr, numBytes, buffer);
-
-    GT_assert (curTrace, (handle   != NULL));
-    GT_assert (curTrace, (numBytes != NULL));
-    GT_assert (curTrace, (buffer   != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (handle == NULL) {
-        /*! @retval PROCESSOR_E_HANDLE Invalid argument */
-        status = PROCESSOR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPROC_read",
-                             status,
-                             "Invalid handle specified");
-    }
-    else if (numBytes == 0) {
-            /*! @retval PROCESSOR_E_INVALIDARG Invalid argument */
-            status = PROCESSOR_E_INVALIDARG;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "DM8168DSPPROC_read",
-                                 status,
-                                 "Invalid numBytes specified");
-    }
-    else if (buffer == NULL) {
-            /*! @retval PROCESSOR_E_INVALIDARG Invalid argument */
-            status = PROCESSOR_E_INVALIDARG;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "DM8168DSPPROC_read",
-                                 status,
-                                 "Invalid buffer specified");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        procPtr8 = (UInt8 *) procAddr ;
-        buffer = memcpy (buffer, procPtr8, *numBytes);
-        GT_assert (curTrace, (buffer != (UInt32) NULL));
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-        if (buffer == (UInt32) NULL) {
-            /*! @retval PROCESSOR_E_FAIL Failed in memcpy */
-            status = PROCESSOR_E_FAIL;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "DM8168DSPPROC_read",
-                                 status,
-                                 "Failed in memcpy");
-            *numBytes = 0;
-        }
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DSPPROC_read",status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-/*!
- *  @brief      Function to write into the slave processor's memory.
- *
- *              Read from the provided buffer and copy into the slave
- *              processor's memory.
- *
- *  @param      handle     Handle to the Processor object
- *  @param      procAddr   Address in host processor's address space of the
- *                         memory region to write into.
- *  @param      numBytes   IN/OUT parameter. As an IN-parameter, it takes in the
- *                         number of bytes to be written. When the function
- *                         returns, this parameter contains the number of bytes
- *                         actually written.
- *  @param      buffer     User-provided buffer from which the data is to be
- *                         written into the slave processor's memory.
- *
- *  @sa         DM8168DSPPROC_read, DM8168DSPPROC_translateAddr
- */
-Int
-DM8168DSPPROC_write (Processor_Handle handle,
-                    UInt32           procAddr,
-                    UInt32 *         numBytes,
-                    Ptr              buffer)
-{
-    Int                   status       = PROCESSOR_SUCCESS ;
-    UInt8  *              procPtr8     = NULL;
-    UInt8                 temp8_1;
-    UInt8                 temp8_2;
-    UInt8                 temp8_3;
-    UInt8                 temp8_4;
-    UInt32                temp;
-
-    GT_4trace (curTrace, GT_ENTER, "DM8168DSPPROC_write",
-               handle, procAddr, numBytes, buffer);
-
-    GT_assert (curTrace, (handle   != NULL));
-    GT_assert (curTrace, (numBytes != NULL));
-    GT_assert (curTrace, (buffer   != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (handle == NULL) {
-        /*! @retval PROCESSOR_E_HANDLE Invalid argument */
-        status = PROCESSOR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPROC_write",
-                             status,
-                             "Invalid handle specified");
-    }
-    else if (numBytes == 0) {
-            /*! @retval PROCESSOR_E_INVALIDARG Invalid argument */
-            status = PROCESSOR_E_INVALIDARG;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "DM8168DSPPROC_write",
-                                 status,
-                                 "Invalid numBytes specified");
-    }
-    else if (buffer == NULL) {
-            /*! @retval PROCESSOR_E_INVALIDARG Invalid argument */
-            status = PROCESSOR_E_INVALIDARG;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "DM8168DSPPROC_write",
-                                 status,
-                                 "Invalid buffer specified");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        if (*numBytes != sizeof (UInt32)) {
-            procPtr8 = (UInt8 *) procAddr ;
-            procAddr = (UInt32) memcpy (procPtr8,
-                                             buffer,
-                                             *numBytes);
-            GT_assert (curTrace, (procAddr != (UInt32) NULL));
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-            if (procAddr == (UInt32) NULL) {
-                /*! @retval PROCESSOR_E_FAIL Failed in memcpy */
-                status = PROCESSOR_E_FAIL;
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "DM8168DSPPROC_write",
-                                     status,
-                                     "Failed in memcpy");
-                *numBytes = 0;
-            }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        }
-        else  {
-             /* For 4 bytes, directly write as a UInt32 */
-            temp8_1 = ((UInt8 *) buffer) [0];
-            temp8_2 = ((UInt8 *) buffer) [1];
-            temp8_3 = ((UInt8 *) buffer) [2];
-            temp8_4 = ((UInt8 *) buffer) [3];
-            temp = (UInt32) (    ((UInt32) temp8_4 << 24)
-                             |   ((UInt32) temp8_3 << 16)
-                             |   ((UInt32) temp8_2 << 8)
-                             |   ((UInt32) temp8_1));
-            *((UInt32*) procAddr) = temp;
-        }
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DSPPROC_write",status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-/*!
- *  @brief      Function to perform device-dependent operations.
- *
- *              Performs device-dependent control operations as exposed by this
- *              implementation of the Processor module.
- *
- *  @param      handle     Handle to the Processor object
- *  @param      cmd        Device specific processor command
- *  @param      arg        Arguments specific to the type of command.
- *
- *  @sa
- */
-Int
-DM8168DSPPROC_control (Processor_Handle handle, Int32 cmd, Ptr arg)
-{
-    Int                   status       = PROCESSOR_SUCCESS ;
-
-    GT_3trace (curTrace, GT_ENTER, "DM8168DSPPROC_control", handle, cmd, arg);
-
-    GT_assert (curTrace, (handle   != NULL));
-    /* cmd and arg can be 0/NULL, so cannot check for validity. */
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (handle == NULL) {
-        /*! @retval PROCESSOR_E_HANDLE Invalid argument */
-        status = PROCESSOR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPROC_control",
-                             status,
-                             "Invalid handle specified");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        /* No control operations currently implemented. */
-        /*! @retval PROCESSOR_E_NOTSUPPORTED No control operations are supported
-                                             for this device. */
-        status = PROCESSOR_E_NOTSUPPORTED;
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DSPPROC_control",status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-/*!
- *  @brief      Translate slave virtual address to master physical address.
- *
- *  @param      handle     Handle to the Processor object
- *  @param      dstAddr    Returned: master physical address.
- *  @param      srcAddr    Slave virtual address.
- *
- *  @sa
- */
-Int
-DM8168DSPPROC_translate(
-        Processor_Handle    handle,
-        UInt32 *            dstAddr,
-        UInt32              srcAddr)
-{
-    Int                         status = PROCESSOR_SUCCESS;
-    Processor_Object *          procHandle= (Processor_Object *)handle;
-    DM8168DSPPROC_Object *      object = NULL;
-    UInt32                      startAddr;
-    UInt32                      endAddr;
-    UInt32                      offset;
-    UInt32                      i;
-    ProcMgr_AddrInfo *          ai;
-
-    GT_3trace(curTrace, GT_ENTER,
-        "DM8168DSPPROC_translate: handle=0x%x, dstAddr=0x%x, srcAddr=0x%x",
-        handle, dstAddr, srcAddr);
-
-    GT_assert (curTrace, (handle != NULL));
-    GT_assert (curTrace, (dstAddr != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (handle == NULL) {
-        /*! @retval PROCESSOR_E_HANDLE Invalid argument */
-        status = PROCESSOR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPROC_translate",
-                             status,
-                             "Invalid handle specified");
-    }
-    else if (dstAddr == NULL) {
-        /*! @retval PROCESSOR_E_INVALIDARG sglist provided as NULL */
-        status = PROCESSOR_E_INVALIDARG;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPROC_translate",
-                             status,
-                             "dstAddr provided as NULL");
-    }
-    else {
-#endif
-        object = (DM8168DSPPROC_Object *)procHandle->object;
-        GT_assert(curTrace, (object != NULL));
-        *dstAddr = -1u;
-
-        for (i = 0; i < AddrTable_count; i++) {
-            ai = &AddrTable[i];
-            startAddr = ai->addr[ProcMgr_AddrType_SlaveVirt];
-            endAddr = startAddr + ai->size;
-
-            if ((startAddr <= srcAddr) && (srcAddr < endAddr)) {
-                offset = srcAddr - startAddr;
-                *dstAddr = ai->addr[ProcMgr_AddrType_MasterPhys] + offset;
-                break;
-            }
-        }
-
-        if (*dstAddr == -1u) {
-            if (!object->params.mmuEnable) {
-                /* default to direct mapping (i.e. v=p) */
-                *dstAddr = srcAddr;
-            }
-            else {
-                /* srcAddr not found in slave address space */
-                status = PROCESSOR_E_INVALIDARG;
-                GT_setFailureReason(curTrace, GT_4CLASS,
-                    "DM8168DSPPROC_translate", status,
-                    "srcAddr not found in slave address space");
-            }
-        }
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif
-    GT_1trace(curTrace, GT_LEAVE,
-        "DM8168DSPPROC_translate: status=0x%x", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-/*!
- *  @brief      Map the given address translation into the slave mmu
- *
- *  @param      handle      Handle to the Processor object
- *  @param      dstAddr     Base virtual address
- *  @param      nSegs       Number of given segments
- *  @param      sglist      Segment list
- */
-Int
-DM8168DSPPROC_map(
-        Processor_Handle    handle,
-        UInt32 *            dstAddr,
-        UInt32              nSegs,
-        Memory_SGList *     sglist)
-{
-    Int                         status = PROCESSOR_SUCCESS;
-    Processor_Object *          procHandle = (Processor_Object *)handle;
-    DM8168DSPPROC_Object *      object = NULL;
-    Bool                        found = FALSE;
-    UInt32                      startAddr;
-    UInt32                      endAddr;
-    UInt32                      i;
-    UInt32                      j;
-    ProcMgr_AddrInfo *          ai;
-//  DM8168DSP_HalMmuCtrlArgs_AddEntry addEntryArgs;
-
-    GT_4trace(curTrace, GT_ENTER, "DM8168DSPPROC_map: "
-       "handle=0x%x, dstAddr=0x%x, nSegs=%d, sglist=0x%x",
-       handle, dstAddr, nSegs, sglist);
-
-    GT_assert (curTrace, (handle != NULL));
-    GT_assert (curTrace, (sglist != NULL));
-    GT_assert (curTrace, (nSegs > 0));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (handle == NULL) {
-        /*! @retval PROCESSOR_E_HANDLE Invalid argument */
-        status = PROCESSOR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPROC_map",
-                             status,
-                             "Invalid handle specified");
-    }
-    else if (sglist == NULL) {
-        /*! @retval PROCESSOR_E_INVALIDARG sglist provided as NULL */
-        status = PROCESSOR_E_INVALIDARG;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPROC_map",
-                             status,
-                             "sglist provided as NULL");
-    }
-    else if (nSegs == 0) {
-        /*! @retval PROCESSOR_E_INVALIDARG Number of segments provided is 0 */
-        status = PROCESSOR_E_INVALIDARG;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPROC_map",
-                             status,
-                             "Number of segments provided is 0");
-    }
-    else {
-#endif
-        object = (DM8168DSPPROC_Object *)procHandle->object;
-        GT_assert (curTrace, (object != NULL));
-
-        for (i = 0; (i < nSegs) && (status >= 0); i++) {
-            /* Update the translation table with entries for which mapping
-             * is required. Add the entry only if the range does not exist
-             * in the translation table.
-             */
-
-            /* check in static entries first */
-            for (j = 0; j < AddrTable_STATIC_COUNT; j++) {
-                ai = &AddrTable [j];
-                startAddr = ai->addr[ProcMgr_AddrType_SlaveVirt];
-                endAddr = startAddr + ai->size;
-
-                if ((startAddr <= *dstAddr) && (*dstAddr < endAddr)) {
-                    found = TRUE;
-                    ai->refCount++;
-                    break;
-                 }
-            }
-
-            /* if not found in static entries, check in dynamic entries */
-            if (!found) {
-                for (j = AddrTable_STATIC_COUNT; j < AddrTable_count; j++) {
-                    ai = &AddrTable [j];
-
-                    if (ai->isMapped == TRUE) {
-                        startAddr = ai->addr[ProcMgr_AddrType_SlaveVirt];
-                        endAddr = startAddr + ai->size;
-
-                        if ((startAddr <= *dstAddr) && (*dstAddr < endAddr)
-                            && ((*dstAddr + sglist[i].size) <= endAddr)) {
-                            found = TRUE;
-                            ai->refCount++;
-                            break;
-                        }
-                    }
-                }
-            }
-
-            /* if not found and mmu is enabled, add new entry to table */
-            if (!found) {
-                if (object->params.mmuEnable) {
-                    if (AddrTable_count != AddrTable_SIZE) {
-                        ai = &AddrTable[AddrTable_count];
-
-                        ai->addr[ProcMgr_AddrType_MasterKnlVirt] = -1u;
-                        ai->addr[ProcMgr_AddrType_MasterUsrVirt] = -1u;
-                        ai->addr[ProcMgr_AddrType_MasterPhys] = sglist[i].paddr;
-                        ai->addr[ProcMgr_AddrType_SlaveVirt] = *dstAddr;
-                        ai->addr[ProcMgr_AddrType_SlavePhys] = -1u;
-                        ai->size = sglist[i].size;
-                        ai->isCached = sglist[i].isCached;
-                        ai->refCount++;
-
-                        AddrTable_count++;
-                    }
-                    else {
-                        status = PROCESSOR_E_FAIL;
-                        GT_setFailureReason(curTrace, GT_4CLASS,
-                            "DM8168DSPPROC_map", status,
-                            "AddrTable_SIZE reached!");
-                    }
-                }
-                else {
-                    /* if mmu disabled, AddrTable not updated */
-                    ai = NULL;
-                }
-            }
-
-            /* if new entry, map into dsp mmu */
-            if ((ai != NULL) && (ai->refCount == 1) && (status >= 0)) {
-                ai->isMapped = TRUE;
-
-                if (object->params.mmuEnable) {
-                    /* Add entry to Dsp mmu */
-#if 0
-                    addEntryArgs.masterPhyAddr = sglist [i].paddr;
-                    addEntryArgs.size          = sglist [i].size;
-                    addEntryArgs.slaveVirtAddr = (UInt32)*dstAddr;
-                    /* TBD: elementSize, endianism, mixedSized are
-                     * hard coded now, must be configurable later
-                     */
-                    addEntryArgs.elementSize   = ELEM_SIZE_16BIT;
-                    addEntryArgs.endianism     = LITTLE_ENDIAN;
-                    addEntryArgs.mixedSize     = MMU_TLBES;
-                    status = DM8168DSP_halMmuCtrl(object->halObject,
-                        Processor_MmuCtrlCmd_AddEntry, &addEntryArgs);
-#endif
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-                    if (status < 0) {
-                        GT_setFailureReason(curTrace, GT_4CLASS,
-                            "DM8168DSPPROC_map", status,
-                            "Processor_MmuCtrlCmd_AddEntry failed");
-                    }
-#endif
-                }
-            }
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-            if (status < 0) {
-                GT_setFailureReason(curTrace, GT_4CLASS,
-                    "DM8168DSPPROC_map", status,
-                    "DSP MMU configuration failed");
-            }
-#endif
-        }
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif
-    GT_1trace(curTrace, GT_LEAVE, "DM8168DSPPROC_map: status=0x%x", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-/*!
- *  @brief      Function to unmap slave address from host address space
- *
- *  @param      handle      Handle to the Processor object
- *  @param      dstAddr     Return parameter: Pointer to receive the mapped
- *                          address.
- *  @param      size        Size of the region to be mapped.
- *
- *  @sa
- */
-Int
-DM8168DSPPROC_unmap(
-        Processor_Handle    handle,
-        UInt32              addr,
-        UInt32              size)
-{
-    Int                         status = PROCESSOR_SUCCESS;
-    Processor_Object *          procHandle = (Processor_Object *)handle;
-    DM8168DSPPROC_Object *      object = NULL;
-    ProcMgr_AddrInfo *          ai;
-    Int                         i;
-    UInt32                      startAddr;
-    UInt32                      endAddr;
-//  DM8168DSP_HalMmuCtrlArgs_DeleteEntry deleteEntryArgs;
-
-    GT_3trace (curTrace, GT_ENTER, "DM8168DSPPROC_unmap",
-               handle, addr, size);
-
-    GT_assert (curTrace, (handle != NULL));
-    GT_assert (curTrace, (size   != 0));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (handle == NULL) {
-        /*! @retval PROCESSOR_E_HANDLE Invalid argument */
-        status = PROCESSOR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPROC_unmap",
-                             status,
-                             "Invalid handle specified");
-    }
-    else if (size == 0) {
-        /*! @retval  PROCESSOR_E_INVALIDARG Size provided is zero */
-        status = PROCESSOR_E_INVALIDARG;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPROC_unmap",
-                             status,
-                             "Size provided is zero");
-    }
-    else {
-#endif
-        object = (DM8168DSPPROC_Object *) procHandle->object;
-        GT_assert (curTrace, (object != NULL));
-
-        /* Delete dynamically added non-default entries from translation
-         * table only in last unmap called on that entry
-         */
-        for (i = AddrTable_STATIC_COUNT; i < AddrTable_count; i++) {
-            ai = &AddrTable[i];
-
-            if (!ai->isMapped) {
-                continue;
-            }
-
-            startAddr = ai->addr[ProcMgr_AddrType_SlaveVirt];
-            endAddr = startAddr + ai->size;
-
-            if ((startAddr <= addr) && (addr < endAddr)) {
-                ai->refCount--;
-
-                if (ai->refCount == 0) {
-                    ai->addr[ProcMgr_AddrType_MasterKnlVirt] = -1u;
-                    ai->addr[ProcMgr_AddrType_MasterUsrVirt] = -1u;
-                    ai->addr[ProcMgr_AddrType_MasterPhys] = -1u;
-                    ai->addr[ProcMgr_AddrType_SlaveVirt] = -1u;
-                    ai->addr[ProcMgr_AddrType_SlavePhys] = -1u;
-                    ai->size = 0u;
-                    ai->isCached = FALSE;
-                    ai->mapMask = 0u;
-                    ai->isMapped = FALSE;
-
-                    if (object->params.mmuEnable) {
-#if 0
-                        /* Remove the entry from the DSP MMU also */
-                        deleteEntryArgs.size          = size;
-                        deleteEntryArgs.slaveVirtAddr = addr;
-                        /* TBD: elementSize, endianism, mixedSized are
-                         * hard coded now, must be configurable later
-                         */
-                        deleteEntryArgs.elementSize   = ELEM_SIZE_16BIT;
-                        deleteEntryArgs.endianism     = LITTLE_ENDIAN;
-                        deleteEntryArgs.mixedSize     = MMU_TLBES;
-
-                        status = DM8168DSP_halMmuCtrl(object->halObject,
-                            Processor_MmuCtrlCmd_DeleteEntry, &deleteEntryArgs);
-#endif
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-                        if (status < 0) {
-                            GT_setFailureReason(curTrace, GT_4CLASS,
-                                "DM8168DSPPROC_unmap", status,
-                                "DSP MMU configuration failed");
-                        }
-#endif
-                    }
-                }
-            }
-        }
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif
-    GT_1trace(curTrace, GT_LEAVE, "DM8168DSPPROC_unmap: status=0x%x", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-#if defined (__cplusplus)
-}
-#endif /* defined (__cplusplus) */
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxdsp/Dm8168DspPwr.c b/qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxdsp/Dm8168DspPwr.c
deleted file mode 100644 (file)
index a9a621b..0000000
+++ /dev/null
@@ -1,1229 +0,0 @@
-/*
- *  @file   Dm8168DspPwr.c
- *
- *  @brief      PwrMgr implementation for DM8168DSP.
- *
- *              This module is responsible for handling power requests for
- *              the ProcMgr. The implementation is specific to DM8168DSP.
- *
- *
- *  ============================================================================
- *
- *  Copyright (c) 2008-2012, Texas Instruments Incorporated
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *  *  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *  *  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- *  *  Neither the name of Texas Instruments Incorporated nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  Contact information for paper mail:
- *  Texas Instruments
- *  Post Office Box 655303
- *  Dallas, Texas 75265
- *  Contact information:
- *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
- *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
- *  ============================================================================
- *
- */
-
-
-
-/* Standard headers */
-#if defined(SYSLINK_BUILD_RTOS)
-#include <xdc/std.h>
-#include <string.h>
-#include <xdc/runtime/Error.h>
-#include <xdc/runtime/Memory.h>
-#include <xdc/runtime/System.h>
-#include <xdc/runtime/IGateProvider.h>
-#include <ti/sysbios/gates/GateMutex.h>
-#include <ti/syslink/utils/_Memory.h>
-#include <ti/syslink/inc/Dm8168Clock.h>
-#endif /* #if defined(SYSLINK_BUILD_RTOS) */
-
-#if defined(SYSLINK_BUILD_HLOS)
-#include <ti/syslink/Std.h>
-/* OSAL & Utils headers */
-#include <ti/syslink/utils/String.h>
-#include <ti/syslink/utils/IGateProvider.h>
-#include <ti/syslink/utils/GateMutex.h>
-#include <ti/syslink/utils/Memory.h>
-#include <_MultiProc.h>
-#if defined(__KERNEL__)
-#include <linux/string.h>
-#else
-#include <string.h>
-#endif
-#if defined (SYSLINK_BUILDOS_LINUX)
-#include <ti/syslink/inc/knl/Linux/LinuxClock.h>
-#endif /* #if defined(SYSLINK_BUILDOS_LINUX) */
-#endif /* #if defined(SYSLINK_BUILD_HLOS) */
-#include <ti/syslink/utils/Trace.h>
-#include <Bitops.h>
-
-/* Module level headers */
-#include <ti/ipc/MultiProc.h>
-#include <ti/syslink/inc/_MultiProc.h>
-#include <ti/syslink/inc/knl/PwrDefs.h>
-#include <ti/syslink/inc/knl/PwrMgr.h>
-#include <ti/syslink/inc/knl/Dm8168DspPwr.h>
-#include <ti/syslink/inc/knl/_Dm8168DspPwr.h>
-#include <ti/syslink/inc/ClockOps.h>
-
-
-
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
-
-/* =============================================================================
- *  Macros and types
- * =============================================================================
- */
-/*!
- *  @brief  DM8168DSP module and mmr addresses (physical)
- */
-#define PRCM_BASE_ADDR              0x48180000
-#define PRCM_SIZE                   0x00003000
-#define PM_ACTIVE_PWRSTST           0x00000A04
-#define CM_ACTIVE_GEM_CLKCTRL       0x00000420
-
-
-#define CM_MMU_CLKSTCTRL            0x0000140C
-#define CM_ALWON_MMUDATA_CLKCTRL    0x0000159C
-#define CM_MMUCFG_CLKSTCTRL         0x00001410
-#define CM_ALWON_MMUCFG_CLKCTRL     0x000015A8
-
-
-#define RM_ACTIVE_RSTCTRL           0x00000A10
-#define RM_ACTIVE_RSTST             0x00000A14
-
-#define GEM_L2RAM_BASE_ADDR         0x40800000
-#define GEM_L2RAM_SIZE              0x00040000
-
-#define CTRL_MODULE_BASE_ADDR       0x48140000
-#define CTRL_MODULE_SIZE            0x00020000
-#define DSPMEM_SLEEP                0x00000650
-
-#define DSP_IDLE_CFG                0x0000061c
-
-#define REG(x)              *((volatile UInt32 *) (x))
-#define MEM(x)              *((volatile UInt32 *) (x))
-
-/*!
- *  @brief  DM8168DSPPWR Module state object
- */
-typedef struct DM8168DSPPWR_ModuleObject_tag {
-    UInt32                configSize;
-    /*!< Size of configuration structure */
-    DM8168DSPPWR_Config       cfg;
-    /*!< DM8168DSPPWR configuration structure */
-    DM8168DSPPWR_Config       defCfg;
-    /*!< Default module configuration */
-    Bool                  isSetup;
-    /*!< Indicates whether the DM8168DSPPWR module is setup. */
-    DM8168DSPPWR_Handle       pwrHandles [MultiProc_MAXPROCESSORS];
-    /*!< PwrMgr handle array. */
-    IGateProvider_Handle           gateHandle;
-    /*!< Handle of gate to be used for local thread safety */
-} DM8168DSPPWR_ModuleObject;
-
-/*!
- *  @brief  DM8168DSPPWR instance object.
- */
-struct DM8168DSPPWR_Object_tag {
-    DM8168DSPPWR_Params params;
-    /*!< Instance parameters (configuration values) */
-    UInt32             prcmVA;
-    /*!< Virtual address for prcm module */
-    UInt32             controlVA;
-    /*!< Virtual address for control module */
-    UInt32             l2baseVA;
-    /*!< Virtual address for control module */
-    Ptr                dspClkHandle;
-    /*!< dsp clk handle */
-    Ptr                dspMmuClkHandle;
-    /*!< dsp clk handle */
-    Ptr                dspMmuCfgClkHandle;
-    /*!< dsp clk handle */
-    Ptr                dspSpinlockHandle;
-    /*!< dsp Spinlock handle */
-    Ptr                dspMailboxHandle;
-    /*!< dsp Mailbox handle */
-#if defined(SYSLINK_VARIANT_TI814X) || defined(SYSLINK_VARIANT_TI811X)
-    Ptr                dspTimerIclkHandle;
-    /*!< dsp Timer4 handle */
-    Ptr                dspTimerFclkHandle;
-    /*!< dsp Timer4 handle */
-#else
-    Ptr                dspTimerIclkHandle1;
-    /*!< dsp Timer4 handle */
-    Ptr                dspTimerFclkHandle1;
-    /*!< dsp Timer4 handle */
-    Ptr                dspTimerIclkHandle2;
-    /*!< dsp Timer4 handle */
-    Ptr                dspTimerFclkHandle2;
-    /*!< dsp Timer4 handle */
-#endif
-    ClockOps_Handle    clockHandle;
-    /*!< Pointer to the Clock object. */
-
-};
-
-/* Defines the DM8168DSPPWR object type. */
-typedef struct DM8168DSPPWR_Object_tag DM8168DSPPWR_Object;
-
-
-/* =============================================================================
- *  Globals
- * =============================================================================
- */
-/*!
- *  @var    DM8168DSPPWR_state
- *
- *  @brief  DM8168DSPPWR state object variable
- */
-#if !defined(SYSLINK_BUILD_DEBUG)
-static
-#endif /* if !defined(SYSLINK_BUILD_DEBUG) */
-DM8168DSPPWR_ModuleObject DM8168DSPPWR_state =
-{
-    .isSetup = FALSE,
-    .configSize = sizeof (DM8168DSPPWR_Config),
-    .defCfg.reserved = 0,
-    .gateHandle = NULL,
-};
-
-
-/* =============================================================================
- * APIs directly called by applications
- * =============================================================================
- */
-/*!
- *  @brief      Function to get the default configuration for the DM8168DSPPWR
- *              module.
- *
- *              This function can be called by the application to get their
- *              configuration parameter to DM8168DSPPWR_setup filled in by the
- *              DM8168DSPPWR module with the default parameters. If the user does
- *              not wish to make any change in the default parameters, this API
- *              is not required to be called.
- *
- *  @param      cfg        Pointer to the DM8168DSPPWR module configuration
- *                         structure in which the default config is to be
- *                         returned.
- *
- *  @sa         DM8168DSPPWR_setup
- */
-Void
-DM8168DSPPWR_getConfig (DM8168DSPPWR_Config * cfg)
-{
-    GT_1trace (curTrace, GT_ENTER, "DM8168DSPPWR_getConfig", cfg);
-
-    GT_assert (curTrace, (cfg != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (cfg == NULL) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPWR_getConfig",
-                             PWRMGR_E_INVALIDARG,
-                             "Argument of type (DM8168DSPPWR_Config *) passed "
-                             "is null!");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        memcpy (cfg,
-                     &DM8168DSPPWR_state.defCfg,
-                     sizeof (DM8168DSPPWR_Config));
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-    GT_0trace (curTrace, GT_LEAVE, "DM8168DSPPWR_getConfig");
-}
-
-
-/*!
- *  @brief      Function to setup the DM8168DSPPWR module.
- *
- *              This function sets up the DM8168DSPPWR module. This function must
- *              be called before any other instance-level APIs can be invoked.
- *              Module-level configuration needs to be provided to this
- *              function. If the user wishes to change some specific config
- *              parameters, then DM8168DSPPWR_getConfig can be called to get the
- *              configuration filled with the default values. After this, only
- *              the required configuration values can be changed. If the user
- *              does not wish to make any change in the default parameters, the
- *              application can simply call DM8168DSPPWR_setup with NULL
- *              parameters. The default parameters would get automatically used.
- *
- *  @param      cfg   Optional DM8168DSPPWR module configuration. If provided as
- *                    NULL, default configuration is used.
- *
- *  @sa         DM8168DSPPWR_destroy
- *              GateMutex_create
- */
-Int
-DM8168DSPPWR_setup (DM8168DSPPWR_Config * cfg)
-{
-    Int               status = PWRMGR_SUCCESS;
-    DM8168DSPPWR_Config   tmpCfg;
-    Error_Block eb;
-
-    Error_init(&eb);
-
-    GT_1trace (curTrace, GT_ENTER, "DM8168DSPPWR_setup", cfg);
-
-    if (cfg == NULL) {
-        DM8168DSPPWR_getConfig (&tmpCfg);
-        cfg = &tmpCfg;
-    }
-
-    /* Create a default gate handle for local module protection. */
-    DM8168DSPPWR_state.gateHandle = (IGateProvider_Handle)
-                             GateMutex_create ((GateMutex_Params*)NULL, &eb);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (DM8168DSPPWR_state.gateHandle == NULL) {
-        /*! @retval PWRMGR_E_FAIL Failed to create GateMutex! */
-        status = PWRMGR_E_FAIL;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPWR_setup",
-                             status,
-                             "Failed to create GateMutex!");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        /* Copy the user provided values into the state object. */
-        memcpy (&DM8168DSPPWR_state.cfg,
-                     cfg,
-                     sizeof (DM8168DSPPWR_Config));
-
-        /* Initialize the name to handles mapping array. */
-        memset (&DM8168DSPPWR_state.pwrHandles,
-                    0,
-                    (sizeof (DM8168DSPPWR_Handle) * MultiProc_MAXPROCESSORS));
-        DM8168DSPPWR_state.isSetup = TRUE;
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DSPPWR_setup", status);
-
-    /*! @retval PWRMGR_SUCCESS Operation successful */
-    return (status);
-}
-
-
-/*!
- *  @brief      Function to destroy the DM8168DSPPWR module.
- *
- *              Once this function is called, other DM8168DSPPWR module APIs, except
- *              for the DM8168DSPPWR_getConfig API cannot be called anymore.
- *
- *  @sa         DM8168DSPPWR_setup
- *              GateMutex_delete
- */
-Int
-DM8168DSPPWR_destroy (Void)
-{
-    Int    status = PWRMGR_SUCCESS;
-    UInt16 i;
-
-    GT_0trace (curTrace, GT_ENTER, "DM8168DSPPWR_destroy");
-
-    /* Check if any DM8168DSPPWR instances have not been deleted so far. If not,
-     * delete them.
-     */
-    for (i = 0 ; i < MultiProc_MAXPROCESSORS ; i++) {
-        GT_assert (curTrace, (DM8168DSPPWR_state.pwrHandles [i] == NULL));
-        if (DM8168DSPPWR_state.pwrHandles [i] != NULL) {
-            DM8168DSPPWR_delete (&(DM8168DSPPWR_state.pwrHandles [i]));
-        }
-    }
-
-    if (DM8168DSPPWR_state.gateHandle != NULL) {
-        GateMutex_delete ((GateMutex_Handle *)
-                                &(DM8168DSPPWR_state.gateHandle));
-    }
-
-    DM8168DSPPWR_state.isSetup = FALSE;
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DSPPWR_destroy", status);
-
-    /*! @retval PWRMGR_SUCCESS Operation successful */
-    return (status);
-}
-
-
-/*!
- *  @brief      Function to initialize the parameters for this PwrMgr instance.
- *
- *  @param      params  Configuration parameters.
- *
- *  @sa         DM8168DSPPWR_create
- */
-Void
-DM8168DSPPWR_Params_init (DM8168DSPPWR_Params * params)
-{
-    GT_1trace (curTrace, GT_ENTER, "DM8168DSPPWR_Params_init",params);
-
-    GT_assert (curTrace, (params != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (params == NULL) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPWR_Params_init",
-                             PWRMGR_E_INVALIDARG,
-                             "Argument of type (DM8168DSPPWR_Params *) "
-                             "passed is null!");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        /* Return updated DM8168DSPPWR instance specific parameters. */
-        params->reserved = 0;
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-    GT_0trace (curTrace, GT_LEAVE, "DM8168DSPPWR_Params_init");
-}
-
-/*!
- *  @brief      Function to create an instance of this PwrMgr.
- *
- *  @param      procId  Processor ID addressed by this PwrMgr instance.
- *  @param      params  Configuration parameters.
- *
- *  @sa         DM8168DSPPWR_delete
- */
-DM8168DSPPWR_Handle
-DM8168DSPPWR_create (      UInt16               procId,
-                    const DM8168DSPPWR_Params * params)
-{
-    Int                  status = PWRMGR_SUCCESS;
-    PwrMgr_Object *      handle = NULL;
-    IArg                 key;
-
-    GT_2trace (curTrace, GT_ENTER, "DM8168DSPPWR_create", procId, params);
-
-    GT_assert (curTrace, IS_VALID_PROCID (procId));
-    GT_assert (curTrace, (params != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (!IS_VALID_PROCID (procId)) {
-        status = PWRMGR_E_INVALIDARG;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPWR_create",
-                             status,
-                             "Invalid procId specified");
-    }
-    else if (params == NULL) {
-        status = PWRMGR_E_INVALIDARG;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPWR_create",
-                             status,
-                             "params passed is null!");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        /* Enter critical section protection. */
-        key = IGateProvider_enter (DM8168DSPPWR_state.gateHandle);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-        /* Check if the PwrMgr already exists for specified procId. */
-        if (DM8168DSPPWR_state.pwrHandles [procId] != NULL) {
-            status = PWRMGR_E_ALREADYEXIST;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "DM8168DSPPWR_create",
-                                 status,
-                                 "PwrMgr already exists for specified procId!");
-        }
-        else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-            /* Allocate memory for the handle */
-            handle = (PwrMgr_Object *) Memory_calloc (NULL,
-                                                      sizeof (PwrMgr_Object),
-                                                      0,
-                                                      NULL);
-            if (handle == NULL) {
-                status = PWRMGR_E_MEMORY;
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "DM8168DSPPWR_create",
-                                     status,
-                                     "Memory allocation failed for handle!");
-            }
-            else {
-                /* Populate the handle fields */
-                handle->pwrFxnTable.attach = &DM8168DSPPWR_attach;
-                handle->pwrFxnTable.detach = &DM8168DSPPWR_detach;
-                handle->pwrFxnTable.on     = &DM8168DSPPWR_on;
-                handle->pwrFxnTable.off    = &DM8168DSPPWR_off;
-                /* TBD: Other functions */
-
-                /* Allocate memory for the DM8168DSPPWR handle */
-                handle->object = Memory_calloc (NULL,
-                                                sizeof (DM8168DSPPWR_Object),
-                                                0,
-                                                NULL);
-                if (handle->object == NULL) {
-                    status = PWRMGR_E_MEMORY;
-                    GT_setFailureReason (curTrace,
-                                        GT_4CLASS,
-                                        "DM8168DSPPWR_create",
-                                        status,
-                                        "Memory allocation failed for handle!");
-                }
-                else {
-#if defined (SYSLINK_BUILDOS_LINUX)
-                    ((DM8168DSPPWR_Object *)(handle->object))->clockHandle
-                                       = (ClockOps_Handle) LinuxClock_create();
-#endif/* #if defined (SYSLINK_BUILDOS_LINUX) */
-#if defined (SYSLINK_BUILD_RTOS)
-                    ((DM8168DSPPWR_Object *)(handle->object))->clockHandle
-                                       = (ClockOps_Handle) DM8168CLOCK_create();
-#endif/* #if defined (SYSLINK_BUILD_RTOS) */
-                    handle->procId = procId;
-                    DM8168DSPPWR_state.pwrHandles [procId] =
-                                                (DM8168DSPPWR_Handle) handle;
-                }
-            }
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-        }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        /* Leave critical section protection. */
-        IGateProvider_leave (DM8168DSPPWR_state.gateHandle, key);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-    if (status < 0) {
-        if (handle !=  NULL) {
-            if (handle->object != NULL) {
-                Memory_free (NULL, handle->object, sizeof (DM8168DSPPWR_Object));
-            }
-            Memory_free (NULL, handle, sizeof (PwrMgr_Object));
-        }
-        /*! @retval NULL Function failed */
-        handle = NULL;
-    }
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DSPPWR_create", handle);
-
-    /*! @retval Valid-Handle Operation successful */
-    return (DM8168DSPPWR_Handle) handle;
-}
-
-
-/*!
- *  @brief      Function to delete an instance of this PwrMgr.
- *
- *              The user provided pointer to the handle is reset after
- *              successful completion of this function.
- *
- *  @param      handlePtr  Pointer to Handle to the PwrMgr instance
- *
- *  @sa         DM8168DSPPWR_create
- */
-Int
-DM8168DSPPWR_delete (DM8168DSPPWR_Handle * handlePtr)
-{
-    Int                  status = PWRMGR_SUCCESS;
-    DM8168DSPPWR_Object * object = NULL;
-    PwrMgr_Object *      handle;
-    IArg                 key;
-
-    GT_1trace (curTrace, GT_ENTER, "DM8168DSPPWR_delete", handlePtr);
-
-    GT_assert (curTrace, (handlePtr != NULL));
-    GT_assert (curTrace, ((handlePtr != NULL) && (*handlePtr != NULL)));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (handlePtr == NULL) {
-        /*! @retval PWRMGR_E_INVALIDARG Invalid NULL handlePtr specified*/
-        status = PWRMGR_E_INVALIDARG;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPWR_delete",
-                             status,
-                             "Invalid NULL handlePtr specified");
-    }
-    else if (*handlePtr == NULL) {
-        /*! @retval PWRMGR_E_HANDLE Invalid NULL *handlePtr specified */
-        status = PWRMGR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPWR_delete",
-                             status,
-                             "Invalid NULL *handlePtr specified");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        handle = (PwrMgr_Object *) (*handlePtr);
-        /* Enter critical section protection. */
-        key = IGateProvider_enter (DM8168DSPPWR_state.gateHandle);
-
-        /* Reset handle in PwrMgr handle array. */
-        GT_assert (curTrace, IS_VALID_PROCID (handle->procId));
-        DM8168DSPPWR_state.pwrHandles [handle->procId] = NULL;
-
-        object = (DM8168DSPPWR_Object *) handle->object;
-        /* Free memory used for the DM8168DSPPWR object. */
-        if (handle->object != NULL) {
-            /* Free memory used for the clock handle */
-#if defined (SYSLINK_BUILDOS_LINUX)
-            LinuxClock_delete(((DM8168DSPPWR_Object *)(handle->object))->clockHandle);
-#endif /* #if defined (SYSLINK_BUILDOS_LINUX) */
-#if defined (SYSLINK_BUILD_RTOS)
-            DM8168CLOCK_delete(((DM8168DSPPWR_Object *)(handle->object))->clockHandle);
-#endif /* #if defined (SYSLINK_BUILD_RTOS) */
-            Memory_free (NULL,
-                         object,
-                         sizeof (DM8168DSPPWR_Object));
-            handle->object = NULL;
-        }
-
-        /* Free memory used for the PwrMgr object. */
-        Memory_free (NULL, handle, sizeof (PwrMgr_Object));
-        *handlePtr = NULL;
-
-        /* Leave critical section protection. */
-        IGateProvider_leave (DM8168DSPPWR_state.gateHandle, key);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DSPPWR_delete", status);
-
-    /*! @retval PWRMGR_SUCCESS Operation successful */
-    return (status);
-}
-
-
-/*!
- *  @brief      Function to open a handle to an instance of this PwrMgr. This
- *              function is called when access to the PwrMgr is required from
- *              a different process.
- *
- *  @param      handlePtr   Handle to the PwrMgr instance
- *  @param      procId      Processor ID addressed by this PwrMgr instance.
- *
- *  @sa         DM8168DSPPWR_close
- */
-Int
-DM8168DSPPWR_open (DM8168DSPPWR_Handle * handlePtr, UInt16 procId)
-{
-    Int status = PWRMGR_SUCCESS;
-
-    GT_2trace (curTrace, GT_ENTER, "DM8168DSPPWR_open", handlePtr, procId);
-
-    GT_assert (curTrace, (handlePtr != NULL));
-    GT_assert (curTrace, IS_VALID_PROCID (procId));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (handlePtr == NULL) {
-        /*! @retval PWRMGR_E_HANDLE Invalid NULL handlePtr specified */
-        status = PWRMGR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPWR_open",
-                             status,
-                             "Invalid NULL handlePtr specified");
-    }
-    else if (!IS_VALID_PROCID (procId)) {
-        /*! @retval PWRMGR_E_INVALIDARG Invalid procId specified */
-        status = PWRMGR_E_INVALIDARG;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPWR_open",
-                             status,
-                             "Invalid procId specified");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        /* Initialize return parameter handle. */
-        *handlePtr = NULL;
-
-        /* Check if the PwrMgr exists and return the handle if found. */
-        if (DM8168DSPPWR_state.pwrHandles [procId] == NULL) {
-            /*! @retval PWRMGR_E_NOTFOUND Specified instance not found */
-            status = PWRMGR_E_NOTFOUND;
-            GT_setFailureReason (curTrace,
-                              GT_4CLASS,
-                              "DM8168DSPPWR_open",
-                              status,
-                              "Specified DM8168DSPPWR instance does not exist!");
-        }
-        else {
-            *handlePtr = DM8168DSPPWR_state.pwrHandles [procId];
-        }
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DSPPWR_open", status);
-
-    /*! @retval PWRMGR_SUCCESS Operation successful */
-    return status;
-}
-
-
-/*!
- *  @brief      Function to close a handle to an instance of this PwrMgr.
- *
- *  @param      handlePtr  Pointer to Handle to the PwrMgr instance
- *
- *  @sa         DM8168DSPPWR_open
- */
-Int
-DM8168DSPPWR_close (DM8168DSPPWR_Handle * handlePtr)
-{
-    Int status = PWRMGR_SUCCESS;
-
-    GT_1trace (curTrace, GT_ENTER, "DM8168DSPPWR_close", handlePtr);
-
-    GT_assert (curTrace, (handlePtr != NULL));
-    GT_assert (curTrace, ((handlePtr != NULL) && (*handlePtr != NULL)));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (handlePtr == NULL) {
-        /*! @retval PWRMGR_E_INVALIDARG Invalid NULL handlePtr pointer
-                                         specified*/
-        status = PWRMGR_E_INVALIDARG;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPWR_close",
-                             status,
-                             "Invalid NULL handlePtr pointer specified");
-    }
-    else if (*handlePtr == NULL) {
-        /*! @retval PWRMGR_E_HANDLE Invalid NULL *handlePtr specified */
-        status = PWRMGR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPWR_close",
-                             status,
-                             "Invalid NULL *handlePtr specified");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        /* Nothing to be done for close. */
-        *handlePtr = NULL;
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DSPPWR_close", status);
-
-    /*! @retval PWRMGR_SUCCESS Operation successful */
-    return status;
-}
-
-
-/* =============================================================================
- * APIs called by PwrMgr module (part of function table interface)
- * =============================================================================
- */
-/*!
- *  @brief      Function to attach to the PwrMgr.
- *
- *  @param      handle  Handle to the PwrMgr instance
- *  @param      params  Attach parameters
- *
- *  @sa         DM8168DSPPWR_detach
- */
-Int
-DM8168DSPPWR_attach (PwrMgr_Handle handle, PwrMgr_AttachParams * params)
-{
-    Int status                        = PWRMGR_SUCCESS;
-    PwrMgr_Object *      pwrMgrHandle = (PwrMgr_Object *) handle;
-    DM8168DSPPWR_Object * object    = NULL;
-    Memory_MapInfo       mapInfo;
-    /* Mapping for prcm base is done in DM8168VIDEOM3_phyShmemInit */
-
-    GT_2trace (curTrace, GT_ENTER, "DM8168DSPPWR_attach", handle, params);
-
-    GT_assert (curTrace, (handle != NULL));
-    GT_assert (curTrace, (params != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (handle == NULL) {
-        /*! @retval PWRMGR_E_HANDLE Invalid argument */
-        status = PWRMGR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPWR_attach",
-                             status,
-                             "Invalid handle specified");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        object = (DM8168DSPPWR_Object *) pwrMgrHandle->object;
-        GT_assert (curTrace, (object != NULL));
-        /* Map and get the virtual address for system control module */
-        mapInfo.src      = PRCM_BASE_ADDR;
-        mapInfo.size     = PRCM_SIZE;
-        mapInfo.isCached = FALSE;
-        status = Memory_map (&mapInfo);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-        if (status < 0) {
-            status = DM8168DSPPWR_E_FAIL;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "DM8168DSPPWR_attach",
-                                 status,
-                                 "Failure in mapping prcm module");
-        }
-        else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-            object->prcmVA = mapInfo.dst;
-
-            /* Map and get the virtual address for system control module */
-            mapInfo.src      = CTRL_MODULE_BASE_ADDR;
-            mapInfo.size     = CTRL_MODULE_SIZE;
-            mapInfo.isCached = FALSE;
-            status = Memory_map (&mapInfo);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-            if (status < 0) {
-                status = DM8168DSPPWR_E_FAIL;
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "DM8168DSPPWR_attach",
-                                     status,
-                                     "Failure in mapping prcm module");
-            }
-            else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-                object->controlVA = mapInfo.dst;
-
-                /* Map and get the virtual address for system l2 ram */
-                mapInfo.src      = GEM_L2RAM_BASE_ADDR;
-                mapInfo.size     = GEM_L2RAM_SIZE;
-                mapInfo.isCached = FALSE;
-                status = Memory_map (&mapInfo);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-                if (status < 0) {
-                    status = DM8168DSPPWR_E_FAIL;
-                    GT_setFailureReason (curTrace,
-                                         GT_4CLASS,
-                                         "DM8168DSPPWR_attach",
-                                         status,
-                                         "Failure in mapping prcm module");
-                }
-                else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-                object->l2baseVA = mapInfo.dst;
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-                }
-            }
-        }
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-    /*! @retval PWRMGR_SUCCESS Operation successful */
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DSPPWR_attach", status);
-    return (status);
-
-}
-
-
-/*!
- *  @brief      Function to detach from the PwrMgr.
- *
- *  @param      handle  Handle to the PwrMgr instance
- *
- *  @sa         DM8168DSPPWR_attach
- */
-Int
-DM8168DSPPWR_detach (PwrMgr_Handle handle)
-{
-
-    Int status                     = PWRMGR_SUCCESS;
-    PwrMgr_Object * pwrMgrHandle   = (PwrMgr_Object *) handle;
-    DM8168DSPPWR_Object * object = NULL;
-    Memory_UnmapInfo     unmapInfo;
-
-
-    /* Mapping for prcm base is done in DM8168VIDEOM3_phyShmemInit */
-
-    GT_1trace (curTrace, GT_ENTER, "DM8168DSPPWR_detach", handle);
-
-    GT_assert (curTrace, (handle != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (handle == NULL) {
-        /*! @retval PWRMGR_E_HANDLE Invalid argument */
-        status = PWRMGR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPWR_detach",
-                             status,
-                             "Invalid handle specified");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        object = (DM8168DSPPWR_Object *) pwrMgrHandle->object;
-        GT_assert (curTrace, (object != NULL));
-
-        if (object->controlVA != 0x0) {
-            /* Unmap the virtual address for control module */
-            unmapInfo.addr = object->controlVA;
-            unmapInfo.size = CTRL_MODULE_SIZE;
-            unmapInfo.isCached = FALSE;
-            if (unmapInfo.addr != 0) {
-                status = Memory_unmap (&unmapInfo);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-                if (status < 0) {
-                    status = DM8168DSPPWR_E_FAIL;
-                    GT_setFailureReason (curTrace,
-                                         GT_4CLASS,
-                                         "DM8168DSPPWR_detach",
-                                         status,
-                                         "Failure in mapping prcm module");
-                }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-            }
-        }
-        if (object->prcmVA != 0x0) {
-            /* Unmap the virtual address for prcm module */
-            unmapInfo.addr = object->prcmVA;
-            unmapInfo.size = PRCM_SIZE;
-            unmapInfo.isCached = FALSE;
-            if (unmapInfo.addr != 0) {
-                status = Memory_unmap (&unmapInfo);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-                if (status < 0) {
-                    status = DM8168DSPPWR_E_FAIL;
-                    GT_setFailureReason (curTrace,
-                                         GT_4CLASS,
-                                         "DM8168DSPPWR_detach",
-                                         status,
-                                         "Failure in mapping prcm module");
-                }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-            }
-        }
-        if (object->l2baseVA != 0x0) {
-            /* Unmap the virtual address for prcm module */
-            unmapInfo.addr = object->l2baseVA;
-            unmapInfo.size = GEM_L2RAM_SIZE;
-            unmapInfo.isCached = FALSE;
-            if (unmapInfo.addr != 0) {
-                status = Memory_unmap (&unmapInfo);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-                if (status < 0) {
-                    status = DM8168DSPPWR_E_FAIL;
-                    GT_setFailureReason (curTrace,
-                                         GT_4CLASS,
-                                         "DM8168DSPPWR_detach",
-                                         status,
-                                         "Failure in mapping prcm module");
-                }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-            }
-        }
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DSPPWR_detach", status);
-    /*! @retval PWRMGR_SUCCESS Operation successful */
-    return (status);
-
-}
-
-
-/*!
- *  @brief      Function to power on the slave processor.
- *
- *              Power on the IVA subsystem, hold the DSP and SEQ in reset, and
- *              release IVA2_RST. This is a hostile reset of the IVA. If the IVA
- *              is already powered on, then it must be powered off in order to
- *              terminate all current activity and initiate a power-on-reset
- *              transition to bring the IVA to a know good state.
- *
- *  @param      handle    Handle to the PwrMgr instance
- *
- *  @sa         DM8168DSPPWR_off
- */
-Int
-DM8168DSPPWR_on (PwrMgr_Handle handle)
-{
-
-    Int                  status       = PWRMGR_SUCCESS ;
-
-#if !defined (NETRA_SIMULATOR) /* Commented for simulator */
-    PwrMgr_Object *      pwrMgrHandle = (PwrMgr_Object *) handle;
-    DM8168DSPPWR_Object * object   = NULL;
-
-    GT_1trace (curTrace, GT_ENTER, "DM8168DSPPWR_on", handle);
-
-    GT_assert (curTrace, (handle != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (handle == NULL) {
-        /*! @retval PWRMGR_E_HANDLE Invalid argument */
-        status = PWRMGR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPWR_on",
-                             status,
-                             "Invalid handle specified");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        object = (DM8168DSPPWR_Object *) pwrMgrHandle->object;
-        GT_assert (curTrace, (object != NULL));
-
-        /* Enable spinlocks, mailbox and timers before powering on dsp */
-        object->dspSpinlockHandle = ClockOps_get(object->clockHandle, "spinbox_ick");
-
-        /* Do not put this check under SYSLINK_BUILD_OPTIMIZE */
-        GT_assert (curTrace, (object->dspSpinlockHandle != NULL));
-        status = ClockOps_enable(object->clockHandle, object->dspSpinlockHandle);
-        if (status < 0) {
-            /*! @retval PWRMGR_E_HANDLE Invalid argument */
-            status = PWRMGR_E_FAIL;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "DM8168DSPPWR_on",
-                                 status,
-                                 "ClockOps_enable failed");
-        }
-        object->dspMailboxHandle = ClockOps_get(object->clockHandle, "mailbox_ick");
-        /* Do not put this check under SYSLINK_BUILD_OPTIMIZE */
-        GT_assert (curTrace, (object->dspMailboxHandle != NULL));
-        status = ClockOps_enable(object->clockHandle, object->dspMailboxHandle);
-        GT_assert (curTrace, (status >= 0));
-
-#if defined(SYSLINK_VARIANT_TI814X) || defined(SYSLINK_VARIANT_TI811X)
-        /* GP timer4 is actually timer 3 for bios it will be enabled from bios
-         * Here we are enabling the gptimer 4 clk module
-         */
-
-        object->dspTimerIclkHandle = ClockOps_get(object->clockHandle, "gpt4_ick");
-        /* Do not put this check under SYSLINK_BUILD_OPTIMIZE */
-        GT_assert (curTrace, (object->dspTimerIclkHandle != NULL));
-        status = ClockOps_enable(object->clockHandle, object->dspTimerIclkHandle);
-        GT_assert (curTrace, (status >= 0));
-
-        object->dspTimerFclkHandle = ClockOps_get(object->clockHandle, "gpt4_fck");
-        /* Do not put this check under SYSLINK_BUILD_OPTIMIZE */
-        GT_assert (curTrace, (object->dspTimerFclkHandle != NULL));
-        status = ClockOps_enable(object->clockHandle, object->dspTimerFclkHandle);
-        GT_assert (curTrace, (status >= 0));
-#else
-        /* GP timer3 is actually timer 2 for bios it will be enabled from bios
-         * Here we are enabling the gptimer 3 clk module
-         */
-        /*
-         * TISB update: I don't know what the above comment is trying to say.
-         * We enable both gpt3 and gpt4 here for Netra because "older" BIOS
-         * needs gpt3 and "newer" BIOS needs gpt4.
-         */
-
-        object->dspTimerIclkHandle1 = ClockOps_get(object->clockHandle, "gpt3_ick");
-        /* Do not put this check under SYSLINK_BUILD_OPTIMIZE */
-        GT_assert (curTrace, (object->dspTimerIclkHandle1 != NULL));
-        status = ClockOps_enable(object->clockHandle, object->dspTimerIclkHandle1);
-        GT_assert (curTrace, (status >= 0));
-
-        object->dspTimerFclkHandle1 = ClockOps_get(object->clockHandle, "gpt3_fck");
-        /* Do not put this check under SYSLINK_BUILD_OPTIMIZE */
-        GT_assert (curTrace, (object->dspTimerFclkHandle1 != NULL));
-        status = ClockOps_enable(object->clockHandle, object->dspTimerFclkHandle1);
-        GT_assert (curTrace, (status >= 0));
-
-        object->dspTimerIclkHandle2 = ClockOps_get(object->clockHandle, "gpt4_ick");
-        /* Do not put this check under SYSLINK_BUILD_OPTIMIZE */
-        GT_assert (curTrace, (object->dspTimerIclkHandle2 != NULL));
-        status = ClockOps_enable(object->clockHandle, object->dspTimerIclkHandle2);
-        GT_assert (curTrace, (status >= 0));
-
-        object->dspTimerFclkHandle2 = ClockOps_get(object->clockHandle, "gpt4_fck");
-        /* Do not put this check under SYSLINK_BUILD_OPTIMIZE */
-        GT_assert (curTrace, (object->dspTimerFclkHandle2 != NULL));
-        status = ClockOps_enable(object->clockHandle, object->dspTimerFclkHandle2);
-        GT_assert (curTrace, (status >= 0));
-
-        /* Bring GEM L2RAM out of Power down Mode */
-        REG(object->controlVA + DSPMEM_SLEEP)     = 0x0;
-#endif
-
-        /* Enable Dsp MMU clocks */
-
-        object->dspMmuCfgClkHandle = ClockOps_get(object->clockHandle, "mmu_cfg_ick");
-        /* Do not put this check under SYSLINK_BUILD_OPTIMIZE */
-        GT_assert (curTrace, (object->dspMmuCfgClkHandle != NULL));
-        status = ClockOps_enable(object->clockHandle, object->dspMmuCfgClkHandle);
-        GT_assert (curTrace, (status >= 0));
-
-        object->dspMmuClkHandle = ClockOps_get(object->clockHandle, "mmu_ick");
-        /* Do not put this check under SYSLINK_BUILD_OPTIMIZE */
-        GT_assert (curTrace, (object->dspMmuClkHandle != NULL));
-        status = ClockOps_enable(object->clockHandle, object->dspMmuClkHandle);
-        GT_assert (curTrace, (status >= 0));
-        object->dspClkHandle = ClockOps_get(object->clockHandle, "gem_ick");
-
-        GT_assert (curTrace, (object->dspClkHandle != NULL));
-        status = ClockOps_enable(object->clockHandle, object->dspClkHandle);
-        GT_assert (curTrace, (status >= 0));
-
-               /* Warm Reset to  access Internal RAM of DSP - to access internal RAM */
-//             REG((object->prcmVA) + RM_ACTIVE_RSTCTRL) = 0x01;
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DSPPWR_on", status);
-    /*! @retval PWRMGR_SUCCESS Operation successful */
-#endif /*#if !defined (NETRA_SIMULATOR)*/
-    return (status);
-}
-
-
-/*!
- *  @brief      Function to power off the slave processor.
- *
- *              Turn the IVA power domain off. To ensure a clean power-off
- *              transition, the IVA subsystem must first be turned on so that
- *              the DSP can initiate an autonomous power-off transition.
- *
- *  @param      handle    Handle to the PwrMgr instance
- *  @param      force     Indicates whether power-off is to be forced
- *
- *  @sa         DM8168DSPPWR_on
- */
-Int
-DM8168DSPPWR_off (PwrMgr_Handle handle, Bool force)
-{
-    Int                  status       = PWRMGR_SUCCESS ;
-    PwrMgr_Object *      pwrMgrHandle = (PwrMgr_Object *) handle;
-    DM8168DSPPWR_Object * object   = NULL;
-
-    GT_1trace (curTrace, GT_ENTER, "DM8168DSPPWR_off", handle);
-
-    GT_assert (curTrace, (handle != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (handle == NULL) {
-        /*! @retval PWRMGR_E_HANDLE Invalid argument */
-        status = PWRMGR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DSPPWR_off",
-                             status,
-                             "Invalid handle specified");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        object = (DM8168DSPPWR_Object *) pwrMgrHandle->object;
-        GT_assert (curTrace, (object != NULL));
-
-
-        /* Disable Dsp mmu clocks */
-        if(object->dspMmuClkHandle) {
-            ClockOps_disable(object->clockHandle, object->dspMmuClkHandle);
-            ClockOps_put(object->clockHandle, object->dspMmuClkHandle);
-        }
-        /* Disable Dsp mmu cfg clocks */
-        if(object->dspMmuCfgClkHandle) {
-            ClockOps_disable(object->clockHandle, object->dspMmuCfgClkHandle);
-            ClockOps_put(object->clockHandle, object->dspMmuCfgClkHandle);
-        }
-
-        /* assert DSP standby, removed to fix DSP internal memory load, -rams */
-//      REG(object->controlVA + DSP_IDLE_CFG) |= 0x8000;
-
-        /* Disable GEM clocks */
-        if(object->dspClkHandle) {
-            ClockOps_disable(object->clockHandle, object->dspClkHandle);
-            ClockOps_put(object->clockHandle, object->dspClkHandle);
-        }
-
-#if defined(SYSLINK_VARIANT_TI814X) || defined(SYSLINK_VARIANT_TI811X)
-        /* Disable  Timer4 functional clocks */
-        if(object->dspTimerFclkHandle) {
-            ClockOps_disable(object->clockHandle, object->dspTimerFclkHandle);
-            ClockOps_put(object->clockHandle, object->dspTimerFclkHandle);
-        }
-        /* Disable Timer4 interface clocks */
-        if(object->dspTimerIclkHandle) {
-            ClockOps_disable(object->clockHandle, object->dspTimerIclkHandle);
-            ClockOps_put(object->clockHandle, object->dspTimerIclkHandle);
-        }
-#else
-        /* Bring GEM L2RAM in to Power down Mode */
-        REG(object->controlVA + DSPMEM_SLEEP) = 0x04;
-
-        /* Disable  Timer4 functional clocks */
-        if(object->dspTimerFclkHandle2) {
-            ClockOps_disable(object->clockHandle, object->dspTimerFclkHandle2);
-            ClockOps_put(object->clockHandle, object->dspTimerFclkHandle2);
-        }
-        /* Disable Timer4 interface clocks */
-        if(object->dspTimerIclkHandle2) {
-            ClockOps_disable(object->clockHandle, object->dspTimerIclkHandle2);
-            ClockOps_put(object->clockHandle, object->dspTimerIclkHandle2);
-        }
-        /* Disable  Timer3 functional clocks */
-        if(object->dspTimerFclkHandle1) {
-            ClockOps_disable(object->clockHandle, object->dspTimerFclkHandle1);
-            ClockOps_put(object->clockHandle, object->dspTimerFclkHandle1);
-        }
-        /* Disable Timer3 interface clocks */
-        if(object->dspTimerIclkHandle1) {
-            ClockOps_disable(object->clockHandle, object->dspTimerIclkHandle1);
-            ClockOps_put(object->clockHandle, object->dspTimerIclkHandle1);
-        }
-#endif
-        /* Disable Mailbox clocks */
-        if(object->dspMailboxHandle) {
-            ClockOps_disable(object->clockHandle, object->dspMailboxHandle);
-            ClockOps_put(object->clockHandle, object->dspMailboxHandle);
-        }
-        /* Disable Spinlock clocks */
-        if(object->dspSpinlockHandle) {
-            ClockOps_disable(object->clockHandle, object->dspSpinlockHandle);
-            ClockOps_put(object->clockHandle, object->dspSpinlockHandle);
-        }
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DSPPWR_off", status);
-    /*! @retval PWRMGR_SUCCESS Operation successful */
-    return (status);
-}
-
-
-#if defined (__cplusplus)
-}
-#endif /* defined (__cplusplus) */
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/Dm8168DucatiMmu.c b/qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/Dm8168DucatiMmu.c
deleted file mode 100644 (file)
index e838b59..0000000
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- *  @file   Dm8168DucatiMmu.c
- *
- *  @brief      ducati mmu code
- *
- *
- *  ============================================================================
- *
- *  Copyright (c) 2008-2012, Texas Instruments Incorporated
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *  *  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *  *  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- *  *  Neither the name of Texas Instruments Incorporated nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  Contact information for paper mail:
- *  Texas Instruments
- *  Post Office Box 655303
- *  Dallas, Texas 75265
- *  Contact information:
- *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
- *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
- *  ============================================================================
- *
- */
-
-
-
-#if defined(SYSLINK_BUILD_HLOS)
-#include <ti/syslink/Std.h>
-/* OSAL & Utils headers */
-#include <OsalDelay.h>
-#endif /* #if defined(SYSLINK_BUILD_HLOS) */
-
-#if defined(SYSLINK_BUILD_RTOS)
-#include <xdc/std.h>
-#endif /* #if defined(SYSLINK_BUILD_RTOS) */
-
-
-#include <ti/syslink/utils/Trace.h>
-#include <OsalThread.h>
-
-#include <PwrDefs.h>
-#include <PwrMgr.h>
-#include <Dm8168DucatiPwr.h>
-#include <ti/syslink/inc/knl/Linux/Dm8168DucatiMmu.h>
-#include <ti/syslink/inc/Bitops.h>
-
-#define REG(x)              *((volatile UInt32 *) (x))
-
-
-#define RM_DEFAULT_RSTCTRL     0x00000B10
-#define RM_DEFAULT_RSTST       0x00000B14
-#define CM_DEFAULT_DUCATI_CLKSTCTRL 0x00000518
-#define CM_DEFAULT_DUCATI_CLKCTRL   0x00000574
-
-
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
-/* =============================================================================
- *  Macros and types
- * =============================================================================
- */
-
-
-Void DM8168DUCATIMMU_enable(PwrMgr_Handle handle)
-{
-    PwrMgr_Object *      pwrMgrHandle = (PwrMgr_Object *) handle;
-    DM8168DUCATIPWR_Object * object    = NULL;
-
-    GT_1trace (curTrace, GT_ENTER, "DM8168DUCATIMMU_enable", handle);
-
-    GT_assert (curTrace, (handle != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        if (handle == NULL) {
-            /*! @retval PWRMGR_E_HANDLE Invalid argument */
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "DM8168DUCATIMMU_enable",
-                                 PWRMGR_E_FAIL,
-                                 "Invalid handle specified");
-        }
-        else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-            object = (DM8168DUCATIPWR_Object *) pwrMgrHandle->object;
-            GT_assert (curTrace, (object != NULL));
-
-            /*Enable the Ducati Logic*/
-            CLEAR_BIT(REG(object->prcmVA + RM_DEFAULT_RSTCTRL), 0x4);
-            while((((REG(object->prcmVA + RM_DEFAULT_RSTST)&0x10))!=0x10));
-#if defined(SYSLINK_VARIANT_TI814X) || \
-    defined(SYSLINK_VARIANT_TI813X) || \
-    defined(SYSLINK_VARIANT_TI811X)
-            /* This delay is required only in case of centaurus*/
-//            OsalDelay_udelay(2);
-            OsalThread_delay(2); //2ms sec delay
-#endif
-            /* Write a while(1) so that even if m3 comes out of reset
-             * m3 wont crash  */
-            REG(object->ducatibaseVA)        = 0x10000;
-            REG(object->ducatibaseVA + 0x04) = 0x9;
-            REG(object->ducatibaseVA + 0x08) = 0xE7FEE7FE;
-
-            /* M3_0 and M3_1 should be taken out of reset after this
-               and that is done is reset code*/
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-
-    }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-    GT_0trace (curTrace, GT_LEAVE, "DM8168DUCATIMMU_enable");
-}
-
-
-Void DM8168DUCATIMMU_disable(PwrMgr_Handle handle)
-{
-    PwrMgr_Object *      pwrMgrHandle = (PwrMgr_Object *) handle;
-    DM8168DUCATIPWR_Object * object    = NULL;
-
-    GT_1trace (curTrace, GT_ENTER, "DM8168DUCATIMMU_disable", handle);
-
-    GT_assert (curTrace, (handle != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        if (handle == NULL) {
-            /*! @retval PWRMGR_E_HANDLE Invalid argument */
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "DM8168DUCATIMMU_enable",
-                                 PWRMGR_E_FAIL,
-                                 "Invalid handle specified");
-        }
-        else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-            object = (DM8168DUCATIPWR_Object *) pwrMgrHandle->object;
-            GT_assert (curTrace, (object != NULL));
-
-            /* This code is specific for apps to run  */
-            REG(object->ducatibaseVA)        = 0x10000;
-            REG(object->ducatibaseVA + 0x04) = 0x9;
-            REG(object->ducatibaseVA + 0x08) = 0xE7FEE7FE;
-            /* Flush the unicache so as to succeed in subsequent runs */
-            REG(object->ducatiMmuVA + 0x0CA8) = 0x400;
-
-            /* DO NOT Disable the Ducati Logic*/
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-
-    }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-    GT_0trace (curTrace, GT_LEAVE, "DM8168DUCATIMMU_disable");
-}
-
-
-#if defined (__cplusplus)
-}
-#endif
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/Dm8168DucatiPwr.c b/qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/Dm8168DucatiPwr.c
deleted file mode 100644 (file)
index 0e1fe06..0000000
+++ /dev/null
@@ -1,1209 +0,0 @@
-/*
- *  @file   Dm8168DucatiPwr.c
- *
- *  @brief      PwrMgr implementation for DM8168DUCATI.
- *
- *              This module is responsible for handling power requests for
- *              the ProcMgr. The implementation is common to DM8168VIDEOM3 and
- *              DM8168VPSSM3.
- *
- *
- *  ============================================================================
- *
- *  Copyright (c) 2008-2012, Texas Instruments Incorporated
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *  *  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *  *  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- *  *  Neither the name of Texas Instruments Incorporated nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  Contact information for paper mail:
- *  Texas Instruments
- *  Post Office Box 655303
- *  Dallas, Texas 75265
- *  Contact information:
- *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
- *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
- *  ============================================================================
- *
- */
-
-
-#if defined(SYSLINK_BUILD_HLOS)
-#include <ti/syslink/Std.h>
-
-/* OSAL & Utils headers */
-#include <ti/syslink/utils/String.h>
-#include <ti/syslink/utils/IGateProvider.h>
-#include <ti/syslink/utils/GateMutex.h>
-#include <ti/syslink/utils/Memory.h>
-#include <ti/syslink/utils/Gate.h>
-#if defined (SYSLINK_BUILDOS_LINUX)
-#include <ti/syslink/inc/knl/Linux/LinuxClock.h>
-#endif /* #if defined(SYSLINK_BUILDOS_LINUX) */
-#endif /* #if defined(SYSLINK_BUILD_HLOS) */
-
-
-#if defined(SYSLINK_BUILD_RTOS)
-#include <xdc/std.h>
-#include <xdc/runtime/Error.h>
-#include <xdc/runtime/Memory.h>
-#include <xdc/runtime/System.h>
-#include <xdc/runtime/Gate.h>
-#include <xdc/runtime/IGateProvider.h>
-#include <ti/sysbios/gates/GateMutex.h>
-#include <ti/syslink/utils/_Memory.h>
-#include <ti/syslink/inc/Dm8168Clock.h>
-#endif /* #if defined(SYSLINK_BUILD_RTOS) */
-
-#if defined(SYSLINK_BUILDOS_LINUX)
-#include <linux/string.h>
-#else
-#include <string.h>
-#endif
-
-#include <ti/syslink/utils/Trace.h>
-
-/* Module level headers */
-#include <ti/ipc/MultiProc.h>
-#include <ti/syslink/inc/_MultiProc.h>
-#include <ti/syslink/inc/knl/PwrDefs.h>
-#include <ti/syslink/inc/knl/PwrMgr.h>
-#include <ti/syslink/inc/knl/Dm8168DucatiPwr.h>
-#include <ti/syslink/inc/knl/_Dm8168DucatiPwr.h>
-#include <ti/syslink/inc/knl/Linux/Dm8168DucatiMmu.h>
-
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
-
-/* =============================================================================
- *  Macros and types
- * =============================================================================
- */
-/*!
- *  @brief  DM8168VIDEOM3 module and mmr addresses (physical)
- */
-
-#define DM8168M3_PRCM_BASE_ADDR      0x48180000
-#define DM8168M3_PRCM_SIZE           0x00002FFF
-
-/* Ducati MMU base */
-#define DUCATI_MMU_CFG               0x55080000
-#define DUCATI_MMU_CFG_SIZE          0x00000FFF
-
-
-#define DUCATI_BASE_ADDR             0x55020000
-#define DUCATI_BASE_ADDR_SIZE        0x00000008
-
-#define MAX_WAIT_COUNT               0x50000
-
-#define REG(x)              *((volatile UInt32 *) (x))
-#define MEM(x)              *((volatile UInt32 *) (x))
-
-/* Macro to make a correct module magic number with refCount */
-#define DM8168DUCATIPWR_MAKE_MAGICSTAMP(x) \
-                            ((DM8168DUCATIPWR_MODULEID << 12u) | (x))
-
-/*!
- *  @brief  DM8168DUCATIPWR Module state object
- */
-typedef struct DM8168DUCATIPWR_ModuleObject_tag {
-    UInt32                  refCount;
-    /* Module Reference count */
-    UInt32                  pwrstateRefCount;
-    /* Reference count */
-    UInt32                 configSize;
-    /*!< Size of configuration structure */
-    DM8168DUCATIPWR_Config  cfg;
-    /*!< DM8168DUCATIPWR configuration structure */
-    DM8168DUCATIPWR_Config  defCfg;
-    /*!< Default module configuration */
-    Bool                   isSetup;
-    /*!< Indicates whether the DM8168DUCATIPWR module is setup. */
-    DM8168DUCATIPWR_Handle  pwrHandles [MultiProc_MAXPROCESSORS];
-    /*!< PwrMgr handle array. */
-    IGateProvider_Handle   gateHandle;
-    /*!< Handle of gate to be used for local thread safety */
-    Ptr                    ducatiClkHandle;
-    /*!< clock handle used to call kernel APIs */
-    Ptr                    ducatiSpinlockHandle;
-    /*!< dsp Spinlock handle */
-    Ptr                    ducatiMailboxHandle;
-    /*!< dsp Mailbox handle */
-} DM8168DUCATIPWR_ModuleObject;
-
-/* =============================================================================
- *  Globals
- * =============================================================================
- */
-/*!
- *  @var    DM8168DUCATIPWR_state
- *
- *  @brief  DM8168DUCATIPWR state object variable
- */
-#if !defined(SYSLINK_BUILD_DEBUG)
-static
-#endif /* if !defined(SYSLINK_BUILD_DEBUG) */
-DM8168DUCATIPWR_ModuleObject DM8168DUCATIPWR_state =
-{
-    .isSetup = FALSE,
-    .configSize = sizeof (DM8168DUCATIPWR_Config),
-    .refCount   = 0,
-    .pwrstateRefCount = 0,
-    .defCfg.reserved = 0,
-    .gateHandle = NULL,
-};
-
-/* =============================================================================
- * APIs directly called by applications
- * =============================================================================
- */
-/*!
- *  @brief      Function to get the default configuration for the DM8168DUCATIPWR
- *              module.
- *
- *              This function can be called by the application to get their
- *              configuration parameter to DM8168DUCATIPWR_setup filled in by the
- *              DM8168DUCATIPWR module with the default parameters. If the user does
- *              not wish to make any change in the default parameters, this API
- *              is not required to be called.
- *
- *  @param      cfg        Pointer to the DM8168DUCATIPWR module configuration
- *                         structure in which the default config is to be
- *                         returned.
- *
- *  @sa         DM8168DUCATIPWR_setup
- */
-Void
-DM8168DUCATIPWR_getConfig (DM8168DUCATIPWR_Config * cfg)
-{
-    GT_1trace (curTrace, GT_ENTER, "DM8168DUCATIPWR_getConfig", cfg);
-
-    GT_assert (curTrace, (cfg != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (cfg == NULL) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DUCATIPWR_getConfig",
-                             PWRMGR_E_INVALIDARG,
-                             "Argument of type (DM8168DUCATIPWR_Config *) passed "
-                             "is null!");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-        if (DM8168DUCATIPWR_state.refCount == 0) {
-            memcpy (cfg,
-                         &DM8168DUCATIPWR_state.defCfg,
-                         sizeof (DM8168DUCATIPWR_Config));
-        }
-        else {
-            memcpy (cfg,
-                         &DM8168DUCATIPWR_state.cfg,
-                         sizeof (DM8168DUCATIPWR_Config));
-        }
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-    GT_0trace (curTrace, GT_LEAVE, "DM8168DUCATIPWR_getConfig");
-}
-
-/*!
- *  @brief      Function to setup the DM8168DUCATIPWR module.
- *
- *              This function sets up the DM8168DUCATIPWR module. This function must
- *              be called before any other instance-level APIs can be invoked.
- *              Module-level configuration needs to be provided to this
- *              function. If the user wishes to change some specific config
- *              parameters, then DM8168DUCATIPWR_getConfig can be called to get the
- *              configuration filled with the default values. After this, only
- *              the required configuration values can be changed. If the user
- *              does not wish to make any change in the default parameters, the
- *              application can simply call DM8168DUCATIPWR_setup with NULL
- *              parameters. The default parameters would get automatically used.
- *
- *  @param      cfg   Optional DM8168DUCATIPWR module configuration. If provided as
- *                    NULL, default configuration is used.
- *
- *  @sa         DM8168DUCATIPWR_destroy
- *              GateMutex_create
- */
-Int
-DM8168DUCATIPWR_setup (DM8168DUCATIPWR_Config * cfg)
-{
-    Int                      status = PWRMGR_SUCCESS;
-    DM8168DUCATIPWR_Config   tmpCfg;
-    IArg                     key;
-    Error_Block              eb;
-
-#if defined(SYSLINK_BUILD_RTOS)
-    Error_init(&eb);
-#endif /* #if defined(SYSLINK_BUILD_RTOS) */
-#if defined(SYSLINK_BUILD_HLOS)
-    eb = 0;
-#endif /* #if defined(SYSLINK_BUILD_HLOS) */
-
-    GT_1trace (curTrace, GT_ENTER, "DM8168DUCATIPWR_setup", cfg);
-    if (cfg == NULL) {
-        DM8168DUCATIPWR_getConfig (&tmpCfg);
-        cfg = &tmpCfg;
-    }
-
-    /* This sets the refCount variable is not initialized, upper 16 bits is
-     * written with module Id to ensure correctness of refCount variable.
-     */
-    key = Gate_enterSystem();
-    DM8168DUCATIPWR_state.refCount++;
-    if (DM8168DUCATIPWR_state.refCount > 1) {
-        status = DM8168DUCATIPWR_S_ALREADYSETUP;
-        Gate_leaveSystem(key);
-    }
-    else {
-        Gate_leaveSystem(key);
-
-        /* Create a default gate handle for local module protection. */
-        DM8168DUCATIPWR_state.gateHandle = (IGateProvider_Handle)
-                                GateMutex_create ((GateMutex_Params*)NULL, &eb);
-        if (DM8168DUCATIPWR_state.gateHandle == NULL) {
-            key = Gate_enterSystem();
-            DM8168DUCATIPWR_state.refCount = 0;
-            Gate_leaveSystem(key);
-            /*! @retval PWRMGR_E_FAIL Failed to create GateMutex! */
-            status = PWRMGR_E_FAIL;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "DM8168DUCATIPWR_setup",
-                                 status,
-                                 "Failed to create GateMutex!");
-        }
-        else {
-            /* Copy the user provided values into the state object. */
-            memcpy (&DM8168DUCATIPWR_state.cfg,
-                         cfg,
-                         sizeof (DM8168DUCATIPWR_Config));
-
-            /* Initialize the name to handles mapping array. */
-            memset (&DM8168DUCATIPWR_state.pwrHandles,
-                        0,
-                        (sizeof (DM8168DUCATIPWR_Handle) * MultiProc_MAXPROCESSORS));
-            DM8168DUCATIPWR_state.isSetup = TRUE;
-        }
-    }
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DUCATIPWR_setup", status);
-    /*! @retval PWRMGR_SUCCESS Operation successful */
-    return (status);
-}
-
-/*!
- *  @brief      Function to destroy the DM8168DUCATIPWR module.
- *
- *              Once this function is called, other DM8168DUCATIPWR module APIs, except
- *              for the DM8168DUCATIPWR_getConfig API cannot be called anymore.
- *
- *  @sa         DM8168DUCATIPWR_setup
- *              GateMutex_delete
- */
-Int
-DM8168DUCATIPWR_destroy (Void)
-{
-    Int    status = PWRMGR_SUCCESS;
-    UInt16 i;
-    IArg key;
-
-    GT_0trace (curTrace, GT_ENTER, "DM8168DUCATIPWR_destroy");
-
-    GT_assert (curTrace, (DM8168DUCATIPWR_state.refCount != 0));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (DM8168DUCATIPWR_state.refCount == 0) {
-        status = DM8168DUCATIPWR_E_INVALIDSTATE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DUCATIPWR_destroy",
-                             status,
-                             "Module was not initialized!");
-    }
-    else {
-#endif /* !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        key = Gate_enterSystem();
-        DM8168DUCATIPWR_state.refCount--;
-        Gate_leaveSystem(key);
-
-        if (DM8168DUCATIPWR_state.refCount == 0) {
-            /* Temporarily increment refCount here. */
-            key = Gate_enterSystem();
-            DM8168DUCATIPWR_state.refCount = 1;
-            Gate_leaveSystem(key);
-
-            /* Check if any DM8168DUCATIPWR instances have not been deleted so far. If not,
-             * delete them.
-             */
-            for (i = 0 ; i < MultiProc_MAXPROCESSORS ; i++) {
-                GT_assert (curTrace, (DM8168DUCATIPWR_state.pwrHandles [i] == NULL));
-                if (DM8168DUCATIPWR_state.pwrHandles [i] != NULL) {
-                    DM8168DUCATIPWR_delete (&(DM8168DUCATIPWR_state.pwrHandles [i]));
-                }
-            }
-            /* restore refCount here. */
-            key = Gate_enterSystem();
-            DM8168DUCATIPWR_state.refCount = 0;
-            Gate_leaveSystem(key);
-
-            if (DM8168DUCATIPWR_state.gateHandle != NULL) {
-                GateMutex_delete ((GateMutex_Handle *)
-                                        &(DM8168DUCATIPWR_state.gateHandle));
-            }
-            DM8168DUCATIPWR_state.isSetup = FALSE;
-        }
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DUCATIPWR_destroy", status);
-
-    /*! @retval PWRMGR_SUCCESS Operation successful */
-    return (status);
-}
-
-/*!
- *  @brief      Function to initialize the parameters for this PwrMgr instance.
- *
- *  @param      params  Configuration parameters.
- *
- *  @sa         DM8168DUCATIPWR_create
- */
-Void
-DM8168DUCATIPWR_Params_init (DM8168DUCATIPWR_Params * params)
-{
-    GT_1trace (curTrace, GT_ENTER, "DM8168DUCATIPWR_Params_init", params);
-
-    GT_assert (curTrace, (params != NULL));
-    GT_assert (curTrace, (DM8168DUCATIPWR_state.refCount != 0));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (DM8168DUCATIPWR_state.refCount == 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DUCATIPWR_Params_initv",
-                             DM8168DUCATIPWR_E_INVALIDSTATE,
-                             "Module was not initialized!");
-    }
-    else if (params == NULL) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DUCATIPWR_Params_init",
-                             PWRMGR_E_INVALIDARG,
-                             "Argument of type (DM8168DUCATIPWR_Params *) "
-                             "passed is null!");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        params->reserved = 0;
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-    GT_0trace (curTrace, GT_LEAVE, "DM8168DUCATIPWR_Params_init");
-}
-
-/*!
- *  @brief      Function to create an instance of this PwrMgr.
- *
- *  @param      procId  Processor ID addressed by this PwrMgr instance.
- *  @param      params  Configuration parameters.
- *
- *  @sa         DM8168DUCATIPWR_delete
- */
-DM8168DUCATIPWR_Handle
-DM8168DUCATIPWR_create (      UInt16               procId,
-                    const DM8168DUCATIPWR_Params * params)
-{
-    Int                  status = PWRMGR_SUCCESS;
-    PwrMgr_Object *      handle = NULL;
-    IArg                 key;
-
-    GT_2trace (curTrace, GT_ENTER, "DM8168DUCATIPWR_create", procId, params);
-
-    GT_assert (curTrace, IS_VALID_PROCID (procId));
-    GT_assert (curTrace, (params != NULL));
-    GT_assert (curTrace, (DM8168DUCATIPWR_state.refCount != 0));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (DM8168DUCATIPWR_state.refCount == 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DUCATIPWR_create",
-                             DM8168DUCATIPWR_E_INVALIDSTATE,
-                             "Module was not initialized!");
-    }
-    else if (!IS_VALID_PROCID (procId)) {
-        /* Not setting status here since this function does not return status.*/
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DUCATIPWR_create",
-                             PWRMGR_E_INVALIDARG,
-                             "Invalid procId specified");
-    }
-    else if (params == NULL) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DUCATIPWR_create",
-                             PWRMGR_E_INVALIDARG,
-                             "params passed is null!");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        /* Enter critical section protection. */
-        key = IGateProvider_enter (DM8168DUCATIPWR_state.gateHandle);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-        /* Check if the PwrMgr already exists for specified procId. */
-        if (DM8168DUCATIPWR_state.pwrHandles [procId] != NULL) {
-            status = PWRMGR_E_ALREADYEXIST;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "DM8168DUCATIPWR_create",
-                                 status,
-                                 "PwrMgr already exists for specified procId!");
-        }
-        else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-            /* Allocate memory for the handle */
-            handle = (PwrMgr_Object *) Memory_calloc (NULL,
-                                                      sizeof (PwrMgr_Object),
-                                                      0,
-                                                      NULL);
-            if (handle == NULL) {
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "DM8168DUCATIPWR_create",
-                                     PWRMGR_E_MEMORY,
-                                     "Memory allocation failed for handle!");
-            }
-            else {
-                /* Populate the handle fields */
-                handle->pwrFxnTable.attach = &DM8168DUCATIPWR_attach;
-                handle->pwrFxnTable.detach = &DM8168DUCATIPWR_detach;
-                handle->pwrFxnTable.on     = &DM8168DUCATIPWR_on;
-                handle->pwrFxnTable.off    = &DM8168DUCATIPWR_off;
-                /* TBD: Other functions */
-
-                /* Allocate memory for the DM8168DUCATIPWR handle */
-                handle->object = Memory_calloc (NULL,
-                                                sizeof (DM8168DUCATIPWR_Object),
-                                                0,
-                                                NULL);
-                if (handle == NULL) {
-                    status = PWRMGR_E_MEMORY;
-                    GT_setFailureReason (curTrace,
-                                        GT_4CLASS,
-                                        "DM8168DUCATIPWR_create",
-                                        status,
-                                        "Memory allocation failed for handle!");
-                }
-                else {
-#if defined (SYSLINK_BUILDOS_LINUX)
-                    ((DM8168DUCATIPWR_Object *)handle->object)->clockHandle
-                                       = (ClockOps_Handle) LinuxClock_create();
-#endif/* #if defined (SYSLINK_BUILDOS_LINUX) */
-#if defined (SYSLINK_BUILD_RTOS)
-                    ((DM8168DUCATIPWR_Object *)handle->object)->clockHandle
-                                       = (ClockOps_Handle) DM8168CLOCK_create();
-#endif/* #if defined (SYSLINK_BUILD_RTOS) */
-                    handle->procId = procId;
-                    DM8168DUCATIPWR_state.pwrHandles [procId] =
-                                                (DM8168DUCATIPWR_Handle) handle;
-                }
-            }
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-        }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        /* Leave critical section protection. */
-        IGateProvider_leave (DM8168DUCATIPWR_state.gateHandle, key);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-    if (status < 0) {
-        if (handle !=  NULL) {
-            if (handle->object != NULL) {
-                Memory_free (NULL, handle->object, sizeof (DM8168DUCATIPWR_Object));
-            }
-            Memory_free (NULL, handle, sizeof (PwrMgr_Object));
-        }
-        /*! @retval NULL Function failed */
-        handle = NULL;
-    }
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DUCATIPWR_create", handle);
-
-    /*! @retval Valid-Handle Operation successful */
-    return (DM8168DUCATIPWR_Handle) handle;
-}
-
-/*!
- *  @brief      Function to delete an instance of this PwrMgr.
- *
- *              The user provided pointer to the handle is reset after
- *              successful completion of this function.
- *
- *  @param      handlePtr  Pointer to Handle to the PwrMgr instance
- *
- *  @sa         DM8168DUCATIPWR_create
- */
-Int
-DM8168DUCATIPWR_delete (DM8168DUCATIPWR_Handle * handlePtr)
-{
-    Int                  status = PWRMGR_SUCCESS;
-    DM8168DUCATIPWR_Object * object = NULL;
-    PwrMgr_Object *      handle;
-    IArg                 key;
-
-    GT_1trace (curTrace, GT_ENTER, "DM8168DUCATIPWR_delete", handlePtr);
-
-    GT_assert (curTrace, (handlePtr != NULL));
-    GT_assert (curTrace, ((handlePtr != NULL) && (*handlePtr != NULL)));
-
-    GT_assert (curTrace, (DM8168DUCATIPWR_state.refCount != 0));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (DM8168DUCATIPWR_state.refCount == 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DUCATIPWR_delete",
-                             DM8168DUCATIPWR_E_INVALIDSTATE,
-                             "Module was not initialized!");
-    }
-    else if (handlePtr == NULL) {
-        /*! @retval PWRMGR_E_INVALIDARG Invalid NULL handlePtr specified*/
-        status = PWRMGR_E_INVALIDARG;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DUCATIPWR_delete",
-                             status,
-                             "Invalid NULL handlePtr specified");
-    }
-    else if (*handlePtr == NULL) {
-        /*! @retval PWRMGR_E_HANDLE Invalid NULL *handlePtr specified */
-        status = PWRMGR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DUCATIPWR_delete",
-                             status,
-                             "Invalid NULL *handlePtr specified");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        handle = (PwrMgr_Object *) (*handlePtr);
-        /* Enter critical section protection. */
-        key = IGateProvider_enter (DM8168DUCATIPWR_state.gateHandle);
-
-        /* Reset handle in PwrMgr handle array. */
-        GT_assert (curTrace, IS_VALID_PROCID (handle->procId));
-        DM8168DUCATIPWR_state.pwrHandles [handle->procId] = NULL;
-
-        object = (DM8168DUCATIPWR_Object *) handle->object;
-        /* Free memory used for the DM8168DUCATIPWR object. */
-        if (handle->object != NULL) {
-            /* Free memory used for the clock handle */
-#if defined (SYSLINK_BUILDOS_LINUX)
-            LinuxClock_delete(((DM8168DUCATIPWR_Object *)handle->object)->clockHandle);
-#endif /* #if defined (SYSLINK_BUILDOS_LINUX) */
-#if defined (SYSLINK_BUILD_RTOS)
-            DM8168CLOCK_delete(((DM8168DUCATIPWR_Object *)handle->object)->clockHandle);
-#endif /* #if defined (SYSLINK_BUILD_RTOS) */
-            Memory_free (NULL,
-                         object,
-                         sizeof (DM8168DUCATIPWR_Object));
-            handle->object = NULL;
-        }
-
-        /* Free memory used for the PwrMgr object. */
-        Memory_free (NULL, handle, sizeof (PwrMgr_Object));
-        *handlePtr = NULL;
-
-        /* Leave critical section protection. */
-        IGateProvider_leave (DM8168DUCATIPWR_state.gateHandle, key);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DUCATIPWR_delete", status);
-
-    /*! @retval PWRMGR_SUCCESS Operation successful */
-    return (status);
-}
-
-/*!
- *  @brief      Function to open a handle to an instance of this PwrMgr. This
- *              function is called when access to the PwrMgr is required from
- *              a different process.
- *
- *  @param      handlePtr   Handle to the PwrMgr instance
- *  @param      procId      Processor ID addressed by this PwrMgr instance.
- *
- *  @sa         DM8168DUCATIPWR_close
- */
-Int
-DM8168DUCATIPWR_open (DM8168DUCATIPWR_Handle * handlePtr, UInt16 procId)
-{
-    Int status = PWRMGR_SUCCESS;
-
-    GT_2trace (curTrace, GT_ENTER, "DM8168DUCATIPWR_open", handlePtr, procId);
-
-    GT_assert (curTrace, (handlePtr != NULL));
-    GT_assert (curTrace, IS_VALID_PROCID (procId));
-
-    GT_assert (curTrace, (DM8168DUCATIPWR_state.refCount != 0));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (DM8168DUCATIPWR_state.refCount == 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DUCATIPWR_open",
-                             DM8168DUCATIPWR_E_INVALIDSTATE,
-                             "Module was not initialized!");
-    }
-    else if (handlePtr == NULL) {
-        /*! @retval PWRMGR_E_HANDLE Invalid NULL handlePtr specified */
-        status = PWRMGR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DUCATIPWR_open",
-                             status,
-                             "Invalid NULL handlePtr specified");
-    }
-    else if (!IS_VALID_PROCID (procId)) {
-        /*! @retval PWRMGR_E_INVALIDARG Invalid procId specified */
-        status = PWRMGR_E_INVALIDARG;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DUCATIPWR_open",
-                             status,
-                             "Invalid procId specified");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        /* Initialize return parameter handle. */
-        *handlePtr = NULL;
-
-        /* Check if the PwrMgr exists and return the handle if found. */
-        if (DM8168DUCATIPWR_state.pwrHandles [procId] == NULL) {
-            /*! @retval PWRMGR_E_NOTFOUND Specified instance not found */
-            status = PWRMGR_E_NOTFOUND;
-            GT_setFailureReason (curTrace,
-                              GT_4CLASS,
-                              "DM8168DUCATIPWR_open",
-                              status,
-                              "Specified DM8168DUCATIPWR instance does not exist!");
-        }
-        else {
-            *handlePtr = DM8168DUCATIPWR_state.pwrHandles [procId];
-        }
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DUCATIPWR_open", status);
-
-    /*! @retval PWRMGR_SUCCESS Operation successful */
-    return status;
-}
-
-/*!
- *  @brief      Function to close a handle to an instance of this PwrMgr.
- *
- *  @param      handlePtr  Pointer to Handle to the PwrMgr instance
- *
- *  @sa         DM8168DUCATIPWR_open
- */
-Int
-DM8168DUCATIPWR_close (DM8168DUCATIPWR_Handle * handlePtr)
-{
-    Int status = PWRMGR_SUCCESS;
-
-    GT_1trace (curTrace, GT_ENTER, "DM8168DUCATIPWR_close", handlePtr);
-
-    GT_assert (curTrace, (handlePtr != NULL));
-    GT_assert (curTrace, ((handlePtr != NULL) && (*handlePtr != NULL)));
-    GT_assert (curTrace, (DM8168DUCATIPWR_state.refCount != 0));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (DM8168DUCATIPWR_state.refCount == 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DUCATIPWR_close",
-                             DM8168DUCATIPWR_E_INVALIDSTATE,
-                             "Module was not initialized!");
-    }
-    else if (handlePtr == NULL) {
-        /*! @retval PWRMGR_E_INVALIDARG Invalid NULL handlePtr pointer
-                                         specified*/
-        status = PWRMGR_E_INVALIDARG;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DUCATIPWR_close",
-                             status,
-                             "Invalid NULL handlePtr pointer specified");
-    }
-    else if (*handlePtr == NULL) {
-        /*! @retval PWRMGR_E_HANDLE Invalid NULL *handlePtr specified */
-        status = PWRMGR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DUCATIPWR_close",
-                             status,
-                             "Invalid NULL *handlePtr specified");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined(SYSLINK_BUILD_HLOS) */
-        /* Nothing to be done for close. */
-        *handlePtr = NULL;
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined(SYSLINK_BUILD_HLOS) */
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DUCATIPWR_close", status);
-
-    /*! @retval PWRMGR_SUCCESS Operation successful */
-    return status;
-}
-
-/* =============================================================================
- * APIs called by PwrMgr module (part of function table interface)
- * =============================================================================
- */
-/*!
- *  @brief      Function to attach to the PwrMgr.
- *
- *  @param      handle  Handle to the PwrMgr instance
- *  @param      params  Attach parameters
- *
- *  @sa         DM8168DUCATIPWR_detach
- */
-Int
-DM8168DUCATIPWR_attach (PwrMgr_Handle handle, PwrMgr_AttachParams * params)
-{
-
-    Int status                            = PWRMGR_SUCCESS;
-    PwrMgr_Object *          pwrMgrHandle = (PwrMgr_Object *) handle;
-    DM8168DUCATIPWR_Object * object       = NULL;
-    Memory_MapInfo           mapInfo;
-    /* Mapping for prcm base is done in DM8168VIDEOM3_phyShmemInit */
-
-    GT_2trace (curTrace, GT_ENTER, "DM8168DUCATIPWR_attach", handle, params);
-
-    GT_assert (curTrace, (handle != NULL));
-    GT_assert (curTrace, (params != NULL));
-    GT_assert (curTrace, (DM8168DUCATIPWR_state.refCount != 0));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (DM8168DUCATIPWR_state.refCount == 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DUCATIPWR_attach",
-                             DM8168DUCATIPWR_E_INVALIDSTATE,
-                             "Module was not initialized!");
-    }
-    else if (handle == NULL) {
-        /*! @retval PWRMGR_E_HANDLE Invalid argument */
-        status = PWRMGR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DUCATIPWR_attach",
-                             status,
-                             "Invalid handle specified");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined(SYSLINK_BUILD_HLOS) */
-        object = (DM8168DUCATIPWR_Object *) pwrMgrHandle->object;
-        GT_assert (curTrace, (object != NULL));
-        /* Map and get the virtual address for system control module */
-        mapInfo.src      = DM8168M3_PRCM_BASE_ADDR;
-        mapInfo.size     = DM8168M3_PRCM_SIZE;
-        mapInfo.isCached = FALSE;
-        status = Memory_map (&mapInfo);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-        if (status < 0) {
-            status = DM8168DUCATIPWR_E_FAIL;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "DM8168DUCATIPWR_attach",
-                                 status,
-                                 "Failure in mapping prcm module");
-        }
-        else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined(SYSLINK_BUILD_HLOS) */
-            object->prcmVA = mapInfo.dst;
-            /* Map and get the virtual address for system control module */
-            mapInfo.src      = DUCATI_MMU_CFG;
-            mapInfo.size     = DUCATI_MMU_CFG_SIZE;
-            mapInfo.isCached = FALSE;
-            status = Memory_map (&mapInfo);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-            if (status < 0) {
-                status = DM8168DUCATIPWR_E_FAIL;
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "DM8168DUCATIPWR_attach",
-                                     status,
-                                     "Failure in mapping ducatimmu module");
-            }
-            else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined(SYSLINK_BUILD_HLOS) */
-                object->ducatiMmuVA = mapInfo.dst;
-                /* Map and get the virtual address for system control module */
-                mapInfo.src      = DUCATI_BASE_ADDR;
-                mapInfo.size     = DUCATI_BASE_ADDR_SIZE;
-                mapInfo.isCached = FALSE;
-                status = Memory_map (&mapInfo);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-                if (status < 0) {
-                    status = DM8168DUCATIPWR_E_FAIL;
-                    GT_setFailureReason (curTrace,
-                                         GT_4CLASS,
-                                         "DM8168DUCATIPWR_attach",
-                                         status,
-                                         "Failure in mapping ducatibase module");
-                }
-                else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined(SYSLINK_BUILD_HLOS) */
-                    object->ducatibaseVA = mapInfo.dst;
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-                }
-            }
-        }
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined(SYSLINK_BUILD_HLOS) */
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DUCATIPWR_attach", status);
-    /*! @retval PWRMGR_SUCCESS Operation successful */
-    return (status);
-}
-
-/*!
- *  @brief      Function to detach from the PwrMgr.
- *
- *  @param      handle  Handle to the PwrMgr instance
- *
- *  @sa         DM8168DUCATIPWR_attach
- */
-Int
-DM8168DUCATIPWR_detach (PwrMgr_Handle handle)
-{
-    Int status                     = PWRMGR_SUCCESS;
-    PwrMgr_Object * pwrMgrHandle   = (PwrMgr_Object *) handle;
-    DM8168DUCATIPWR_Object * object = NULL;
-    Memory_UnmapInfo     unmapInfo;
-
-
-    GT_1trace (curTrace, GT_ENTER, "DM8168DUCATIPWR_detach", handle);
-
-    GT_assert (curTrace, (handle != NULL));
-    GT_assert (curTrace, (DM8168DUCATIPWR_state.refCount != 0));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (DM8168DUCATIPWR_state.refCount == 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DUCATIPWR_detach",
-                             DM8168DUCATIPWR_E_INVALIDSTATE,
-                             "Module was not initialized!");
-    }
-    else if (handle == NULL) {
-        /*! @retval PWRMGR_E_HANDLE Invalid argument */
-        status = PWRMGR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DUCATIPWR_detach",
-                             status,
-                             "Invalid handle specified");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined(SYSLINK_BUILD_HLOS) */
-        object = (DM8168DUCATIPWR_Object *) pwrMgrHandle->object;
-        GT_assert (curTrace, (object != NULL));
-
-        /* Unmap the virtual address for prcm module */
-        unmapInfo.addr = object->prcmVA;
-        unmapInfo.size = DM8168M3_PRCM_SIZE;
-        unmapInfo.isCached = FALSE;
-        if (unmapInfo.addr != 0) {
-            status = Memory_unmap (&unmapInfo);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-            if (status < 0) {
-                status = DM8168DUCATIPWR_E_FAIL;
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "DM8168DUCATIPWR_detach",
-                                     status,
-                                     "Failure in mapping prcm module");
-            }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined(SYSLINK_BUILD_HLOS) */
-        }
-        /* Unmap the virtual address for mmu base*/
-        unmapInfo.addr = object->ducatiMmuVA;
-        unmapInfo.size = DUCATI_MMU_CFG_SIZE;
-        unmapInfo.isCached = FALSE;
-        if (unmapInfo.addr != 0) {
-            status = Memory_unmap (&unmapInfo);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-            if (status < 0) {
-                status = DM8168DUCATIPWR_E_FAIL;
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "DM8168DUCATIPWR_detach",
-                                     status,
-                                     "Failure in mapping ducatiMmu module");
-            }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined(SYSLINK_BUILD_HLOS) */
-        }
-
-        /* Unmap the virtual address for ducati control base */
-        unmapInfo.addr = object->ducatibaseVA;
-        unmapInfo.size = DUCATI_BASE_ADDR_SIZE;
-        unmapInfo.isCached = FALSE;
-        if (unmapInfo.addr != 0) {
-            status = Memory_unmap (&unmapInfo);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-            if (status < 0) {
-                status = DM8168DUCATIPWR_E_FAIL;
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "DM8168DUCATIPWR_detach",
-                                     status,
-                                     "Failure in mapping ducatiMmu module");
-            }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined(SYSLINK_BUILD_HLOS) */
-        }
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined(SYSLINK_BUILD_HLOS) */
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DUCATIPWR_detach", status);
-    /*! @retval PWRMGR_SUCCESS Operation successful */
-    return (status);
-}
-
-/*!
- *  @brief      Function to power on the slave processor.
- *
- *              Power on the IVA subsystem, hold the DSP and SEQ in reset, and
- *              release IVA2_RST. This is a hostile reset of the IVA. If the IVA
- *              is already powered on, then it must be powered off in order to
- *              terminate all current activity and initiate a power-on-reset
- *              transition to bring the IVA to a know good state.
- *
- *  @param      handle    Handle to the PwrMgr instance
- *
- *  @sa         DM8168DUCATIPWR_off
- */
-Int
-DM8168DUCATIPWR_on (PwrMgr_Handle handle)
-{
-    Int                  status       = PWRMGR_SUCCESS ;
-    Int32                tmpstatus    = 0;
-    PwrMgr_Object *      pwrMgrHandle = (PwrMgr_Object *) handle;
-    DM8168DUCATIPWR_Object * object   = NULL;
-    IArg                     key;
-    (Void)tmpstatus;
-    GT_1trace (curTrace, GT_ENTER, "DM8168DUCATIPWR_on", handle);
-
-    GT_assert (curTrace, (handle != NULL));
-    GT_assert (curTrace, (DM8168DUCATIPWR_state.refCount != 0));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (DM8168DUCATIPWR_state.refCount == 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DUCATIPWR_on",
-                             DM8168DUCATIPWR_E_INVALIDSTATE,
-                             "Module was not initialized!");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        /* This sets the refCount variable is not initialized, upper 16 bits is
-         * written with module Id to ensure correctness of refCount variable.
-         */
-        key = Gate_enterSystem();
-        DM8168DUCATIPWR_state.pwrstateRefCount++;
-        if (DM8168DUCATIPWR_state.pwrstateRefCount > 1) {
-            status = DM8168DUCATIPWR_S_ALREADYSETUP;
-            Gate_leaveSystem(key);
-        }
-        else {
-            Gate_leaveSystem(key);
-#if !defined(SYSLINK_BUILD_OPTIMIZE)&& defined(SYSLINK_BUILD_HLOS)
-            if (handle == NULL) {
-                /*! @retval PWRMGR_E_HANDLE Invalid argument */
-                status = PWRMGR_E_HANDLE;
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "DM8168DUCATIPWR_on",
-                                     status,
-                                     "Invalid handle specified");
-            }
-            else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined(SYSLINK_BUILD_HLOS) */
-                 object = (DM8168DUCATIPWR_Object *) pwrMgrHandle->object;
-
-                 GT_assert (curTrace, (object != NULL));
-                 /* Enable spinlocks, mailbox and timers before powering on ducati */
-
-                 DM8168DUCATIPWR_state.ducatiSpinlockHandle
-                            = ClockOps_get(object->clockHandle, "spinbox_ick");
-                     /* Do not put this check under SYSLINK_BUILD_OPTIMIZE */
-                 GT_assert (curTrace,
-                               (DM8168DUCATIPWR_state.ducatiSpinlockHandle != NULL));
-                 status = ClockOps_enable(object->clockHandle,
-                                         DM8168DUCATIPWR_state.ducatiSpinlockHandle);
-                 GT_assert (curTrace, (status >= 0));
-
-                 DM8168DUCATIPWR_state.ducatiMailboxHandle
-                            = ClockOps_get(object->clockHandle, "mailbox_ick");
-                             /* Do not put this check under SYSLINK_BUILD_OPTIMIZE */
-                 GT_assert (curTrace, (DM8168DUCATIPWR_state.ducatiMailboxHandle != NULL));
-                 status = ClockOps_enable(object->clockHandle,
-                                          DM8168DUCATIPWR_state.ducatiMailboxHandle);
-                 GT_assert (curTrace, (status >= 0));
-
-                 /* poer on ducati */
-                 DM8168DUCATIPWR_state.ducatiClkHandle
-                             = ClockOps_get(object->clockHandle, "ducati_ick");
-                 /* Do not put this check under SYSLINK_BUILD_OPTIMIZE */
-                 if (DM8168DUCATIPWR_state.ducatiClkHandle == NULL) {
-                         /*! @retval PWRMGR_E_HANDLE Invalid argument */
-                         status = PWRMGR_E_HANDLE;
-                         GT_setFailureReason (curTrace,
-                                              GT_4CLASS,
-                                              "DM8168DUCATIPWR_on",
-                                              status,
-                                          "object->clkHandle retuned NULL clk_get failed for ducati");
-                 }
-                 else {
-                     tmpstatus = ClockOps_enable(object->clockHandle,
-                                              DM8168DUCATIPWR_state.ducatiClkHandle);
-                     GT_assert (curTrace, (tmpstatus >= 0));
-                     /* Complete the remaining power sequence here*/
-                     DM8168DUCATIMMU_enable(pwrMgrHandle);
-                 }
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined(SYSLINK_BUILD_HLOS)
-            }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined(SYSLINK_BUILD_HLOS)*/
-        }
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)*/
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DUCATIPWR_on", status);
-    /*! @retval PWRMGR_SUCCESS Operation successful */
-    return (status);
-}
-
-/*!
- *  @brief      Function to power off the slave processor.
- *
- *              Turn the IVA power domain off. To ensure a clean power-off
- *              transition, the IVA subsystem must first be turned on so that
- *              the DSP can initiate an autonomous power-off transition.
- *
- *  @param      handle    Handle to the PwrMgr instance
- *  @param      force     Indicates whether power-off is to be forced
- *
- *  @sa         DM8168DUCATIPWR_on
- */
-Int
-DM8168DUCATIPWR_off (PwrMgr_Handle handle, Bool force)
-{
-    Int                  status       = PWRMGR_SUCCESS ;
-    PwrMgr_Object *      pwrMgrHandle = (PwrMgr_Object *) handle;
-    DM8168DUCATIPWR_Object * object   = NULL;
-    IArg                     key;
-
-    GT_1trace (curTrace, GT_ENTER, "DM8168DUCATIPWR_off", handle);
-
-    GT_assert (curTrace, (handle != NULL));
-
-    GT_assert (curTrace, (DM8168DUCATIPWR_state.refCount != 0));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (DM8168DUCATIPWR_state.refCount == 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DUCATIPWR_off",
-                             DM8168DUCATIPWR_E_INVALIDSTATE,
-                             "Module was not initialized!");
-    }
-    else if (handle == NULL) {
-        /*! @retval PWRMGR_E_HANDLE Invalid argument */
-        status = PWRMGR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168DUCATIPWR_off",
-                             status,
-                             "Invalid handle specified");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-                 object = (DM8168DUCATIPWR_Object *) pwrMgrHandle->object;
-        key = Gate_enterSystem();
-        DM8168DUCATIPWR_state.pwrstateRefCount--;
-        Gate_leaveSystem(key);
-
-        if (DM8168DUCATIPWR_state.pwrstateRefCount == 0) {
-            DM8168DUCATIMMU_disable(pwrMgrHandle);
-            /* Disable Mailbox clocks */
-            if(DM8168DUCATIPWR_state.ducatiMailboxHandle) {
-                ClockOps_disable(object->clockHandle,
-                                     DM8168DUCATIPWR_state.ducatiMailboxHandle);
-                ClockOps_put(object->clockHandle,
-                                     DM8168DUCATIPWR_state.ducatiMailboxHandle);
-            }
-            /* Disable Spinlock clocks */
-            if(DM8168DUCATIPWR_state.ducatiSpinlockHandle) {
-                ClockOps_disable(object->clockHandle,
-                                    DM8168DUCATIPWR_state.ducatiSpinlockHandle);
-                ClockOps_put(object->clockHandle,
-                                    DM8168DUCATIPWR_state.ducatiSpinlockHandle);
-            }
-            if(DM8168DUCATIPWR_state.ducatiClkHandle) {
-                ClockOps_disable(object->clockHandle,
-                                         DM8168DUCATIPWR_state.ducatiClkHandle);
-                ClockOps_put(object->clockHandle,
-                                         DM8168DUCATIPWR_state.ducatiClkHandle);
-            }
-        }
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined(SYSLINK_BUILD_HLOS) */
-    GT_1trace (curTrace, GT_LEAVE, "DM8168DUCATIPWR_off", status);
-    /*! @retval PWRMGR_SUCCESS Operation successful */
-    return (status);
-}
-
-#if defined (__cplusplus)
-}
-#endif /* defined (__cplusplus) */
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvideom3/Dm8168M3VideoHal.c b/qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvideom3/Dm8168M3VideoHal.c
deleted file mode 100644 (file)
index b043eb1..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- *  @file   Dm8168M3VideoHal.c
- *
- *  @brief      Top-level Hardware Abstraction Module implementation
- *
- *              This module implements the top-level Hardware Abstraction Layer
- *              for DM8168VIDEOM3.
- *              The implementation is specific to DM8168VIDEOM3.
- *
- *
- *  ============================================================================
- *
- *  Copyright (c) 2008-2012, Texas Instruments Incorporated
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *  *  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *  *  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- *  *  Neither the name of Texas Instruments Incorporated nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  Contact information for paper mail:
- *  Texas Instruments
- *  Post Office Box 655303
- *  Dallas, Texas 75265
- *  Contact information:
- *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
- *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
- *  ============================================================================
- *
- */
-
-
-
-#if defined(SYSLINK_BUILD_RTOS)
-#include <xdc/std.h>
-#include <xdc/runtime/Memory.h>
-#include <xdc/runtime/Error.h>
-#endif /* #if defined(SYSLINK_BUILD_RTOS) */
-
-#if defined(SYSLINK_BUILD_HLOS)
-#include <ti/syslink/Std.h>
-/* OSAL & utils headers */
-#include <ti/syslink/utils/Memory.h>
-#endif /* #if defined(SYSLINK_BUILD_HLOS) */
-
-
-/* OSAL & Utils headers */
-#include <ti/syslink/utils/Trace.h>
-
-/* Hardware Abstraction Layer headers */
-#include <_ProcDefs.h>
-#include <Processor.h>
-#include <Dm8168M3VideoHal.h>
-#include <Dm8168M3VideoHalBoot.h>
-#include <Dm8168M3VideoPhyShmem.h>
-
-
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
-
-/* =============================================================================
- *  Macros and types
- * =============================================================================
- */
-
-/* =============================================================================
- * APIs called by DM8168VIDEOM3PROC module
- * =============================================================================
- */
-/*!
- *  @brief      Function to initialize the HAL object
- *
- *  @param      halObj      Return parameter: Pointer to the HAL object
- *  @param      initParams  Optional initialization parameters
- *
- *  @sa         DM8168VIDEOM3_halExit
- *              DM8168VIDEOM3_phyShmemInit
- */
-Int
-DM8168VIDEOM3_halInit (Ptr * halObj, Ptr params)
-{
-    Int                  status    = PROCESSOR_SUCCESS;
-    DM8168VIDEOM3_HalObject * halObject = NULL;
-
-    GT_2trace (curTrace, GT_ENTER, "DM8168VIDEOM3_halInit", halObj, params);
-
-    GT_assert (curTrace, (halObj != NULL));
-
-    halObject = (DM8168VIDEOM3_HalObject *) halObj ;
-
-    (Void) params ; /* Not used. */
-
-    *halObj = Memory_calloc (NULL, sizeof (DM8168VIDEOM3_HalObject), 0, NULL);
-    if (halObject == NULL) {
-        /*! @retval PROCESSOR_E_MEMORY Memory allocation failed */
-        status = PROCESSOR_E_MEMORY;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168VIDEOM3_halInit",
-                             status,
-                             "Memory allocation failed for HAL object!");
-    }
-    else {
-        status = DM8168VIDEOM3_phyShmemInit (*halObj);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "DM8168VIDEOM3_halInit",
-                                 status,
-                                 "DM8168VIDEOM3_phyShmemInit failed!");
-            Memory_free (NULL, *halObj, sizeof (DM8168VIDEOM3_HalObject));
-            *halObj = NULL;
-        }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-    }
-
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168VIDEOM3_halInit", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-/*!
- *  @brief      Function to finalize the HAL object
- *
- *  @param      halObj      Pointer to the HAL object
- *
- *  @sa         DM8168VIDEOM3_halInit
- *              DM8168VIDEOM3_phyShmemExit
- */
-Int
-DM8168VIDEOM3_halExit (Ptr halObj)
-{
-    Int                  status    = PROCESSOR_SUCCESS;
-
-    GT_1trace (curTrace, GT_ENTER, "DM8168VIDEOM3_halExit", halObj);
-
-    GT_assert (curTrace, (halObj != NULL));
-
-    status = DM8168VIDEOM3_phyShmemExit (halObj);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (status < 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168VIDEOM3_halExit",
-                             status,
-                             "DM8168VIDEOM3_phyShmemExit failed!");
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-    if (halObj != NULL) {
-        /* Free the memory for the HAL object. */
-        Memory_free (NULL, halObj, sizeof (DM8168VIDEOM3_HalObject));
-    }
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168VIDEOM3_halExit", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-#if defined (__cplusplus)
-}
-#endif
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvideom3/Dm8168M3VideoHalBoot.c b/qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvideom3/Dm8168M3VideoHalBoot.c
deleted file mode 100644 (file)
index 587b30e..0000000
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- *  @file   Dm8168M3VideoHalBoot.c
- *
- *  @brief      Boot control module.
- *
- *              This module is responsible for handling boot-related hardware-
- *              specific operations.
- *              The implementation is specific to DM8168VIDEOM3.
- *
- *
- *  ============================================================================
- *
- *  Copyright (c) 2008-2012, Texas Instruments Incorporated
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *  *  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *  *  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- *  *  Neither the name of Texas Instruments Incorporated nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  Contact information for paper mail:
- *  Texas Instruments
- *  Post Office Box 655303
- *  Dallas, Texas 75265
- *  Contact information:
- *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
- *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
- *  ============================================================================
- *
- */
-
-
-
-#if defined(SYSLINK_BUILD_RTOS)
-#include <xdc/std.h>
-#include <xdc/runtime/Error.h>
-#endif /* #if defined(SYSLINK_BUILD_RTOS) */
-
-#if defined(SYSLINK_BUILD_HLOS)
-#include <ti/syslink/Std.h>
-#endif /* #if defined(SYSLINK_BUILD_HLOS) */
-
-/* OSAL & Utils headers */
-#include <ti/syslink/utils/Trace.h>
-
-/* Module headers */
-//#include <_ProcDefs.h>
-#include <Processor.h>
-
-/* Hardware Abstraction Layer headers */
-#include <Dm8168M3VideoHal.h>
-#include <Dm8168M3VideoHalBoot.h>
-
-
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
-
-/* =============================================================================
- *  Macros and types
- * =============================================================================
- */
-/*!
- *  @brief  Offsets of the DSP BOOT ADDR register
- */
-#define CONTROL_IVA2_BOOTADDR_OFFSET  0x190
-#define CONTROL_IVA2_BOOTMOD_OFFSET   0x194
-
-
-/* =============================================================================
- * APIs called by DM8168VIDEOM3PROC module
- * =============================================================================
- */
-/*!
- *  @brief      Function to control boot operations
- *
- *  @param      halObj  Pointer to the HAL object
- *  @param      cmd     Boot command
- *  @param      arg     Arguments specific to the boot command
- *
- *  @sa
- */
-Int
-DM8168VIDEOM3_halBootCtrl (Ptr halObj, Processor_BootCtrlCmd cmd, Ptr args)
-{
-    Int                  status    = PROCESSOR_SUCCESS;
-    DM8168VIDEOM3_HalObject * halObject = NULL;
-
-    GT_3trace (curTrace, GT_ENTER, "DM8168VIDEOM3_halBootCtrl", halObj, cmd, args);
-
-    GT_assert (curTrace, (halObj != NULL));
-    GT_assert (curTrace, (cmd < Processor_BootCtrlCmd_EndValue));
-
-    halObject = (DM8168VIDEOM3_HalObject *) halObj;
-
-    switch (cmd) {
-        case Processor_BootCtrlCmd_SetEntryPoint:
-        {
-            /* copy _c_int00 addresses to 0x4th location of Ducati
-               Last bit at this mem location has to be explicitly set to 1 to
-               ensure that M3 is in THUMB mode*/
-            REG (halObject->generalCtrlBase) = 0x0;
-            REG (halObject->generalCtrlBase) = ((UInt32)args | 0x1);
-        }
-        break ;
-
-        case Processor_BootCtrlCmd_SetBootComplete:
-        {
-            /* Do nothing here for DM8168VIDEOM3 gem */
-        }
-        break ;
-
-        case Processor_BootCtrlCmd_ResetBootComplete:
-        {
-            /* Do nothing here for DM8168VIDEOM3 gem */
-        }
-        break ;
-
-        default:
-        {
-            /*! @retval PROCESSOR_E_INVALIDARG Invalid argument */
-            status = PROCESSOR_E_INVALIDARG;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "DM8168VIDEOM3_halBootCtrl",
-                                 status,
-                                 "Unsupported boot ctrl cmd specified");
-        }
-        break ;
-    }
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168VIDEOM3_halBootCtrl",status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-#if defined (__cplusplus)
-}
-#endif
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvideom3/Dm8168M3VideoHalReset.c b/qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvideom3/Dm8168M3VideoHalReset.c
deleted file mode 100644 (file)
index 0b04090..0000000
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- *  @file   Dm8168M3VideoHalReset.c
- *
- *  @brief      Reset control module.
- *
- *              This module is responsible for handling reset-related hardware-
- *              specific operations.
- *              The implementation is specific to DM8168VIDEOM3.
- *
- *
- *  ============================================================================
- *
- *  Copyright (c) 2008-2012, Texas Instruments Incorporated
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *  *  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *  *  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- *  *  Neither the name of Texas Instruments Incorporated nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  Contact information for paper mail:
- *  Texas Instruments
- *  Post Office Box 655303
- *  Dallas, Texas 75265
- *  Contact information:
- *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
- *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
- *  ============================================================================
- *
- */
-
-
-
-#if defined(SYSLINK_BUILD_RTOS)
-#include <xdc/std.h>
-#include <xdc/runtime/Error.h>
-#endif /* #if defined(SYSLINK_BUILD_RTOS) */
-
-#if defined(SYSLINK_BUILD_HLOS)
-#include <ti/syslink/Std.h>
-#endif /* #if defined(SYSLINK_BUILD_HLOS) */
-
-
-/* OSAL & Utils headers */
-#include <ti/syslink/utils/Trace.h>
-#include <Bitops.h>
-
-/* Module level headers */
-#include <_ProcDefs.h>
-#include <Processor.h>
-
-/* Hardware Abstraction Layer headers */
-#include <Dm8168M3VideoHal.h>
-#include <Dm8168M3VideoHalReset.h>
-
-
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
-
-/* =============================================================================
- *  Macros and types
- * =============================================================================
- */
-#define CM_DEFAULT_DUCATI_CLKSTCTRL 0x00000518
-#define CM_DEFAULT_DUCATI_CLKCTRL   0x00000574
-#define RM_DEFAULT_RSTCTRL          0x00000B10
-#define RM_DEFAULT_RSTST            0x00000B14
-
-
-/* =============================================================================
- * APIs called by DM8168VIDEOM3PROC module
- * =============================================================================
- */
-/*!
- *  @brief      Function to control reset operations
- *
- *  @param      halObj  Pointer to the HAL object
- *  @param      cmd     Reset control command
- *  @param      arg     Arguments specific to the reset control command
- *
- *  @sa
- */
-Int
-DM8168VIDEOM3_halResetCtrl (Ptr halObj, Processor_ResetCtrlCmd cmd, Ptr args)
-{
-    Int                  status    = PROCESSOR_SUCCESS;
-    DM8168VIDEOM3_HalObject * halObject = NULL;
-
-    GT_3trace (curTrace, GT_ENTER, "DM8168VIDEOM3_halResetCtrl", halObj, cmd, args);
-
-    GT_assert (curTrace, (halObj != NULL));
-    GT_assert (curTrace, (cmd < Processor_ResetCtrlCmd_EndValue));
-
-    halObject = (DM8168VIDEOM3_HalObject *) halObj ;
-
-    switch (cmd) {
-        case Processor_ResetCtrlCmd_Reset:
-        {
-            /*Put ONLY Ducati M3_0 to Reset*/
-            SET_BIT (REG((halObject->prcmBase) + RM_DEFAULT_RSTCTRL), 0x2);
-            /* clear the status bit only if it is set*/
-            if(TEST_BIT(REG((halObject->prcmBase) + RM_DEFAULT_RSTST)  , 0x2)) {
-                REG((halObject->prcmBase) + RM_DEFAULT_RSTST) = 0x4;
-            }
-        }
-        break ;
-
-        case Processor_ResetCtrlCmd_Release:
-        {
-            /*Bring ONLY Ducati M3_0 out of Reset*/
-            CLEAR_BIT (REG((halObject->prcmBase) + RM_DEFAULT_RSTCTRL), 0x2);
-            /*Check for Ducati M3_0 out of Reset*/
-            while((((REG(halObject->prcmBase + RM_DEFAULT_RSTST)&0x04))!=0x04)&&
-                  (((REG(halObject->prcmBase + RM_DEFAULT_RSTST)&0x14))!=0x14)&&
-                  (((REG(halObject->prcmBase + RM_DEFAULT_RSTST)&0x1C))!=0x1C)) ;
-            /*Check Module is in Functional Mode */
-            while(((REG(halObject->prcmBase + CM_DEFAULT_DUCATI_CLKCTRL)&0x30000)>>16)!=0) ;
-        }
-        break;
-
-        case Processor_ResetCtrlCmd_PeripheralUp:
-        {
-            /* Nothing to be done to bringup the peripherals for this device. */
-        }
-        break;
-
-        default:
-        {
-            /*! @retval PROCESSOR_E_INVALIDARG Invalid argument */
-            status = PROCESSOR_E_INVALIDARG;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "DM8168VIDEOM3_halResetCtrl",
-                                 status,
-                                 "Unsupported reset ctrl cmd specified");
-        }
-        break ;
-    }
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168VIDEOM3_halResetCtrl",status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-#if defined (__cplusplus)
-}
-#endif
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvideom3/Dm8168M3VideoPhyShmem.c b/qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvideom3/Dm8168M3VideoPhyShmem.c
deleted file mode 100644 (file)
index ba51ef1..0000000
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- *  @file   Dm8168M3VideoPhyShmem.c
- *
- *  @brief      Linux shared memory physical interface file for DM8168VIDEOM3.
- *
- *              This module is responsible for handling boot-related hardware-
- *              specific operations.
- *              The implementation is specific to DM740VIDEOM3.
- *
- *
- *  ============================================================================
- *
- *  Copyright (c) 2008-2012, Texas Instruments Incorporated
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *  *  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *  *  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- *  *  Neither the name of Texas Instruments Incorporated nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  Contact information for paper mail:
- *  Texas Instruments
- *  Post Office Box 655303
- *  Dallas, Texas 75265
- *  Contact information:
- *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
- *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
- *  ============================================================================
- *
- */
-
-
-
-#if defined(SYSLINK_BUILD_HLOS)
-/* Standard headers */
-#include <ti/syslink/Std.h>
-
-
-/* OSAL and utils */
-#include <ti/syslink/utils/Memory.h>
-#endif /* #if defined(SYSLINK_BUILD_HLOS) */
-
-#if defined(SYSLINK_BUILD_RTOS)
-#include <xdc/std.h>
-#include <xdc/runtime/Memory.h>
-#include <xdc/runtime/Error.h>
-#include <ti/syslink/utils/_Memory.h>
-#endif /* #if defined(SYSLINK_BUILD_RTOS) */
-
-/* Module headers */
-#include <_ProcDefs.h>
-#include <Processor.h>
-
-#include <ti/syslink/utils/Trace.h>
-
-/* Hardware Abstraction Layer headers */
-#include <Dm8168M3VideoHal.h>
-#include <Dm8168M3VideoHalBoot.h>
-#include <Dm8168M3VideoHalReset.h>
-#include <Dm8168M3VideoPhyShmem.h>
-#include <Dm8168M3VideoHalMmu.h>
-
-
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
-
-/* =============================================================================
- *  Macros and types
- * =============================================================================
- */
-
-
-/* =============================================================================
- * APIs called by DM8168VIDEOM3PROC module
- * =============================================================================
- */
-/*!
- *  @brief      Function to initialize Shared Driver/device.
- *
- *  @param      halObj  Pointer to the HAL object
- *
- *  @sa         DM8168VIDEOM3_phyShmemExit
- *              Memory_map
- */
-Int
-DM8168VIDEOM3_phyShmemInit (Ptr halObj)
-{
-    Int                      status    = PROCESSOR_SUCCESS;
-    DM8168VIDEOM3_HalObject * halObject = NULL;
-    Memory_MapInfo           mapInfo;
-
-    GT_1trace (curTrace, GT_ENTER, "DM8168VIDEOM3_phyShmemInit", halObj);
-
-    GT_assert (curTrace, (halObj != NULL));
-
-    halObject = (DM8168VIDEOM3_HalObject *) halObj;
-
-    mapInfo.src      = VIDEOM3_BOOT_ADDR;
-    mapInfo.size     = VIDEOM3_BOOT_ADDR_SIZE;
-    mapInfo.isCached = FALSE;
-    status = Memory_map (&mapInfo);
-    if (status < 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168VIDEOM3_phyShmemInit",
-                             status,
-                             "Failure in Memory_map for MMU base registers");
-        halObject->generalCtrlBase = 0;
-    }
-    else {
-        halObject->generalCtrlBase = mapInfo.dst;
-    }
-
-    mapInfo.src      = PRCM_BASE_ADDR;
-    mapInfo.size     = PRCM_SIZE;
-    mapInfo.isCached = FALSE;
-    status = Memory_map (&mapInfo);
-    if (status < 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168VIDEOM3_phyShmemInit",
-                             status,
-                             "Failure in Memory_map for MMU base registers");
-        halObject->prcmBase = 0;
-    }
-    else {
-        halObject->prcmBase = mapInfo.dst;
-    }
-/* TO BE IMPLEMENTED
-    mapInfo.src      = MMU_BASE;
-    mapInfo.size     = MMU_SIZE;
-    mapInfo.isCached = FALSE;
-    status = Memory_map (&mapInfo);
-    if (status < 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168VIDEOM3_phyShmemInit",
-                             status,
-                             "Failure in Memory_map for MMU base registers");
-        halObject->mmuBase = 0;
-    }
-    else {
-        halObject->mmuBase = mapInfo.dst;
-    }
-*/
-    GT_1trace (curTrace, GT_LEAVE, "DM8168VIDEOM3_phyShmemInit", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-/*!
- *  @brief      Function to finalize Shared Driver/device.
- *
- *  @param      halObj  Pointer to the HAL object
- *
- *  @sa         DM8168VIDEOM3_phyShmemInit
- *              Memory_Unmap
- */
-Int
-DM8168VIDEOM3_phyShmemExit (Ptr halObj)
-{
-    Int                      status    = PROCESSOR_SUCCESS;
-    DM8168VIDEOM3_HalObject * halObject = NULL;
-    Memory_UnmapInfo         unmapInfo;
-
-    GT_1trace (curTrace, GT_ENTER, "DM8168VIDEOM3_phyShmemExit", halObj);
-
-    GT_assert (curTrace, (halObj != NULL));
-
-    halObject = (DM8168VIDEOM3_HalObject *) halObj;
-
-    unmapInfo.addr = halObject->prcmBase;
-    unmapInfo.size = PRCM_SIZE;
-    unmapInfo.isCached = FALSE;
-    if (unmapInfo.addr != 0) {
-        status = Memory_unmap (&unmapInfo);
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                              GT_4CLASS,
-                              "DM8168VIDEOM3_phyShmemExit",
-                              status,
-                              "Failure in Memory_Unmap for MMU base registers");
-        }
-        halObject->mmuBase = 0 ;
-    }
-
-    unmapInfo.addr = halObject->generalCtrlBase;
-    unmapInfo.size = VIDEOM3_BOOT_ADDR_SIZE;
-    unmapInfo.isCached = FALSE;
-    if (unmapInfo.addr != 0) {
-        status = Memory_unmap (&unmapInfo);
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                              GT_4CLASS,
-                              "DM8168VIDEOM3_phyShmemExit",
-                              status,
-                              "Failure in Memory_Unmap for MMU base registers");
-        }
-        halObject->generalCtrlBase = 0 ;
-    }
-
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168VIDEOM3_phyShmemExit",status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-#if defined (__cplusplus)
-
-}
-#endif
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvideom3/Dm8168M3VideoProc.c b/qnx/src/ipc3x_dev/ti/syslink/family/common/ti81xx/ti81xxducati/ti81xxvideom3/Dm8168M3VideoProc.c
deleted file mode 100644 (file)
index b895787..0000000
+++ /dev/null
@@ -1,2035 +0,0 @@
-/*
- *  @file   Dm8168M3VideoProc.c
- *
- * @brief       Processor implementation for DM8168VIDEOM3.
- *
- *              This module is responsible for taking care of device-specific
- *              operations for the processor. This module can be used
- *              stand-alone or as part of ProcMgr.
- *              The implementation is specific to DM8168VIDEOM3.
- *
- *
- *  ============================================================================
- *
- *  Copyright (c) 2008-2012, Texas Instruments Incorporated
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *  *  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *  *  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- *  *  Neither the name of Texas Instruments Incorporated nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  Contact information for paper mail:
- *  Texas Instruments
- *  Post Office Box 655303
- *  Dallas, Texas 75265
- *  Contact information:
- *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
- *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
- *  ============================================================================
- *
- */
-
-
-
-#if defined(SYSLINK_BUILD_RTOS)
-#include <xdc/std.h>
-#include <xdc/runtime/Error.h>
-#include <xdc/runtime/Memory.h>
-#include <xdc/runtime/System.h>
-#include <xdc/runtime/IGateProvider.h>
-#include <ti/sysbios/gates/GateMutex.h>
-#endif /* #if defined(SYSLINK_BUILD_RTOS) */
-
-#if defined(SYSLINK_BUILD_HLOS)
-#include <ti/syslink/Std.h>
-/* OSAL & Utils headers */
-#include <ti/syslink/utils/Cfg.h>
-#include <ti/syslink/utils/String.h>
-#include <ti/syslink/utils/IGateProvider.h>
-#include <ti/syslink/utils/GateMutex.h>
-#include <ti/syslink/utils/Memory.h>
-#endif /* #if defined(SYSLINK_BUILD_HLOS) */
-
-#if defined(SYSLINK_BUILDOS_LINUX)
-#include <linux/string.h>
-#else
-#include <string.h>
-#endif
-
-#include <ti/syslink/utils/Trace.h>
-/* Module level headers */
-#include <ProcDefs.h>
-#include <Processor.h>
-#include <Dm8168M3VideoProc.h>
-#include <_Dm8168M3VideoProc.h>
-#include <Dm8168M3VideoHal.h>
-#include <Dm8168M3VideoHalReset.h>
-#include <Dm8168M3VideoHalBoot.h>
-#include <ti/ipc/MultiProc.h>
-#include <_MultiProc.h>
-
-
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
-
-/* =============================================================================
- *  Macros and types
- * =============================================================================
- */
-
-/*!
- *  @brief  Number of static entries in address translation table.
- */
-#define AddrTable_STATIC_COUNT 4
-
-/*!
- *  @brief  Max entries in address translation table.
- */
-#define AddrTable_SIZE 32
-
-/* Config param for L2MMU. This is not a typo, we are using the
- * same name (VPSS-M3) because both Ducati M3 processors use the
- * same L2MMU. The docs expose VPSS-M3 but not the VIDEO-M3 processor.
- */
-#define PARAMS_mmuEnable "ProcMgr.proc[VPSS-M3].mmuEnable="
-
-
-/*!
- *  @brief  DM8168VIDEOM3PROC Module state object
- */
-typedef struct DM8168VIDEOM3PROC_ModuleObject_tag {
-    UInt32                  configSize;
-    /*!< Size of configuration structure */
-    DM8168VIDEOM3PROC_Config cfg;
-    /*!< DM8168VIDEOM3PROC configuration structure */
-    DM8168VIDEOM3PROC_Config defCfg;
-    /*!< Default module configuration */
-    DM8168VIDEOM3PROC_Params      defInstParams;
-    /*!< Default parameters for the DM8168VIDEOM3PROC instances */
-    Bool                    isSetup;
-    /*!< Indicates whether the DM8168VIDEOM3PROC module is setup. */
-    DM8168VIDEOM3PROC_Handle procHandles [MultiProc_MAXPROCESSORS];
-    /*!< Processor handle array. */
-    IGateProvider_Handle             gateHandle;
-    /*!< Handle of gate to be used for local thread safety */
-} DM8168VIDEOM3PROC_ModuleObject;
-
-/*!
- *  @brief  DM8168VIDEOM3PROC instance object.
- */
-struct DM8168VIDEOM3PROC_Object_tag {
-    DM8168VIDEOM3PROC_Params params;
-    /*!< Instance parameters (configuration values) */
-    Ptr                     halObject;
-    /*!< Pointer to the Hardware Abstraction Layer object. */
-    ProcMgr_Handle          pmHandle;
-    /*!< Handle to proc manager */
-};
-
-/* Defines the DM8168VIDEOM3PROC object type. */
-typedef struct DM8168VIDEOM3PROC_Object_tag DM8168VIDEOM3PROC_Object;
-
-/* Default memory regions */
-static UInt32 AddrTable_count = AddrTable_STATIC_COUNT;
-
-/* static memory regions
- * CAUTION: AddrTable_STATIC_COUNT must match number of entries below.
- */
-static ProcMgr_AddrInfo AddrTable[AddrTable_SIZE] =
-    {
-        { /* L2 BOOT, 16 KB */
-            .addr     = { -1u, -1u, 0x55020000, 0x00000000, 0x55020000 },
-            .size     = 0x4000,
-            .isCached = FALSE,
-            .isMapped = FALSE,
-            .mapMask  = ProcMgr_MASTERKNLVIRT
-        },
-        { /* L2 RAM, 240 KB */
-            .addr     = { -1u, -1u, 0x55024000, 0x20004000, 0x55024000 },
-            .size     = 0x3C000,
-            .isCached = FALSE,
-            .isMapped = FALSE,
-            .mapMask  = ProcMgr_MASTERKNLVIRT
-        },
-        { /* OCMC0, 256 KB */
-            .addr     = { -1u, -1u, 0x40300000, 0x00300000, 0x40300000 },
-            .size     = 0x40000,
-            .isCached = FALSE,
-            .isMapped = FALSE,
-            .mapMask  = (ProcMgr_MASTERKNLVIRT | ProcMgr_SLAVEVIRT)
-        },
-        { /* OCMC1, 256 KB */
-            .addr     = { -1u, -1u, 0x40400000, 0x00400000, 0x40400000 },
-            .size     = 0x40000,
-            .isCached = FALSE,
-            .isMapped = FALSE,
-            .mapMask  = (ProcMgr_MASTERKNLVIRT | ProcMgr_SLAVEVIRT)
-        }
-    };
-
-
-/* =============================================================================
- *  Globals
- * =============================================================================
- */
-
-/*!
- *  @var    DM8168VIDEOM3PROC_state
- *
- *  @brief  DM8168VIDEOM3PROC state object variable
- */
-#if !defined(SYSLINK_BUILD_DEBUG)
-static
-#endif /* if !defined(SYSLINK_BUILD_DEBUG) */
-DM8168VIDEOM3PROC_ModuleObject DM8168VIDEOM3PROC_state =
-{
-    .isSetup = FALSE,
-    .configSize = sizeof (DM8168VIDEOM3PROC_Config),
-    .gateHandle = NULL,
-    .defInstParams.mmuEnable = FALSE,
-    .defInstParams.numMemEntries = AddrTable_STATIC_COUNT
-};
-
-/* config override specified in SysLinkCfg.c, defined in ProcMgr.c */
-extern String ProcMgr_sysLinkCfgParams;
-
-
-/* =============================================================================
- * APIs directly called by applications
- * =============================================================================
- */
-/*!
- *  @brief      Function to get the default configuration for the DM8168VIDEOM3PROC
- *              module.
- *
- *              This function can be called by the application to get their
- *              configuration parameter to DM8168VIDEOM3PROC_setup filled in by the
- *              DM8168VIDEOM3PROC module with the default parameters. If the user
- *              does not wish to make any change in the default parameters, this
- *              API is not required to be called.
- *
- *  @param      cfg        Pointer to the DM8168VIDEOM3PROC module configuration
- *                         structure in which the default config is to be
- *                         returned.
- *
- *  @sa         DM8168VIDEOM3PROC_setup
- */
-Void
-DM8168VIDEOM3PROC_getConfig (DM8168VIDEOM3PROC_Config * cfg)
-{
-    GT_1trace (curTrace, GT_ENTER, "DM8168VIDEOM3PROC_getConfig", cfg);
-
-    GT_assert (curTrace, (cfg != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (cfg == NULL) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168VIDEOM3PROC_getConfig",
-                             PROCESSOR_E_INVALIDARG,
-                             "Argument of type (DM8168VIDEOM3PROC_Config *) passed "
-                             "is null!");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        memcpy(cfg,
-               &(DM8168VIDEOM3PROC_state.defCfg),
-               sizeof (DM8168VIDEOM3PROC_Config));
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-    GT_0trace (curTrace, GT_LEAVE, "DM8168VIDEOM3PROC_getConfig");
-}
-
-
-/*!
- *  @brief      Function to setup the DM8168VIDEOM3PROC module.
- *
- *              This function sets up the DM8168VIDEOM3PROC module. This function
- *              must be called before any other instance-level APIs can be
- *              invoked.
- *              Module-level configuration needs to be provided to this
- *              function. If the user wishes to change some specific config
- *              parameters, then DM8168VIDEOM3PROC_getConfig can be called to get the
- *              configuration filled with the default values. After this, only
- *              the required configuration values can be changed. If the user
- *              does not wish to make any change in the default parameters, the
- *              application can simply call DM8168VIDEOM3PROC_setup with NULL
- *              parameters. The default parameters would get automatically used.
- *
- *  @param      cfg   Optional DM8168VIDEOM3PROC module configuration. If provided as
- *                    NULL, default configuration is used.
- *
- *  @sa         DM8168VIDEOM3PROC_destroy
- *              GateMutex_create
- */
-Int
-DM8168VIDEOM3PROC_setup (DM8168VIDEOM3PROC_Config * cfg)
-{
-    Int                       status = PROCESSOR_SUCCESS;
-    DM8168VIDEOM3PROC_Config  tmpCfg;
-    Error_Block               eb;
-    Error_init(&eb);
-
-    GT_1trace (curTrace, GT_ENTER, "DM8168VIDEOM3PROC_setup", cfg);
-
-    if (cfg == NULL) {
-        DM8168VIDEOM3PROC_getConfig (&tmpCfg);
-        cfg = &tmpCfg;
-    }
-
-    /* Create a default gate handle for local module protection. */
-    DM8168VIDEOM3PROC_state.gateHandle = (IGateProvider_Handle)
-                                GateMutex_create ((GateMutex_Params*)NULL, &eb);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (DM8168VIDEOM3PROC_state.gateHandle == NULL) {
-        /*! @retval PROCESSOR_E_FAIL Failed to create GateMutex! */
-        status = PROCESSOR_E_FAIL;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168VIDEOM3PROC_setup",
-                             status,
-                             "Failed to create GateMutex!");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        /* Copy the user provided values into the state object. */
-        memcpy (&DM8168VIDEOM3PROC_state.cfg,
-                     cfg,
-                     sizeof (DM8168VIDEOM3PROC_Config));
-
-        /* Initialize the name to handles mapping array. */
-        memset (&DM8168VIDEOM3PROC_state.procHandles,
-                    0,
-                    (sizeof (DM8168VIDEOM3PROC_Handle) * MultiProc_getNumProcessors()));
-        DM8168VIDEOM3PROC_state.isSetup = TRUE;
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168VIDEOM3PROC_setup", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return (status);
-}
-
-
-/*!
- *  @brief      Function to destroy the DM8168VIDEOM3PROC module.
- *
- *              Once this function is called, other DM8168VIDEOM3PROC module APIs,
- *              except for the DM8168VIDEOM3PROC_getConfig API cannot be called
- *              anymore.
- *
- *  @sa         DM8168VIDEOM3PROC_setup
- *              GateMutex_delete
- */
-Int
-DM8168VIDEOM3PROC_destroy (Void)
-{
-    Int    status = PROCESSOR_SUCCESS;
-    UInt16 i;
-
-    GT_0trace (curTrace, GT_ENTER, "DM8168VIDEOM3PROC_destroy");
-
-    /* Check if any DM8168VIDEOM3PROC instances have not been deleted so far. If not,
-     * delete them.
-     */
-    for (i = 0 ; i < MultiProc_getNumProcessors() ; i++) {
-        GT_assert (curTrace, (DM8168VIDEOM3PROC_state.procHandles [i] == NULL));
-        if (DM8168VIDEOM3PROC_state.procHandles [i] != NULL) {
-            DM8168VIDEOM3PROC_delete (&(DM8168VIDEOM3PROC_state.procHandles [i]));
-        }
-    }
-
-    if (DM8168VIDEOM3PROC_state.gateHandle != NULL) {
-        GateMutex_delete ((GateMutex_Handle *)
-                                &(DM8168VIDEOM3PROC_state.gateHandle));
-    }
-
-    DM8168VIDEOM3PROC_state.isSetup = FALSE;
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168VIDEOM3PROC_destroy", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return (status);
-}
-
-
-/*!
- *  @brief      Function to initialize the parameters for this Processor
- *              instance.
- *
- *  @param      params  Configuration parameters to be returned
- *
- *  @sa         DM8168VIDEOM3PROC_create
- */
-Void
-DM8168VIDEOM3PROC_Params_init(
-        DM8168VIDEOM3PROC_Handle    handle,
-        DM8168VIDEOM3PROC_Params *  params)
-{
-    DM8168VIDEOM3PROC_Object * procObject = (DM8168VIDEOM3PROC_Object *) handle;
-    Int i                                 = 0;
-    ProcMgr_AddrInfo *     ai         = NULL;
-
-    GT_2trace(curTrace, GT_ENTER,
-        "DM8168VIDEOM3PROC_Params_init: handle=0x%x, params=0x%x\n",
-        handle, params);
-
-    GT_assert (curTrace, (params != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (params == NULL) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168VIDEOM3PROC_Params_init",
-                             PROCESSOR_E_INVALIDARG,
-                             "Argument of type (DM8168VIDEOM3PROC_Params *) "
-                             "passed is null!");
-    }
-    else {
-#endif
-        if (handle == NULL) {
-
-            /* check for instance params override */
-            Cfg_propBool(PARAMS_mmuEnable, ProcMgr_sysLinkCfgParams,
-                &(DM8168VIDEOM3PROC_state.defInstParams.mmuEnable));
-
-            memcpy(params, &(DM8168VIDEOM3PROC_state.defInstParams),
-                sizeof(DM8168VIDEOM3PROC_Params));
-
-            /* initialize the translation table */
-            for (i = AddrTable_count; i < AddrTable_SIZE; i++) {
-                ai = &AddrTable[i];
-                ai->addr[ProcMgr_AddrType_MasterKnlVirt] = -1u;
-                ai->addr[ProcMgr_AddrType_MasterUsrVirt] = -1u;
-                ai->addr[ProcMgr_AddrType_MasterPhys] = -1u;
-                ai->addr[ProcMgr_AddrType_SlaveVirt] = -1u;
-                ai->addr[ProcMgr_AddrType_SlavePhys] = -1u;
-                ai->size = 0u;
-                ai->isCached = FALSE;
-                ai->mapMask = 0u;
-                ai->isMapped = FALSE;
-            }
-
-            /* initialize refCount for all entries - both static and dynamic */
-            for (i = 0; i < AddrTable_SIZE; i++) {
-                AddrTable[i].refCount = 0u;
-            }
-
-            memcpy((Ptr)params->memEntries, AddrTable, sizeof (AddrTable));
-        }
-        else {
-            /* return updated DM8168VIDEOM3PROC instance specific parameters */
-            memcpy(params, &(procObject->params),
-                sizeof (DM8168VIDEOM3PROC_Params));
-        }
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif
-
-    GT_0trace(curTrace, GT_LEAVE, "DM8168VIDEOM3PROC_Params_init");
-}
-
-/*!
- *  @brief      Function to create an instance of this Processor.
- *
- *  @param      name    Name of the Processor instance.
- *  @param      params  Configuration parameters.
- *
- *  @sa         DM8168VIDEOM3PROC_delete
- */
-DM8168VIDEOM3PROC_Handle
-DM8168VIDEOM3PROC_create (      UInt16                procId,
-                     const DM8168VIDEOM3PROC_Params * params)
-{
-    Int                   status    = PROCESSOR_SUCCESS;
-    Processor_Object *    handle    = NULL;
-    DM8168VIDEOM3PROC_Object * object    = NULL;
-    IArg                  key;
-    List_Params           listParams;
-
-    GT_2trace (curTrace, GT_ENTER, "DM8168VIDEOM3PROC_create", procId, params);
-
-    GT_assert (curTrace, IS_VALID_PROCID (procId));
-    GT_assert (curTrace, (params != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (!IS_VALID_PROCID (procId)) {
-        /* Not setting status here since this function does not return status.*/
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168VIDEOM3PROC_create",
-                             PROCESSOR_E_INVALIDARG,
-                             "Invalid procId specified");
-    }
-    else if (params == NULL) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168VIDEOM3PROC_create",
-                             PROCESSOR_E_INVALIDARG,
-                             "params passed is NULL!");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        /* Enter critical section protection. */
-        key = IGateProvider_enter (DM8168VIDEOM3PROC_state.gateHandle);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-        /* Check if the Processor already exists for specified procId. */
-        if (DM8168VIDEOM3PROC_state.procHandles [procId] != NULL) {
-            status = PROCESSOR_E_ALREADYEXIST;
-            GT_setFailureReason (curTrace,
-                              GT_4CLASS,
-                              "DM8168VIDEOM3PROC_create",
-                              status,
-                              "Processor already exists for specified procId!");
-        }
-        else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-            /* Allocate memory for the handle */
-            handle = (Processor_Object *) Memory_calloc (NULL,
-                                                      sizeof (Processor_Object),
-                                                      0,
-                                                      NULL);
-            if (handle == NULL) {
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "DM8168VIDEOM3PROC_create",
-                                     PROCESSOR_E_MEMORY,
-                                     "Memory allocation failed for handle!");
-            }
-            else {
-                /* Populate the handle fields */
-                handle->procFxnTable.attach      = &DM8168VIDEOM3PROC_attach;
-                handle->procFxnTable.detach      = &DM8168VIDEOM3PROC_detach;
-                handle->procFxnTable.start       = &DM8168VIDEOM3PROC_start;
-                handle->procFxnTable.stop        = &DM8168VIDEOM3PROC_stop;
-                handle->procFxnTable.read        = &DM8168VIDEOM3PROC_read;
-                handle->procFxnTable.write       = &DM8168VIDEOM3PROC_write;
-                handle->procFxnTable.control     = &DM8168VIDEOM3PROC_control;
-                handle->procFxnTable.map         = &DM8168VIDEOM3PROC_map;
-                handle->procFxnTable.unmap       = &DM8168VIDEOM3PROC_unmap;
-                handle->procFxnTable.translateAddr = &DM8168VIDEOM3PROC_translate;
-                handle->state = ProcMgr_State_Unknown;
-
-                /* Allocate memory for the DM8168VIDEOM3PROC handle */
-                handle->object = Memory_calloc (NULL,
-                                                sizeof (DM8168VIDEOM3PROC_Object),
-                                                0,
-                                                NULL);
-                if (handle->object == NULL) {
-                    status = PROCESSOR_E_MEMORY;
-                    GT_setFailureReason (curTrace,
-                                GT_4CLASS,
-                                "DM8168VIDEOM3PROC_create",
-                                status,
-                                "Memory allocation failed for handle->object!");
-                }
-                else {
-                    handle->procId = procId;
-                    object = (DM8168VIDEOM3PROC_Object *) handle->object;
-                    object->halObject = NULL;
-                    /* Copy params into instance object. */
-                    memcpy (&(object->params),
-                                 (Ptr) params,
-                                 sizeof (DM8168VIDEOM3PROC_Params));
-
-                    /* Set the handle in the state object. */
-                    DM8168VIDEOM3PROC_state.procHandles [procId] =
-                                               (DM8168VIDEOM3PROC_Handle) handle;
-                    /* Initialize the list of listeners */
-                    List_Params_init(&listParams);
-                    handle->registeredNotifiers = List_create(&listParams);
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-                    if (handle->registeredNotifiers == NULL) {
-                        /*! @retval PROCESSOR_E_FAIL OsalIsr_create failed */
-                        status = PROCESSOR_E_FAIL;
-                        GT_setFailureReason (curTrace,
-                                             GT_4CLASS,
-                                             "DM8168VIDEOM3PROC_create",
-                                             status,
-                                             "List_create failed");
-                    }
-                    else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-                        handle->notifiersLock =
-                                 OsalMutex_create(OsalMutex_Type_Interruptible);
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-                        if (handle->notifiersLock == NULL) {
-                            /*! @retval PROCESSOR_E_FAIL OsalIsr_create failed*/
-                            status = PROCESSOR_E_FAIL;
-                            GT_setFailureReason (curTrace,
-                                                 GT_4CLASS,
-                                                 "DM8168VIDEOM3PROC_create",
-                                                 status,
-                                                 "OsalMutex_create failed");
-                        }
-                    }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-                }
-            }
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-        }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-        /* Leave critical section protection. */
-        IGateProvider_leave (DM8168VIDEOM3PROC_state.gateHandle, key);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-    if (status < 0) {
-        if (handle !=  NULL) {
-            if (handle->registeredNotifiers != NULL) {
-                List_delete (&handle->registeredNotifiers);
-            }
-            if (handle->object != NULL) {
-                Memory_free (NULL,
-                             handle->object,
-                             sizeof (DM8168VIDEOM3PROC_Object));
-            }
-            Memory_free (NULL, handle, sizeof (Processor_Object));
-        }
-        /*! @retval NULL Function failed */
-        handle = NULL;
-    }
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168VIDEOM3PROC_create", handle);
-
-    /*! @retval Valid-Handle Operation successful */
-    return (DM8168VIDEOM3PROC_Handle) handle;
-}
-
-
-/*!
- *  @brief      Function to delete an instance of this Processor.
- *
- *              The user provided pointer to the handle is reset after
- *              successful completion of this function.
- *
- *  @param      handlePtr  Pointer to Handle to the Processor instance
- *
- *  @sa         DM8168VIDEOM3PROC_create
- */
-Int
-DM8168VIDEOM3PROC_delete (DM8168VIDEOM3PROC_Handle * handlePtr)
-{
-    Int                   status = PROCESSOR_SUCCESS;
-    DM8168VIDEOM3PROC_Object * object = NULL;
-    Processor_Object *    handle;
-    IArg                  key;
-    List_Elem *           elem    = NULL;
-    Processor_RegisterElem * regElem = NULL;
-
-    GT_1trace (curTrace, GT_ENTER, "DM8168VIDEOM3PROC_delete", handlePtr);
-
-    GT_assert (curTrace, (handlePtr != NULL));
-    GT_assert (curTrace, ((handlePtr != NULL) && (*handlePtr != NULL)));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (handlePtr == NULL) {
-        /*! @retval PROCESSOR_E_INVALIDARG Invalid NULL handlePtr pointer
-                                         specified*/
-        status = PROCESSOR_E_INVALIDARG;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168VIDEOM3PROC_delete",
-                             status,
-                             "Invalid NULL handlePtr pointer specified");
-    }
-    else if (*handlePtr == NULL) {
-        /*! @retval PROCESSOR_E_HANDLE Invalid NULL *handlePtr specified */
-        status = PROCESSOR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168VIDEOM3PROC_delete",
-                             status,
-                             "Invalid NULL *handlePtr specified");
-    }
-    else {
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-        handle = (Processor_Object *) (*handlePtr);
-        /* Enter critical section protection. */
-        key = IGateProvider_enter (DM8168VIDEOM3PROC_state.gateHandle);
-
-        /* Reset handle in PwrMgr handle array. */
-        GT_assert (curTrace, IS_VALID_PROCID (handle->procId));
-        DM8168VIDEOM3PROC_state.procHandles [handle->procId] = NULL;
-
-        /* Free memory used for the DM8168VIDEOM3PROC object. */
-        if (handle->object != NULL) {
-            object = (DM8168VIDEOM3PROC_Object *) handle->object;
-            Memory_free (NULL,
-                         object,
-                         sizeof (DM8168VIDEOM3PROC_Object));
-            handle->object = NULL;
-        }
-
-        /*
-         * Check the list of listeners to see if any are remaining
-         * and reply to them
-         */
-        OsalMutex_delete(&handle->notifiersLock);
-
-        while ((elem = List_dequeue(handle->registeredNotifiers)) != NULL) {
-            regElem = (Processor_RegisterElem *)elem;
-
-            /* Check if there is an associated timer and cancel it */
-            if (regElem->timer != -1) {
-                struct itimerspec value ;
-                value.it_value.tv_sec = 0;
-                value.it_value.tv_nsec = 0;
-                value.it_interval.tv_sec = 0;
-                value.it_interval.tv_nsec = 0;
-                timer_settime(regElem->timer, 0, &value, NULL);
-
-                timer_delete(regElem->timer);
-                regElem->timer = -1;
-            }
-
-            /* Call the callback function so it can clean up. */
-            regElem->info->cbFxn(handle->procId,
-                                 NULL,
-                                 handle->state,
-                                 handle->state,
-                                 ProcMgr_EventStatus_Canceled,
-                                 regElem->info->arg);
-            /* Free the memory */
-            Memory_free(NULL, regElem, sizeof(Processor_RegisterElem));
-        }
-
-        /* Delete the list of listeners */
-        List_delete(&handle->registeredNotifiers);
-
-        /* Free memory used for the Processor object. */
-        Memory_free (NULL, handle, sizeof (Processor_Object));
-        *handlePtr = NULL;
-
-        /* Leave critical section protection. */
-        IGateProvider_leave (DM8168VIDEOM3PROC_state.gateHandle, key);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
-
-    GT_1trace (curTrace, GT_LEAVE, "DM8168VIDEOM3PROC_delete", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return (status);
-}
-
-
-/*!
- *  @brief      Function to open a handle to an instance of this Processor. This
- *              function is called when access to the Processor is required from
- *              a different process.
- *
- *  @param      handlePtr   Handle to the Processor instance
- *  @param      procId      Processor ID addressed by this Processor instance.
- *
- *  @sa         DM8168VIDEOM3PROC_close
- */
-Int
-DM8168VIDEOM3PROC_open (DM8168VIDEOM3PROC_Handle * handlePtr, UInt16 procId)
-{
-    Int status = PROCESSOR_SUCCESS;
-
-    GT_2trace (curTrace, GT_ENTER, "DM8168VIDEOM3PROC_open", handlePtr, procId);
-
-    GT_assert (curTrace, (handlePtr != NULL));
-    GT_assert (curTrace, IS_VALID_PROCID (procId));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
-    if (handlePtr == NULL) {
-        /*! @retval PROCESSOR_E_HANDLE Invalid NULL handlePtr specified */
-        status = PROCESSOR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168VIDEOM3PROC_open",
-                             status,
-                             "Invalid NULL handlePtr specified");
-    }
-    else if (!IS_VALID_PROCID (procId)) {
-        /*! @retval PROCESSOR_E_INVALIDARG Invalid procId specified */
-        status = PROCESSOR_E_INVALIDARG;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "DM8168VIDEOM3PROC_open",
-                             status,
-                 &nbs