[Skiboot] [PATCH 2/5] npu2-opencapi: Rework adapter reset

Andrew Donnellan andrew.donnellan at au1.ibm.com
Tue Apr 24 11:50:22 AEST 2018


On 12/04/18 22:45, Frederic Barrat wrote:
> From: Frederic Barrat <fbarrat at linux.vnet.ibm.com>
> 
> 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 at linux.vnet.ibm.com>

This looks good, clearer than my existing approach

Acked-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>

> ---
>   core/platform.c          | 15 ++++++----
>   hw/npu2-opencapi.c       | 71 ++++++++++++++++++++++++++++++++++--------------
>   include/platform.h       |  6 ++--
>   platforms/astbmc/zaius.c | 15 ++++++----
>   platforms/ibm-fsp/zz.c   | 15 ++++++----
>   5 files changed, 81 insertions(+), 41 deletions(-)
> 
> diff --git a/core/platform.c b/core/platform.c
> index 174235d9..b7b048f2 100644
> --- a/core/platform.c
> +++ b/core/platform.c
> @@ -34,6 +34,9 @@ DEFINE_LOG_ENTRY(OPAL_RC_ABNORMAL_REBOOT, OPAL_PLATFORM_ERR_EVT, OPAL_CEC,
>   		 OPAL_CEC_HARDWARE, OPAL_PREDICTIVE_ERR_FAULT_RECTIFY_REBOOT,
>   		 OPAL_ABNORMAL_POWER_OFF);
>   
> +#define OCAPI_I2C_RESET_ADDR       0x20
> +#define OCAPI_I2C_RESET_BOTTOM     (1 << 1)
> +#define OCAPI_I2C_RESET_TOP        (1 << 6)

my previous comments on use of macros apply here too :D But I don't feel 
very strongly about this.

-- 
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan at au1.ibm.com  IBM Australia Limited



More information about the Skiboot mailing list