diff options
Diffstat (limited to 'include/common.h')
-rw-r--r-- | include/common.h | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/include/common.h b/include/common.h index 693f5bf970..b7b4d9e350 100644 --- a/include/common.h +++ b/include/common.h @@ -16,9 +16,10 @@ #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 <printk.h> +#include <linux/printk.h> /* * sanity check. The Linux Kernel defines only one of __LITTLE_ENDIAN and @@ -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); @@ -62,15 +69,6 @@ void ctrlc_handled(void); static inline void ctrlc_handled(void) { } #endif -#ifdef CONFIG_ARCH_HAS_STACK_DUMP -void dump_stack(void); -#else -static inline void dump_stack(void) -{ - printf("no stack data available\n"); -} -#endif - int parse_area_spec(const char *str, loff_t *start, loff_t *size); /* Just like simple_strtoul(), but this one honors a K/M/G suffix */ @@ -97,8 +95,6 @@ enum autoboot_state do_autoboot_countdown(void); void __noreturn start_barebox(void); void shutdown_barebox(void); -#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) - /* * The STACK_ALIGN_ARRAY macro is used to allocate a buffer on the stack that * meets a minimum alignment requirement. @@ -110,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, @@ -137,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_ */ |