aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/phb4.h7
-rw-r--r--include/platform.h5
-rw-r--r--include/xscom-p9-regs.h3
3 files changed, 15 insertions, 0 deletions
diff --git a/include/phb4.h b/include/phb4.h
index bed6eef..3ec8a5b 100644
--- a/include/phb4.h
+++ b/include/phb4.h
@@ -306,4 +306,11 @@ static inline void phb4_set_err_pending(struct phb4 *p, bool pending)
p->err_pending = pending;
}
+#define PHB4_PER_CHIP 6 /* Max 6 PHBs per chip on p9 */
+
+static inline int phb4_get_opal_id(unsigned int chip_id, unsigned int index)
+{
+ return chip_id * PHB4_PER_CHIP + index;
+}
+
#endif /* __PHB4_H */
diff --git a/include/platform.h b/include/platform.h
index 9133204..4dcdb33 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -101,6 +101,11 @@ struct platform {
void (*pci_setup_phb)(struct phb *phb, unsigned int index);
/*
+ * This is called before resetting the PHBs (lift PERST) and
+ * probing the devices. The PHBs have already been initialized.
+ */
+ void (*pre_pci_fixup)(void);
+ /*
* Called during PCI scan for each device. For bridges, this is
* called before its children are probed. This is called for
* every device and for the PHB itself with a NULL pd though
diff --git a/include/xscom-p9-regs.h b/include/xscom-p9-regs.h
index 7da404b..4738e81 100644
--- a/include/xscom-p9-regs.h
+++ b/include/xscom-p9-regs.h
@@ -18,4 +18,7 @@
#define P9X_EX_NCU_DARN_BAR 0x11011
#define P9X_EX_NCU_DARN_BAR_EN PPC_BIT(0)
+#define P9_GPIO_DATA_OUT_ENABLE 0x00000000000B0054ull
+#define P9_GPIO_DATA_OUT 0x00000000000B0051ull
+
#endif /* __XSCOM_P9_REGS_H__ */