| /* |
| <: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. |
| |
| :> |
| */ |
| |
| /* This file is for internal use within the protection switching user application - |
| no functions here should be called from anywhere else! */ |
| |
| #ifndef _BCMOLT_USER_APPL_PS_INTERNAL_H_ |
| #define _BCMOLT_USER_APPL_PS_INTERNAL_H_ |
| |
| #include <bcm_dev_log.h> |
| #include "bcmolt_user_appl_ps.h" |
| |
| #ifdef ENABLE_LOG |
| dev_log_id ps_get_log_id(void); |
| #define PS_ERR(...) BCM_LOG(ERROR, ps_get_log_id(), __VA_ARGS__) |
| #define PS_INFO(...) BCM_LOG(INFO, ps_get_log_id(), __VA_ARGS__) |
| #else |
| #define PS_ERR(...) bcmos_printf("[PS ERROR] " __VA_ARGS__) |
| #define PS_INFO(...) bcmos_printf("[PS INFO] " __VA_ARGS__) |
| #endif |
| |
| /* Helper functions */ |
| uint32_t ps_get_last_switch_start_time_us(void); |
| |
| /* GPON-specific functionality */ |
| bcmos_errno ps_process_ind_gpon(const bcmolt_ps_pon *pon, const bcmolt_auto *ind); |
| bcmos_errno ps_move_to_standby_gpon(const bcmolt_ps_pon *pon); |
| bcmos_errno ps_move_to_working_gpon(const bcmolt_ps_pon *pon); |
| |
| /* EPON-specific functionality */ |
| bcmos_errno ps_process_ind_epon(const bcmolt_ps_pon *pon, const bcmolt_auto *ind); |
| bcmos_errno ps_move_to_standby_epon(const bcmolt_ps_pon *pon); |
| bcmos_errno ps_move_to_working_epon(const bcmolt_ps_pon *pon); |
| |
| /* XGPON-specific functionality */ |
| bcmos_errno ps_process_ind_xgpon(const bcmolt_ps_pon *pon, const bcmolt_auto *ind); |
| bcmos_errno ps_move_to_standby_xgpon(const bcmolt_ps_pon *pon); |
| bcmos_errno ps_move_to_working_xgpon(const bcmolt_ps_pon *pon); |
| |
| #endif |