[Skiboot] [PATCH] Add slot tables for Habanero
Benjamin Herrenschmidt
benh at kernel.crashing.org
Tue Sep 1 15:17:39 AEST 2015
Names provided by Ben Mashak
Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---
platforms/astbmc/habanero.c | 99 ++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 98 insertions(+), 1 deletion(-)
diff --git a/platforms/astbmc/habanero.c b/platforms/astbmc/habanero.c
index 7ae5dc4..41e84f7 100644
--- a/platforms/astbmc/habanero.c
+++ b/platforms/astbmc/habanero.c
@@ -23,6 +23,101 @@
#include "astbmc.h"
+static const struct slot_table_entry habanero_phb0_slot[] = {
+ {
+ .etype = st_pluggable_slot,
+ .location = ST_LOC_DEVFN(0,0),
+ .name = "Slot3",
+ },
+ { .etype = st_end },
+};
+
+static const struct slot_table_entry habanero_plx_slots[] = {
+ {
+ .etype = st_pluggable_slot,
+ .location = ST_LOC_DEVFN(1,0),
+ .name = "Network Mezz",
+ },
+ {
+ .etype = st_pluggable_slot,
+ .location = ST_LOC_DEVFN(2,0),
+ .name = "Network Mezz",
+ },
+ {
+ .etype = st_builtin_dev,
+ .location = ST_LOC_DEVFN(8,0),
+ .name = "Storage Mezz",
+ },
+ {
+ .etype = st_builtin_dev,
+ .location = ST_LOC_DEVFN(9,0),
+ .name = "Backplane USB",
+ },
+ {
+ .etype = st_builtin_dev,
+ .location = ST_LOC_DEVFN(0xa,0),
+ .name = "Backplane BMC",
+ },
+ {
+ .etype = st_pluggable_slot,
+ .location = ST_LOC_DEVFN(0x10,0),
+ .name = "Slot2",
+ },
+ {
+ .etype = st_pluggable_slot,
+ .location = ST_LOC_DEVFN(0x11,0),
+ .name = "Slot1",
+ },
+ { .etype = st_end },
+};
+
+static const struct slot_table_entry habanero_plx_up[] = {
+ {
+ .etype = st_builtin_dev,
+ .location = ST_LOC_DEVFN(0,0),
+ .children = habanero_plx_slots,
+ },
+ { .etype = st_end },
+};
+
+static const struct slot_table_entry habanero_phb1_slot[] = {
+ {
+ .etype = st_builtin_dev,
+ .location = ST_LOC_DEVFN(0,0),
+ .name = "Backplane PLX",
+ .children = habanero_plx_up,
+ },
+ { .etype = st_end },
+};
+
+static const struct slot_table_entry habanero_phb2_slot[] = {
+ {
+ .etype = st_pluggable_slot,
+ .location = ST_LOC_DEVFN(0,0),
+ .name = "Slot4",
+ },
+ { .etype = st_end },
+};
+
+static const struct slot_table_entry habanero_phb_table[] = {
+ {
+ .etype = st_phb,
+ .location = ST_LOC_PHB(0,0),
+ .children = habanero_phb0_slot,
+ },
+ {
+ .etype = st_phb,
+ .location = ST_LOC_PHB(0,1),
+ .children = habanero_phb1_slot,
+ },
+ {
+ .etype = st_phb,
+ .location = ST_LOC_PHB(0,2),
+ .children = habanero_phb2_slot,
+ },
+ { .etype = st_end },
+};
+
static bool habanero_probe(void)
{
const char *model;
@@ -41,14 +136,16 @@ static bool habanero_probe(void)
prd_init();
+ slot_table_init(habanero_phb_table);
+
return true;
}
-
DECLARE_PLATFORM(habanero) = {
.name = "Habanero",
.probe = habanero_probe,
.init = astbmc_init,
+ .pci_get_slot_info = slot_table_get_slot_info,
.external_irq = astbmc_ext_irq_serirq_cpld,
.cec_power_down = astbmc_ipmi_power_down,
.cec_reboot = astbmc_ipmi_reboot,
More information about the Skiboot
mailing list