[Skiboot] [PATCH 2/6] mambo: Add callthru0()
Michael Neuling
mikey at neuling.org
Wed Nov 2 18:07:35 AEDT 2016
To be used for rtc and simstop calls
Signed-off-by: Michael Neuling <mikey at neuling.org>
---
platforms/mambo/mambo.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/platforms/mambo/mambo.c b/platforms/mambo/mambo.c
index fc454bd741..02df88bcb6 100644
--- a/platforms/mambo/mambo.c
+++ b/platforms/mambo/mambo.c
@@ -34,6 +34,13 @@ static bool mambo_probe(void)
return true;
}
+static inline unsigned long callthru0(int command)
+{
+ register uint64_t c asm("r3") = command;
+ asm volatile (".long 0x000eaeb0":"=r" (c):"r"(c));
+ return (c);
+}
+
static int64_t mambo_rtc_read(uint32_t *ymd, uint64_t *hmsm)
{
int64_t mambo_time;
--
2.9.3
More information about the Skiboot
mailing list