summaryrefslogtreecommitdiff
path: root/platform/kendryte
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2019-04-11 03:41:46 +0300
committerAnup Patel <anup@brainfault.org>2019-04-24 07:19:46 +0300
commitfbf986ac2a0b926ae97e6796b87e366610d7589e (patch)
tree1d65814b7832b1173c4094e4f91c7da9f491e87a /platform/kendryte
parent97fb8c0e3bcd4d7915ea35020e4d95999d389cd3 (diff)
downloadopensbi-fbf986ac2a0b926ae97e6796b87e366610d7589e.tar.xz
all: Annotate some tables to have clang-format leave them alone
One of the shortcomings of clang-format is that it doesn't allow for aligned define tables, which is used for a number of constants. Add annotation to disable the automatic formatting where needed. Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'platform/kendryte')
-rw-r--r--platform/kendryte/k210/platform.h5
-rw-r--r--platform/kendryte/k210/uarths.h4
2 files changed, 8 insertions, 1 deletions
diff --git a/platform/kendryte/k210/platform.h b/platform/kendryte/k210/platform.h
index 982d942..8694ea8 100644
--- a/platform/kendryte/k210/platform.h
+++ b/platform/kendryte/k210/platform.h
@@ -22,6 +22,8 @@
#include <sbi/riscv_asm.h>
+/* clang-format off */
+
#define K210_HART_COUNT 2
#define K210_HART_STACK_SIZE 4096
@@ -171,5 +173,6 @@ enum plic_irq {
#define PLIC_NUM_SOURCES (IRQN_MAX - 1)
#define PLIC_NUM_PRIORITIES (7)
-#endif /* _PLATFORM_H_ */
+/* clang-format on */
+#endif /* _PLATFORM_H_ */
diff --git a/platform/kendryte/k210/uarths.h b/platform/kendryte/k210/uarths.h
index ad3308c..3bfb8d5 100644
--- a/platform/kendryte/k210/uarths.h
+++ b/platform/kendryte/k210/uarths.h
@@ -50,6 +50,8 @@
#include <sbi/sbi_types.h>
+/* clang-format off */
+
/* Base register address */
#define UARTHS_BASE_ADDR (0x38000000U)
@@ -74,6 +76,8 @@
#define UARTHS_IP_TXWM 0x01
#define UARTHS_IP_RXWM 0x02
+/* clang-format on */
+
struct uarths_txdata {
/* Bits [7:0] is data */
u32 data : 8;