aboutsummaryrefslogtreecommitdiff
path: root/platforms
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2017-09-15 15:40:50 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-09-15 02:49:27 -0500
commit4fc76e58601c7c698268d52bea1694ba1dd19d55 (patch)
tree4805f05de5d1113565218526f1c2af842600d443 /platforms
parentdcd53cfaeaf633e9ec08f4c8c68bf6c12ad0f998 (diff)
downloadskiboot-4fc76e58601c7c698268d52bea1694ba1dd19d55.zip
skiboot-4fc76e58601c7c698268d52bea1694ba1dd19d55.tar.gz
skiboot-4fc76e58601c7c698268d52bea1694ba1dd19d55.tar.bz2
platform/witherspoon: Add slot names to table
Add the other PCIe devices to the witherspoon slot tables. This provides a fall back for systems without IOSLOT information in the HDAT. This is mainly to allow DD1 systems to continue being useful. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'platforms')
-rw-r--r--platforms/astbmc/astbmc.h10
-rw-r--r--platforms/astbmc/witherspoon.c80
2 files changed, 68 insertions, 22 deletions
diff --git a/platforms/astbmc/astbmc.h b/platforms/astbmc/astbmc.h
index 88eb43f..feaca1d 100644
--- a/platforms/astbmc/astbmc.h
+++ b/platforms/astbmc/astbmc.h
@@ -41,6 +41,16 @@ struct slot_table_entry {
const struct slot_table_entry *children;
};
+/*
+ * Helper to reduce the noise in the PHB table
+ */
+#define ST_PHB_ENTRY(chip_id, phb_id, child_table) \
+{ \
+ .etype = st_phb, \
+ .location = ST_LOC_PHB(chip_id, phb_id), \
+ .children = child_table \
+}
+
extern const struct bmc_platform astbmc_ami;
extern const struct bmc_platform astbmc_openbmc;
diff --git a/platforms/astbmc/witherspoon.c b/platforms/astbmc/witherspoon.c
index a987e90..e9cc98b 100644
--- a/platforms/astbmc/witherspoon.c
+++ b/platforms/astbmc/witherspoon.c
@@ -30,6 +30,42 @@
#include "astbmc.h"
+static const struct slot_table_entry witherspoon_slot1[] = {
+ {
+ .etype = st_pluggable_slot,
+ .location = ST_LOC_DEVFN(0,0),
+ .name = "SLOT0"
+ },
+ { .etype = st_end },
+};
+
+static const struct slot_table_entry witherspoon_slot2_shared[] = {
+ {
+ .etype = st_pluggable_slot,
+ .location = ST_LOC_DEVFN(0,0),
+ .name = "SLOT1"
+ },
+ { .etype = st_end },
+};
+
+static const struct slot_table_entry witherspoon_slot3[] = {
+ {
+ .etype = st_pluggable_slot,
+ .location = ST_LOC_DEVFN(0,0),
+ .name = "SLOT2"
+ },
+ { .etype = st_end },
+};
+
+static const struct slot_table_entry witherspoon_slot4[] = {
+ {
+ .etype = st_pluggable_slot,
+ .location = ST_LOC_DEVFN(0,0),
+ .name = "SLOT3"
+ },
+ { .etype = st_end },
+};
+
static const struct slot_table_entry witherspoon_gpu0[] = {
{
.etype = st_pluggable_slot,
@@ -146,7 +182,7 @@ static const struct slot_table_entry witherspoon_plx1_up[] = {
{ .etype = st_end },
};
-static const struct slot_table_entry witherspoon_phb0_4_slot[] = {
+static const struct slot_table_entry witherspoon_plx0_phb[] = {
{
.etype = st_builtin_dev,
.location = ST_LOC_DEVFN(0,0),
@@ -155,7 +191,7 @@ static const struct slot_table_entry witherspoon_phb0_4_slot[] = {
{ .etype = st_end },
};
-static const struct slot_table_entry witherspoon_phb8_5_slot[] = {
+static const struct slot_table_entry witherspoon_plx1_phb[] = {
{
.etype = st_builtin_dev,
.location = ST_LOC_DEVFN(0,0),
@@ -202,27 +238,27 @@ static const struct slot_table_entry witherspoon_npu8_slots[] = {
{ .etype = st_end },
};
+/*
+ * Slot numbering:
+ *
+ * slot 1 - x4 slot
+ * slot 2 - shared slot, 8x to each chip's PHB3
+ * slot 3 - 16x \w CAPI, second chip
+ * slot 4 - 16x \w CAPI, first chip
+ */
+
static const struct slot_table_entry witherspoon_phb_table[] = {
- {
- .etype = st_phb,
- .location = ST_LOC_PHB(0,4),
- .children = witherspoon_phb0_4_slot,
- },
- {
- .etype = st_phb,
- .location = ST_LOC_PHB(0,7),
- .children = witherspoon_npu0_slots,
- },
- {
- .etype = st_phb,
- .location = ST_LOC_PHB(8,5),
- .children = witherspoon_phb8_5_slot,
- },
- {
- .etype = st_phb,
- .location = ST_LOC_PHB(8,8),
- .children = witherspoon_npu8_slots,
- },
+ ST_PHB_ENTRY(0, 0, witherspoon_slot4),
+ ST_PHB_ENTRY(0, 3, witherspoon_slot2_shared),
+ ST_PHB_ENTRY(0, 4, witherspoon_plx0_phb),
+ ST_PHB_ENTRY(0, 7, witherspoon_npu0_slots),
+
+ ST_PHB_ENTRY(8, 0, witherspoon_slot3),
+ ST_PHB_ENTRY(8, 3, witherspoon_slot2_shared),
+ ST_PHB_ENTRY(8, 4, witherspoon_slot1),
+ ST_PHB_ENTRY(8, 5, witherspoon_plx1_phb),
+ ST_PHB_ENTRY(8, 8, witherspoon_npu8_slots),
+
{ .etype = st_end },
};