iPXE
|
Marvell AQtion family network card driver, hardware-specific functions. More...
#include <errno.h>
#include <stdio.h>
#include <unistd.h>
#include <byteswap.h>
#include <ipxe/pci.h>
#include "aqc1xx.h"
#include "atl2_hw.h"
Go to the source code of this file.
Functions | |
FILE_LICENCE (BSD2) | |
static int | atl2_hw_boot_completed_ (struct atl_nic *nic) |
void | atl2_hw_read_shared_in_ (struct atl_nic *nic, uint32_t offset, uint32_t *data, uint32_t len) |
void | atl2_hw_write_shared_in_ (struct atl_nic *nic, uint32_t offset, uint32_t *data, uint32_t len) |
int | atl2_hw_finish_ack_ (struct atl_nic *nic, uint32_t ms) |
int | atl2_hw_fw_init_ (struct atl_nic *nic) |
int | atl2_hw_reset (struct atl_nic *nic) |
int | atl2_hw_start (struct atl_nic *nic) |
int | atl2_hw_stop (struct atl_nic *nic) |
int | atl2_hw_get_link (struct atl_nic *nic) |
int | atl2_hw_get_mac (struct atl_nic *nic, uint8_t *mac) |
Variables | |
struct atl_hw_ops | atl2_hw |
Marvell AQtion family network card driver, hardware-specific functions.
Copyright(C) 2017-2024 Marvell
SPDX-License-Identifier: BSD-2-Clause
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file atl2_hw.c.
FILE_LICENCE | ( | BSD2 | ) |
|
static |
Definition at line 42 of file atl2_hw.c.
References ATL2_FW_HOST_INTERRUPT_REQUEST_READY, ATL2_GLB_RST_CTRL2, ATL2_HOST_ITR_REQ, ATL2_RESET_STATUS_BOOT_COMPLETED_MASK, and ATL_READ_REG.
Referenced by atl2_hw_reset().
void atl2_hw_read_shared_in_ | ( | struct atl_nic * | nic, |
uint32_t | offset, | ||
uint32_t * | data, | ||
uint32_t | len | ||
) |
Definition at line 50 of file atl2_hw.c.
References ATL2_MIF_SHARED_BUF_IN, ATL_READ_REG, data, len, and offset.
Referenced by atl2_hw_fw_init_(), atl2_hw_get_mac(), atl2_hw_start(), and atl2_hw_stop().
void atl2_hw_write_shared_in_ | ( | struct atl_nic * | nic, |
uint32_t | offset, | ||
uint32_t * | data, | ||
uint32_t | len | ||
) |
Definition at line 60 of file atl2_hw.c.
References ATL2_MIF_SHARED_BUF_IN, ATL_WRITE_REG, data, len, and offset.
Referenced by atl2_hw_fw_init_(), atl2_hw_start(), and atl2_hw_stop().
Definition at line 70 of file atl2_hw.c.
References ATL2_DELAY_100, ATL2_HOST_FINISHED_WRITE, ATL2_MCP_BUSY_WRITE, ATL_READ_REG, ATL_WRITE_REG, ETIME, and udelay().
Referenced by atl2_hw_fw_init_(), atl2_hw_start(), and atl2_hw_stop().
int atl2_hw_fw_init_ | ( | struct atl_nic * | nic | ) |
Definition at line 91 of file atl2_hw.c.
References ATL2_HOST_MODE_ACTIVE, atl2_hw_finish_ack_(), atl2_hw_read_shared_in_(), atl2_hw_write_shared_in_(), ATL2_LINK_CTRL_IN_OFF, ATL2_LINK_OPTS_IN_OFF, ATL2_MTU_IN_OFF, and val.
Referenced by atl2_hw_reset().
int atl2_hw_reset | ( | struct atl_nic * | nic | ) |
Definition at line 111 of file atl2_hw.c.
References ATL2_DELAY_10, ATL2_FW_HOST_INTERRUPT_REQUEST_READY, ATL2_GLB_RST_CTRL2, ATL2_HOST_ITR_REQ, atl2_hw_boot_completed_(), atl2_hw_fw_init_(), ATL2_RESET_STATUS_BC_STARTED, ATL2_RESET_STATUS_BOOT_FAILED_MASK, ATL2_RESET_STATUS_REQ_GSR, ATL_READ_REG, ATL_WRITE_REG, DBGC, EIO, ENOTSUP, ETIME, request, status, and udelay().
int atl2_hw_start | ( | struct atl_nic * | nic | ) |
Definition at line 181 of file atl2_hw.c.
References atl2_hw_finish_ack_(), atl2_hw_read_shared_in_(), atl2_hw_write_shared_in_(), ATL2_LINK_OPTS_IN_OFF, and val.
int atl2_hw_stop | ( | struct atl_nic * | nic | ) |
Definition at line 191 of file atl2_hw.c.
References atl2_hw_finish_ack_(), atl2_hw_read_shared_in_(), atl2_hw_write_shared_in_(), ATL2_LINK_OPTS_IN_OFF, and val.
int atl2_hw_get_link | ( | struct atl_nic * | nic | ) |
Definition at line 201 of file atl2_hw.c.
References ATL2_LINK_STS_OUT_OFF, ATL2_MIF_SHARED_BUF_OUT, ATL_READ_REG, and val.
Definition at line 209 of file atl2_hw.c.
References atl2_hw_read_shared_in_(), ATL2_MAC_ADDR_IN_OFF, mac, and memcpy().
struct atl_hw_ops atl2_hw |
Definition at line 219 of file atl2_hw.c.
Referenced by atl_probe().