diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/cache.h | 31 | ||||
-rw-r--r-- | include/configs/exynos5-common.h | 2 | ||||
-rw-r--r-- | include/configs/rpi.h | 4 | ||||
-rw-r--r-- | include/configs/sifive-fu540.h | 1 | ||||
-rw-r--r-- | include/efi_api.h | 4 | ||||
-rw-r--r-- | include/efi_loader.h | 4 | ||||
-rw-r--r-- | include/env_callback.h | 2 | ||||
-rw-r--r-- | include/env_flags.h | 2 | ||||
-rw-r--r-- | include/net.h | 2 | ||||
-rw-r--r-- | include/net/pcap.h | 55 | ||||
-rw-r--r-- | include/netdev.h | 3 |
11 files changed, 105 insertions, 5 deletions
diff --git a/include/cache.h b/include/cache.h index c6334ca27f..32f59fd8f7 100644 --- a/include/cache.h +++ b/include/cache.h @@ -22,6 +22,22 @@ struct cache_ops { * @return 0 if OK, -ve on error */ int (*get_info)(struct udevice *dev, struct cache_info *info); + + /** + * enable() - Enable cache + * + * @dev: Device to check (UCLASS_CACHE) + * @return 0 if OK, -ve on error + */ + int (*enable)(struct udevice *dev); + + /** + * disable() - Flush and disable cache + * + * @dev: Device to check (UCLASS_CACHE) + * @return 0 if OK, -ve on error + */ + int (*disable)(struct udevice *dev); }; #define cache_get_ops(dev) ((struct cache_ops *)(dev)->driver->ops) @@ -35,4 +51,19 @@ struct cache_ops { */ int cache_get_info(struct udevice *dev, struct cache_info *info); +/** + * cache_enable() - Enable cache + * + * @dev: Device to check (UCLASS_CACHE) + * @return 0 if OK, -ve on error + */ +int cache_enable(struct udevice *dev); + +/** + * cache_disable() - Flush and disable cache + * + * @dev: Device to check (UCLASS_CACHE) + * @return 0 if OK, -ve on error + */ +int cache_disable(struct udevice *dev); #endif diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h index 397bbf6d9d..e0a4d76d53 100644 --- a/include/configs/exynos5-common.h +++ b/include/configs/exynos5-common.h @@ -128,9 +128,9 @@ #define EXYNOS_IRAM_SECONDARY_BASE 0x02020018 #define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 2) \ func(MMC, mmc, 1) \ func(MMC, mmc, 0) \ - func(MMC, mmc, 2) \ func(PXE, pxe, na) \ func(DHCP, dhcp, na) diff --git a/include/configs/rpi.h b/include/configs/rpi.h index 8473cecd94..77d2d5458a 100644 --- a/include/configs/rpi.h +++ b/include/configs/rpi.h @@ -55,6 +55,10 @@ #define CONFIG_SYS_MEMTEST_END 0x00200000 #define CONFIG_LOADADDR 0x00200000 +#ifdef CONFIG_ARM64 +#define CONFIG_SYS_BOOTM_LEN SZ_64M +#endif + /* Devices */ /* GPIO */ #define CONFIG_BCM2835_GPIO diff --git a/include/configs/sifive-fu540.h b/include/configs/sifive-fu540.h index 858b7a7da1..736ceb1f48 100644 --- a/include/configs/sifive-fu540.h +++ b/include/configs/sifive-fu540.h @@ -26,6 +26,7 @@ #define CONFIG_ENV_SIZE SZ_128K #define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 0) \ func(DHCP, dhcp, na) #include <config_distro_bootcmd.h> diff --git a/include/efi_api.h b/include/efi_api.h index 43778197af..cb895f31e5 100644 --- a/include/efi_api.h +++ b/include/efi_api.h @@ -483,7 +483,7 @@ struct efi_device_path_cdrom_path { struct efi_device_path dp; u32 boot_entry; u64 partition_start; - u64 partition_end; + u64 partition_size; } __packed; struct efi_device_path_file_path { @@ -1281,6 +1281,8 @@ struct efi_simple_network { struct efi_mac_address *dest_addr, u16 *protocol); struct efi_event *wait_for_packet; struct efi_simple_network_mode *mode; + /* private fields */ + u32 int_status; }; #define EFI_PXE_BASE_CODE_PROTOCOL_GUID \ diff --git a/include/efi_loader.h b/include/efi_loader.h index 5298ea7997..00eba8afa4 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -478,6 +478,10 @@ efi_status_t efi_get_memory_map(efi_uintn_t *memory_map_size, /* Adds a range into the EFI memory map */ efi_status_t efi_add_memory_map(uint64_t start, uint64_t pages, int memory_type, bool overlap_only_ram); +/* Adds a conventional range into the EFI memory map */ +efi_status_t efi_add_conventional_memory_map(u64 ram_start, u64 ram_end, + u64 ram_top); + /* Called by board init to initialize the EFI drivers */ efi_status_t efi_driver_init(void); /* Called by board init to initialize the EFI memory map */ diff --git a/include/env_callback.h b/include/env_callback.h index 982c07854d..74da20eec3 100644 --- a/include/env_callback.h +++ b/include/env_callback.h @@ -42,7 +42,7 @@ #define DNS_CALLBACK #endif -#ifdef CONFIG_CMD_NET +#ifdef CONFIG_NET #define NET_CALLBACKS \ "bootfile:bootfile," \ "ipaddr:ipaddr," \ diff --git a/include/env_flags.h b/include/env_flags.h index e5380f2948..725841a891 100644 --- a/include/env_flags.h +++ b/include/env_flags.h @@ -36,7 +36,7 @@ enum env_flags_varaccess { #define CONFIG_ENV_FLAGS_LIST_STATIC "" #endif -#ifdef CONFIG_CMD_NET +#ifdef CONFIG_NET #ifdef CONFIG_REGEX #define ETHADDR_WILDCARD "\\d*" #else diff --git a/include/net.h b/include/net.h index a54d5eeac5..75a16e4c8f 100644 --- a/include/net.h +++ b/include/net.h @@ -816,7 +816,7 @@ static inline int is_valid_ethaddr(const u8 *addr) static inline void net_random_ethaddr(uchar *addr) { int i; - unsigned int seed = get_timer(0); + unsigned int seed = get_ticks(); for (i = 0; i < 6; i++) addr[i] = rand_r(&seed); diff --git a/include/net/pcap.h b/include/net/pcap.h new file mode 100644 index 0000000000..512ba982f1 --- /dev/null +++ b/include/net/pcap.h @@ -0,0 +1,55 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright 2019 + * Ramon Fried <rfried.dev@gmail.com> + */ + +/** + * pcap_init() - Initialize PCAP memory buffer + * + * @paddr physicaly memory address to store buffer + * @size maximum size of capture file in memory + * + * @return 0 on success, -ERROR on error + */ +int pcap_init(phys_addr_t paddr, unsigned long size); + +/** + * pcap_start_stop() - start / stop pcap capture + * + * @start if true, start capture if false stop capture + * + * @return 0 on success, -ERROR on error + */ +int pcap_start_stop(bool start); + +/** + * pcap_clear() - clear pcap capture buffer and statistics + * + * @return 0 on success, -ERROR on error + */ +int pcap_clear(void); + +/** + * pcap_print_status() - print status of pcap capture + * + * @return 0 on success, -ERROR on error + */ +int pcap_print_status(void); + +/** + * pcap_active() - check if pcap is enabled + * + * @return TRUE if active, FALSE if not. + */ +bool pcap_active(void); + +/** + * pcap_post() - Post a packet to PCAP file + * + * @packet: packet to post + * @len: packet length in bytes + * @outgoing packet direction (outgoing/incoming) + * @return 0 on success, -ERROR on error + */ +int pcap_post(const void *packet, size_t len, bool outgoing); diff --git a/include/netdev.h b/include/netdev.h index a40c4adaad..68a3fceab6 100644 --- a/include/netdev.h +++ b/include/netdev.h @@ -10,6 +10,7 @@ #ifndef _NETDEV_H_ #define _NETDEV_H_ +#include <phy_interface.h> /* * Board and CPU-specific initialization functions @@ -21,6 +22,8 @@ */ int board_eth_init(bd_t *bis); +int board_interface_eth_init(struct udevice *dev, + phy_interface_t interface_type); int cpu_eth_init(bd_t *bis); /* Driver initialization prototypes */ |