From patchwork Fri Sep 14 03:46:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Donnellan X-Patchwork-Id: 969604 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42BM0Z0YTqz9sB5 for ; Fri, 14 Sep 2018 13:47:26 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=au1.ibm.com Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42BM0Y5jHqzF3Th for ; Fri, 14 Sep 2018 13:47:25 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=au1.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=au1.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=andrew.donnellan@au1.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=au1.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42BM013W3WzF36d for ; Fri, 14 Sep 2018 13:46:57 +1000 (AEST) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8E3iNdZ115722 for ; Thu, 13 Sep 2018 23:46:55 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2mg1hff35j-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 13 Sep 2018 23:46:54 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 14 Sep 2018 04:46:53 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 14 Sep 2018 04:46:50 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w8E3knwL62849142 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 14 Sep 2018 03:46:49 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2F1B4A405E; Fri, 14 Sep 2018 06:46:37 +0100 (BST) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D0A14A404D; Fri, 14 Sep 2018 06:46:36 +0100 (BST) Received: from ozlabs.au.ibm.com (unknown [9.192.253.14]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 14 Sep 2018 06:46:36 +0100 (BST) Received: from intelligence.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id DB7B0A037D; Fri, 14 Sep 2018 13:46:46 +1000 (AEST) From: Andrew Donnellan To: skiboot@lists.ozlabs.org Date: Fri, 14 Sep 2018 13:46:21 +1000 X-Mailer: git-send-email 2.11.0 X-TM-AS-GCONF: 00 x-cbid: 18091403-0020-0000-0000-000002C617B7 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18091403-0021-0000-0000-0000211376A8 Message-Id: MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-09-14_02:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=415 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809140038 Subject: [Skiboot] [PATCH v5 0/6] OpenCAPI support for Witherspoon X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alistair@popple.id.au, arbab@linux.ibm.com, fbarrat@linux.vnet.ibm.com Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" This series implements OpenCAPI support for Witherspoon. Patch 1 is a fixup to the OCC GPU presence detection. Patches 2-4 are restructuring of the NPU code in preparation for platforms that support both NVLink and OpenCAPI. Patch 5 is a fixup to OpenCAPI I2C reset and presence detection. Patch 6 adds Witherspoon-specific platform support, including the Witherspoon-specific device presence and type detection. v1->v2: - Address review comments from Reza/Alistair/Oliver v2->v3: - make OCC GPU presence less noisy - add check for npu->devices overflow - get rid of ocapi_global_mmio_base - Abort NPU init if we can't find the device presence I2C port - define device detection callback for ZZ - add comment to explain OpenCAPI slot presence function - rename the i2c fields in i2c refactoring commit message - refactor link type/index setting in witherspoon platform code - add explanatory comment for i2c reset settings in witherspoon platform code v3->v4: - break out of loop once device found in set_link_details() (Fred) - add missing break (Fred) v4->v5: - Rebase on master Andrew Andrew Donnellan (6): occ: Wait if OCC GPU presence status not immediately available npu2: Split device index into brick and link index hw/npu2: Common NPU2 init routine between NVLink and OpenCAPI hw/npu2, platform: Add NPU2 platform device detection callback hw/npu2, platform: Restructure OpenCAPI i2c reset/presence pins platforms/astbmc/witherspoon: Implement OpenCAPI support core/init.c | 2 +- core/platform.c | 26 +-- hdata/spira.c | 1 +- hw/npu2-common.c | 235 +++++++++++++++++++++++-- hw/npu2-hw-procedures.c | 8 +- hw/npu2-opencapi.c | 324 +++++++++++----------------------- hw/npu2.c | 257 ++++++++------------------- hw/occ.c | 16 +- include/npu2-regs.h | 14 +- include/npu2.h | 26 ++- include/platform.h | 16 +- include/skiboot.h | 1 +- platforms/astbmc/witherspoon.c | 209 ++++++++++++++++++++++- platforms/astbmc/zaius.c | 25 +-- platforms/ibm-fsp/zz.c | 26 +-- 15 files changed, 727 insertions(+), 459 deletions(-) base-commit: cbffa63d51715114cd09950490f9fafd2cfd7284