summaryrefslogtreecommitdiffstats
path: root/include/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/common.h')
-rw-r--r--include/common.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/include/common.h b/include/common.h
index 4167d4676e..b7b4d9e350 100644
--- a/include/common.h
+++ b/include/common.h
@@ -16,6 +16,7 @@
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/stddef.h>
+#include <linux/pagemap.h>
#include <asm/common.h>
#include <asm/io.h>
#include <linux/printk.h>
@@ -43,6 +44,12 @@
*/
void reginfo(void);
+/* For use when unrelocated */
+static inline void __hang(void)
+{
+ while (1);
+}
+
void __noreturn hang (void);
char *size_human_readable(unsigned long long size);
@@ -99,11 +106,6 @@ void shutdown_barebox(void);
char __##name[sizeof(type) * (size) + (align) - 1]; \
type *name = (type *)ALIGN((uintptr_t)__##name, align)
-#define PAGE_SIZE 4096
-#define PAGE_SHIFT 12
-#define PAGE_ALIGN(s) ALIGN(s, PAGE_SIZE)
-#define PAGE_ALIGN_DOWN(x) ALIGN_DOWN(x, PAGE_SIZE)
-
int mem_parse_options(int argc, char *argv[], char *optstr, int *mode,
char **sourcefile, char **destfile, int *swab);
int memcpy_parse_options(int argc, char *argv[], int *sourcefd,
@@ -126,4 +128,10 @@ const char *barebox_get_hostname(void);
void barebox_set_hostname(const char *);
void barebox_set_hostname_no_overwrite(const char *);
+const char *barebox_get_serial_number(void);
+void barebox_set_serial_number(const char *);
+
+void barebox_set_of_machine_compatible(const char *);
+const char *barebox_get_of_machine_compatible(void);
+
#endif /* __COMMON_H_ */