diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2022-10-13 13:57:07 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-10-13 13:57:07 +0200 |
commit | 3d46afb56fa3c5e3c41a382dc454b5bcda04d5ac (patch) | |
tree | 957de9cbc6a68e82c84ae26cc4712c3e86dfc964 /include | |
parent | 965a946c49e016bcff5bbfffaa1a468cd74af0db (diff) | |
parent | 8513703c6c46428908264923260504ce81e3e3a7 (diff) | |
download | barebox-3d46afb56fa3c5e3c41a382dc454b5bcda04d5ac.tar.gz barebox-3d46afb56fa3c5e3c41a382dc454b5bcda04d5ac.tar.xz |
Merge branch 'for-next/misc'
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-generic/barebox.lds.h | 4 | ||||
-rw-r--r-- | include/block.h | 4 | ||||
-rw-r--r-- | include/common.h | 6 | ||||
-rw-r--r-- | include/driver.h | 2 | ||||
-rw-r--r-- | include/errno.h | 1 | ||||
-rw-r--r-- | include/file-list.h | 1 | ||||
-rw-r--r-- | include/firmware.h | 1 | ||||
-rw-r--r-- | include/fs.h | 3 | ||||
-rw-r--r-- | include/linux/hw_random.h | 6 | ||||
-rw-r--r-- | include/linux/kernel.h | 2 | ||||
-rw-r--r-- | include/linux/limits.h | 1 | ||||
-rw-r--r-- | include/printk.h | 2 | ||||
-rw-r--r-- | include/stdlib.h | 2 | ||||
-rw-r--r-- | include/usb/usb.h | 2 |
14 files changed, 26 insertions, 11 deletions
diff --git a/include/asm-generic/barebox.lds.h b/include/asm-generic/barebox.lds.h index 48c10b1738..d3736ebaed 100644 --- a/include/asm-generic/barebox.lds.h +++ b/include/asm-generic/barebox.lds.h @@ -8,10 +8,6 @@ #define STRUCT_ALIGNMENT 32 #define STRUCT_ALIGN() . = ALIGN(STRUCT_ALIGNMENT) -#if defined CONFIG_ARCH_EP93XX -#include <mach/barebox.lds.h> -#endif - #ifndef PRE_IMAGE #define PRE_IMAGE #endif diff --git a/include/block.h b/include/block.h index 1fb40e942f..8740a03d36 100644 --- a/include/block.h +++ b/include/block.h @@ -50,9 +50,9 @@ static inline int block_flush(struct block_device *blk) } #ifdef CONFIG_BLOCK -struct block_device *cdev_get_block_device(struct cdev *cdev); +struct block_device *cdev_get_block_device(const struct cdev *cdev); #else -static inline struct block_device *cdev_get_block_device(struct cdev *cdev) +static inline struct block_device *cdev_get_block_device(const struct cdev *cdev) { return NULL; } diff --git a/include/common.h b/include/common.h index bd12035688..cf3e0447a0 100644 --- a/include/common.h +++ b/include/common.h @@ -43,6 +43,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); diff --git a/include/driver.h b/include/driver.h index f48e906fec..2386949c31 100644 --- a/include/driver.h +++ b/include/driver.h @@ -184,6 +184,8 @@ char *deviceid_from_spec_str(const char *str, char **endp); static inline const char *dev_id(const struct device_d *dev) { + if (!dev) + return NULL; return (dev->id != DEVICE_ID_SINGLE) ? dev->unique_name : dev->name; } diff --git a/include/errno.h b/include/errno.h index 262c9fc3eb..1644265966 100644 --- a/include/errno.h +++ b/include/errno.h @@ -8,7 +8,6 @@ extern int errno; void perror(const char *s); -const char *errno_str(void); const char *strerror(int errnum); #endif /* __ERRNO_H */ diff --git a/include/file-list.h b/include/file-list.h index af0dd7bbf1..2b2003971f 100644 --- a/include/file-list.h +++ b/include/file-list.h @@ -8,6 +8,7 @@ #define FILE_LIST_FLAG_READBACK (1 << 1) #define FILE_LIST_FLAG_CREATE (1 << 2) #define FILE_LIST_FLAG_UBI (1 << 3) +#define FILE_LIST_FLAG_OPTIONAL (1 << 4) struct file_list_entry { char *name; diff --git a/include/firmware.h b/include/firmware.h index 2cfaeb1e6a..cfb8899322 100644 --- a/include/firmware.h +++ b/include/firmware.h @@ -7,6 +7,7 @@ #define FIRMWARE_H #include <pbl.h> +#include <printk.h> #include <types.h> #include <driver.h> #include <debug_ll.h> diff --git a/include/fs.h b/include/fs.h index 894cae3e4c..b501db38ad 100644 --- a/include/fs.h +++ b/include/fs.h @@ -164,6 +164,7 @@ int fs_init_legacy(struct fs_device_d *fsdev); int fsdev_open_cdev(struct fs_device_d *fsdev); const char *cdev_get_mount_path(struct cdev *cdev); const char *cdev_mount_default(struct cdev *cdev, const char *fsoptions); +const char *cdev_mount(struct cdev *cdev); void mount_all(void); void fsdev_set_linux_rootarg(struct fs_device_d *fsdev, const char *str); @@ -178,4 +179,6 @@ static inline const char *devpath_to_name(const char *devpath) return devpath; } +const char *fs_detect(const char *filename, const char *fsoptions); + #endif /* __FS_H */ diff --git a/include/linux/hw_random.h b/include/linux/hw_random.h index 116afd9721..e541abfa17 100644 --- a/include/linux/hw_random.h +++ b/include/linux/hw_random.h @@ -36,12 +36,16 @@ struct hwrng { /* Register a new Hardware Random Number Generator driver. */ int hwrng_register(struct device_d *dev, struct hwrng *rng); -int hwrng_get_data(struct hwrng *rng, void *buffer, size_t size, int wait); #ifdef CONFIG_HWRNG struct hwrng *hwrng_get_first(void); +int hwrng_get_data(struct hwrng *rng, void *buffer, size_t size, int wait); #else static inline struct hwrng *hwrng_get_first(void) { return ERR_PTR(-ENODEV); }; +static inline int hwrng_get_data(struct hwrng *rng, void *buffer, size_t size, int wait) +{ + return -ENODEV; +} #endif void hwrng_unregister(struct hwrng *rng); diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 4483d33e65..44fc02df0b 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -82,8 +82,6 @@ (__x < 0) ? -__x : __x; \ }) -void __noreturn panic(const char *fmt, ...); - extern unsigned long simple_strtoul(const char *,char **,unsigned int); extern long simple_strtol(const char *,char **,unsigned int); extern unsigned long long simple_strtoull(const char *,char **,unsigned int); diff --git a/include/linux/limits.h b/include/linux/limits.h index bda9c94bb5..85bba76f4a 100644 --- a/include/linux/limits.h +++ b/include/linux/limits.h @@ -18,6 +18,7 @@ #define ULLONG_MAX (~0ULL) #define SIZE_MAX (~(size_t)0) #define PHYS_ADDR_MAX (~(phys_addr_t)0) +#define SSIZE_MAX ((ssize_t)(SIZE_MAX >> 1)) #define U8_MAX ((u8)~0U) #define S8_MAX ((s8)(U8_MAX >> 1)) diff --git a/include/printk.h b/include/printk.h index 8de8202af9..b313b408a9 100644 --- a/include/printk.h +++ b/include/printk.h @@ -27,6 +27,8 @@ static inline int printf(const char *fmt, ...) } #endif +void __attribute__((noreturn)) panic(const char *fmt, ...); + #define printk printf #define printk_once(fmt, ...) \ diff --git a/include/stdlib.h b/include/stdlib.h index 8eb419e111..0305970557 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -15,6 +15,8 @@ void srand(unsigned int seed); /* fill a buffer with pseudo-random data */ void get_random_bytes(void *buf, int len); int get_crypto_bytes(void *buf, int len); +struct hwrng; +int hwrng_get_crypto_bytes(struct hwrng *rng, void *buf, int len); static inline u32 random32(void) { diff --git a/include/usb/usb.h b/include/usb/usb.h index 39f4750916..04b433ba73 100644 --- a/include/usb/usb.h +++ b/include/usb/usb.h @@ -201,7 +201,7 @@ int usb_clear_halt(struct usb_device *dev, int pipe); int usb_string(struct usb_device *dev, int index, char *buf, size_t size); int usb_set_interface(struct usb_device *dev, int interface, int alternate); -void usb_rescan(void); +int usb_rescan(void); /* big endian -> little endian conversion */ /* some CPUs are already little endian e.g. the ARM920T */ |