blob: 7b40fb167fb529101f226ec65e2f4071f35a84f0 [file] [log] [blame]
/*
<:copyright-BRCM:2016:DUAL/GPL:standard
Broadcom Proprietary and Confidential.(c) 2016 Broadcom
All Rights Reserved
Unless you and Broadcom execute a separate written software license
agreement governing use of this software, this software is licensed
to you under the terms of the GNU General Public License version 2
(the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php,
with the following added to such license:
As a special exception, the copyright holders of this software give
you permission to link this software with independent modules, and
to copy and distribute the resulting executable under terms of your
choice, provided that you also meet, for each linked independent
module, the terms and conditions of the license of that module.
An independent module is a module which is not derived from this
software. The special exception does not apply to any modifications
of the software.
Not withstanding the above, under no circumstances may you combine
this software in any way with any other Broadcom software provided
under a license other than the GPL, without Broadcom's express prior
written consent.
:>
*/
#ifndef BCMOS_PLATFORM_H_
#define BCMOS_PLATFORM_H_
#ifndef BCMOS_SYSTEM_H_
#error Please do not include bcmos_platform.h directly. Include bcmos_system.h
#endif
/** BCM68620 CPU core
* \ingroup system_task */
typedef enum
{
BCMOS_CPU_CORE_ANY, /**< Any core */
BCMOS_CPU_CORE__NUM_OF = 1, /**< Number of cores */
} bcmos_core;
#define MAX_NUMBER_OF_PONS_ON_ALL_DEVICES (BCMTR_MAX_OLTS * BCMTR_MAX_INSTANCES)
/** BCM68620 module
* \ingroup system_module
*/
typedef enum
{
BCMOS_MODULE_ID_NONE, /**< no module */
#ifdef BCMOS_SYS_UNITTEST
BCMOS_MODULE_ID_TEST1,
BCMOS_MODULE_ID_TEST2,
#endif
/* Each Device (BCM6862X) must have its own dedicated Device Control Module at the host */
BCMOS_MODULE_ID_DEV_CTRL_DEV0,
BCMOS_MODULE_ID_DEV_CTRL_DEV1,
BCMOS_MODULE_ID_DEV_CTRL_DEV2,
BCMOS_MODULE_ID_DEV_CTRL_DEV3,
BCMOS_MODULE_ID_DEV_CTRL_DEV4,
BCMOS_MODULE_ID_DEV_CTRL_DEV5,
BCMOS_MODULE_ID_DEV_CTRL_DEV6,
BCMOS_MODULE_ID_DEV_CTRL_DEV7,
/* CLI over PCIe client */
BCMOS_MODULE_ID_CLI_OVER_PCIE,
/* Protection switching user application */
BCMOS_MODULE_ID_USER_APPL_PS,
/* Remote CLI */
BCMOS_MODULE_ID_REMOTE_CLI_DEV0,
/* Remote logger application (To support multiple devices need to add number of devices to previous value) */
BCMOS_MODULE_ID_USER_APPL_REMOTE_LOGGER_DEV0 = BCMOS_MODULE_ID_REMOTE_CLI_DEV0 + BCMTR_MAX_OLTS,
/* OMCI SW download user application (To support multiple devices need to add number of devices to previous value) */
BCMOS_MODULE_ID_USER_APPL_OMCI_SWDL_DEV0 = BCMOS_MODULE_ID_USER_APPL_REMOTE_LOGGER_DEV0 + BCMTR_MAX_OLTS,
/* GPON mac learning / aging user application (To support multiple devices need to add number of devices to previous value)*/
BCMOS_MODULE_ID_USER_APPL_GPON_MAC_LEARNING_DEV0 = BCMOS_MODULE_ID_USER_APPL_OMCI_SWDL_DEV0 + BCMTR_MAX_OLTS,
/* GPON stress user application (To support multiple devices need to add number of devices to previous value)*/
BCMOS_MODULE_ID_USER_APPL_GPON_STRESS_DEV0 = BCMOS_MODULE_ID_USER_APPL_GPON_MAC_LEARNING_DEV0 + BCMTR_MAX_OLTS,
/* GPON DS OMCI packets user application (To support multiple devices need to add number of devices to previous value)*/
BCMOS_MODULE_ID_USER_APPL_GPON_DS_OMCI0_DEV0 = BCMOS_MODULE_ID_USER_APPL_GPON_STRESS_DEV0 + BCMTR_MAX_OLTS,
/* GPON SN acquisition (To support multiple devices need to add number of devices multiply with max PON number to previous value)*/
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,
/* GPON statistics (To support multiple devices need to add number of devices multiply with max PON number to previous value) */
BCMOS_MODULE_ID_USER_APPL_GPON_STATISTICS0_DEV0 = BCMOS_MODULE_ID_USER_APPL_GPON_SN_ACQUISITION0_DEV0 + MAX_NUMBER_OF_PONS_ON_ALL_DEVICES,
/* GPON RSSI user application (To support multiple devices need to add number of devices multiply with max PON number to previous value) */
BCMOS_MODULE_ID_USER_APPL_GPON_RSSI_DEV0 = BCMOS_MODULE_ID_USER_APPL_GPON_STATISTICS0_DEV0 + MAX_NUMBER_OF_PONS_ON_ALL_DEVICES,
/* EPON OAM negotiation application (To support multiple devices need to add number of devices to previous value)*/
BCMOS_MODULE_ID_USER_APPL_EON = BCMOS_MODULE_ID_USER_APPL_GPON_RSSI_DEV0 + BCMTR_MAX_OLTS,
/* EPON optical monitoring application */
BCMOS_MODULE_ID_USER_APPL_OMON = BCMOS_MODULE_ID_USER_APPL_EON + BCMTR_MAX_OLTS,
/* EPON Host driven encryption application */
BCMOS_MODULE_ID_USER_APPL_EPON_HDE,
BCMOS_MODULE_ID_USER_APPL_EPON_OAM,
BCMOS_MODULE_ID_USER_APPL_DPOE_SEC,
BCMOS_MODULE_ID_USER_APPL_IMAGE_TRANSFER0 = BCMOS_MODULE_ID_USER_APPL_DPOE_SEC + BCMTR_MAX_OLTS,
BCMOS_MODULE_ID_USER_APPL_IMAGE_TRANSFER1,
BCMOS_MODULE_ID_USER_APPL_ONU_TUNING_DEV0,
BCMOS_MODULE_ID_USER_APPL_ONU_TUNING_DEV1,
BCMOS_MODULE_ID__NUM_OF, /**< Number of modules */
BCMOS_MODULE_ID_INVALID = BCMOS_MODULE_ID_NONE
} bcmos_module_id;
/** BCM68620 event group. Each group supports up to 32 events.
* \ingroup system_event
*/
typedef enum
{
#ifdef BCMOS_SYS_UNITTEST
BCMOS_EVENT_ID_TEST1,
BCMOS_EVENT_ID_TEST2,
#else
BCMOS_EVENT_ID_DUMMY, /* Currently OS s/w doesn't use events.
Remove this constant when adding real events */
#endif
BCMOS_EVENT_ID__NUM_OF, /**< Number of event groups */
} bcmos_event_id;
/** Message hash size
* \ingroup system_msg
*/
#define BCMOS_MSG_HASH_SIZE 512
/** Maple OS message
* \ingroup system_msg
*/
typedef enum
{
BCMOS_MSG_ID__BEGIN,
/* Internal messages */
BCMOS_MSG_ID_INTERNAL_TIMER = BCMOS_MSG_ID__BEGIN, /**< Internal "timer message" type */
BCMOS_MSG_ID_INTERNAL_EVENT, /**< Internal "event message" type */
BCMOS_MSG_ID_INTERNAL_IPC,
BCMOS_MSG_ID_INITIATE_RX_POWER,
BCMOS_MSG_ID_INITIATE_TRX_STATUS,
BCMOS_MSG_ID_INITIATE_ROGUE_SCAN,
BCMOS_MSG_ID_INITIATE_RSSI_READ,
BCMOS_MSG_ID_GPON_STRESS_START,
BCMOS_MSG_ID_GPON_STRESS_TIMEOUT,
BCMOS_MSG_ID_GPON_STRESS_ONU_DISCOVERED,
BCMOS_MSG_ID_GPON_STRESS_PON_DEACTIVATION_COMPLETED,
BCMOS_MSG_ID_GPON_STRESS_PON_ACTIVATION_COMPLETED,
BCMOS_MSG_ID_GPON_STRESS_ALL_ONUS_DEACTIVATION_COMPLETED,
BCMOS_MSG_ID_GPON_STRESS_ALL_ONUS_ACTIVATION_COMPLETED,
BCMOS_MSG_ID_GPON_STRESS_ONU_DEACTIVATION_COMPLETED,
BCMOS_MSG_ID_GPON_STRESS_ONU_ACTIVATION_COMPLETED,
BCMOS_MSG_ID_GPON_DS_OMCI_START,
BCMOS_MSG_ID_GPON_DS_OMCI_TIMEOUT,
BCMOS_MSG_ID_GPON_DS_OMCI_STOP,
BCMOS_MSG_ID_GPON_DS_OMCI_DEVICE_CONNECTED,
BCMOS_MSG_ID_GPON_DS_OMCI_DEVICE_DISCONNECTED,
BCMOS_MSG_ID_GPON_RSSI_START,
BCMOS_MSG_ID_GPON_STATISTICS_START,
BCMOS_MSG_ID_GPON_STATISTICS_TIMEOUT,
BCMOS_MSG_ID_GPON_STATISTICS_STOP,
BCMOS_MSG_ID_EON_START,
BCMOS_MSG_ID_EON_STOP,
BCMOS_MSG_ID_EON_PROXY_RX,
BCMOS_MSG_ID_EPON_OAM_PROXY_RX,
BCMOS_MSG_ID_EPON_OAM_TIMEOUT,
BCMOS_MSG_ID_DPOE_SEC_START,
BCMOS_MSG_ID_DPOE_SEC_RX_OAM,
BCMOS_MSG_ID_DPOE_SEC_RX_EAPOL,
BCMOS_MSG_ID_ONU_TUNING_START,
BCMOS_MSG_ID_ONU_TUNING_STOP,
BCMOS_MSG_ID__NONE,
BCMOS_MSG_ID__END,
BCMOS_MSG_ID__FORCE16 = 0x7fff
} bcmos_msg_id;
#define BCMOS_MSG_ID__NUM_OF (BCMOS_MSG_ID__END - BCMOS_MSG_ID__BEGIN)
/*
* Task priorities
*/
#define TASK_PRIORITY_TRANSPORT_TX BCMOS_TASK_PRIORITY_3
#define TASK_PRIORITY_TRANSPORT_RX BCMOS_TASK_PRIORITY_8
#define TASK_PRIORITY_TRANSPORT_PROXY BCMOS_TASK_PRIORITY_9
#define TASK_PRIORITY_TRANSPORT_REMOTE_CLI BCMOS_TASK_PRIORITY_9
#define TASK_PRIORITY_DEVICE_CONTROL BCMOS_TASK_PRIORITY_10
#define TASK_PRIORITY_USER_APPL_PS BCMOS_TASK_PRIORITY_12
#define TASK_PRIORITY_USER_APPL_EON BCMOS_TASK_PRIORITY_12
#define TASK_PRIORITY_USER_APPL_OMON BCMOS_TASK_PRIORITY_12
#define TASK_PRIORITY_USER_APPL_EPON_HDE BCMOS_TASK_PRIORITY_12
#define TASK_PRIORITY_USER_APPL_DPOE_SEC BCMOS_TASK_PRIORITY_12
#define TASK_PRIORITY_USER_APPL_GPON_MAC_LEARNING BCMOS_TASK_PRIORITY_12
#define TASK_PRIORITY_USER_APPL_GPON_STRESS BCMOS_TASK_PRIORITY_12
#define TASK_PRIORITY_USER_APPL_GPON_SN_ACQUISITION BCMOS_TASK_PRIORITY_12
#define TASK_PRIORITY_USER_APPL_GPON_DS_OMCI BCMOS_TASK_PRIORITY_12
#define TASK_PRIORITY_USER_APPL_GPON_STATISTICS BCMOS_TASK_PRIORITY_12
#define TASK_PRIORITY_USER_APPL_ONU_TUNING BCMOS_TASK_PRIORITY_12
#define TASK_PRIORITY_USER_APPL_GPON_RSSI BCMOS_TASK_PRIORITY_12
#define TASK_PRIORITY_CLI BCMOS_TASK_PRIORITY_15
#define TASK_PRIORITY_USER_APPL_OMCI_SWDL BCMOS_TASK_PRIORITY_17
#define TASK_PRIORITY_USER_APPL_IMAGE_TRANSFER BCMOS_TASK_PRIORITY_17
#define TASK_PRIORITY_DEV_LOG_KERNEL BCMOS_TASK_PRIORITY_20
#define TASK_PRIORITY_DEV_LOG BCMOS_TASK_PRIORITY_30
#define TASK_PRIORITY_USER_APPL_REMOTE_LOGGER BCMOS_TASK_PRIORITY_30
#endif /* BCMOS_PLATFORM_H_ */