openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

PTP_feature.h (2474B)


      1 /*
      2  * 
      3  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      4  * 
      5  * Copyright 2007-2020 Broadcom Inc. All rights reserved.
      6  *
      7  * File:    PTP_feature.h
      8  *
      9  * Holds SDK features version info, to be shared with PTP FW
     10  */
     11 
     12 #ifndef __PTP_FEATURE_H__
     13 #define __PTP_FEATURE_H__
     14 
     15 /*
     16 #define PTP_SDK_VERSION         0x01000000
     17 #define PTP_UC_MIN_VERSION      0x01000200
     18 */
     19 
     20 #define ENABLE       1
     21 #define DISABLE      0
     22 #define PTP_SDK_BASE_VERSION         0x01000000
     23 #define PTP_SDK_VERSION   PTP_SDK_BASE_VERSION         | \
     24                             (ENABLE  << PTP_VP_TOD_IN_SERIAL)        | \
     25                             (ENABLE  << PTP_CMICM_CHANNEL_CONF_L1BKUP) |\
     26                             (ENABLE  << PTP_CMICM_CHANNEL_CONF_NOL1MUXSEL)        | \
     27                             (ENABLE  << PTP_G8275P1_MAX_STEPS_REMOVED)  | \
     28                             (ENABLE  << PTP_TIMEPROPERTIES_PKT_FLAGS)  | \
     29                             (ENABLE  << PTP_TOD_TS_SYNC_ENABLE)  |\
     30                             (ENABLE  << PTP_TOD_UART_PARITY)  |\
     31                             (ENABLE  << PTP_GPS_SWITCH_OFFSET)
     32 
     33 
     34 #define PTP_UC_MIN_VERSION     0x01000200
     35 
     36 /*PTP FW version*/
     37 extern uint32 ptp_firmware_version;
     38 
     39 #define PTP_UC_FEATURE_CHECK(feature)  (ptp_firmware_version & (1 << feature))
     40 
     41 /* Feature support bit should be shared between SDK and UKERNEL version.
     42  * 24th bit are reserved in SDK as they are set in the legacy version
     43  * PTP_VERSION : 0x01000200 MIN_SDK_VERSION : 0x01000000*/
     44 #define PTP_FEATURE_RESERVED1  9
     45 #define PTP_FEATURE_RESERVED2  24
     46 
     47 /* Features added in uKernel PTP FW */
     48 #define PTP_VP_TOD_IN_SERIAL                1 /*Virtual Port TODIn Source Etherenet/Serial Support*/
     49 #define PTP_CMICM_CHANNEL_CONF_L1BKUP       2 /* CMICM L1 backup conf support in ptp channel config */
     50 #define PTP_CMICM_CHANNEL_CONF_NOL1MUXSEL   3 /* CMICM synce conf support without L1 mux config*/
     51 #define PTP_G8275P1_MAX_STEPS_REMOVED       4 /* Support for maxStepsRemoved as per ITU-T G.8275.1 (06/2016) */
     52 #define PTP_TIMEPROPERTIES_PKT_FLAGS        5 /* PTP time properties packet flags */
     53 #define PTP_TOD_TS_SYNC_ENABLE              6 /* TOD -  enable timestamper sync feature */
     54 #define PTP_TOD_UART_PARITY                 7 /* TOD - UART Parity configuration */
     55 #define PTP_GPS_SWITCH_OFFSET               8 /* Support for GPS - PTP offset (auto & manual) */
     56 
     57 
     58 #endif /*__PTP_FEATURE_H__*/
     59