[Skiboot] [PATCH 2/4] astbmc/slots: Add SW_PLUGGABLE() macro
Oliver O'Halloran
oohall at gmail.com
Tue Aug 21 14:37:50 AEST 2018
Add a macro to help with defining ports that are under a switch. This is
different to the existing ST_PLUGGABLE() macro in that it can be used to
define a slot inside a slot_table_entry array.
Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
---
platforms/astbmc/astbmc.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/platforms/astbmc/astbmc.h b/platforms/astbmc/astbmc.h
index fc53d1a10b1e..f8548c57cccd 100644
--- a/platforms/astbmc/astbmc.h
+++ b/platforms/astbmc/astbmc.h
@@ -79,6 +79,14 @@ static struct slot_table_entry st_name[] = \
{ .etype = st_end }, \
}
+#define SW_PLUGGABLE(slot_name, port, ...) \
+{ \
+ .etype = st_pluggable_slot, \
+ .name = slot_name, \
+ .location = ST_LOC_DEVFN(port, 0), \
+ ##__VA_ARGS__ \
+}
+
extern const struct bmc_platform astbmc_ami;
extern const struct bmc_platform astbmc_openbmc;
--
2.9.5
More information about the Skiboot
mailing list