summaryrefslogtreecommitdiffstats
path: root/src/occ_gpe1
diff options
context:
space:
mode:
authorWilliam Bryan <wilbryan@us.ibm.com>2017-08-16 12:29:01 -0500
committerWilliam A. Bryan <wilbryan@us.ibm.com>2017-08-24 18:11:19 -0400
commit8e2f38a98ba958b3fe520836cb1f509fa0432030 (patch)
tree354e7dfff6b74bce5e6d1adb1db05a68159a4a5d /src/occ_gpe1
parent109fa5363062ec9439f83e2e0d12a5150a255c53 (diff)
downloadtalos-occ-8e2f38a98ba958b3fe520836cb1f509fa0432030.tar.gz
talos-occ-8e2f38a98ba958b3fe520836cb1f509fa0432030.zip
Move I2C info to common
Change-Id: I64c0213d7320b484d165fe0094e2e0286f730957 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/44690 Reviewed-by: Martha Broyles <mbroyles@us.ibm.com> Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com> Reviewed-by: William A. Bryan <wilbryan@us.ibm.com> Tested-by: William A. Bryan <wilbryan@us.ibm.com>
Diffstat (limited to 'src/occ_gpe1')
-rwxr-xr-xsrc/occ_gpe1/gpe1.h24
-rwxr-xr-xsrc/occ_gpe1/gpe1_dimm.h32
-rw-r--r--src/occ_gpe1/gpe1_dimm_read.c1
-rw-r--r--src/occ_gpe1/gpe1_dimm_reset.c4
4 files changed, 7 insertions, 54 deletions
diff --git a/src/occ_gpe1/gpe1.h b/src/occ_gpe1/gpe1.h
index 4ce0823..2771b96 100755
--- a/src/occ_gpe1/gpe1.h
+++ b/src/occ_gpe1/gpe1.h
@@ -1,11 +1,11 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/occ_405/gpe/gpe1.h $ */
+/* $Source: src/occ_gpe1/gpe1.h $ */
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2015 */
+/* Contributors Listed Below - COPYRIGHT 2011,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -28,26 +28,6 @@
#include "gpe_export.h"
-
-// I2C SCOM Addresses:
-// (There are unique constants/addresses per engine, but to make the calls generic,
-// these constants are defined instead of using the base constants)
-#define PIB_BASE 0x000A0000
-// Engine B 0x00A0000
-// Engine C 0x00A1000
-// Engine D 0x00A2000
-// Engine E 0x00A3000
-#define SCOM_ENGINE_OFFSET(engine) (engine << 12)
-#define I2C_FIFO1_REG_READ 0x000A0004
-#define I2C_COMMAND_REG 0x000A0005
-#define I2C_MODE_REG 0x000A0006
-#define I2C_INTERRUPT_MASK_REG 0x000A0008
-#define I2C_STATUS_REG 0x000A000B // read
-#define I2C_IMM_RESET_I2C 0x000A000B // write
-#define I2C_BUSY_REGISTER 0x000A000E
-#define I2C_FIFO4_REG_READ 0x000A0012
-
-
// Debug trace
#ifdef GPE1_DEBUG
#define GPE1_DIMM_DBG(frmt,args...) \
diff --git a/src/occ_gpe1/gpe1_dimm.h b/src/occ_gpe1/gpe1_dimm.h
index 59dbdac..3e413f6 100755
--- a/src/occ_gpe1/gpe1_dimm.h
+++ b/src/occ_gpe1/gpe1_dimm.h
@@ -1,11 +1,11 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/occ_405/gpe/gpe1_dimm.h $ */
+/* $Source: src/occ_gpe1/gpe1_dimm.h $ */
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2015 */
+/* Contributors Listed Below - COPYRIGHT 2011,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -28,34 +28,6 @@
#include "gpe_export.h"
-#define PIB_BASE 0x000A0000
-// Engine B 0x00A0000
-// Engine C 0x00A1000
-// Engine D 0x00A2000
-// Engine E 0x00A3000
-#define I2C_FIFO1_REG_READ 0x000A0004
-#define I2C_COMMAND_REG 0x000A0005
-#define I2C_MODE_REG 0x000A0006
-#define I2C_INTERRUPT_MASK_REG 0x000A0008
-#define I2C_STATUS_REG 0x000A000B // read
-#define I2C_IMM_RESET_I2C 0x000A000B // write
-#define I2C_BUSY_REGISTER 0x000A000E
-#define I2C_FIFO4_REG_READ 0x000A0012
-
-#define SCOM_ENGINE_OFFSET(engine) (engine << 12)
-
-// I2C Status Register masks
-#define STATUS_ERROR_MASK 0xFC80000000000000
-#define STATUS_ERROR_OR_COMPLETE_MASK 0xFF80000000000000
-#define STATUS_COMPLETE_MASK 0x0100000000000000
-#define PEEK_ERROR_MASK 0x00000000FC000000
-#define PEEK_MORE_DATA 0x0000000002000000
-
-// 0-15: Bit Rate Divisor - 0x0049 gives approx 391kHz (and allows margin for clock variation)
-// 16-21: Port Number (0-5)
-// 22-26: reserved (0s)
-#define I2C_MODE_REG_DIVISOR 0x0049000000000000
-
void dimm_set_ffdc(GpeErrorStruct *o_error, uint32_t i_addr, uint32_t i_rc, uint64_t i_ffdc);
void gpe_dimm_sm(ipc_msg_t* cmd, void* arg);
diff --git a/src/occ_gpe1/gpe1_dimm_read.c b/src/occ_gpe1/gpe1_dimm_read.c
index 90f4a4b..804a984 100644
--- a/src/occ_gpe1/gpe1_dimm_read.c
+++ b/src/occ_gpe1/gpe1_dimm_read.c
@@ -35,6 +35,7 @@
#include "gpe1.h"
#include "gpe1_dimm.h"
#include "dimm_structs.h"
+#include "i2c.h"
void dimm_write_int_mask(ipc_msg_t* cmd, void* arg);
void dimm_write_mode(ipc_msg_t* cmd, void* arg);
diff --git a/src/occ_gpe1/gpe1_dimm_reset.c b/src/occ_gpe1/gpe1_dimm_reset.c
index 16cf8da..2e7228b 100644
--- a/src/occ_gpe1/gpe1_dimm_reset.c
+++ b/src/occ_gpe1/gpe1_dimm_reset.c
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015 */
+/* Contributors Listed Below - COPYRIGHT 2015,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -35,7 +35,7 @@
#include "gpe1.h"
#include "gpe1_dimm.h"
#include "dimm_structs.h"
-
+#include "i2c.h"
/*
* Function Specifications:
OpenPOWER on IntegriCloud