diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2015-08-20 11:29:29 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-09-01 16:18:35 +1000 |
commit | 9fb3a04fd25d18b4865e44d461e6a8993b7717a0 (patch) | |
tree | 56d2eefbb6c5893aa468ab087ad8ac38fcdbef19 /platforms/astbmc/astbmc.h | |
parent | 58ccf6a977ade80e4475d7d350c4c076ab1accad (diff) | |
download | skiboot-9fb3a04fd25d18b4865e44d461e6a8993b7717a0.zip skiboot-9fb3a04fd25d18b4865e44d461e6a8993b7717a0.tar.gz skiboot-9fb3a04fd25d18b4865e44d461e6a8993b7717a0.tar.bz2 |
plat/bmc: Add infrastructure for slot tables
This adds some basic infrastructure for simple slot tables allowing
us to name slots and built-in devices on OPP machines.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
[stewart@linux.vnet.ibm.com: add IBM (C) in new file, trim trailing whitespace]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'platforms/astbmc/astbmc.h')
-rw-r--r-- | platforms/astbmc/astbmc.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/platforms/astbmc/astbmc.h b/platforms/astbmc/astbmc.h index 489ffd2..23c31c7 100644 --- a/platforms/astbmc/astbmc.h +++ b/platforms/astbmc/astbmc.h @@ -18,6 +18,21 @@ #ifndef __ASTBMC_H #define __ASTBMC_H +#define ST_LOC_PHB(chip_id, phb_idx) ((chip_id) << 16 | (phb_idx)) +#define ST_LOC_DEVFN(dev, fn) ((dev) << 3 | (fn)) + +struct slot_table_entry { + enum slot_table_etype { + st_end, /* End of list */ + st_phb, + st_pluggable_slot, + st_builtin_dev, + } etype; + uint32_t location; + const char *name; + const struct slot_table_entry *children; +}; + extern void astbmc_early_init(void); extern int64_t astbmc_ipmi_reboot(void); extern int64_t astbmc_ipmi_power_down(uint64_t request); @@ -25,4 +40,7 @@ extern void astbmc_init(void); extern void astbmc_ext_irq_serirq_cpld(unsigned int chip_id); extern int pnor_init(void); +extern void slot_table_init(const struct slot_table_entry *top_table); +extern void slot_table_get_slot_info(struct phb *phb, struct pci_device * pd); + #endif /* __ASTBMC_H */ |