diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/extension_board.h | 31 | ||||
-rw-r--r-- | include/fdt_support.h | 2 | ||||
-rw-r--r-- | include/w1-eeprom.h | 2 | ||||
-rw-r--r-- | include/w1.h | 17 |
4 files changed, 50 insertions, 2 deletions
diff --git a/include/extension_board.h b/include/extension_board.h new file mode 100644 index 00000000000..c530a0ad8a2 --- /dev/null +++ b/include/extension_board.h @@ -0,0 +1,31 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * (C) Copyright 2021 + * Köry Maincent, Bootlin, <kory.maincent@bootlin.com> + */ + +#ifndef __EXTENSION_SUPPORT_H +#define __EXTENSION_SUPPORT_H + +struct extension { + struct list_head list; + char name[32]; + char owner[32]; + char version[32]; + char overlay[32]; + char other[32]; +}; + +/** + * extension_board_scan - Add system-specific function to scan extension board. + * @param extension_list List of extension board information to update. + * @return the number of extension. + * + * This function is called if CONFIG_CMD_EXTENSION is defined. + * Needs to fill the list extension_list with elements. + * Each element need to be allocated to an extension structure. + * + */ +int extension_board_scan(struct list_head *extension_list); + +#endif /* __EXTENSION_SUPPORT_H */ diff --git a/include/fdt_support.h b/include/fdt_support.h index e2a4689cd8a..1e4dbc0a8f6 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -352,6 +352,8 @@ int fdt_setup_simplefb_node(void *fdt, int node, u64 base_address, u32 width, int fdt_overlay_apply_verbose(void *fdt, void *fdto); +int fdt_valid(struct fdt_header **blobp); + /** * fdt_get_cells_len() - Get the length of a type of cell in top-level nodes * diff --git a/include/w1-eeprom.h b/include/w1-eeprom.h index 22337368b4b..b3cf77a81ef 100644 --- a/include/w1-eeprom.h +++ b/include/w1-eeprom.h @@ -27,7 +27,5 @@ int w1_eeprom_read_buf(struct udevice *dev, unsigned int offset, int w1_eeprom_dm_init(void); -int w1_eeprom_register_new_device(u64 id); - int w1_eeprom_get_id(struct udevice *dev, u64 *id); #endif diff --git a/include/w1.h b/include/w1.h index 77f439e587f..b18078ba152 100644 --- a/include/w1.h +++ b/include/w1.h @@ -15,6 +15,23 @@ struct udevice; #define W1_FAMILY_DS2502 0x09 #define W1_FAMILY_EEP_SANDBOX 0xfe +struct w1_driver_entry { + struct driver *driver; + u8 *family; +}; + +/* U_BOOT_W1_DEVICE() tells U-Boot to create a one-wire device. + * + * @__name: Device name (C identifier, not a string. E.g. gpio7_at_ff7e0000) + * @__driver: Driver name (C identifier, not a string. E.g. gpio7_at_ff7e0000) + * @__family: Family code number of the one-wire + */ +#define U_BOOT_W1_DEVICE(__name, __family) \ + ll_entry_declare(struct w1_driver_entry, __name, w1_driver_entry) = { \ + .driver = llsym(struct driver, __name, driver), \ + .family = __family, \ + } + struct w1_device { u64 id; }; |