📄 ixfeaturectrl.h
字号:
* @enum IxFeatureCtrlSwConfig * * @brief Enumeration for software configuration in access components. * * Entry for new run-time software configuration should be added here. */typedef enum{ IX_FEATURECTRL_ETH_LEARNING = 0, /**< EthDB Learning Feature */ IX_FEATURECTRL_ORIGB0_DISPATCHER, /**< IXP42X B0 and IXP46X dispatcher without livelock prevention functionality Feature */ IX_FEATURECTRL_SWCONFIG_MAX /**< Maximum boudary for IxFeatureCtrlSwConfig */} IxFeatureCtrlSwConfig;/************************************************************************ * IXP400 Feature Control Register * - It contains the information (available/unavailable) of IXP425&IXP46X * hardware components in their corresponding bit location. * - Bit value of 0 means the hardware component is available * or not software disabled. Hardware component that is available * can be software disabled. * - Bit value of 1 means the hardware is unavailable or software * disabled.Hardware component that is unavailable cannot be software * enabled. * - Use ixFeatureCtrlHwCapabilityRead() to read the hardware component's * availability. * - Use ixFeatureCtrlRead() to get the current IXP425/IXP46X feature control * register value. * * Bit Field Description (Hardware Component Availability) * --- --------------------------------------------------- * 0 RComp Circuitry * 1 USB Controller * 2 Hashing Coprocessor * 3 AES Coprocessor * 4 DES Coprocessor * 5 HDLC Coprocessor * 6 AAL Coprocessor - Always available in IXP46X * 7 HSS Coprocesspr * 8 Utopia Coprocessor * 9 Ethernet 0 Coprocessor * 10 Ethernet 1 Coprocessor * 11 NPE A * 12 NPE B * 13 NPE C * 14 PCI Controller * 15 ECC/TimeSync Coprocessor - Only applicable to IXP46X * 16-17 Utopia PHY Limit Status : 0x0 - 32 PHY * 0x1 - 16 PHY * 0x2 - 8 PHY * 0x3 - 4 PHY * * Portions below are only applicable to IXP46X * 18 USB Host Coprocessor * 19 NPE A Ethernet - 0 for Enable if Utopia = 1 * 20 NPE B Ethernet coprocessor 1-3. * 21 RSA Crypto Block coprocessor. * 22-23 Processor frequency : 0x0 - 533 MHz * 0x1 - 667 MHz * 0x2 - 400 MHz * 0x3 - 266 MHz * 24-31 Reserved * ************************************************************************//*Section generic to both IXP42X and IXP46X*//** * @ingroup IxFeatureCtrlAPI * * @enum IxFeatureCtrlComponentType * * @brief Enumeration for components availavble * */typedef enum{ IX_FEATURECTRL_RCOMP = 0, /**<bit location for RComp Circuitry*/ IX_FEATURECTRL_USB, /**<bit location for USB Controller*/ IX_FEATURECTRL_HASH, /**<bit location for Hashing Coprocessor*/ IX_FEATURECTRL_AES, /**<bit location for AES Coprocessor*/ IX_FEATURECTRL_DES, /**<bit location for DES Coprocessor*/ IX_FEATURECTRL_HDLC, /**<bit location for HDLC Coprocessor*/ IX_FEATURECTRL_AAL, /**<bit location for AAL Coprocessor*/ IX_FEATURECTRL_HSS, /**<bit location for HSS Coprocessor*/ IX_FEATURECTRL_UTOPIA, /**<bit location for UTOPIA Coprocessor*/ IX_FEATURECTRL_ETH0, /**<bit location for Ethernet 0 Coprocessor*/ IX_FEATURECTRL_ETH1, /**<bit location for Ethernet 1 Coprocessor*/ IX_FEATURECTRL_NPEA, /**<bit location for NPE A*/ IX_FEATURECTRL_NPEB, /**<bit location for NPE B*/ IX_FEATURECTRL_NPEC, /**<bit location for NPE C*/ IX_FEATURECTRL_PCI, /**<bit location for PCI Controller*/ IX_FEATURECTRL_ECC_TIMESYNC, /**<bit location for TimeSync Coprocessor*/ IX_FEATURECTRL_UTOPIA_PHY_LIMIT, /**<bit location for Utopia PHY Limit Status*/ IX_FEATURECTRL_UTOPIA_PHY_LIMIT_BIT2, /**<2nd bit of PHY limit status*/ IX_FEATURECTRL_USB_HOST_CONTROLLER, /**<bit location for USB host controller*/ IX_FEATURECTRL_NPEA_ETH, /**<bit location for NPE-A Ethernet Disable*/ IX_FEATURECTRL_NPEB_ETH, /**<bit location for NPE-B Ethernet 1-3 Coprocessors Disable*/ IX_FEATURECTRL_RSA, /**<bit location for RSA Crypto block Coprocessors Disable*/ IX_FEATURECTRL_XSCALE_MAX_FREQ, /**<bit location for XScale max frequency*/ IX_FEATURECTRL_XSCALE_MAX_FREQ_BIT2, /**<2nd xscale max freq bit NOT TO BE USED */ IX_FEATURECTRL_MAX_COMPONENTS} IxFeatureCtrlComponentType;/** * @ingroup IxFeatureCtrlDeviceId * * @enum IxFeatureCtrlDeviceId * * @brief Enumeration for device type. * * @warning This enum is closely related to the npe image. Its format should comply * with formats used in the npe image ImageID. This is indicated by the * first nibble of the image ID. This should also be in sync with the * with what is defined in CP15. Current available formats are * - IXP42X - 0000 * - IXP46X - 0001 * */typedef enum{ IX_FEATURE_CTRL_DEVICE_TYPE_IXP42X = 0, /**<Device type is IXP42X */ IX_FEATURE_CTRL_DEVICE_TYPE_IXP46X, /**<Device type is IXP46X */ IX_FEATURE_CTRL_DEVICE_TYPE_MAX /**<Max devices */} IxFeatureCtrlDeviceId;/** * @} addtogroup IxFeatureCtrlSwConfig *//* * Typedefs *//** * @ingroup IxFeatureCtrlAPI * * @typedef IxFeatureCtrlReg * * @brief Feature Control Register that contains hardware components' * availability information. */typedef UINT32 IxFeatureCtrlReg;/** * @ingroup IxFeatureCtrlAPI * * @typedef IxFeatureCtrlProductId * * @brief Product ID of Silicon that contains Silicon Stepping and * Maximum XScale Core Frequency information. */typedef UINT32 IxFeatureCtrlProductId;/* * Prototypes for interface functions *//** * @ingroup IxFeatureCtrlAPI * * @fn IxFeatureCtrlReg ixFeatureCtrlRead (void) * * @brief This function reads out the CURRENT value of Feature Control Register. * The current value may not be the same as that of the hardware component * availability. * * The bit location of each hardware component is defined above. * A value of '1' in bit means the hardware component is not available. A value of '0' * means the hardware component is available. * * @return * - IxFeatureCtrlReg - the current value of IXP400 Feature Control Register */ PUBLIC IxFeatureCtrlRegixFeatureCtrlRead (void);/** * @ingroup IxFeatureCtrlAPI * * @fn IxFeatureDeviceId ixFeatureCtrlDeviceRead (void) * * @brief This function gets the type of device that the software is currently running * on * * This function reads the feature Ctrl register specifically to obtain the device id. * The definitions of the avilable IDs are as above. * * @return * - IxFeatureCtrlDeviceId - the type of device currently running */IxFeatureCtrlDeviceIdixFeatureCtrlDeviceRead (void);/** * @ingroup IxFeatureCtrlAPI * * @fn IxFeatureCtrlBuildDevice ixFeatureCtrlSoftwareBuildGet (void) * * @brief This function refers to the value set by the compiler flag to determine * the type of device the software is built for. * * The function reads the compiler flag to determine the device the software is * built for. When the user executes build in the command line, * a compile time flag (__ixp42X/__ixp46X is set. This API reads this * flag and returns the software build type to the calling client. * * @return * - IxFeatureCtrlBuildDevice - the type of device software is built for. */IxFeatureCtrlBuildDeviceixFeatureCtrlSoftwareBuildGet (void);/** * @ingroup IxFeatureCtrlAPI * * @fn IxFeatureCtrlReg ixFeatureCtrlHwCapabilityRead (void) * * @brief This function reads out the hardware capability of a silicon type as defined in * feature control register.This value is different from that returned by * ixFeatureCtrlRead() because this function returns the actual hardware component * availability. * * The bit location of each hardware component is defined above. * A value of '1' in bit means the hardware component is not available. A value of '0' * means the hardware component is available. * * @return * - IxFeatureCtrlReg - the hardware capability of IXP400. * * @warning * - This function must not be called when IXP400 is running as the result * is undefined. */ PUBLIC IxFeatureCtrlRegixFeatureCtrlHwCapabilityRead (void);/** * @ingroup IxFeatureCtrlAPI * * @fn void ixFeatureCtrlWrite (IxFeatureCtrlReg expUnitReg) * * @brief This function write the value stored in IxFeatureCtrlReg expUnitReg * to the Feature Control Register. * * The bit location of each hardware component is defined above. * The write is only effective on available hardware components. Writing '1' in a * bit will software disable the respective hardware component. A '0' will mean that * the hardware component will remain to be operable. * * @param expUnitReg @ref IxFeatureCtrlReg [in] - The value to be written to feature control * register. * * @return none * */ PUBLIC voidixFeatureCtrlWrite (IxFeatureCtrlReg expUnitReg);/** * @ingroup IxFeatureCtrlAPI * * @fn IX_STATUS ixFeatureCtrlComponentCheck (IxFeatureCtrlComponentType componentType) * * @brief This function will check the availability of hardware component specified * as componentType value. * * Usage Example:<br> * - if(IX_FEATURE_CTRL_COMPONENT_DISABLED != * ixFeatureCtrlComponentCheck(IX_FEATURECTRL_ETH0)) <br> * - if(IX_FEATURE_CTRL_COMPONENT_ENABLED == * ixFeatureCtrlComponentCheck(IX_FEATURECTRL_PCI)) <br> * * This function is typically called during component initialization time. * * @param componentType @ref IxFeatureCtrlComponentType [in] - the type of a component as * defined above as IX_FEATURECTRL_XXX (Exp: IX_FEATURECTRL_PCI, IX_FEATURECTRL_ETH0) * * @return * - IX_FEATURE_CTRL_COMPONENT_ENABLED if component is available * - IX_FEATURE_CTRL_COMPONENT_DISABLED if component is unavailable */ PUBLIC IX_STATUSixFeatureCtrlComponentCheck (IxFeatureCtrlComponentType componentType);/** * @ingroup IxFeatureCtrlAPI * * @fn IxFeatureCtrlProductId ixFeatureCtrlProductIdRead (void) * * @brief This function will return IXP400 product ID i.e. CP15, * Register 0. * * @return * - IxFeatureCtrlProductId - the value of product ID. * */ PUBLIC IxFeatureCtrlProductIdixFeatureCtrlProductIdRead (void) ;/** * @ingroup IxFeatureCtrlAPI * * @fn IX_STATUS ixFeatureCtrlSwConfigurationCheck (IxFeatureCtrlSwConfig swConfigType) * * @brief This function checks whether the specified software configuration is * enabled or disabled. * * Usage Example:<br> * - if(IX_FEATURE_CTRL_SWCONFIG_DISABLED != * ixFeatureCtrlSwConfigurationCheck(IX_FEATURECTRL_ETH_LEARNING)) <br> * - if(IX_FEATURE_CTRL_SWCONFIG_ENABLED == * ixFeatureCtrlSwConfigurationCheck(IX_FEATURECTRL_ETH_LEARNING)) <br> * * This function is typically called during access component initialization time. * * @param swConfigType @ref IxFeatureCtrlSwConfig [in] - the type of a software configuration * defined in IxFeatureCtrlSwConfig enumeration. * * @return * - IX_FEATURE_CTRL_SWCONFIG_ENABLED if software configuration is enabled. * - IX_FEATURE_CTRL_SWCONFIG_DISABLED if software configuration is disabled. */ PUBLIC IX_STATUSixFeatureCtrlSwConfigurationCheck (IxFeatureCtrlSwConfig swConfigType);/** * @ingroup IxFeatureCtrlAPI * * @fn void ixFeatureCtrlSwConfigurationWrite (IxFeatureCtrlSwConfig swConfigType, BOOL enabled) * * @brief This function enable/disable the specified software configuration. * * Usage Example:<br> * - ixFeatureCtrlSwConfigurationWrite(IX_FEATURECTRL_ETH_LEARNING, TRUE) is used * to enable Ethernet Learning Feature <br> * - ixFeatureCtrlSwConfigurationWrite(IX_FEATURECTRL_ETH_LEARNING, FALSE) is used * to disable Ethernet Learning Feature <br> * * @param swConfigType IxFeatureCtrlSwConfig [in] - the type of a software configuration * defined in IxFeatureCtrlSwConfig enumeration. * @param enabled BOOL [in] - To enable(TRUE) / disable (FALSE) the specified software * configuration. * * @return none * */ PUBLIC voidixFeatureCtrlSwConfigurationWrite (IxFeatureCtrlSwConfig swConfigType, BOOL enabled);/** * @ingroup IxFeatureCtrlAPI * * @fn void ixFeatureCtrlIxp400SwVersionShow (void) * * @brief This function shows the current software release information for IXP400 * * @return none * */ PUBLIC voidixFeatureCtrlIxp400SwVersionShow (void);#endif /* IXFEATURECTRL_H *//** * @} defgroup IxFeatureCtrlAPI */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -