aboutsummaryrefslogtreecommitdiff
path: root/platforms
diff options
context:
space:
mode:
authorFrederic Barrat <fbarrat@linux.vnet.ibm.com>2018-05-23 19:25:42 +0200
committerStewart Smith <stewart@linux.ibm.com>2018-06-01 02:07:26 -0500
commitbaa4156c71f40dc69c2f65d075e726054dba059d (patch)
treedaba85cdf9ca6333f1536fbaa3e7cb969cb0e726 /platforms
parentb5c863a86427db83cdb398f227e82745dbe255d0 (diff)
downloadskiboot-baa4156c71f40dc69c2f65d075e726054dba059d.zip
skiboot-baa4156c71f40dc69c2f65d075e726054dba059d.tar.gz
skiboot-baa4156c71f40dc69c2f65d075e726054dba059d.tar.bz2
npu2-opencapi: Rework adapter reset
Rework a bit the code to reset the opencapi adapter: - make clearer which i2c pin is resetting which device - break the reset operation in smaller chunks. This is really to prepare for a future patch. No functional changes. Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'platforms')
-rw-r--r--platforms/astbmc/zaius.c13
-rw-r--r--platforms/ibm-fsp/zz.c12
2 files changed, 12 insertions, 13 deletions
diff --git a/platforms/astbmc/zaius.c b/platforms/astbmc/zaius.c
index fe5bb44..36e66fa 100644
--- a/platforms/astbmc/zaius.c
+++ b/platforms/astbmc/zaius.c
@@ -24,17 +24,16 @@
#include "astbmc.h"
-
const struct platform_ocapi zaius_ocapi = {
- .i2c_engine = 1,
- .i2c_port = 4,
- .i2c_offset = { 0x3, 0x1, 0x1 },
- .i2c_odl0_data = { 0xFD, 0xFD, 0xFF },
- .i2c_odl1_data = { 0xBF, 0xBF, 0xFF },
+ .i2c_engine = 1,
+ .i2c_port = 4,
+ .i2c_reset_addr = 0x20,
+ .i2c_reset_odl0 = (1 << 1),
+ .i2c_reset_odl1 = (1 << 6),
.i2c_presence_addr = 0x20,
.i2c_presence_odl0 = (1 << 2), /* bottom connector */
.i2c_presence_odl1 = (1 << 7), /* top connector */
- .odl_phy_swap = true,
+ .odl_phy_swap = true,
};
#define NPU_BASE 0x5011000
diff --git a/platforms/ibm-fsp/zz.c b/platforms/ibm-fsp/zz.c
index 6c8411e..dc48768 100644
--- a/platforms/ibm-fsp/zz.c
+++ b/platforms/ibm-fsp/zz.c
@@ -29,11 +29,11 @@
/* We don't yet create NPU device nodes on ZZ, but these values are correct */
const struct platform_ocapi zz_ocapi = {
- .i2c_engine = 1,
- .i2c_port = 4,
- .i2c_offset = { 0x3, 0x1, 0x1 },
- .i2c_odl0_data = { 0xFD, 0xFD, 0xFF },
- .i2c_odl1_data = { 0xBF, 0xBF, 0xFF },
+ .i2c_engine = 1,
+ .i2c_port = 4,
+ .i2c_reset_addr = 0x20,
+ .i2c_reset_odl0 = (1 << 1),
+ .i2c_reset_odl1 = (1 << 6),
.i2c_presence_addr = 0x20,
.i2c_presence_odl0 = (1 << 2), /* bottom connector */
.i2c_presence_odl1 = (1 << 7), /* top connector */
@@ -42,7 +42,7 @@ const struct platform_ocapi zz_ocapi = {
* force the presence until all our systems are upgraded
*/
.force_presence = true,
- .odl_phy_swap = true,
+ .odl_phy_swap = true,
};
static bool zz_probe(void)