]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/blobdiff - packages/ti/ipc/tests/Dsp_vayu.cfg
Add power management support to DRA7xx DSP
[ipc/ipcdev.git] / packages / ti / ipc / tests / Dsp_vayu.cfg
index 6af3a72cbb53ec926886bf21f2994ffb42fa4ee5..a6fe8d42ca26bfae7de2814f4d02b42faebe3233 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2014, Texas Instruments Incorporated
+ * Copyright (c) 2012-2015, Texas Instruments Incorporated
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -48,8 +48,6 @@ var BIOS        = xdc.useModule('ti.sysbios.BIOS');
 
 var Cache = xdc.useModule('ti.sysbios.family.c66.Cache');
 Cache.setMarMeta(0xa0000000, 0x02000000, Cache.Mar_DISABLE);
-var L1cache = new Cache.Size();
-L1cache.l1dSize = Cache.L1Size_0K;
 
 /* Reduces code size, by only pulling in modules explicitly referenced: */
 //BIOS.libType    = BIOS.LibType_Custom;
@@ -74,22 +72,18 @@ Resource.loadSegment = "EXT_CODE";
 
 /* Modules used in Power Management */
 xdc.loadPackage('ti.pm');
-/*
-var Power = xdc.useModule('ti.sysbios.family.c64p.tesla.Power');
+
+var Power = xdc.useModule('ti.sysbios.family.c66.vayu.Power');
 Power.loadSegment = "PM_DATA";
-*/
+
 
 /* Idle function that periodically flushes the unicache */
 var Idle = xdc.useModule('ti.sysbios.knl.Idle');
 Idle.addFunc('&VirtQueue_cacheWb');
 
-//TBD: Idle.addFunc('&ti_deh_Deh_idleBegin'); /* Must be placed before pwr mgmt */
-//TBD: Idle.addFunc('&IpcPower_idle');        /* IpcPower_idle must be at the end */
-
 var HeapBuf   = xdc.useModule('ti.sysbios.heaps.HeapBuf');
 var List      = xdc.useModule('ti.sdo.utils.List');
 
-xdc.useModule('ti.sysbios.xdcruntime.GateThreadSupport');
 var GateSwi   = xdc.useModule('ti.sysbios.gates.GateSwi');
 
 var Task          = xdc.useModule('ti.sysbios.knl.Task');
@@ -110,10 +104,10 @@ Text.isLoaded = true;
 var Registry = xdc.useModule('xdc.runtime.Registry');
 Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
 Registry.common$.diags_EXIT  = Diags.RUNTIME_OFF;
-Registry.common$.diags_USER1 = Diags.ALWAYS_ON;
-Registry.common$.diags_INFO  = Diags.ALWAYS_ON;
-Registry.common$.diags_LIFECYCLE = Diags.ALWAYS_ON;
-Registry.common$.diags_STATUS = Diags.ALWAYS_ON;
+Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;
+Registry.common$.diags_INFO  = Diags.RUNTIME_OFF;
+Registry.common$.diags_LIFECYCLE = Diags.RUNTIME_OFF;
+Registry.common$.diags_STATUS = Diags.RUNTIME_OFF;
 Diags.setMaskEnabled = true;
 
 var Main = xdc.useModule('xdc.runtime.Main');
@@ -121,26 +115,33 @@ Main.common$.diags_ASSERT = Diags.ALWAYS_ON;
 Main.common$.diags_INTERNAL = Diags.ALWAYS_ON;
 
 var Hwi = xdc.useModule('ti.sysbios.family.c64p.Hwi');
-//TBD: var Deh = xdc.useModule('ti.deh.Deh');
 Hwi.enableException = true;
 
 /* -------------------------------- DSP ----------------------------------*/
 var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
 var myName;
+var timerId;
 if (Program.platformName.match(/^ti\.platforms\.evmDRA7XX\:dsp1/)) {
     myName = "DSP1";
+    /* Configure BIOS clock source as GPTimer5 */
+    timerId = 4;
+
+    var Deh = xdc.useModule('ti.deh.Deh');
+
+    Idle.addFunc('&ti_deh_Deh_idleBegin'); /* Must be placed before pwr mgmt */
+    //TBD Idle.addFunc('&IpcPower_idle'); /* IpcPower_idle must be at the end */
 }
 else {
     myName = "DSP2";
+    /* Configure BIOS clock source as GPTimer6 */
+    timerId = 5;
 }
 MultiProc.setConfig(myName, ["HOST", "IPU2", "IPU1", "DSP2", "DSP1"]);
 
 /* --------------------------- TICK --------------------------------------*/
 var Clock = xdc.useModule('ti.sysbios.knl.Clock');
-Clock.tickSource = Clock.TickSource_NULL;
-//Clock.tickSource = Clock.TickSource_USER;
-/* Configure BIOS clock source as GPTimer5 */
-//Clock.timerId = 0;
+Clock.tickSource = Clock.TickSource_USER;
+Clock.timerId = timerId;
 
 var Timer = xdc.useModule('ti.sysbios.timers.dmtimer.Timer');
 
@@ -152,16 +153,16 @@ Timer.checkFrequency = false;
 Timer.intFreq.hi = 0;
 Timer.intFreq.lo = 19200000;
 
-//var timerParams = new Timer.Params();
-//timerParams.period = Clock.tickPeriod;
-//timerParams.periodType = Timer.PeriodType_MICROSECS;
+var timerParams = new Timer.Params();
+timerParams.period = Clock.tickPeriod;
+timerParams.periodType = Timer.PeriodType_MICROSECS;
 /* Switch off Software Reset to make the below settings effective */
-//timerParams.tiocpCfg.softreset = 0x0;
+timerParams.tiocpCfg.softreset = 0x0;
 /* Smart-idle wake-up-capable mode */
-//timerParams.tiocpCfg.idlemode = 0x3;
+timerParams.tiocpCfg.idlemode = 0x3;
 /* Wake-up generation for Overflow */
-//timerParams.twer.ovf_wup_ena = 0x1;
-//Timer.create(Clock.timerId, Clock.doTick, timerParams);
+timerParams.twer.ovf_wup_ena = 0x1;
+Timer.create(Clock.timerId, Clock.doTick, timerParams);
 
 Program.sectMap[".tracebuf"] = "TRACE_BUF";
 Program.sectMap[".errorbuf"] = "EXC_DATA";