iPXE
atl2_hw.h
Go to the documentation of this file.
1/*
2 * Copyright(C) 2017-2024 Marvell
3 *
4 * SPDX-License-Identifier: BSD-2-Clause
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8
9 * 1. Redistributions of source code must retain the above copyright notice,
10 * this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright notice,
12 * this list of conditions and the following disclaimer in the documentation
13 * and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS
16 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17 * TO,THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR HOLDER OR
19 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
24 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
25 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
27 */
28
29#ifndef __ATL2_HW_H
30#define __ATL2_HW_H
31
32FILE_LICENCE ( BSD2 );
33
34#define ATL2_GLB_RST_CTRL2 0x3040
35#define ATL2_HOST_FINISHED_WRITE 0xE00
36#define ATL2_MCP_BUSY_WRITE 0xE04
37#define ATL2_HOST_ITR_REQ 0xF00
38
39
40#define ATL2_RESET_STATUS_REQ_GSR ( 1U << 0x0 )
41#define ATL2_RESET_STATUS_REQ_HOST_BOOT ( 1U << 0x8 )
42#define ATL2_RESET_STATUS_REQ_MAC_FAST_BOOT ( 1U << 0xA )
43#define ATL2_RESET_STATUS_REQ_PHY_FAST_BOOT ( 1U << 0xB )
44
45#define ATL2_RESET_STATUS_HOST_LOAD_COMPLETED ( 1U << 0x10 )
46#define ATL2_RESET_STATUS_REQUIRE_HOST_LOAD ( 1U << 0x11 )
47#define ATL2_RESET_STATUS_BC_STARTED ( 1U << 0x18 )
48#define ATL2_RESET_STATUS_CRASH_DURING_INIT ( 1U << 0x1B )
49#define ATL2_RESET_STATUS_BC_FAILED ( 1U << 0x1C )
50#define ATL2_RESET_STATUS_FW_FAILED ( 1U << 0x1D )
51#define ATL2_RESET_STATUS_FW_SUCCEED ( 1U << 0x1F )
52
53#define ATL2_RESET_STATUS_BOOT_FAILED_MASK ( ATL2_RESET_STATUS_CRASH_DURING_INIT | ATL2_RESET_STATUS_BC_FAILED | ATL2_RESET_STATUS_FW_FAILED )
54#define ATL2_RESET_STATUS_BOOT_COMPLETED_MASK ( ATL2_RESET_STATUS_BOOT_FAILED_MASK | ATL2_RESET_STATUS_FW_SUCCEED )
55
56#define ATL2_FW_HOST_INTERRUPT_REQUEST_READY 0x0001
57#define ATL2_FW_HOST_INTERRUPT_MAC_READY 0x0004
58#define ATL2_FW_HOST_INTERRUPT_DATA_HANDLED 0x0100
59#define ATL2_FW_HOST_INTERRUPT_LINK_UP 0x0200
60#define ATL2_FW_HOST_INTERRUPT_LINK_DOWN 0x0400
61#define ATL2_FW_HOST_INTERRUPT_PHY_FAULT 0x0800
62#define ATL2_FW_HOST_INTERRUPT_MAC_FAULT 0x1000
63#define ATL2_FW_HOST_INTERRUPT_TEMPERATURE_WARNING 0x2000
64#define ATL2_FW_HOST_INTERRUPT_HEARTBEAT 0x4000
65
66#define ATL2_FW_LINK_RATE_INVALID 0
67#define ATL2_FW_LINK_RATE_10M 1
68#define ATL2_FW_LINK_RATE_100M 2
69#define ATL2_FW_LINK_RATE_1G 3
70#define ATL2_FW_LINK_RATE_2G5 4
71#define ATL2_FW_LINK_RATE_5G 5
72#define ATL2_FW_LINK_RATE_10G 6
73
74#define ATL2_HOST_MODE_INVALID 0U
75#define ATL2_HOST_MODE_ACTIVE 1U
76#define ATL2_HOST_MODE_SLEEP_PROXY 2U
77#define ATL2_HOST_MODE_LOW_POWER 3U
78#define ATL2_HOST_MODE_SHUTDOWN 4U
79
80#define ATL2_MIF_SHARED_BUF_IN 0x12000
81#define ATL2_MIF_SHARED_BUF_OUT 0x13000
82
83#define ATL2_MTU_IN_OFF 0x0
84#define ATL2_MAC_ADDR_IN_OFF 0x8
85#define ATL2_LINK_CTRL_IN_OFF 0x10
86#define ATL2_LINK_OPTS_IN_OFF 0x18
87
88#define ATL2_FW_OUT_OFF 0x8
89#define ATL2_LINK_STS_OUT_OFF 0x14
90
91#define ATL2_DELAY_10 10
92#define ATL2_DELAY_100 100
93
94#endif
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896