diff options
Diffstat (limited to 'pk/device.c')
-rw-r--r-- | pk/device.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/pk/device.c b/pk/device.c index 73cd71d..f8b39ca 100644 --- a/pk/device.c +++ b/pk/device.c @@ -1,18 +1,8 @@ #include "pk.h" +#include "frontend.h" #include <string.h> #include <stdlib.h> -static uint64_t tohost_sync(unsigned dev, unsigned cmd, uint64_t payload) -{ - uint64_t tohost = (uint64_t)dev << 56 | (uint64_t)cmd << 48 | payload; - uint64_t fromhost; - __sync_synchronize(); - while (swap_csr(tohost, tohost) != 0); - while ((fromhost = swap_csr(fromhost, 0)) == 0); - __sync_synchronize(); - return fromhost; -} - void enumerate_devices() { char buf[64] __attribute__((aligned(64))); |