diff options
Diffstat (limited to 'include/common.h')
-rw-r--r-- | include/common.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/include/common.h b/include/common.h index bd12035688..d7b5261bc9 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, @@ -125,6 +127,7 @@ void barebox_set_model(const char *); const char *barebox_get_hostname(void); void barebox_set_hostname(const char *); void barebox_set_hostname_no_overwrite(const char *); +bool barebox_hostname_is_valid(const char *s); const char *barebox_get_serial_number(void); void barebox_set_serial_number(const char *); |