[Skiboot] [RFC 10/12] witherspoon: Add missing slot information

Oliver O'Halloran oohall at gmail.com
Tue Aug 1 23:00:05 AEST 2017


Add the non-GPU slot information that were missing now that we've
finished mangling the slot tables.

Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
---
 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 },
 };
-- 
2.9.4



More information about the Skiboot mailing list