853c7399011c77cc95311f0ff76ca224f914c9db
[rpi-open-firmware.git] / arm_chainloader / chainloader.h
1 #pragma once
2
3 #include <stdint.h>
4 #include <stddef.h>
5 #include <lib/xprintf.h>
6
7 #define printf xprintf
8
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12
13 extern void udelay(uint32_t time);
14
15 #define STATIC_INIT_PRIORITY(x) __attribute__((init_priority(x)))
16
17 #define STATIC_CPRMAN_DRIVER STATIC_INIT_PRIORITY(101)
18 #define STATIC_DRIVER STATIC_INIT_PRIORITY(200)
19 #define STATIC_APP STATIC_INIT_PRIORITY(600)
20
21 #define mfence() __sync_synchronize()
22
23 #define NBBY 8
24
25 #define __BIT(__n) \
26 (((uintmax_t)(__n) >= NBBY * sizeof(uintmax_t)) ? 0 : \
27 ((uintmax_t)1 << (uintmax_t)((__n) & (NBBY * sizeof(uintmax_t) - 1))))
28
29 #ifdef __cplusplus
30 }
31 #endif
32
This page took 0.05984 seconds and 3 git commands to generate.