From 310c04648b3474d9437428e1b65557447f8f86f7 Mon Sep 17 00:00:00 2001 From: Michael Neuling Date: Wed, 2 Nov 2016 18:07:35 +1100 Subject: mambo: Add callthru0() To be used for rtc and simstop calls Signed-off-by: Michael Neuling Signed-off-by: Stewart Smith --- platforms/mambo/mambo.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/platforms/mambo/mambo.c b/platforms/mambo/mambo.c index 279ff1f..21578c8 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; -- cgit v1.1