From patchwork Tue Aug 1 13:00:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver O'Halloran X-Patchwork-Id: 796222 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xMGhj1zYGz9sR8 for ; Tue, 1 Aug 2017 23:03:17 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="G9twCIC1"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3xMGhj0mHLzDqpx for ; Tue, 1 Aug 2017 23:03:17 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="G9twCIC1"; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3xMGdq5y7jzDsQ2 for ; Tue, 1 Aug 2017 23:00:47 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="G9twCIC1"; dkim-atps=neutral Received: by mail-pf0-x243.google.com with SMTP id c65so2231404pfl.0 for ; Tue, 01 Aug 2017 06:00:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=O4Sv48WU6cFnatBQpfqcKSWd1iSWtPTGH9RxesrW8nw=; b=G9twCIC1UmS5QnQlkqE6tts1dVfTF92wTu7ADAaP/dI5qwshMG1XB+K+1cT9ACXqDP OYVuD975uvqsYOJRKyoVvIgdn2YVZI+SwCCITc2gbjT/EYOkihMbm0cSvcJi8D/pvPeO wwiGdh+bQ8W0Oji7Hzv98zrQj2BpXO8z1WfYc3u/IEf+ryMMMZZniOT2AQRvfqDcKDxr Jj4BjYNYEgY/DqTs4tDNDXcg1gAXEOt4nH43+Ll0mu3TXMeI6DuIQhp6jY/h2V2vHdqo DwzpqAF2c2928uLm4d5APwuxnY2wivBv8a9HwwKKNDXBFZD8Rp6TmVdWyqPaI+uGnOJn m2LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=O4Sv48WU6cFnatBQpfqcKSWd1iSWtPTGH9RxesrW8nw=; b=UlIrcujVJDknXKlHaLbaTDHLmQ6ts+bxiRDM/3WhFcCdwd1RPa8HgSP7jX7a4R3q+y dlzITEHQxZ0x3P07oPOnFdW9vF67G2jJ93i8YoA/ULMtovMsKcwrqTtB5bm0gyWNK7di FIsTiRsfHltR5VZMvAX8yNP59xe8qYzvddU8wp/SiOfWulhBYMFdxXPSPex2THCjD8E2 uofnKQD/T4LH1F3z385MpF8bf/nVfWH/QDoRP7XcGI1tN12G2dO/3THkJwYPlm66Fzgy vZybCIi+ig+N3ZxegtwX0pYcbJgG0n8ODMJqENqIM0M/vubrrDaHAx3UaEqsOLqPVi4t axpg== X-Gm-Message-State: AIVw110PWaU5F5IMTMV8dUGfiCYBWYQQwv1lTG+i7JytBbLmNrSj4l1l k7dswwkLtMWM6UVr X-Received: by 10.84.194.195 with SMTP id h61mr21756732pld.140.1501592445905; Tue, 01 Aug 2017 06:00:45 -0700 (PDT) Received: from flat-canetoad.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id g22sm3235806pgn.65.2017.08.01.06.00.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Aug 2017 06:00:45 -0700 (PDT) From: Oliver O'Halloran To: skiboot@lists.ozlabs.org Date: Tue, 1 Aug 2017 23:00:05 +1000 Message-Id: <20170801130007.8990-11-oohall@gmail.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170801130007.8990-1-oohall@gmail.com> References: <20170801130007.8990-1-oohall@gmail.com> Subject: [Skiboot] [RFC 10/12] witherspoon: Add missing slot information X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Add the non-GPU slot information that were missing now that we've finished mangling the slot tables. Signed-off-by: Oliver O'Halloran --- platforms/astbmc/witherspoon.c | 153 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 139 insertions(+), 14 deletions(-) diff --git a/platforms/astbmc/witherspoon.c b/platforms/astbmc/witherspoon.c index 4f384db77b5b..f05eaede51b9 100644 --- a/platforms/astbmc/witherspoon.c +++ b/platforms/astbmc/witherspoon.c @@ -30,9 +30,54 @@ #include "astbmc.h" +/* pluggable slots */ + +static const struct slot_table_entry witherspoon_slot1[] = { + { + .etype = st_pluggable_slot, + .location = ST_LOC_DEVFN(0,0), + .name = "Slot 1 (4x)" + }, + { .etype = st_end }, +}; + +static const struct slot_table_entry witherspoon_slot2_shared[] = { + { + .etype = st_pluggable_slot, + .location = ST_LOC_DEVFN(0,0), + .name = "Slot 2 (8x + 8x)" + }, + { .etype = st_end }, +}; + +static const struct slot_table_entry witherspoon_slot3[] = { + { + .etype = st_pluggable_slot, + .location = ST_LOC_DEVFN(0,0), + .name = "Slot 3 (16x + CAPI)" + }, + { .etype = st_end }, +}; + +static const struct slot_table_entry witherspoon_slot4[] = { + { + .etype = st_pluggable_slot, + .location = ST_LOC_DEVFN(0,0), + .name = "Slot 4 (16x + CAPI)" + }, + { .etype = st_end }, +}; + +/* builtin devices */ + static const struct slot_table_entry witherspoon_plx0_down[] = { { .etype = st_builtin_dev, + .location = ST_LOC_DEVFN(0x2,0), + .name = "Builtin SATA", + }, + { + .etype = st_builtin_dev, .location = ST_LOC_DEVFN(0xa,0), .name = "GPU0", .nvlink = ST_LOC_NPU_TARGET(0, 0), @@ -52,6 +97,25 @@ static const struct slot_table_entry witherspoon_plx0_down[] = { { .etype = st_end }, }; +const struct slot_table_entry witherspoon_plx0_up[] = { + { + .etype = st_sw_upstream, + .location = ST_LOC_DEVFN(0x0,0), + .children = witherspoon_plx0_down, + .name = "PLX 0" + }, + { .etype = st_end }, +}; + +static const struct slot_table_entry witherspoon_plx0_phb[] = { + { + .etype = st_builtin_dev, + .location = ST_LOC_DEVFN(0,0), + .children = witherspoon_plx0_up, + }, + { .etype = st_end }, +}; + static const struct slot_table_entry witherspoon_plx1_down[] = { { .etype = st_builtin_dev, @@ -61,7 +125,7 @@ static const struct slot_table_entry witherspoon_plx1_down[] = { }, { .etype = st_builtin_dev, - .location = ST_LOC_DEVFN(0x8,0), + .location = ST_LOC_DEVFN(0x5,0), .name = "GPU4", .nvlink = ST_LOC_NPU_TARGET(8, 1), }, @@ -74,52 +138,113 @@ static const struct slot_table_entry witherspoon_plx1_down[] = { { .etype = st_end }, }; -static const struct slot_table_entry witherspoon_plx0_up[] = { +const struct slot_table_entry witherspoon_plx1_up[] = { { .etype = st_sw_upstream, - .location = ST_LOC_DEVFN(0x20,0), - .children = witherspoon_plx0_down, + .location = ST_LOC_DEVFN(0x0,0), + .children = witherspoon_plx1_down, + .name = "PLX 1" }, { .etype = st_end }, }; -static const struct slot_table_entry witherspoon_plx1_up[] = { +static const struct slot_table_entry witherspoon_plx1_phb[] = { { - .etype = st_sw_upstream, - .location = ST_LOC_DEVFN(0x20,0), - .children = witherspoon_plx1_down, + .etype = st_builtin_dev, + .location = ST_LOC_DEVFN(0,0), + .children = witherspoon_plx1_up, }, { .etype = st_end }, }; -static const struct slot_table_entry witherspoon_phb0_4_slot[] = { +const struct slot_table_entry witherspoon_bmc_dev[] = { { .etype = st_builtin_dev, .location = ST_LOC_DEVFN(0,0), - .children = witherspoon_plx0_up, + .name = "BMC" + }, + { .etype = st_end }, +}; +static const struct slot_table_entry witherspoon_bmc_phb[] = { + { + .etype = st_builtin_dev, + .location = ST_LOC_DEVFN(0,0), + .children = witherspoon_bmc_dev, }, { .etype = st_end }, }; -static const struct slot_table_entry witherspoon_phb8_5_slot[] = { +static const struct slot_table_entry witherspoon_net_dev[] = { { .etype = st_builtin_dev, .location = ST_LOC_DEVFN(0,0), - .children = witherspoon_plx1_up, + .name = "Builtin 1Gb Ethernet" }, { .etype = st_end }, }; +static const struct slot_table_entry witherspoon_net_phb[] = { + { + .etype = st_builtin_dev, + .location = ST_LOC_DEVFN(0,0), + .children = witherspoon_net_dev + }, + { .etype = st_end }, +}; + +/* + * slot numbering: + * + * slot 1 - HHHL Gen4 x4 (spoon2 has the broadcom here? looks like it - PHB 8, 3? + * slot 2 - PHB0,3 and PHB 8,3 + * slot 3 - 16x \w CAPI, proc? + * slot 4 - 16x \w CAPI, proc? + */ static const struct slot_table_entry witherspoon_phb_table[] = { { .etype = st_phb, + .location = ST_LOC_PHB(0,0), + .children = witherspoon_slot4, /* XXX: Might be slot 3 */ + }, + { + .etype = st_phb, + .location = ST_LOC_PHB(0,2), + .children = witherspoon_bmc_phb, /* BMC */ + }, + { + .etype = st_phb, + .location = ST_LOC_PHB(0,3), + .children = witherspoon_slot2_shared, /* shared */ + }, + { + .etype = st_phb, .location = ST_LOC_PHB(0,4), - .children = witherspoon_phb0_4_slot, + .children = witherspoon_plx0_phb, /* chip 1 PLX connection */ + }, + { + .etype = st_phb, + .location = ST_LOC_PHB(0,5), + .children = witherspoon_net_phb, /* builtin ethernet */ + }, + { + .etype = st_phb, + .location = ST_LOC_PHB(8,0), + .children = witherspoon_slot3, /* XXX: might be slot 4 */ + }, + { + .etype = st_phb, + .location = ST_LOC_PHB(8,3), + .children = witherspoon_slot2_shared, /* shared slot */ + }, + { + .etype = st_phb, + .location = ST_LOC_PHB(8,4), + .children = witherspoon_slot1, }, { .etype = st_phb, .location = ST_LOC_PHB(8,5), - .children = witherspoon_phb8_5_slot, + .children = witherspoon_plx1_phb, /* Chip 2 PLX up */ }, { .etype = st_end }, };