From 4d28576dffd565b790a9f9332d7094bed4094ddb Mon Sep 17 00:00:00 2001 From: Frederic Barrat Date: Wed, 14 Nov 2018 18:02:48 +0100 Subject: platform/witherspoon: Avoid harmless error message The I2C read to find out if a device on the GPU slot is an opencapi adapter or nvidia card is reporting an "arbitration loss" error if no device is connected on the GPU slot. That I2C read is actually useless if we already know there's no device connected, so let's skip it. It will avoid logging an harmless error. Signed-off-by: Frederic Barrat Reviewed-by: Andrew Donnellan Signed-off-by: Stewart Smith --- platforms/astbmc/witherspoon.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/platforms/astbmc/witherspoon.c b/platforms/astbmc/witherspoon.c index f45f739..772a719 100644 --- a/platforms/astbmc/witherspoon.c +++ b/platforms/astbmc/witherspoon.c @@ -271,6 +271,13 @@ static void witherspoon_npu2_device_detect(struct npu2 *npu) prlog(PR_DEBUG, "PLAT: Chip %d GPU#1 slot present\n", chip->id); } + /* + * The following I2C ops generate errors if no device is + * present on any SXM2 slot. Since it's useless, let's skip it + */ + if (!gpu0_present && !gpu1_present) + return; + /* Set pins to input */ state = 0xff; rc = i2c_request_send(i2c_port_id, -- cgit v1.1