index 6af3a72cbb53ec926886bf21f2994ffb42fa4ee5..a6fe8d42ca26bfae7de2814f4d02b42faebe3233 100644 (file)
/*
- * 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
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;
/* 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');
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');
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');
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";