iPXE
|
#include "../../include/public/mlx_pci_gw.h"
#include "../../include/public/mlx_bail.h"
#include "../../include/public/mlx_pci.h"
#include "../../include/public/mlx_logging.h"
Go to the source code of this file.
Functions | |
FILE_LICENCE (GPL2_OR_LATER) | |
static mlx_status | mlx_pci_gw_check_capability_id (IN mlx_utils *utils, IN mlx_uint8 cap_pointer, OUT mlx_boolean *bool) |
static mlx_status | mlx_pci_gw_get_ownership (IN mlx_utils *utils) |
static mlx_status | mlx_pci_gw_free_ownership (IN mlx_utils *utils) |
static mlx_status | mlx_pci_gw_set_space (IN mlx_utils *utils, IN mlx_pci_gw_space space) |
static mlx_status | mlx_pci_gw_wait_for_flag_value (IN mlx_utils *utils, IN mlx_boolean value) |
static mlx_status | mlx_pci_gw_search_capability (IN mlx_utils *utils, OUT mlx_uint32 *cap_offset) |
mlx_status | mlx_pci_gw_init (IN mlx_utils *utils) |
mlx_status | mlx_pci_gw_teardown (IN mlx_utils *utils) |
mlx_status | mlx_pci_gw_read (IN mlx_utils *utils, IN mlx_pci_gw_space space, IN mlx_uint32 address, OUT mlx_pci_gw_buffer *buffer) |
mlx_status | mlx_pci_gw_write (IN mlx_utils *utils, IN mlx_pci_gw_space space, IN mlx_uint32 address, IN mlx_pci_gw_buffer buffer) |
FILE_LICENCE | ( | GPL2_OR_LATER | ) |
|
static |
Definition at line 32 of file mlx_pci_gw.c.
References MLX_CHECK_STATUS, mlx_pci_read(), MLX_SUCCESS, MlxPciWidthUint8, offset, PCI_GW_CAPABILITY_ID, PCI_GW_CAPABILITY_ID_OFFSET, and status.
Referenced by mlx_pci_gw_search_capability().
|
static |
Definition at line 51 of file mlx_pci_gw.c.
References MLX_CHECK_STATUS, MLX_FAILED, mlx_pci_read(), mlx_pci_write(), MLX_SUCCESS, mlx_utils_delay_in_us(), MlxPciWidthUint32, PCI_GW_CAPABILITY_COUNTER_OFFSET, PCI_GW_CAPABILITY_SEMAPHORE_OFFSET, PCI_GW_GET_OWNERSHIP_TRIES, PCI_GW_SEMPHORE_TRIES, and status.
Referenced by mlx_pci_gw_init(), mlx_pci_gw_read(), and mlx_pci_gw_write().
|
static |
Definition at line 103 of file mlx_pci_gw.c.
References MLX_CHECK_STATUS, mlx_pci_write(), MLX_SUCCESS, MlxPciWidthUint32, PCI_GW_CAPABILITY_SEMAPHORE_OFFSET, status, and value.
Referenced by mlx_pci_gw_read(), mlx_pci_gw_teardown(), and mlx_pci_gw_write().
|
static |
Definition at line 120 of file mlx_pci_gw.c.
References MLX_CHECK_STATUS, MLX_FAILED, mlx_pci_read(), mlx_pci_write(), MLX_SUCCESS, MlxPciWidthUint16, MlxPciWidthUint8, PCI_GW_CAPABILITY_SPACE_OFFSET, PCI_GW_CAPABILITY_STATUS_OFFSET, and status.
Referenced by mlx_pci_gw_read(), and mlx_pci_gw_write().
|
static |
Definition at line 146 of file mlx_pci_gw.c.
References flag, MLX_CHECK_STATUS, MLX_FAILED, mlx_pci_read(), MLX_SUCCESS, mlx_utils_delay_in_us(), MlxPciWidthUint32, PCI_GW_CAPABILITY_FLAG_OFFSET, PCI_GW_READ_FLAG_TRIES, status, and value.
Referenced by mlx_pci_gw_read(), and mlx_pci_gw_write().
|
static |
Definition at line 171 of file mlx_pci_gw.c.
References FALSE, MLX_CHECK_STATUS, MLX_INVALID_PARAMETER, MLX_NOT_FOUND, mlx_pci_gw_check_capability_id(), mlx_pci_read(), MLX_SUCCESS, MlxPciWidthUint8, NULL, PCI_GW_CAPABILITY_NEXT_POINTER_OFFSET, PCI_GW_FIRST_CAPABILITY_POINTER_OFFSET, status, and TRUE.
Referenced by mlx_pci_gw_init().
mlx_status mlx_pci_gw_init | ( | IN mlx_utils * | utils | ) |
Definition at line 218 of file mlx_pci_gw.c.
References MLX_CHECK_STATUS, MLX_INVALID_PARAMETER, mlx_pci_gw_get_ownership(), mlx_pci_gw_search_capability(), MLX_SUCCESS, NULL, mlx_pci_gw::pci_cmd_offset, and status.
Referenced by flexboot_nodnic_is_supported(), and init_mlx_utils().
mlx_status mlx_pci_gw_teardown | ( | IN mlx_utils * | utils | ) |
Definition at line 247 of file mlx_pci_gw.c.
References mlx_pci_gw_free_ownership(), and MLX_SUCCESS.
Referenced by flexboot_nodnic_is_supported(), free_mlx_utils(), and init_mlx_utils().
mlx_status mlx_pci_gw_read | ( | IN mlx_utils * | utils, |
IN mlx_pci_gw_space | space, | ||
IN mlx_uint32 | address, | ||
OUT mlx_pci_gw_buffer * | buffer | ||
) |
Definition at line 258 of file mlx_pci_gw.c.
References address, buffer, MLX_CHECK_STATUS, MLX_INVALID_PARAMETER, mlx_pci_gw_free_ownership(), mlx_pci_gw_get_ownership(), mlx_pci_gw_set_space(), mlx_pci_gw_wait_for_flag_value(), mlx_pci_read(), mlx_pci_write(), MLX_SUCCESS, mlx_utils_acquire_lock(), mlx_utils_delay_in_us(), mlx_utils_release_lock(), MlxPciWidthUint32, NULL, mlx_pci_gw::pci_cmd_offset, PCI_GW_CAPABILITY_ADDRESS_OFFSET, PCI_GW_CAPABILITY_DATA_OFFSET, mlx_pci_gw::space, status, and TRUE.
Referenced by flexboot_nodnic_is_supported(), mlx_icmd_get_semaphore(), mlx_icmd_get_status(), mlx_icmd_go(), mlx_icmd_init(), mlx_icmd_read_buffer(), mlx_icmd_set_opcode(), and nodnic_cmd_read().
mlx_status mlx_pci_gw_write | ( | IN mlx_utils * | utils, |
IN mlx_pci_gw_space | space, | ||
IN mlx_uint32 | address, | ||
IN mlx_pci_gw_buffer | buffer | ||
) |
Definition at line 328 of file mlx_pci_gw.c.
References address, buffer, FALSE, MLX_CHECK_STATUS, MLX_INVALID_PARAMETER, mlx_pci_gw_free_ownership(), mlx_pci_gw_get_ownership(), mlx_pci_gw_set_space(), mlx_pci_gw_wait_for_flag_value(), mlx_pci_write(), MLX_SUCCESS, mlx_utils_acquire_lock(), mlx_utils_release_lock(), MlxPciWidthUint32, NULL, mlx_pci_gw::pci_cmd_offset, PCI_GW_CAPABILITY_ADDRESS_OFFSET, PCI_GW_CAPABILITY_DATA_OFFSET, PCI_GW_WRITE_FLAG, mlx_pci_gw::space, and status.
Referenced by mlx_icmd_clear_semaphore(), mlx_icmd_get_semaphore(), mlx_icmd_go(), mlx_icmd_set_opcode(), mlx_icmd_write_buffer(), and nodnic_cmd_write().