diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/clk.h | 15 | ||||
-rw-r--r-- | include/configs/chromebook_link.h | 3 | ||||
-rw-r--r-- | include/configs/chromebook_samus.h | 2 | ||||
-rw-r--r-- | include/configs/qemu-x86.h | 5 | ||||
-rw-r--r-- | include/configs/sunxi-common.h | 16 | ||||
-rw-r--r-- | include/configs/x86-common.h | 1 | ||||
-rw-r--r-- | include/efi_api.h | 5 | ||||
-rw-r--r-- | include/efi_loader.h | 34 | ||||
-rw-r--r-- | include/efi_selftest.h | 11 | ||||
-rw-r--r-- | include/pch.h | 18 | ||||
-rw-r--r-- | include/pci.h | 6 | ||||
-rw-r--r-- | include/reset.h | 16 |
12 files changed, 103 insertions, 29 deletions
diff --git a/include/clk.h b/include/clk.h index 8e366163f9..d24e99713a 100644 --- a/include/clk.h +++ b/include/clk.h @@ -8,6 +8,7 @@ #ifndef _CLK_H_ #define _CLK_H_ +#include <dm/ofnode.h> #include <linux/errno.h> #include <linux/types.h> @@ -101,6 +102,20 @@ int clk_get_by_index_platdata(struct udevice *dev, int index, int clk_get_by_index(struct udevice *dev, int index, struct clk *clk); /** + * clock_get_by_index_nodev - Get/request a clock by integer index + * without a device. + * + * This is a version of clk_get_by_index() that does not use a device. + * + * @node: The client ofnode. + * @index: The index of the clock to request, within the client's list of + * clocks. + * @clock A pointer to a clock struct to initialize. + * @return 0 if OK, or a negative error code. + */ +int clk_get_by_index_nodev(ofnode node, int index, struct clk *clk); + +/** * clock_get_bulk - Get/request all clocks of a device. * * This looks up and requests all clocks of the client device; each device is diff --git a/include/configs/chromebook_link.h b/include/configs/chromebook_link.h index ca59276892..f26e463fe5 100644 --- a/include/configs/chromebook_link.h +++ b/include/configs/chromebook_link.h @@ -18,9 +18,6 @@ #define CONFIG_ENV_SECT_SIZE 0x1000 #define CONFIG_ENV_OFFSET 0x003f8000 -#define BOOT_DEVICE_SPI 10 - #define CONFIG_SPL_BOARD_LOAD_IMAGE -#define BOOT_DEVICE_BOARD 11 #endif /* __CONFIG_H */ diff --git a/include/configs/chromebook_samus.h b/include/configs/chromebook_samus.h index ccb2fe8caa..2f7dd69fb8 100644 --- a/include/configs/chromebook_samus.h +++ b/include/configs/chromebook_samus.h @@ -23,4 +23,6 @@ #define CONFIG_ENV_SECT_SIZE 0x1000 #define CONFIG_ENV_OFFSET 0x003f8000 +#define CONFIG_TPL_TEXT_BASE 0xfffd8000 + #endif /* __CONFIG_H */ diff --git a/include/configs/qemu-x86.h b/include/configs/qemu-x86.h index 4cd1cac3bd..64e7a60b8a 100644 --- a/include/configs/qemu-x86.h +++ b/include/configs/qemu-x86.h @@ -33,11 +33,6 @@ #define CONFIG_SYS_ATA_IDE1_OFFSET 0x170 #define CONFIG_ATAPI -/* SPI is not supported */ - -#define BOOT_DEVICE_SPI 10 - #define CONFIG_SPL_BOARD_LOAD_IMAGE -#define BOOT_DEVICE_BOARD 11 #endif /* __CONFIG_H */ diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index accc21f56f..fceb812448 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -390,6 +390,18 @@ extern int soft_i2c_gpio_scl; #define BOOT_TARGET_DEVICES_USB(func) #endif +#ifdef CONFIG_CMD_PXE +#define BOOT_TARGET_DEVICES_PXE(func) func(PXE, pxe, na) +#else +#define BOOT_TARGET_DEVICES_PXE(func) +#endif + +#ifdef CONFIG_CMD_DHCP +#define BOOT_TARGET_DEVICES_DHCP(func) func(DHCP, dhcp, na) +#else +#define BOOT_TARGET_DEVICES_DHCP(func) +#endif + /* FEL boot support, auto-execute boot.scr if a script address was provided */ #define BOOTENV_DEV_FEL(devtypeu, devtypel, instance) \ "bootcmd_fel=" \ @@ -405,8 +417,8 @@ extern int soft_i2c_gpio_scl; BOOT_TARGET_DEVICES_MMC(func) \ BOOT_TARGET_DEVICES_SCSI(func) \ BOOT_TARGET_DEVICES_USB(func) \ - func(PXE, pxe, na) \ - func(DHCP, dhcp, na) + BOOT_TARGET_DEVICES_PXE(func) \ + BOOT_TARGET_DEVICES_DHCP(func) #ifdef CONFIG_OLD_SUNXI_KERNEL_COMPAT #define BOOTCMD_SUNXI_COMPAT \ diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h index 4180b25f97..7fcf76a6bf 100644 --- a/include/configs/x86-common.h +++ b/include/configs/x86-common.h @@ -36,7 +36,6 @@ /*----------------------------------------------------------------------- * Real Time Clock Configuration */ -#define CONFIG_RTC_MC146818 #define CONFIG_SYS_ISA_IO_BASE_ADDRESS 0 #define CONFIG_SYS_ISA_IO CONFIG_SYS_ISA_IO_BASE_ADDRESS diff --git a/include/efi_api.h b/include/efi_api.h index 472160cb30..755c405793 100644 --- a/include/efi_api.h +++ b/include/efi_api.h @@ -128,7 +128,8 @@ struct efi_boot_services { efi_status_t exit_status, efi_uintn_t exitdata_size, u16 *exitdata); efi_status_t (EFIAPI *unload_image)(efi_handle_t image_handle); - efi_status_t (EFIAPI *exit_boot_services)(efi_handle_t, unsigned long); + efi_status_t (EFIAPI *exit_boot_services)(efi_handle_t image_handle, + efi_uintn_t map_key); efi_status_t (EFIAPI *get_next_monotonic_count)(u64 *count); efi_status_t (EFIAPI *stall)(unsigned long usecs); @@ -348,7 +349,7 @@ struct efi_loaded_image { aligned_u64 image_size; unsigned int image_code_type; unsigned int image_data_type; - unsigned long unload; + efi_status_t (EFIAPI *unload)(efi_handle_t image_handle); }; #define EFI_DEVICE_PATH_PROTOCOL_GUID \ diff --git a/include/efi_loader.h b/include/efi_loader.h index 7af3f16ef8..07ef14ba1c 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -180,6 +180,19 @@ struct efi_handler { }; /** + * enum efi_object_type - type of EFI object + * + * In UnloadImage we must be able to identify if the handle relates to a + * started image. + */ +enum efi_object_type { + EFI_OBJECT_TYPE_UNDEFINED = 0, + EFI_OBJECT_TYPE_U_BOOT_FIRMWARE, + EFI_OBJECT_TYPE_LOADED_IMAGE, + EFI_OBJECT_TYPE_STARTED_IMAGE, +}; + +/** * struct efi_object - dereferenced EFI handle * * @link: pointers to put the handle into a linked list @@ -201,6 +214,7 @@ struct efi_object { struct list_head link; /* The list of protocols */ struct list_head protocols; + enum efi_object_type type; }; /** @@ -221,6 +235,7 @@ struct efi_loaded_image_obj { struct jmp_buf_data exit_jmp; EFIAPI efi_status_t (*entry)(efi_handle_t image_handle, struct efi_system_table *st); + u16 image_type; }; /** @@ -257,6 +272,25 @@ extern struct list_head efi_obj_list; /* List of all events */ extern struct list_head efi_events; +/** + * efi_register_notify_event - event registered by RegisterProtocolNotify() + * + * The address of this structure serves as registration value. + * + * @link: link to list of all registered events + * @event: registered event. The same event may registered for + * multiple GUIDs. + * @protocol: protocol for which the event is registered + */ +struct efi_register_notify_event { + struct list_head link; + struct efi_event *event; + efi_guid_t protocol; +}; + +/* List of all events registered by RegisterProtocolNotify() */ +extern struct list_head efi_register_notify_events; + /* Initialize efi execution environment */ efi_status_t efi_init_obj_list(void); /* Called by bootefi to initialize root node */ diff --git a/include/efi_selftest.h b/include/efi_selftest.h index dd42e49023..eaee188de7 100644 --- a/include/efi_selftest.h +++ b/include/efi_selftest.h @@ -93,17 +93,6 @@ u16 *efi_st_translate_char(u16 code); u16 *efi_st_translate_code(u16 code); /* - * Compare memory. - * We cannot use lib/string.c due to different CFLAGS values. - * - * @buf1: first buffer - * @buf2: second buffer - * @length: number of bytes to compare - * @return: 0 if both buffers contain the same bytes - */ -int efi_st_memcmp(const void *buf1, const void *buf2, size_t length); - -/* * Compare an u16 string to a char string. * * @buf1: u16 string diff --git a/include/pch.h b/include/pch.h index 046a5fde3a..0b44b66df9 100644 --- a/include/pch.h +++ b/include/pch.h @@ -16,6 +16,9 @@ enum pch_req_t { /* Returns HDA config info if Azalia V1CTL enabled, -ENOENT if not */ PCH_REQ_HDA_CONFIG, + /* Fills out a struct pch_pmbase_info if available */ + PCH_REQ_PMBASE_INFO, + PCH_REQ_TEST1, /* Test requests for sandbox driver */ PCH_REQ_TEST2, PCH_REQ_TEST3, @@ -24,6 +27,21 @@ enum pch_req_t { }; /** + * struct pch_pmbase_info - Information filled in by PCH_REQ_PMBASE_INFO + * + * @pmbase: IO address of power-management controller + * @gpio0_en_ofs: Offset of GPIO0 enable register + * @pm1_sts_ofs: Offset of status register + * @pm1_cnt_ofs: Offset of control register + */ +struct pch_pmbase_info { + u16 base; + u8 gpio0_en_ofs; + u8 pm1_sts_ofs; + u8 pm1_cnt_ofs; +}; + +/** * struct pch_ops - Operations for the Platform Controller Hub * * Consider using ioctl() to add rarely used or driver-specific operations. diff --git a/include/pci.h b/include/pci.h index 066238a9c3..508f7bca81 100644 --- a/include/pci.h +++ b/include/pci.h @@ -546,11 +546,7 @@ extern void pci_cfgfunc_do_nothing(struct pci_controller* hose, pci_dev_t dev, extern void pci_cfgfunc_config_device(struct pci_controller* hose, pci_dev_t dev, struct pci_config_table *); -#ifdef CONFIG_NR_DRAM_BANKS -#define MAX_PCI_REGIONS (CONFIG_NR_DRAM_BANKS + 7) -#else -#define MAX_PCI_REGIONS 7 -#endif +#define MAX_PCI_REGIONS 7 #define INDIRECT_TYPE_NO_PCIE_LINK 1 diff --git a/include/reset.h b/include/reset.h index a1a9ad5603..4fac4e6a20 100644 --- a/include/reset.h +++ b/include/reset.h @@ -6,6 +6,7 @@ #ifndef _RESET_H #define _RESET_H +#include <dm/ofnode.h> #include <linux/errno.h> /** @@ -103,6 +104,21 @@ int reset_get_by_index(struct udevice *dev, int index, struct reset_ctl *reset_ctl); /** + * reset_get_by_index_nodev - Get/request a reset signal by integer index + * without a device. + * + * This is a version of reset_get_by_index() that does not use a device. + * + * @node: The client ofnode. + * @index: The index of the reset signal to request, within the client's + * list of reset signals. + * @reset_ctl A pointer to a reset control struct to initialize. + * @return 0 if OK, or a negative error code. + */ +int reset_get_by_index_nodev(ofnode node, int index, + struct reset_ctl *reset_ctl); + +/** * reset_get_bulk - Get/request all reset signals of a device. * * This looks up and requests all reset signals of the client device; each |