summaryrefslogtreecommitdiff
path: root/include/ec_commands.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ec_commands.h')
-rw-r--r--include/ec_commands.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h
index 5c19196b2e..94edd18db4 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -23,6 +23,12 @@
#if !defined(__KERNEL__)
#include "compile_time_macros.h"
+#ifndef GENMASK
+#define GENMASK(h, l) (((BIT(h) << 1) - 1) ^ (BIT(l) - 1))
+#endif
+#ifndef GENMASK_ULL
+#define GENMASK_ULL(h, l) (((BIT_ULL(h) << 1) - 1) ^ (BIT_ULL(l) - 1))
+#endif
#endif
/*