diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2024-04-16 15:46:35 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2024-04-16 15:46:35 +0200 |
commit | 30955f79e7b3353f3c203efdb6eaf2a57b08c4c5 (patch) | |
tree | f46ed41b31354039b86967282a5a52807ef3d04f /include | |
parent | 10c24308965d3b24ee6ac18fa2e6219bc7e972a9 (diff) | |
parent | e476edd5322f789ed79d93a5849e8c4c998e3b3f (diff) | |
download | barebox-30955f79e7b3353f3c203efdb6eaf2a57b08c4c5.tar.gz barebox-30955f79e7b3353f3c203efdb6eaf2a57b08c4c5.tar.xz |
Merge branch 'for-next/misc' into next
Diffstat (limited to 'include')
-rw-r--r-- | include/aiodev.h | 9 | ||||
-rw-r--r-- | include/bootm.h | 8 | ||||
-rw-r--r-- | include/common.h | 1 | ||||
-rw-r--r-- | include/console.h | 1 | ||||
-rw-r--r-- | include/efi.h | 3 | ||||
-rw-r--r-- | include/input/input.h | 1 | ||||
-rw-r--r-- | include/linux/gpio/consumer.h | 2 | ||||
-rw-r--r-- | include/mach/zynqmp/firmware-zynqmp.h | 11 | ||||
-rw-r--r-- | include/mci.h | 7 | ||||
-rw-r--r-- | include/platform_data/gpio-intel.h | 23 | ||||
-rw-r--r-- | include/string.h | 2 | ||||
-rw-r--r-- | include/usb_dfu_trailer.h | 32 |
12 files changed, 64 insertions, 36 deletions
diff --git a/include/aiodev.h b/include/aiodev.h index 56bd2da9f5..fb0807ad42 100644 --- a/include/aiodev.h +++ b/include/aiodev.h @@ -47,4 +47,13 @@ static inline const char *aiochannel_get_unit(struct aiochannel *aiochan) extern struct list_head aiodevices; #define for_each_aiodevice(aiodevice) list_for_each_entry(aiodevice, &aiodevices, list) +#ifdef CONFIG_AIODEV +int aiochannel_name_get_value(const char *chname, int *value); +#else +static inline int aiochannel_name_get_value(const char *chname, int *value) +{ + return -EOPNOTSUPP; +} +#endif + #endif diff --git a/include/bootm.h b/include/bootm.h index ee2b574521..98ac5e5a93 100644 --- a/include/bootm.h +++ b/include/bootm.h @@ -34,6 +34,11 @@ struct bootm_data { * value of global.machine_id to Kernel. */ bool provide_machine_id; + /* + * provide_hostname - if true, try to add systemd.hostname= with value + * of global.hostname to Kernel. + */ + bool provide_hostname; unsigned long initrd_address; unsigned long os_address; unsigned long os_entry; @@ -147,6 +152,9 @@ int bootm_get_os_size(struct image_data *data); enum bootm_verify bootm_get_verify_mode(void); void bootm_set_verify_mode(enum bootm_verify mode); +bool bootm_signed_images_are_forced(void); +void bootm_force_signed_images(void); + #define UIMAGE_SOME_ADDRESS (UIMAGE_INVALID_ADDRESS - 1) void *booti_load_image(struct image_data *data, phys_addr_t *oftree); diff --git a/include/common.h b/include/common.h index b7b4d9e350..d7b5261bc9 100644 --- a/include/common.h +++ b/include/common.h @@ -127,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 *); diff --git a/include/console.h b/include/console.h index 69c0ec144b..62d13d7aa0 100644 --- a/include/console.h +++ b/include/console.h @@ -102,6 +102,7 @@ int console_set_active(struct console_device *cdev, unsigned active); unsigned console_get_active(struct console_device *cdev); int console_set_baudrate(struct console_device *cdev, unsigned baudrate); unsigned console_get_baudrate(struct console_device *cdev); +void console_set_stdoutpath(struct console_device *cdev, unsigned baudrate); struct console_device *of_console_by_stdout_path(void); diff --git a/include/efi.h b/include/efi.h index 6bb5f8cb0a..a27cbe1f49 100644 --- a/include/efi.h +++ b/include/efi.h @@ -562,6 +562,9 @@ extern struct efi_runtime_services *RT; #define EFI_TIMESTAMP_PROTOCOL_GUID \ EFI_GUID(0xafbfde41, 0x2e6e, 0x4262, 0xba, 0x65, 0x62, 0xb9, 0x23, 0x6e, 0x54, 0x95) +#define EFI_I2C_MASTER_PROTOCOL_GUID \ + EFI_GUID(0xcd72881f, 0x45b5, 0x4feb, 0x98, 0xc8, 0x31, 0x3d, 0xa8, 0x11, 0x74, 0x62) + /* barebox specific GUIDs */ #define EFI_BAREBOX_VENDOR_GUID \ EFI_GUID(0x5b91f69c, 0x8b88, 0x4a2b, 0x92, 0x69, 0x5f, 0x1d, 0x80, 0x2b, 0x51, 0x75) diff --git a/include/input/input.h b/include/input/input.h index d169c647bd..9445d20e56 100644 --- a/include/input/input.h +++ b/include/input/input.h @@ -14,6 +14,7 @@ struct input_event { struct input_device { struct list_head list; + struct device *parent; DECLARE_BITMAP(keys, KEY_CNT); }; diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h index 531ed14725..e04f516b31 100644 --- a/include/linux/gpio/consumer.h +++ b/include/linux/gpio/consumer.h @@ -45,6 +45,8 @@ struct gpio_descs { DECLARE_FLEX_ARRAY(struct gpio_desc *, desc); }; +bool gpiod_slice_acquired(struct gpio_desc *); + #if defined(CONFIG_OFDEVICE) && defined(CONFIG_GPIOLIB) /* returned gpio descriptor can be passed to any normal gpio_* function */ diff --git a/include/mach/zynqmp/firmware-zynqmp.h b/include/mach/zynqmp/firmware-zynqmp.h index 00c63058f4..9f833189d3 100644 --- a/include/mach/zynqmp/firmware-zynqmp.h +++ b/include/mach/zynqmp/firmware-zynqmp.h @@ -119,8 +119,19 @@ struct zynqmp_eemi_ops { const struct zynqmp_eemi_ops *zynqmp_pm_get_eemi_ops(void); +#if defined(CONFIG_ARCH_ZYNQMP) int zynqmp_pm_set_sd_tapdelay(u32 node_id, u32 type, u32 value); int zynqmp_pm_sd_dll_reset(u32 node_id, u32 type); +#else +static inline int zynqmp_pm_set_sd_tapdelay(u32 node_id, u32 type, u32 value) +{ + return -ENOSYS; +} +static inline int zynqmp_pm_sd_dll_reset(u32 node_id, u32 type) +{ + return -ENOSYS; +} +#endif int zynqmp_pm_write_ggs(u32 index, u32 value); int zynqmp_pm_read_ggs(u32 index, u32 *value); diff --git a/include/mci.h b/include/mci.h index 52bf84ecdb..2274ca8e97 100644 --- a/include/mci.h +++ b/include/mci.h @@ -559,15 +559,14 @@ struct mci { struct mci_host *host; /**< the host for this card */ struct device dev; /**< the device for our disk (mcix) */ unsigned version; - bool sdio; /**< card is a SDIO card */ - /** != 0 when a high capacity card is connected (OCR -> OCR_HCS) */ - int high_capacity; unsigned card_caps; /**< Card's capabilities */ unsigned ocr; /**< card's "operation condition register" */ unsigned scr[2]; unsigned csd[4]; /**< card's "card specific data register" */ unsigned cid[4]; /**< card's "card identification register" */ - unsigned short rca; /* FIXME */ + unsigned short rca; /**< relative card address */ + bool sdio; /**< card is a SDIO card */ + bool high_capacity; /**< high capacity card is connected (OCR -> OCR_HCS) */ unsigned tran_speed; /**< Maximum transfer speed */ /** currently used data block length for read accesses */ unsigned read_bl_len; diff --git a/include/platform_data/gpio-intel.h b/include/platform_data/gpio-intel.h new file mode 100644 index 0000000000..4da4764998 --- /dev/null +++ b/include/platform_data/gpio-intel.h @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#ifndef __GPIO_INTEL_H +#define __GPIO_INTEL_H + +#include <linux/types.h> + +struct gpio_intel_platform_data { + resource_size_t community_base; + resource_size_t community_size; + unsigned int ngpios; +}; + +static inline struct device *add_intel_gpio_device( + struct gpio_intel_platform_data *pdata +) +{ + return add_generic_device("intel-gpio", DEVICE_ID_DYNAMIC, NULL, + pdata->community_base, pdata->community_size, + IORESOURCE_MEM, pdata); +} + +#endif /* __GPIO_INTEL_H */ diff --git a/include/string.h b/include/string.h index 2f2af85b55..4ee3be6d93 100644 --- a/include/string.h +++ b/include/string.h @@ -33,4 +33,6 @@ static inline bool streq_ptr(const char *a, const char *b) return strcmp_ptr(a, b) == 0; } +bool isempty(const char *s); + #endif /* __STRING_H */ diff --git a/include/usb_dfu_trailer.h b/include/usb_dfu_trailer.h deleted file mode 100644 index 64b8407275..0000000000 --- a/include/usb_dfu_trailer.h +++ /dev/null @@ -1,32 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef _USB_DFU_TRAILER_H -#define _USB_DFU_TRAILER_H - -/* trailer handling for DFU files */ - -#define BAREBOX_DFU_TRAILER_V1 1 -#define BAREBOX_DFU_TRAILER_MAGIC 0x19731978 -struct barebox_dfu_trailer { - u_int32_t magic; - u_int16_t version; - u_int16_t length; - u_int16_t vendor; - u_int16_t product; - u_int32_t revision; -} __attribute__((packed)); - -/* we mirror the trailer because we want it to be longer in later versions - * while keeping backwards compatibility */ -static inline void dfu_trailer_mirror(struct barebox_dfu_trailer *trailer, - unsigned char *eof) -{ - int i; - int len = sizeof(struct barebox_dfu_trailer); - unsigned char *src = eof - len; - unsigned char *dst = (unsigned char *) trailer; - - for (i = 0; i < len; i++) - dst[len-1-i] = src[i]; -} - -#endif /* _USB_DFU_TRAILER_H */ |