blob: 7b40fb167fb529101f226ec65e2f4071f35a84f0 [file] [log] [blame]
Shad Ansari2f7f9be2017-06-07 13:34:53 -07001/*
2<:copyright-BRCM:2016:DUAL/GPL:standard
3
4 Broadcom Proprietary and Confidential.(c) 2016 Broadcom
5 All Rights Reserved
6
7Unless you and Broadcom execute a separate written software license
8agreement governing use of this software, this software is licensed
9to you under the terms of the GNU General Public License version 2
10(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
11with the following added to such license:
12
13 As a special exception, the copyright holders of this software give
14 you permission to link this software with independent modules, and
15 to copy and distribute the resulting executable under terms of your
16 choice, provided that you also meet, for each linked independent
17 module, the terms and conditions of the license of that module.
18 An independent module is a module which is not derived from this
19 software. The special exception does not apply to any modifications
20 of the software.
21
22Not withstanding the above, under no circumstances may you combine
23this software in any way with any other Broadcom software provided
24under a license other than the GPL, without Broadcom's express prior
25written consent.
26
27:>
28 */
29
30#ifndef BCMOS_PLATFORM_H_
31#define BCMOS_PLATFORM_H_
32
33#ifndef BCMOS_SYSTEM_H_
34#error Please do not include bcmos_platform.h directly. Include bcmos_system.h
35#endif
36
37/** BCM68620 CPU core
38 * \ingroup system_task */
39typedef enum
40{
41 BCMOS_CPU_CORE_ANY, /**< Any core */
42
43 BCMOS_CPU_CORE__NUM_OF = 1, /**< Number of cores */
44} bcmos_core;
45
46#define MAX_NUMBER_OF_PONS_ON_ALL_DEVICES (BCMTR_MAX_OLTS * BCMTR_MAX_INSTANCES)
47
48/** BCM68620 module
49 * \ingroup system_module
50 */
51typedef enum
52{
53 BCMOS_MODULE_ID_NONE, /**< no module */
54
55#ifdef BCMOS_SYS_UNITTEST
56 BCMOS_MODULE_ID_TEST1,
57 BCMOS_MODULE_ID_TEST2,
58#endif
59 /* Each Device (BCM6862X) must have its own dedicated Device Control Module at the host */
60 BCMOS_MODULE_ID_DEV_CTRL_DEV0,
61 BCMOS_MODULE_ID_DEV_CTRL_DEV1,
62 BCMOS_MODULE_ID_DEV_CTRL_DEV2,
63 BCMOS_MODULE_ID_DEV_CTRL_DEV3,
64 BCMOS_MODULE_ID_DEV_CTRL_DEV4,
65 BCMOS_MODULE_ID_DEV_CTRL_DEV5,
66 BCMOS_MODULE_ID_DEV_CTRL_DEV6,
67 BCMOS_MODULE_ID_DEV_CTRL_DEV7,
68
69 /* CLI over PCIe client */
70 BCMOS_MODULE_ID_CLI_OVER_PCIE,
71
72 /* Protection switching user application */
73 BCMOS_MODULE_ID_USER_APPL_PS,
74
75 /* Remote CLI */
76 BCMOS_MODULE_ID_REMOTE_CLI_DEV0,
77
78 /* Remote logger application (To support multiple devices need to add number of devices to previous value) */
79 BCMOS_MODULE_ID_USER_APPL_REMOTE_LOGGER_DEV0 = BCMOS_MODULE_ID_REMOTE_CLI_DEV0 + BCMTR_MAX_OLTS,
80
81 /* OMCI SW download user application (To support multiple devices need to add number of devices to previous value) */
82 BCMOS_MODULE_ID_USER_APPL_OMCI_SWDL_DEV0 = BCMOS_MODULE_ID_USER_APPL_REMOTE_LOGGER_DEV0 + BCMTR_MAX_OLTS,
83
84 /* GPON mac learning / aging user application (To support multiple devices need to add number of devices to previous value)*/
85 BCMOS_MODULE_ID_USER_APPL_GPON_MAC_LEARNING_DEV0 = BCMOS_MODULE_ID_USER_APPL_OMCI_SWDL_DEV0 + BCMTR_MAX_OLTS,
86
87 /* GPON stress user application (To support multiple devices need to add number of devices to previous value)*/
88 BCMOS_MODULE_ID_USER_APPL_GPON_STRESS_DEV0 = BCMOS_MODULE_ID_USER_APPL_GPON_MAC_LEARNING_DEV0 + BCMTR_MAX_OLTS,
89
90 /* GPON DS OMCI packets user application (To support multiple devices need to add number of devices to previous value)*/
91 BCMOS_MODULE_ID_USER_APPL_GPON_DS_OMCI0_DEV0 = BCMOS_MODULE_ID_USER_APPL_GPON_STRESS_DEV0 + BCMTR_MAX_OLTS,
92
93 /* GPON SN acquisition (To support multiple devices need to add number of devices multiply with max PON number to previous value)*/
94 BCMOS_MODULE_ID_USER_APPL_GPON_SN_ACQUISITION0_DEV0 = BCMOS_MODULE_ID_USER_APPL_GPON_DS_OMCI0_DEV0 + MAX_NUMBER_OF_PONS_ON_ALL_DEVICES,
95
96 /* GPON statistics (To support multiple devices need to add number of devices multiply with max PON number to previous value) */
97 BCMOS_MODULE_ID_USER_APPL_GPON_STATISTICS0_DEV0 = BCMOS_MODULE_ID_USER_APPL_GPON_SN_ACQUISITION0_DEV0 + MAX_NUMBER_OF_PONS_ON_ALL_DEVICES,
98
99 /* GPON RSSI user application (To support multiple devices need to add number of devices multiply with max PON number to previous value) */
100 BCMOS_MODULE_ID_USER_APPL_GPON_RSSI_DEV0 = BCMOS_MODULE_ID_USER_APPL_GPON_STATISTICS0_DEV0 + MAX_NUMBER_OF_PONS_ON_ALL_DEVICES,
101
102 /* EPON OAM negotiation application (To support multiple devices need to add number of devices to previous value)*/
103 BCMOS_MODULE_ID_USER_APPL_EON = BCMOS_MODULE_ID_USER_APPL_GPON_RSSI_DEV0 + BCMTR_MAX_OLTS,
104
105 /* EPON optical monitoring application */
106 BCMOS_MODULE_ID_USER_APPL_OMON = BCMOS_MODULE_ID_USER_APPL_EON + BCMTR_MAX_OLTS,
107
108 /* EPON Host driven encryption application */
109 BCMOS_MODULE_ID_USER_APPL_EPON_HDE,
110
111 BCMOS_MODULE_ID_USER_APPL_EPON_OAM,
112
113 BCMOS_MODULE_ID_USER_APPL_DPOE_SEC,
114
115 BCMOS_MODULE_ID_USER_APPL_IMAGE_TRANSFER0 = BCMOS_MODULE_ID_USER_APPL_DPOE_SEC + BCMTR_MAX_OLTS,
116 BCMOS_MODULE_ID_USER_APPL_IMAGE_TRANSFER1,
117
118 BCMOS_MODULE_ID_USER_APPL_ONU_TUNING_DEV0,
119 BCMOS_MODULE_ID_USER_APPL_ONU_TUNING_DEV1,
120
121 BCMOS_MODULE_ID__NUM_OF, /**< Number of modules */
122 BCMOS_MODULE_ID_INVALID = BCMOS_MODULE_ID_NONE
123} bcmos_module_id;
124
125/** BCM68620 event group. Each group supports up to 32 events.
126 * \ingroup system_event
127 */
128typedef enum
129{
130#ifdef BCMOS_SYS_UNITTEST
131 BCMOS_EVENT_ID_TEST1,
132 BCMOS_EVENT_ID_TEST2,
133#else
134 BCMOS_EVENT_ID_DUMMY, /* Currently OS s/w doesn't use events.
135 Remove this constant when adding real events */
136#endif
137
138 BCMOS_EVENT_ID__NUM_OF, /**< Number of event groups */
139} bcmos_event_id;
140
141/** Message hash size
142 * \ingroup system_msg
143 */
144#define BCMOS_MSG_HASH_SIZE 512
145
146/** Maple OS message
147 * \ingroup system_msg
148 */
149typedef enum
150{
151 BCMOS_MSG_ID__BEGIN,
152
153 /* Internal messages */
154 BCMOS_MSG_ID_INTERNAL_TIMER = BCMOS_MSG_ID__BEGIN, /**< Internal "timer message" type */
155 BCMOS_MSG_ID_INTERNAL_EVENT, /**< Internal "event message" type */
156 BCMOS_MSG_ID_INTERNAL_IPC,
157
158 BCMOS_MSG_ID_INITIATE_RX_POWER,
159 BCMOS_MSG_ID_INITIATE_TRX_STATUS,
160 BCMOS_MSG_ID_INITIATE_ROGUE_SCAN,
161 BCMOS_MSG_ID_INITIATE_RSSI_READ,
162
163 BCMOS_MSG_ID_GPON_STRESS_START,
164 BCMOS_MSG_ID_GPON_STRESS_TIMEOUT,
165 BCMOS_MSG_ID_GPON_STRESS_ONU_DISCOVERED,
166 BCMOS_MSG_ID_GPON_STRESS_PON_DEACTIVATION_COMPLETED,
167 BCMOS_MSG_ID_GPON_STRESS_PON_ACTIVATION_COMPLETED,
168 BCMOS_MSG_ID_GPON_STRESS_ALL_ONUS_DEACTIVATION_COMPLETED,
169 BCMOS_MSG_ID_GPON_STRESS_ALL_ONUS_ACTIVATION_COMPLETED,
170 BCMOS_MSG_ID_GPON_STRESS_ONU_DEACTIVATION_COMPLETED,
171 BCMOS_MSG_ID_GPON_STRESS_ONU_ACTIVATION_COMPLETED,
172
173 BCMOS_MSG_ID_GPON_DS_OMCI_START,
174 BCMOS_MSG_ID_GPON_DS_OMCI_TIMEOUT,
175 BCMOS_MSG_ID_GPON_DS_OMCI_STOP,
176 BCMOS_MSG_ID_GPON_DS_OMCI_DEVICE_CONNECTED,
177 BCMOS_MSG_ID_GPON_DS_OMCI_DEVICE_DISCONNECTED,
178
179 BCMOS_MSG_ID_GPON_RSSI_START,
180
181 BCMOS_MSG_ID_GPON_STATISTICS_START,
182 BCMOS_MSG_ID_GPON_STATISTICS_TIMEOUT,
183 BCMOS_MSG_ID_GPON_STATISTICS_STOP,
184
185 BCMOS_MSG_ID_EON_START,
186 BCMOS_MSG_ID_EON_STOP,
187 BCMOS_MSG_ID_EON_PROXY_RX,
188
189 BCMOS_MSG_ID_EPON_OAM_PROXY_RX,
190 BCMOS_MSG_ID_EPON_OAM_TIMEOUT,
191
192 BCMOS_MSG_ID_DPOE_SEC_START,
193 BCMOS_MSG_ID_DPOE_SEC_RX_OAM,
194 BCMOS_MSG_ID_DPOE_SEC_RX_EAPOL,
195
196 BCMOS_MSG_ID_ONU_TUNING_START,
197 BCMOS_MSG_ID_ONU_TUNING_STOP,
198
199 BCMOS_MSG_ID__NONE,
200 BCMOS_MSG_ID__END,
201 BCMOS_MSG_ID__FORCE16 = 0x7fff
202} bcmos_msg_id;
203
204#define BCMOS_MSG_ID__NUM_OF (BCMOS_MSG_ID__END - BCMOS_MSG_ID__BEGIN)
205/*
206 * Task priorities
207 */
208
209#define TASK_PRIORITY_TRANSPORT_TX BCMOS_TASK_PRIORITY_3
210#define TASK_PRIORITY_TRANSPORT_RX BCMOS_TASK_PRIORITY_8
211#define TASK_PRIORITY_TRANSPORT_PROXY BCMOS_TASK_PRIORITY_9
212#define TASK_PRIORITY_TRANSPORT_REMOTE_CLI BCMOS_TASK_PRIORITY_9
213#define TASK_PRIORITY_DEVICE_CONTROL BCMOS_TASK_PRIORITY_10
214#define TASK_PRIORITY_USER_APPL_PS BCMOS_TASK_PRIORITY_12
215#define TASK_PRIORITY_USER_APPL_EON BCMOS_TASK_PRIORITY_12
216#define TASK_PRIORITY_USER_APPL_OMON BCMOS_TASK_PRIORITY_12
217#define TASK_PRIORITY_USER_APPL_EPON_HDE BCMOS_TASK_PRIORITY_12
218#define TASK_PRIORITY_USER_APPL_DPOE_SEC BCMOS_TASK_PRIORITY_12
219#define TASK_PRIORITY_USER_APPL_GPON_MAC_LEARNING BCMOS_TASK_PRIORITY_12
220#define TASK_PRIORITY_USER_APPL_GPON_STRESS BCMOS_TASK_PRIORITY_12
221#define TASK_PRIORITY_USER_APPL_GPON_SN_ACQUISITION BCMOS_TASK_PRIORITY_12
222#define TASK_PRIORITY_USER_APPL_GPON_DS_OMCI BCMOS_TASK_PRIORITY_12
223#define TASK_PRIORITY_USER_APPL_GPON_STATISTICS BCMOS_TASK_PRIORITY_12
224#define TASK_PRIORITY_USER_APPL_ONU_TUNING BCMOS_TASK_PRIORITY_12
225#define TASK_PRIORITY_USER_APPL_GPON_RSSI BCMOS_TASK_PRIORITY_12
226#define TASK_PRIORITY_CLI BCMOS_TASK_PRIORITY_15
227#define TASK_PRIORITY_USER_APPL_OMCI_SWDL BCMOS_TASK_PRIORITY_17
228#define TASK_PRIORITY_USER_APPL_IMAGE_TRANSFER BCMOS_TASK_PRIORITY_17
229#define TASK_PRIORITY_DEV_LOG_KERNEL BCMOS_TASK_PRIORITY_20
230#define TASK_PRIORITY_DEV_LOG BCMOS_TASK_PRIORITY_30
231#define TASK_PRIORITY_USER_APPL_REMOTE_LOGGER BCMOS_TASK_PRIORITY_30
232
233
234
235
236#endif /* BCMOS_PLATFORM_H_ */