-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: Ic08c41538ae95b08ce05aa1a2413d45318f3e4ee Original-Change-Id: Ic4fcd226eea7478ffff6cacb830f8e1e83e6f247 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/64919 Reviewed-by: Louis Stermole <stermole@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: RYAN P. KING <rpking@us.ibm.com> Reviewed-by: ANDRE A. MARIN <aamarin@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/71772 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
- Loading branch information
Showing
4 changed files
with
232 additions
and
0 deletions.
There are no files selected for viewing
80 changes: 80 additions & 0 deletions
80
src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_omi_train.C
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/* IBM_PROLOG_BEGIN_TAG */ | ||
/* This is an automatically generated prolog. */ | ||
/* */ | ||
/* $Source: src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_omi_train.C $ */ | ||
/* */ | ||
/* OpenPOWER HostBoot Project */ | ||
/* */ | ||
/* Contributors Listed Below - COPYRIGHT 2018 */ | ||
/* [+] 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 */ | ||
|
||
/// | ||
/// @file exp_omi_train.C | ||
/// @brief Contains the explorer OMI train | ||
/// | ||
// *HWP HWP Owner: Andre Marin <aamarin@us.ibm.com> | ||
// *HWP HWP Backup: Stephen Glancy <sglancy@us.ibm.com> | ||
// *HWP Team: Memory | ||
// *HWP Level: 3 | ||
// *HWP Consumed by: Memory | ||
|
||
#include <fapi2.H> | ||
#include <generic/memory/lib/utils/c_str.H> | ||
#include <lib/omi/exp_omi_utils.H> | ||
#include <lib/i2c/exp_i2c.H> | ||
#include <exp_omi_train.H> | ||
|
||
extern "C" | ||
{ | ||
|
||
/// | ||
/// @brief Trains the OCMB link | ||
/// @param[in] i_target the OCMB target to operate on | ||
/// @return FAPI2_RC_SUCCESS iff ok | ||
/// | ||
fapi2::ReturnCode exp_omi_train(const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>& i_target) | ||
{ | ||
// TODO:RTC197867 Update these constants to read out actual values from attributes | ||
constexpr uint8_t MANUFACTURING_MODE_OFF = 0x00; | ||
constexpr uint8_t NO_LOOPBACK_TESTING = 0x00; | ||
constexpr uint8_t OPENCAPI_TRANSPORT_LAYER = 0x00; | ||
constexpr uint8_t IMMEDIATE_DL_LAYER_BOOT = 0x00; | ||
constexpr uint8_t FULL_BOOT_MODE = 0x00; | ||
constexpr uint8_t LANE_MODE_8 = 0x01; | ||
constexpr uint8_t SERDES_25600MBPS = 0x03; | ||
std::vector<uint8_t> l_data; | ||
|
||
// Gets the data setup | ||
FAPI_TRY(mss::exp::omi::train::setup_fw_boot_config(i_target, | ||
MANUFACTURING_MODE_OFF, | ||
NO_LOOPBACK_TESTING, | ||
OPENCAPI_TRANSPORT_LAYER, | ||
IMMEDIATE_DL_LAYER_BOOT, | ||
FULL_BOOT_MODE, | ||
LANE_MODE_8, | ||
SERDES_25600MBPS, | ||
l_data)); | ||
|
||
// Issues the command and checks for completion | ||
// Note: the status check also checks for the OMI training completion, so after we run this command, we're good to go | ||
FAPI_TRY(mss::exp::i2c::boot_config(i_target, l_data)); | ||
|
||
fapi_try_exit: | ||
return fapi2::current_err; | ||
} | ||
} |
53 changes: 53 additions & 0 deletions
53
src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_omi_train.H
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* IBM_PROLOG_BEGIN_TAG */ | ||
/* This is an automatically generated prolog. */ | ||
/* */ | ||
/* $Source: src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_omi_train.H $ */ | ||
/* */ | ||
/* OpenPOWER HostBoot Project */ | ||
/* */ | ||
/* Contributors Listed Below - COPYRIGHT 2018 */ | ||
/* [+] 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 */ | ||
|
||
/// | ||
/// @file exp_omi_train.H | ||
/// @brief Contains the explorer OMI train | ||
/// | ||
// *HWP HWP Owner: Andre Marin <aamarin@us.ibm.com> | ||
// *HWP HWP Backup: Stephen Glancy <sglancy@us.ibm.com> | ||
// *HWP Team: Memory | ||
// *HWP Level: 3 | ||
// *HWP Consumed by: Memory | ||
#ifndef EXP_OMI_TRAIN_H_ | ||
#define EXP_OMI_TRAIN_H_ | ||
|
||
#include <fapi2.H> | ||
|
||
typedef fapi2::ReturnCode (*exp_omi_train_FP_t) (const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>&); | ||
|
||
extern "C" | ||
{ | ||
|
||
/// | ||
/// @brief Trains the OCMB link | ||
/// @param[in] i_target the OCMB target to operate on | ||
/// @return FAPI2_RC_SUCCESS iff ok | ||
/// | ||
fapi2::ReturnCode exp_omi_train(const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>& i_target); | ||
} | ||
|
||
#endif |
29 changes: 29 additions & 0 deletions
29
src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_omi_train.mk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# IBM_PROLOG_BEGIN_TAG | ||
# This is an automatically generated prolog. | ||
# | ||
# $Source: src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_omi_train.mk $ | ||
# | ||
# OpenPOWER HostBoot Project | ||
# | ||
# Contributors Listed Below - COPYRIGHT 2018 | ||
# [+] 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 | ||
-include 00exp_common.mk | ||
|
||
PROCEDURE=exp_omi_train | ||
$(eval $(call ADD_EXP_MEMORY_INCDIRS,$(PROCEDURE))) | ||
$(call BUILD_PROCEDURE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters