[Skiboot] [RESEND] npu2-opencapi: Enable presence detection on ZZ

Andrew Donnellan andrew.donnellan at au1.ibm.com
Tue Oct 16 10:08:18 AEDT 2018


On 15/10/18 6:36 pm, Frederic Barrat wrote:
> Presence detection for opencapi adapters was broken for ZZ planars v3
> and below. All ZZ systems currently used in the lab have had their
> planar upgraded, so we can now remove the override we had to force
> presence and activate presence detection. Which should improve boot
> time.
> 
> Considering the state of opal support on ZZ, this is really only for
> lab usage on BML. The opencapi enablement team has okay'd the
> change. In the unlikely case somebody tries opencapi on an old ZZ, the
> presence detection through i2c will show that no adapter is present
> and skiboot won't try to access or train the link.
> 
> Signed-off-by: Frederic Barrat <fbarrat at linux.ibm.com>

As with last time

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


> ---
> 
> Resending as the problems seen when the patch was sent the first time
> had nothing to do with the patch.
> 
>   core/platform.c        | 6 ------
>   hw/npu2-common.c       | 3 +--
>   include/platform.h     | 1 -
>   platforms/ibm-fsp/zz.c | 5 -----
>   4 files changed, 1 insertion(+), 14 deletions(-)
> 
> diff --git a/core/platform.c b/core/platform.c
> index 7985ce56..570a4309 100644
> --- a/core/platform.c
> +++ b/core/platform.c
> @@ -184,12 +184,6 @@ const struct platform_ocapi generic_ocapi = {
>   	.i2c_presence_brick3 = (1 << 7), /* top connector */
>   	.i2c_presence_brick4 = 0, /* unused */
>   	.i2c_presence_brick5 = 0, /* unused */
> -	/*
> -	 * The ZZs we typically use for BML/generic platform tend to
> -	 * have old planars and presence detection is broken there, so
> -	 * force presence.
> -	 */
> -	.force_presence      = true,
>   	.odl_phy_swap        = true,
>   };
>   
> diff --git a/hw/npu2-common.c b/hw/npu2-common.c
> index 9e392b87..6e6b12f0 100644
> --- a/hw/npu2-common.c
> +++ b/hw/npu2-common.c
> @@ -144,8 +144,7 @@ void npu2_i2c_presence_detect(struct npu2 *npu)
>   	assert(platform.ocapi);
>   	for (int i = 0; i < npu->total_devices; i++) {
>   		dev = &npu->devices[i];
> -		if (platform.ocapi->force_presence ||
> -		    _i2c_presence_detect(dev))
> +		if (_i2c_presence_detect(dev))
>   			dev->type = NPU2_DEV_TYPE_OPENCAPI;
>   		else
>   			dev->type = NPU2_DEV_TYPE_UNKNOWN;
> diff --git a/include/platform.h b/include/platform.h
> index fee5a76c..7a132908 100644
> --- a/include/platform.h
> +++ b/include/platform.h
> @@ -59,7 +59,6 @@ struct platform_ocapi {
>   	uint8_t i2c_presence_brick3;	/* I2C pin to read for presence on brick 3 */
>   	uint8_t i2c_presence_brick4;	/* I2C pin to read for presence on brick 4 */
>   	uint8_t i2c_presence_brick5;	/* I2C pin to read for presence on brick 5 */
> -	bool force_presence;            /* don't use i2c detection */
>   	bool odl_phy_swap;		/* Swap ODL1 to use brick 2 rather than
>   					 * brick 1 lanes */
>   };
> diff --git a/platforms/ibm-fsp/zz.c b/platforms/ibm-fsp/zz.c
> index e5447269..040eca1d 100644
> --- a/platforms/ibm-fsp/zz.c
> +++ b/platforms/ibm-fsp/zz.c
> @@ -42,11 +42,6 @@ const struct platform_ocapi zz_ocapi = {
>   	.i2c_presence_brick3 = (1 << 7), /* top connector */
>   	.i2c_presence_brick4 = 0, /* unused */
>   	.i2c_presence_brick5 = 0, /* unused */
> -	/*
> -	 * i2c presence detection is broken on ZZ planar < v4 so we
> -	 * force the presence until all our systems are upgraded
> -	 */
> -	.force_presence      = true,
>   	.odl_phy_swap        = true,
>   };
>   
> 

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



More information about the Skiboot mailing list