From c20d27db681512f397280b67b49c104df0244981 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Tue, 1 Sep 2015 15:17:39 +1000 Subject: Add slot tables for Habanero Names provided by Ben Mashak Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Stewart Smith --- platforms/astbmc/habanero.c | 99 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 98 insertions(+), 1 deletion(-) (limited to 'platforms') 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, -- cgit v1.1