aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2015-09-01 15:17:39 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-09-01 16:19:08 +1000
commitc20d27db681512f397280b67b49c104df0244981 (patch)
treee0f497cecfc32d9bcb6dc90853fc8e7bf7fa693d
parent9fb3a04fd25d18b4865e44d461e6a8993b7717a0 (diff)
downloadskiboot-c20d27db681512f397280b67b49c104df0244981.zip
skiboot-c20d27db681512f397280b67b49c104df0244981.tar.gz
skiboot-c20d27db681512f397280b67b49c104df0244981.tar.bz2
Add slot tables for Habanero
Names provided by Ben Mashak Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--platforms/astbmc/habanero.c99
1 files changed, 98 insertions, 1 deletions
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,