Debian Codegraph @

src/vendorcode/amd/opensil/genoa_poc/mpio/chip.h

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #ifndef OPENSIL_GENOA_POC_MPIO_CHIP_H
4 #define OPENSIL_GENOA_POC_MPIO_CHIP_H
5
6 #include <stdint.h>
7
8 /*
9 * GENOA MPIO mapping
10 * P0 -> [0-15]
11 * G0 -> [16-31]
12 * P1 -> [32-47]
13 * G1 -> [48-63]
14 * P2 -> [64-79]
15 * G2 -> [80-95]
16 * P3 -> [96-111]
17 * G3 -> [112-127]
18 * P4 -> [128-131]
19 * P5 -> [132-136]
20 */
21
22 enum mpio_type {
23 IFTYPE_UNUSED,
24 IFTYPE_PCIE,
25 IFTYPE_SATA,
26 };
27
28 /* Sync with PCIE_HOTPLUG_TYPE */
29 enum mpio_hotplug {
30 HotplugDisabled, ///< Hotplug disable
31 Basic, ///< Basic Hotplug
32 ServerExpress, ///< Server Hotplug Express Module
33 Enhanced, ///< Enhanced
34 Inboard, ///< Inboard
35 ServerEntSSD, ///< Server Hotplug Enterprise SSD
36 UBM, ///< UBM Backplane
37 OCP, ///< OCP NIC 3.0
38 };
39
40 enum pcie_link_speed {
41 MaxSupported,
42 Gen1,
43 Gen2,
44 Gen3,
45 Gen4,
46 Gen5,
47 };
48
49 /* Sync with PCIE_ASPM_TYPE */
50 enum pcie_aspm {
51 aspm_disabled,
52 L0s,
53 L1,
54 L0sL1,
55 };
56
57 struct drivers_amd_opensil_mpio_config {
58 enum mpio_type type;
59 uint8_t start_lane;
60 uint8_t end_lane;
61 uint8_t gpio_group;
62 enum mpio_hotplug hotplug;
63 enum pcie_link_speed speed;
64 enum pcie_aspm aspm;
65 uint8_t aspm_l1_1 : 1;
66 uint8_t aspm_l1_2 : 1;
67 uint8_t clock_pm : 1;
68 uint8_t bmc : 1;
69 };
70
71 #endif /* OPENSIL_GENOA_POC_MPIO_CHIP_H */