/* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ /* $Source: import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/avs_driver.h $ */ /* */ /* OpenPOWER HCODE Project */ /* */ /* COPYRIGHT 2015,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ /* You may obtain a copy of the License at */ /* */ /* http://www.apache.org/licenses/LICENSE-2.0 */ /* */ /* Unless required by applicable law or agreed to in writing, software */ /* distributed under the License is distributed on an "AS IS" BASIS, */ /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ /* implied. See the License for the specific language governing */ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ // // Setup and enable the O2S bridge on the AVS bus. // #ifndef _AVS_DRIVER_H_ #define _AVS_DRIVER_H_ #define MAX_POLL_COUNT_AVS 10 #define AVS_RAIL_NUM_MASK 0xF #define AVS_BUS_NUM_MASK 0x10 enum AVS_DRIVER { AVS_DRIVER_MAX_EXTERNAL_VOLTAGE = 1500, AVS_DRIVER_MIN_EXTERNAL_VOLTAGE = 500 }; enum AVS_DRIVER_RETURN_CODES { AVS_RC_SUCCESS = 0, AVS_RC_ONGOING_TIMEOUT = 1, AVS_RC_RESYNC_ERROR = 2 }; void external_voltage_control_init(uint32_t* vext_read_mv); void external_voltage_control_write(uint32_t vext_write_mv); #endif //_AVS_DRIVER_H_