aboutsummaryrefslogtreecommitdiff
path: root/include/asm-generic
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/global_data.h2
-rw-r--r--include/asm-generic/gpio.h12
-rw-r--r--include/asm-generic/pe.h16
3 files changed, 24 insertions, 6 deletions
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index 02a3ed68382..7c2220643b5 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -137,7 +137,7 @@ typedef struct global_data {
#if defined(CONFIG_TRANSLATION_OFFSET)
fdt_addr_t translation_offset; /* optional translation offset */
#endif
-#if defined(CONFIG_WDT)
+#if CONFIG_IS_ENABLED(WDT)
struct udevice *watchdog_dev;
#endif
} gd_t;
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index 37f71e5708e..d6cf18744fd 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -352,9 +352,10 @@ int dm_gpio_lookup_name(const char *name, struct gpio_desc *desc);
* gpio_hog_lookup_name() - Look up a named GPIO and return the gpio descr.
*
* @name: Name to look up
- * @return: Returns gpio_desc for gpio
+ * @desc: Returns GPIO description, on success, else NULL
+ * @return: Returns 0 if OK, else -ENODEV
*/
-struct gpio_desc *gpio_hog_lookup_name(const char *name);
+int gpio_hog_lookup_name(const char *name, struct gpio_desc **desc);
/**
* gpio_hog_probe_all() - probe all gpio devices with
@@ -523,12 +524,13 @@ int gpio_request_list_by_name_nodev(ofnode node, const char *list_name,
* gpio_dev_request_index() - request single GPIO from gpio device
*
* @dev: GPIO device
- * @nodename: Name of node
+ * @nodename: Name of node for which gpio gets requested, used
+ * for the gpio label name
* @list_name: Name of GPIO list (e.g. "board-id-gpios")
* @index: Index number of the GPIO in that list use request (0=first)
* @flags: GPIOD_* flags
- * @dtflags: GPIO flags read from DT
- * @desc: GPIO descriotor filled from this function
+ * @dtflags: GPIO flags read from DT defined see GPIOD_*
+ * @desc: returns GPIO descriptor filled from this function
* @return: return value from gpio_request_tail()
*/
int gpio_dev_request_index(struct udevice *dev, const char *nodename,
diff --git a/include/asm-generic/pe.h b/include/asm-generic/pe.h
index faae534e371..b247519a3d5 100644
--- a/include/asm-generic/pe.h
+++ b/include/asm-generic/pe.h
@@ -29,6 +29,22 @@
#define IMAGE_FILE_UP_SYSTEM_ONLY 0x4000
#define IMAGE_FILE_BYTES_REVERSED_HI 0x8000
+/* Machine types */
+#define IMAGE_FILE_MACHINE_I386 0x014c
+#define IMAGE_FILE_MACHINE_ARM 0x01c0
+#define IMAGE_FILE_MACHINE_THUMB 0x01c2
+#define IMAGE_FILE_MACHINE_ARMNT 0x01c4
+#define IMAGE_FILE_MACHINE_AMD64 0x8664
+#define IMAGE_FILE_MACHINE_ARM64 0xaa64
+#define IMAGE_FILE_MACHINE_RISCV32 0x5032
+#define IMAGE_FILE_MACHINE_RISCV64 0x5064
+
+/* Header magic constants */
+#define IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x010b
+#define IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x020b
+#define IMAGE_DOS_SIGNATURE 0x5a4d /* MZ */
+#define IMAGE_NT_SIGNATURE 0x00004550 /* PE00 */
+
/* Subsystem type */
#define IMAGE_SUBSYSTEM_EFI_APPLICATION 10
#define IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11