diff options
author | Raul E Rangel <rrangel@chromium.org> | 2018-08-20 12:47:19 -0600 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2018-09-12 14:15:18 +0000 |
commit | d63627fb846b6621be87348b1653a5f37070e12f (patch) | |
tree | 2547e1bf937bc9bbf128d5b2f1836e407c0e928b /payloads/libpayload/include/stddef.h | |
parent | 24ae85c3ffb48c72f67a514dcb843c1de54e5416 (diff) | |
download | coreboot-d63627fb846b6621be87348b1653a5f37070e12f.tar.xz |
libpayload/libc/time: Add an arch_ndelay()
Replace _delay with an arch_ndelay(). This way each arch can setup their
own delay mechanism.
BUG=b:109749762
TEST=Verified delay's still work on grunt.
Change-Id: I552eb30984f9c21e92dffc9d7b36873e9e2e4ac5
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Reviewed-on: https://review.coreboot.org/28243
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'payloads/libpayload/include/stddef.h')
-rw-r--r-- | payloads/libpayload/include/stddef.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/payloads/libpayload/include/stddef.h b/payloads/libpayload/include/stddef.h index 4e41eedfe8..725ff0bcb5 100644 --- a/payloads/libpayload/include/stddef.h +++ b/payloads/libpayload/include/stddef.h @@ -29,6 +29,9 @@ typedef __SIZE_TYPE__ ssize_t; #define MHz (1000*KHz) #define GHz (1000*MHz) +#define NSECS_PER_SEC 1000000000 #define USECS_PER_SEC 1000000 #define MSECS_PER_SEC 1000 +#define NSECS_PER_MSEC (NSECS_PER_SEC / MSECS_PER_SEC) +#define NSECS_PER_USEC (NSECS_PER_SEC / USECS_PER_SEC) #define USECS_PER_MSEC (USECS_PER_SEC / MSECS_PER_SEC) |