diff options
| author | Matt Derksen <mderkse1@us.ibm.com> | 2018-08-30 08:10:40 -0500 |
|---|---|---|
| committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-09-20 17:06:38 -0500 |
| commit | 165bb46bac36d2774b7fe36543024710053ec3d0 (patch) | |
| tree | f21eb63d24214397c161e76641ee6ef4c1added0 /src/include/usr/devicefw | |
| parent | 5abc57bc8352ef13ab7aa23edfbc2d607f9cd5b2 (diff) | |
| download | blackbird-hostboot-165bb46bac36d2774b7fe36543024710053ec3d0.tar.gz blackbird-hostboot-165bb46bac36d2774b7fe36543024710053ec3d0.zip | |
Support fapi2 i2c functions
New interface in fapi2 to perform i2c operations directly.
This is needed for OCMB access before we get OMI bus running,
specifically as part of a cmd/rsp protocol.
Change-Id: I8b778f12f8c0c6820ceb51146f1e21d30891c964
RTC:197029
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/63919
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr/devicefw')
| -rw-r--r-- | src/include/usr/devicefw/userif.H | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/include/usr/devicefw/userif.H b/src/include/usr/devicefw/userif.H index 5bdd3b238..25d355ccf 100644 --- a/src/include/usr/devicefw/userif.H +++ b/src/include/usr/devicefw/userif.H @@ -70,7 +70,7 @@ namespace DeviceFW DEPRECATED_MEMD_VPD, NODECOMM, NVDIMM, - + FAPI_I2C, LAST_ACCESS_TYPE, }; @@ -366,6 +366,7 @@ namespace DeviceFW static_cast<uint64_t>(( i_mode )),\ static_cast<uint64_t>(( i_link_id )),\ static_cast<uint64_t>(( i_mailbox_id )) + /** * Construct the device addressing parameters for the NVDIMM device ops. * @param[i] i_address - NVDIMM address to internal register @@ -373,6 +374,25 @@ namespace DeviceFW #define DEVICE_NVDIMM_ADDRESS(i_address)\ DeviceFW::NVDIMM, static_cast<uint64_t>((i_address)) + + /** + * Construct the device addressing parameters for the FAPI I2C operation + * with an initial configuration needed + * + * @param[in] i_cfg_buf_size - cfg buffer size + * @param[in] i_cfg_buf - buffer that holds data to write to the HW target. + */ + #define DEVICE_FAPI_I2C_ADDRESS_WCONFIG(i_cfg_buf_size, i_cfg_buf) \ + DeviceFW::FAPI_I2C,\ + static_cast<size_t>(( i_cfg_buf_size )),\ + static_cast<uint8_t*>(( i_cfg_buf )) + + /** + * Construct the device addressing parameters for the FAPI I2C operation + */ + #define DEVICE_FAPI_I2C_ADDRESS()\ + DEVICE_FAPI_I2C_ADDRESS_WCONFIG( 0, NULL ) + /** * @brief Perform a hardware read operation. * |

