xref: /openbmc/linux/drivers/pci/pcie/Kconfig (revision a2818ee4)
1# SPDX-License-Identifier: GPL-2.0
2#
3# PCI Express Port Bus Configuration
4#
5config PCIEPORTBUS
6	bool "PCI Express Port Bus support"
7	depends on PCI
8	help
9	  This automatically enables PCI Express Port Bus support. Users can
10	  choose Native Hot-Plug support, Advanced Error Reporting support,
11	  Power Management Event support and Virtual Channel support to run
12	  on PCI Express Ports (Root or Switch).
13
14#
15# Include service Kconfig here
16#
17config HOTPLUG_PCI_PCIE
18	bool "PCI Express Hotplug driver"
19	depends on HOTPLUG_PCI && PCIEPORTBUS
20	help
21	  Say Y here if you have a motherboard that supports PCI Express Native
22	  Hotplug
23
24	  When in doubt, say N.
25
26config PCIEAER
27	bool "PCI Express Advanced Error Reporting support"
28	depends on PCIEPORTBUS
29	select RAS
30	default y
31	help
32	  This enables PCI Express Root Port Advanced Error Reporting
33	  (AER) driver support. Error reporting messages sent to Root
34	  Port will be handled by PCI Express AER driver.
35
36config PCIEAER_INJECT
37	tristate "PCI Express error injection support"
38	depends on PCIEAER
39	help
40	  This enables PCI Express Root Port Advanced Error Reporting
41	  (AER) software error injector.
42
43	  Debugging AER code is quite difficult because it is hard
44	  to trigger various real hardware errors. Software-based
45	  error injection can fake almost all kinds of errors with the
46	  help of a user space helper tool aer-inject, which can be
47	  gotten from:
48	     http://www.kernel.org/pub/linux/utils/pci/aer-inject/
49
50#
51# PCI Express ECRC
52#
53config PCIE_ECRC
54	bool "PCI Express ECRC settings control"
55	depends on PCIEAER
56	help
57	  Used to override firmware/bios settings for PCI Express ECRC
58	  (transaction layer end-to-end CRC checking).
59
60	  When in doubt, say N.
61
62#
63# PCI Express ASPM
64#
65config PCIEASPM
66	bool "PCI Express ASPM control" if EXPERT
67	depends on PCI && PCIEPORTBUS
68	default y
69	help
70	  This enables OS control over PCI Express ASPM (Active State
71	  Power Management) and Clock Power Management. ASPM supports
72	  state L0/L0s/L1.
73
74	  ASPM is initially set up by the firmware. With this option enabled,
75	  Linux can modify this state in order to disable ASPM on known-bad
76	  hardware or configurations and enable it when known-safe.
77
78	  ASPM can be disabled or enabled at runtime via
79	  /sys/module/pcie_aspm/parameters/policy
80
81	  When in doubt, say Y.
82
83config PCIEASPM_DEBUG
84	bool "Debug PCI Express ASPM"
85	depends on PCIEASPM
86	help
87	  This enables PCI Express ASPM debug support. It will add per-device
88	  interface to control ASPM.
89
90choice
91	prompt "Default ASPM policy"
92	default PCIEASPM_DEFAULT
93	depends on PCIEASPM
94
95config PCIEASPM_DEFAULT
96	bool "BIOS default"
97	depends on PCIEASPM
98	help
99	  Use the BIOS defaults for PCI Express ASPM.
100
101config PCIEASPM_POWERSAVE
102	bool "Powersave"
103	depends on PCIEASPM
104	help
105	  Enable PCI Express ASPM L0s and L1 where possible, even if the
106	  BIOS did not.
107
108config PCIEASPM_POWER_SUPERSAVE
109	bool "Power Supersave"
110	depends on PCIEASPM
111	help
112	  Same as PCIEASPM_POWERSAVE, except it also enables L1 substates where
113	  possible. This would result in higher power savings while staying in L1
114	  where the components support it.
115
116config PCIEASPM_PERFORMANCE
117	bool "Performance"
118	depends on PCIEASPM
119	help
120	  Disable PCI Express ASPM L0s and L1, even if the BIOS enabled them.
121endchoice
122
123config PCIE_PME
124	def_bool y
125	depends on PCIEPORTBUS && PM
126
127config PCIE_DPC
128	bool "PCI Express Downstream Port Containment support"
129	depends on PCIEPORTBUS && PCIEAER
130	help
131	  This enables PCI Express Downstream Port Containment (DPC)
132	  driver support.  DPC events from Root and Downstream ports
133	  will be handled by the DPC driver.  If your system doesn't
134	  have this capability or you do not want to use this feature,
135	  it is safe to answer N.
136
137config PCIE_PTM
138	bool "PCI Express Precision Time Measurement support"
139	depends on PCIEPORTBUS
140	help
141	  This enables PCI Express Precision Time Measurement (PTM)
142	  support.
143
144	  This is only useful if you have devices that support PTM, but it
145	  is safe to enable even if you don't.
146