[Skiboot] [PATCH] npu2-opencapi: Enable presence detection on ZZ
Frederic Barrat
fbarrat at linux.ibm.com
Mon Sep 24 22:30:44 AEST 2018
Stewart: don't merge yet. The patch does what it's supposed to do, but
it also speeds up boot, thus timing of subsequent opencapi operations
and I think it reveals a latent problem on some rare cases. Still
investigating...
Fred
Le 19/09/2018 à 19:21, Frederic Barrat a écrit :
> 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.
>
> This is really for 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 adapters are present
> and skiboot won't try to access it or train the link.
>
> Signed-off-by: Frederic Barrat <fbarrat at linux.ibm.com>
> ---
> 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,
> };
>
>
More information about the Skiboot
mailing list