[Skiboot] [RFC PATCH 5/5] WIP: Add slot tables for Habanero
Benjamin Herrenschmidt
benh at kernel.crashing.org
Thu Aug 20 11:29:30 AEST 2015
The names aren't definitive yet
Not-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..715b4c6 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 = "PHB0 SLOT",
+ },
+ { .etype = st_end },
+};
+
+static const struct slot_table_entry habanero_plx_slots[] = {
+ {
+ .etype = st_pluggable_slot,
+ .location = ST_LOC_DEVFN(1,0),
+ .name = "Mezz SLOT 1",
+ },
+ {
+ .etype = st_pluggable_slot,
+ .location = ST_LOC_DEVFN(2,0),
+ .name = "Mezz SLOT 2",
+ },
+ {
+ .etype = st_builtin_dev,
+ .location = ST_LOC_DEVFN(8,0),
+ .name = "Built-in SATA",
+ },
+ {
+ .etype = st_builtin_dev,
+ .location = ST_LOC_DEVFN(9,0),
+ .name = "Built-in USB",
+ },
+ {
+ .etype = st_builtin_dev,
+ .location = ST_LOC_DEVFN(0xa,0),
+ .name = "Built-in BMC",
+ },
+ {
+ .etype = st_pluggable_slot,
+ .location = ST_LOC_DEVFN(0x10,0),
+ .name = "PLX SLOT 0",
+ },
+ {
+ .etype = st_pluggable_slot,
+ .location = ST_LOC_DEVFN(0x11,0),
+ .name = "PLX SLOT 1",
+ },
+ { .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 = "Built-in 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 = "PHB2 SLOT",
+ },
+ { .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,
--
2.4.3
More information about the Skiboot
mailing list