diff options
author | Hao Wu <wuhaotsh@google.com> | 2025-07-07 11:09:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-07 11:09:25 -0700 |
commit | c076c6bc0b74bff38f43bf28d9df2ff9bde55ca8 (patch) | |
tree | a44fdfa838ed794fb004d7b9505771d11af0e2cb /ast27x0/include/io.h | |
parent | d6e3386709b3e49322a94ffadc2aaab9944ab77b (diff) | |
parent | 80768e454d548a7f7f53374a3a0ff8ec4bbae778 (diff) | |
download | vbootrom-master.zip vbootrom-master.tar.gz vbootrom-master.tar.bz2 |
ast27x0: Initialize and enable SSP/TSP using SCU
Diffstat (limited to 'ast27x0/include/io.h')
-rw-r--r-- | ast27x0/include/io.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ast27x0/include/io.h b/ast27x0/include/io.h index fab6546..6813940 100644 --- a/ast27x0/include/io.h +++ b/ast27x0/include/io.h @@ -27,4 +27,12 @@ #define writel(value, addr) (*(volatile unsigned int *)(addr) = (unsigned int)(value)) #define writeq(value, addr) (*(volatile unsigned long long *)(addr) = (unsigned long long)(value)) +#define BITS_PER_LONG (sizeof(unsigned long) * 8) +#define GENMASK(h, l) \ + (((~0UL) >> (BITS_PER_LONG - ((h) - (l) + 1))) << (l)) + +#define BIT(x) (1UL << (x)) + +#define ALIGN_UP(x, align) (((x) + ((align) - 1)) & ~((align) - 1)) + #endif /* __AST27X0_INCLUDE_IO_H__ */ |