[processor-sdk/pdk.git] / packages / ti / drv / emac / cpsw / example / src / c66x / bios / cpsw_mgmt.h
1 /** \r
2 * @file cpsw_singlecore.h\r
3 *\r
4 * @brief \r
5 * Holds all the constants and API definitions required by the example\r
6 * application to run.\r
7 *\r
8 * \par\r
9 * ============================================================================\r
10 * @n (C) Copyright 2009-2014, Texas Instruments, Inc.\r
11 * \r
12 * Redistribution and use in source and binary forms, with or without \r
13 * modification, are permitted provided that the following conditions \r
14 * are met:\r
15 *\r
16 * Redistributions of source code must retain the above copyright \r
17 * notice, this list of conditions and the following disclaimer.\r
18 *\r
19 * Redistributions in binary form must reproduce the above copyright\r
20 * notice, this list of conditions and the following disclaimer in the \r
21 * documentation and/or other materials provided with the \r
22 * distribution.\r
23 *\r
24 * Neither the name of Texas Instruments Incorporated nor the names of\r
25 * its contributors may be used to endorse or promote products derived\r
26 * from this software without specific prior written permission.\r
27 *\r
28 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
29 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
30 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
31 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
32 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
33 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
34 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
35 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
36 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
37 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
38 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
39 *\r
40 */\r
41 #ifndef _CPSW_MGMT_H_\r
42 #define _CPSW_MGMT_H_\r
43 \r
44 #ifdef __cplusplus\r
45 extern "C" {\r
46 #endif\r
47 \r
48 #include <stdlib.h>\r
49 #include <xdc/runtime/System.h>\r
50 \r
51 #ifdef SIMULATOR_SUPPORT\r
52 /** Number of ports in the ethernet subsystem */\r
53 #undef NUM_PORTS\r
54 #define NUM_PORTS CSL_CPSW_NUM_PORTS\r
55 \r
56 #else\r
57 \r
58 #ifndef NUM_PORTS\r
59 /** Number of ports in the ethernet subsystem (default for EVM) */\r
60 #define NUM_PORTS 3u\r
61 \r
62 #endif\r
63 \r
64 #endif /* SIMULATOR_SUPPOR */\r
65 \r
66 \r
67 /* Define LoopBack modes */ \r
68 #define CPSW_LOOPBACK_NONE 0 /* No Loopback */\r
69 #define CPSW_LOOPBACK_INTERNAL 1 /* SGMII internal Loopback */\r
70 #define CPSW_LOOPBACK_EXTERNAL 2 /* Loopback outside SoC */\r
71 #define CPSW_LOOPBACK_SERDES 3 /* SGMII Serdes Loopback */\r
72 extern int cpswLpbkMode;\r
73 extern int cpswSimTest;\r
74 extern void CycleDelay (int32_t count);\r
75 \r
76 #ifdef __cplusplus\r
77 }\r
78 #endif\r
79 \r
80 #endif /* _CPSW_MGMT_H_ */\r
81 /* Nothing past this point */\r