diff options
author | Michael Neuling <mikey@neuling.org> | 2016-11-02 18:07:35 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-11-02 18:24:09 +1100 |
commit | 310c04648b3474d9437428e1b65557447f8f86f7 (patch) | |
tree | fb2afcf83fec83ed11602aa1cc94cc747b140c2d /platforms/mambo/mambo.c | |
parent | ec4636b53843aa46e9226fa3bd9bc8357138840a (diff) | |
download | talos-skiboot-310c04648b3474d9437428e1b65557447f8f86f7.tar.gz talos-skiboot-310c04648b3474d9437428e1b65557447f8f86f7.zip |
mambo: Add callthru0()
To be used for rtc and simstop calls
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'platforms/mambo/mambo.c')
-rw-r--r-- | platforms/mambo/mambo.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/platforms/mambo/mambo.c b/platforms/mambo/mambo.c index 279ff1f2..21578c80 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; |