[Skiboot] [PATCH v6 7/9] vas: Define vas_get_hvwc_mmio_bar interface
Sukadev Bhattiprolu
sukadev at linux.vnet.ibm.com
Thu May 25 15:02:14 AEST 2017
The nest accelerator (NX) will need this interface to initialize its
UMAC MMIO BAR.
Signed-off-by: Sukadev Bhattiprolu <sukadev at linux.vnet.ibm.com>
---
Changelog[v4]:
[Balbir Singh] Make the new interface inline.
---
core/vas.c | 13 +++++++++++++
include/vas.h | 1 +
2 files changed, 14 insertions(+)
diff --git a/core/vas.c b/core/vas.c
index cebda05..cd7c580 100644
--- a/core/vas.c
+++ b/core/vas.c
@@ -69,6 +69,19 @@ static int vas_scom_write(struct proc_chip *chip, uint64_t reg, uint64_t val)
return rc;
}
+/* Interface for NX - make sure VAS is fully initialized first */
+__attrconst inline uint64_t vas_get_hvwc_mmio_bar(const int chipid)
+{
+ uint64_t addr;
+
+ if (!vas_initialized)
+ return 0ULL;
+
+ get_hvwc_mmio_bar(chipid, &addr, NULL);
+
+ return addr;
+}
+
static int init_north_ctl(struct proc_chip *chip)
{
uint64_t val = 0ULL;
diff --git a/include/vas.h b/include/vas.h
index 2590d9e..c382585 100644
--- a/include/vas.h
+++ b/include/vas.h
@@ -37,6 +37,7 @@
*/
extern void vas_init(void);
+extern __attrconst uint64_t vas_get_hvwc_mmio_bar(const int chipid);
/*
* HVWC and UWC BAR.
--
2.7.4
More information about the Skiboot
mailing list