summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures
diff options
context:
space:
mode:
authorJoe McGill <jmcgill@us.ibm.com>2016-10-21 08:19:51 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-10-25 09:08:44 -0400
commit02c1e4c150f49da6363bc237fbfe07bd88b28ff2 (patch)
tree629789989a746da64171d57849700ece169f044d /src/import/chips/p9/procedures
parent3b44d13ead807ac1f1ecdf55ed7d10b602c1b8ac (diff)
downloadtalos-hostboot-02c1e4c150f49da6363bc237fbfe07bd88b28ff2.tar.gz
talos-hostboot-02c1e4c150f49da6363bc237fbfe07bd88b28ff2.zip
p9_nv_ref_clk_enable -- initial release, sets NV output refclk drive enables
retriggering Jenkins (again) Change-Id: I41b8455e45967b5dbee2502a26e813e861172ab2 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/31620 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Joseph J. McGill <jmcgill@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/31746 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures')
-rw-r--r--src/import/chips/p9/procedures/hwp/perv/p9_nv_ref_clk_enable.C72
-rw-r--r--src/import/chips/p9/procedures/hwp/perv/p9_nv_ref_clk_enable.H74
-rw-r--r--src/import/chips/p9/procedures/hwp/perv/p9_nv_ref_clk_enable.mk26
3 files changed, 172 insertions, 0 deletions
diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_nv_ref_clk_enable.C b/src/import/chips/p9/procedures/hwp/perv/p9_nv_ref_clk_enable.C
new file mode 100644
index 000000000..cf9ffd8b2
--- /dev/null
+++ b/src/import/chips/p9/procedures/hwp/perv/p9_nv_ref_clk_enable.C
@@ -0,0 +1,72 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/import/chips/p9/procedures/hwp/perv/p9_nv_ref_clk_enable.C $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2016 */
+/* [+] 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 p9_nv_ref_clk_enable.C
+/// @brief Enable NV reference clocks (FAPI2)
+///
+/// @author Joe McGill <jmcgill@us.ibm.com>
+///
+
+//
+// *HWP HWP Owner: Joe McGill <jmcgill@us.ibm.com>
+// *HWP FW Owner: Thi Tran <thi@us.ibm.com>
+// *HWP Team: Perv
+// *HWP Level: 2
+// *HWP Consumed by: HB
+//
+
+//------------------------------------------------------------------------------
+// Includes
+//------------------------------------------------------------------------------
+#include <p9_nv_ref_clk_enable.H>
+#include <p9_perv_scom_addresses.H>
+#include <p9_perv_scom_addresses_fld.H>
+
+
+//------------------------------------------------------------------------------
+// Constant definitions
+//------------------------------------------------------------------------------
+const uint16_t TPFSI_OFFCHIP_REFCLK_EN_NV = 0x7;
+
+//------------------------------------------------------------------------------
+// Function definitions
+//------------------------------------------------------------------------------
+
+fapi2::ReturnCode
+p9_nv_ref_clk_enable(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target)
+{
+ FAPI_INF("Start");
+ fapi2::buffer<uint64_t> l_root_ctrl6;
+ FAPI_TRY(fapi2::getScom(i_target, PERV_ROOT_CTRL6_SCOM, l_root_ctrl6),
+ "Error from getScom (PERV_ROOT_CTRL6_SCOM)");
+ l_root_ctrl6.insertFromRight<PERV_ROOT_CTRL6_TPFSI_OFFCHIP_REFCLK_EN_DC,
+ PERV_ROOT_CTRL6_TPFSI_OFFCHIP_REFCLK_EN_DC_LEN>(TPFSI_OFFCHIP_REFCLK_EN_NV);
+ FAPI_TRY(fapi2::putScom(i_target, PERV_ROOT_CTRL6_SCOM, l_root_ctrl6),
+ "Error from putScom (PERV_ROOT_CTRL6_SCOM)");
+
+fapi_try_exit:
+ FAPI_INF("End");
+ return fapi2::current_err;
+}
diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_nv_ref_clk_enable.H b/src/import/chips/p9/procedures/hwp/perv/p9_nv_ref_clk_enable.H
new file mode 100644
index 000000000..4d9d721ef
--- /dev/null
+++ b/src/import/chips/p9/procedures/hwp/perv/p9_nv_ref_clk_enable.H
@@ -0,0 +1,74 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/import/chips/p9/procedures/hwp/perv/p9_nv_ref_clk_enable.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2016 */
+/* [+] 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 p9_nv_ref_clk_enable.H
+/// @brief Enable NV reference clocks (FAPI2)
+///
+/// @author Joe McGill <jmcgill@us.ibm.com>
+///
+
+//
+// *HWP HWP Owner: Joe McGill <jmcgill@us.ibm.com>
+// *HWP FW Owner: Thi Tran <thi@us.ibm.com>
+// *HWP Team: Perv
+// *HWP Level: 2
+// *HWP Consumed by: HB
+//
+
+#ifndef _P9_NV_REF_CLK_ENABLE_H_
+#define _P9_NV_REF_CLK_ENABLE_H_
+
+
+//------------------------------------------------------------------------------
+// Includes
+//------------------------------------------------------------------------------
+#include <fapi2.H>
+
+//------------------------------------------------------------------------------
+// Structure definitions
+//------------------------------------------------------------------------------
+
+/// function pointer typedef definition for HWP call support
+typedef fapi2::ReturnCode (*p9_nv_ref_clk_enable_FP_t) (const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>&);
+
+
+//------------------------------------------------------------------------------
+// Function prototypes
+//------------------------------------------------------------------------------
+
+extern "C"
+{
+
+///
+/// @brief Enable reference clocks for NV links
+///
+/// @param[in] i_target Reference to processor chip target
+/// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code.
+///
+ fapi2::ReturnCode p9_nv_ref_clk_enable(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target);
+
+} // extern "C"
+
+#endif // _P9_NV_REF_CLK_ENABLE_H_
diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_nv_ref_clk_enable.mk b/src/import/chips/p9/procedures/hwp/perv/p9_nv_ref_clk_enable.mk
new file mode 100644
index 000000000..5801fa681
--- /dev/null
+++ b/src/import/chips/p9/procedures/hwp/perv/p9_nv_ref_clk_enable.mk
@@ -0,0 +1,26 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/import/chips/p9/procedures/hwp/perv/p9_nv_ref_clk_enable.mk $
+#
+# OpenPOWER HostBoot Project
+#
+# Contributors Listed Below - COPYRIGHT 2016
+# [+] 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
+PROCEDURE=p9_nv_ref_clk_enable
+$(call BUILD_PROCEDURE)
OpenPOWER on IntegriCloud