[Skiboot] [RFC 04/12] astbmc/slots: Add an upstream port slot type
Oliver O'Halloran
oohall at gmail.com
Tue Aug 1 22:59:59 AEST 2017
Add a new slot type to represent switch upstream ports. Currently we use
st_builtin_dev for all devices that we need to traverse when mapping
PCI devices to slots. This makes parsing the slot tables somewhat tricky
in practice due to the lack of context.
Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
---
platforms/astbmc/astbmc.h | 1 +
platforms/astbmc/barreleye.c | 2 +-
platforms/astbmc/firestone.c | 2 +-
platforms/astbmc/garrison.c | 2 +-
platforms/astbmc/habanero.c | 2 +-
platforms/astbmc/p8dnu.c | 4 ++--
platforms/astbmc/p8dtu.c | 2 +-
platforms/astbmc/palmetto.c | 2 +-
platforms/astbmc/witherspoon.c | 4 ++--
9 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/platforms/astbmc/astbmc.h b/platforms/astbmc/astbmc.h
index 2d0e35e4a325..e094e2506d76 100644
--- a/platforms/astbmc/astbmc.h
+++ b/platforms/astbmc/astbmc.h
@@ -43,6 +43,7 @@ struct slot_table_entry {
st_phb,
st_pluggable_slot,
st_builtin_dev,
+ st_sw_upstream,
st_npu_slot
} etype;
uint32_t location;
diff --git a/platforms/astbmc/barreleye.c b/platforms/astbmc/barreleye.c
index 554aacf12105..f8c77e3b00d3 100644
--- a/platforms/astbmc/barreleye.c
+++ b/platforms/astbmc/barreleye.c
@@ -58,7 +58,7 @@ static const struct slot_table_entry barreleye_plx_slots[] = {
static const struct slot_table_entry barreleye_plx_up[] = {
{
- .etype = st_builtin_dev,
+ .etype = st_sw_upstream,
.location = ST_LOC_DEVFN(0,0),
.children = barreleye_plx_slots,
},
diff --git a/platforms/astbmc/firestone.c b/platforms/astbmc/firestone.c
index fc6575b13728..7434a4802fc5 100644
--- a/platforms/astbmc/firestone.c
+++ b/platforms/astbmc/firestone.c
@@ -76,7 +76,7 @@ static const struct slot_table_entry firestone_plx_slots[] = {
static const struct slot_table_entry firestone_plx_up[] = {
{
- .etype = st_builtin_dev,
+ .etype = st_sw_upstream,
.location = ST_LOC_DEVFN(0,0),
.children = firestone_plx_slots,
},
diff --git a/platforms/astbmc/garrison.c b/platforms/astbmc/garrison.c
index 1697b66f56c6..4b3ba071a833 100644
--- a/platforms/astbmc/garrison.c
+++ b/platforms/astbmc/garrison.c
@@ -107,7 +107,7 @@ static const struct slot_table_entry garrison_plx_slots[] = {
static const struct slot_table_entry garrison_plx_up[] = {
{
- .etype = st_builtin_dev,
+ .etype = st_sw_upstream,
.location = ST_LOC_DEVFN(0,0),
.children = garrison_plx_slots,
},
diff --git a/platforms/astbmc/habanero.c b/platforms/astbmc/habanero.c
index 2856a9774c8e..2ff1a7eeee79 100644
--- a/platforms/astbmc/habanero.c
+++ b/platforms/astbmc/habanero.c
@@ -68,7 +68,7 @@ static const struct slot_table_entry habanero_plx_slots[] = {
static const struct slot_table_entry habanero_plx_up[] = {
{
- .etype = st_builtin_dev,
+ .etype = st_sw_upstream,
.location = ST_LOC_DEVFN(0,0),
.children = habanero_plx_slots,
},
diff --git a/platforms/astbmc/p8dnu.c b/platforms/astbmc/p8dnu.c
index 8cf532e26b8e..1ac2a2141dbb 100644
--- a/platforms/astbmc/p8dnu.c
+++ b/platforms/astbmc/p8dnu.c
@@ -66,7 +66,7 @@ static const struct slot_table_entry p8dnu_plx_slots_00[] = {
static const struct slot_table_entry p8dnu_plx_up_00[] = {
{
- .etype = st_builtin_dev,
+ .etype = st_sw_upstream,
.location = ST_LOC_DEVFN(0,0),
.children = p8dnu_plx_slots_00,
},
@@ -149,7 +149,7 @@ static const struct slot_table_entry p8dnu_plx_slots[] = {
static const struct slot_table_entry p8dnu_plx_up[] = {
{
- .etype = st_builtin_dev,
+ .etype = st_sw_upstream,
.location = ST_LOC_DEVFN(0,0),
.children = p8dnu_plx_slots,
},
diff --git a/platforms/astbmc/p8dtu.c b/platforms/astbmc/p8dtu.c
index 63d36fb65deb..7c3b41b71680 100644
--- a/platforms/astbmc/p8dtu.c
+++ b/platforms/astbmc/p8dtu.c
@@ -73,7 +73,7 @@ static const struct slot_table_entry p8dtu_plx_slots[] = {
static const struct slot_table_entry p8dtu_plx_up[] = {
{
- .etype = st_builtin_dev,
+ .etype = st_sw_upstream,
.location = ST_LOC_DEVFN(0,0),
.children = p8dtu_plx_slots,
},
diff --git a/platforms/astbmc/palmetto.c b/platforms/astbmc/palmetto.c
index 69f111c72b4f..fb115dc31f29 100644
--- a/platforms/astbmc/palmetto.c
+++ b/platforms/astbmc/palmetto.c
@@ -58,7 +58,7 @@ static const struct slot_table_entry palmetto_plx_slots[] = {
static const struct slot_table_entry palmetto_plx_up[] = {
{
- .etype = st_builtin_dev,
+ .etype = st_sw_upstream,
.location = ST_LOC_DEVFN(0,0),
.children = palmetto_plx_slots,
},
diff --git a/platforms/astbmc/witherspoon.c b/platforms/astbmc/witherspoon.c
index aa260f94af1a..c3e997a393ac 100644
--- a/platforms/astbmc/witherspoon.c
+++ b/platforms/astbmc/witherspoon.c
@@ -76,7 +76,7 @@ static const struct slot_table_entry witherspoon_plx1_down[] = {
static const struct slot_table_entry witherspoon_plx0_up[] = {
{
- .etype = st_builtin_dev,
+ .etype = st_sw_upstream,
.location = ST_LOC_DEVFN(0x20,0),
.children = witherspoon_plx0_down,
},
@@ -85,7 +85,7 @@ static const struct slot_table_entry witherspoon_plx0_up[] = {
static const struct slot_table_entry witherspoon_plx1_up[] = {
{
- .etype = st_builtin_dev,
+ .etype = st_sw_upstream,
.location = ST_LOC_DEVFN(0x20,0),
.children = witherspoon_plx1_down,
},
--
2.9.4
More information about the Skiboot
mailing list