]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/blob - packages/ti/ipc/tests/rpmsg_transport.cfg
Add Vayu Family Support for IPU2 (SMP) and DSP1
[ipc/ipcdev.git] / packages / ti / ipc / tests / rpmsg_transport.cfg
1 /*
2  * Copyright (c) 2012-2013, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * *  Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  *
12  * *  Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  *
16  * *  Neither the name of Texas Instruments Incorporated nor the names of
17  *    its contributors may be used to endorse or promote products derived
18  *    from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
34 //print ("Program.cpu.deviceName = " + Program.cpu.deviceName);
35 //print ("Program.platformName = " + Program.platformName);
37 /* This will match for omap5 IPU only: */
38 if (Program.cpu.deviceName.match(/^OMAP5430$/) &&
39         Program.cpu.attrs.cpuCore.match(/^CM4$/)) {
40     /* This initializes the MessageQ Transport RPMSG stack:  */
41     xdc.loadPackage('ti.ipc.ipcmgr');
42     var BIOS        = xdc.useModule('ti.sysbios.BIOS');
43     BIOS.addUserStartupFunction('&IpcMgr_ipcStartup');
45     var HeapBuf = xdc.useModule('ti.sysbios.heaps.HeapBuf');
46     var params = new HeapBuf.Params;
47     params.align = 8;
48     params.blockSize = 512;
49     params.numBlocks = 256;
50     var msgHeap = HeapBuf.create(params);
52     var MessageQ  = xdc.useModule('ti.sdo.ipc.MessageQ');
53     MessageQ.registerHeapMeta(msgHeap, 0);
55     var Diags = xdc.useModule('xdc.runtime.Diags');
56     Diags.setMaskMeta("ti.ipc.transports.TransportRpmsg",
57         Diags.INFO|Diags.USER1|Diags.STATUS, Diags.ALWAYS_ON);
58     Diags.setMaskMeta("ti.ipc.namesrv.NameServerRemoteRpmsg", Diags.INFO,
59         Diags.ALWAYS_ON);
61     var VirtioSetup = xdc.useModule('ti.ipc.transports.TransportRpmsgSetup');
62     VirtioSetup.common$.diags_INFO = Diags.ALWAYS_ON;
64     xdc.loadCapsule("ti/configs/omap54xx/IpcCommon.cfg.xs");
65     xdc.includeFile("ti/configs/omap54xx/IpuSmp.cfg");
66     xdc.includeFile("ti/configs/omap54xx/IpuAmmu.cfg");
67 }
68 /* This will match for omap5 dsp only: */
69 else if (Program.platformName.match(/^ti\.platform\.omap54xx\.dsp/)) {
70     /* This initializes the MessageQ Transport RPMSG stack:  */
71     xdc.loadPackage('ti.ipc.ipcmgr');
72     var BIOS        = xdc.useModule('ti.sysbios.BIOS');
73     BIOS.addUserStartupFunction('&IpcMgr_ipcStartup');
75     var HeapBuf = xdc.useModule('ti.sysbios.heaps.HeapBuf');
76     var params = new HeapBuf.Params;
77     params.align = 8;
78     params.blockSize = 512;
79     params.numBlocks = 256;
80     var msgHeap = HeapBuf.create(params);
82     var MessageQ  = xdc.useModule('ti.sdo.ipc.MessageQ');
83     MessageQ.registerHeapMeta(msgHeap, 0);
85     var Diags = xdc.useModule('xdc.runtime.Diags');
86     Diags.setMaskMeta("ti.ipc.transports.TransportRpmsg",
87         Diags.INFO|Diags.USER1|Diags.STATUS, Diags.ALWAYS_ON);
88     Diags.setMaskMeta("ti.ipc.namesrv.NameServerRemoteRpmsg", Diags.INFO,
89         Diags.ALWAYS_ON);
91     var VirtioSetup = xdc.useModule('ti.ipc.transports.TransportRpmsgSetup');
92     VirtioSetup.common$.diags_INFO = Diags.ALWAYS_ON;
94     xdc.includeFile("ti/configs/omap54xx/Dsp.cfg");
95     xdc.includeFile("ti/configs/omap54xx/DspAmmu.cfg");
96 }
97 else if (Program.platformName.match(/^ti\.platform\.vayu\.ipu2/)) {
98     /* This initializes the MessageQ Transport RPMSG stack:  */
99     xdc.loadPackage('ti.ipc.ipcmgr');
100     var BIOS        = xdc.useModule('ti.sysbios.BIOS');
101     BIOS.addUserStartupFunction('&IpcMgr_ipcStartup');
103     var HeapBuf = xdc.useModule('ti.sysbios.heaps.HeapBuf');
104     var params = new HeapBuf.Params;
105     params.align = 8;
106     params.blockSize = 512;
107     params.numBlocks = 256;
108     var msgHeap = HeapBuf.create(params);
110     var MessageQ  = xdc.useModule('ti.sdo.ipc.MessageQ');
111     MessageQ.registerHeapMeta(msgHeap, 0);
113     var Diags = xdc.useModule('xdc.runtime.Diags');
114     Diags.setMaskMeta("ti.ipc.transports.TransportRpmsg",
115         Diags.INFO|Diags.USER1|Diags.STATUS, Diags.ALWAYS_ON);
116     Diags.setMaskMeta("ti.ipc.namesrv.NameServerRemoteRpmsg", Diags.INFO,
117         Diags.ALWAYS_ON);
119     var VirtioSetup = xdc.useModule('ti.ipc.transports.TransportRpmsgSetup');
120     VirtioSetup.common$.diags_INFO = Diags.ALWAYS_ON;
122     xdc.loadCapsule("ti/configs/vayu/IpcCommon.cfg.xs");
123     xdc.includeFile("ti/configs/vayu/Ipu2Smp.cfg");
124     xdc.includeFile("ti/configs/vayu/IpuAmmu.cfg");
126 else if (Program.platformName.match(/^ti\.platform\.vayu\.dsp1/)) {
127     /* This initializes the MessageQ Transport RPMSG stack:  */
128     xdc.loadPackage('ti.ipc.ipcmgr');
129     var BIOS        = xdc.useModule('ti.sysbios.BIOS');
130     BIOS.addUserStartupFunction('&IpcMgr_ipcStartup');
132     var HeapBuf = xdc.useModule('ti.sysbios.heaps.HeapBuf');
133     var params = new HeapBuf.Params;
134     params.align = 8;
135     params.blockSize = 512;
136     params.numBlocks = 256;
137     var msgHeap = HeapBuf.create(params);
139     var MessageQ  = xdc.useModule('ti.sdo.ipc.MessageQ');
140     MessageQ.registerHeapMeta(msgHeap, 0);
142     var Diags = xdc.useModule('xdc.runtime.Diags');
143     Diags.setMaskMeta("ti.ipc.transports.TransportRpmsg",
144         Diags.INFO|Diags.USER1|Diags.STATUS, Diags.ALWAYS_ON);
145     Diags.setMaskMeta("ti.ipc.namesrv.NameServerRemoteRpmsg", Diags.INFO,
146         Diags.ALWAYS_ON);
148     var VirtioSetup = xdc.useModule('ti.ipc.transports.TransportRpmsgSetup');
149     VirtioSetup.common$.diags_INFO = Diags.ALWAYS_ON;
151     xdc.includeFile("ti/configs/vayu/Dsp1.cfg");
153 else {
154     xdc.loadCapsule("messageq_common.cfg.xs");
157 var MessageQ  = xdc.useModule('ti.sdo.ipc.MessageQ');
159 var VirtioSetup = xdc.useModule('ti.ipc.transports.TransportRpmsgSetup');
160 MessageQ.SetupTransportProxy = VirtioSetup;
162 var NameServer = xdc.useModule("ti.sdo.utils.NameServer");
163 var NsRemote = xdc.useModule("ti.ipc.namesrv.NameServerRemoteRpmsg");
164 NameServer.SetupProxy = NsRemote;
166 var TransportRpmsg = xdc.useModule('ti.ipc.transports.TransportRpmsg');