diff options
author | Frederic Barrat <fbarrat@linux.vnet.ibm.com> | 2018-05-23 19:25:42 +0200 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2018-06-01 02:07:26 -0500 |
commit | baa4156c71f40dc69c2f65d075e726054dba059d (patch) | |
tree | daba85cdf9ca6333f1536fbaa3e7cb969cb0e726 /core/platform.c | |
parent | b5c863a86427db83cdb398f227e82745dbe255d0 (diff) | |
download | skiboot-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 'core/platform.c')
-rw-r--r-- | core/platform.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/platform.c b/core/platform.c index 92b118b..3282227 100644 --- a/core/platform.c +++ b/core/platform.c @@ -170,11 +170,11 @@ static int generic_start_preload_resource(enum resource_id id, uint32_t subid, /* These values will work for a ZZ booted using BML */ const struct platform_ocapi generic_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 */ @@ -184,7 +184,7 @@ const struct platform_ocapi generic_ocapi = { * force presence. */ .force_presence = true, - .odl_phy_swap = true, + .odl_phy_swap = true, }; static struct bmc_platform generic_bmc = { |