Angel Pons | f94ac9a | 2020-04-05 15:46:48 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 2 | |
| 3 | #include <console/console.h> |
Angel Pons | 9d733de | 2020-11-23 13:15:19 +0100 | [diff] [blame] | 4 | #include <cpu/intel/haswell/haswell.h> |
Angel Pons | af4bd56 | 2021-12-28 13:05:56 +0100 | [diff] [blame] | 5 | #include <delay.h> |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 6 | #include <device/device.h> |
| 7 | #include <device/pci.h> |
| 8 | #include <device/pciexp.h> |
| 9 | #include <device/pci_def.h> |
| 10 | #include <device/pci_ids.h> |
Patrick Rudolph | e56189c | 2018-04-18 10:11:59 +0200 | [diff] [blame] | 11 | #include <device/pci_ops.h> |
Julius Werner | 4ee4bd5 | 2014-10-20 13:46:39 -0700 | [diff] [blame] | 12 | #include <soc/lpc.h> |
Julius Werner | 4ee4bd5 | 2014-10-20 13:46:39 -0700 | [diff] [blame] | 13 | #include <soc/pch.h> |
| 14 | #include <soc/pci_devs.h> |
| 15 | #include <soc/rcba.h> |
Angel Pons | 3cc2c38 | 2020-10-23 20:38:23 +0200 | [diff] [blame] | 16 | #include <soc/intel/broadwell/pch/chip.h> |
Angel Pons | c423ce2 | 2021-04-19 16:13:31 +0200 | [diff] [blame] | 17 | #include <southbridge/intel/lynxpoint/iobp.h> |
Angel Pons | 733f03d | 2021-01-28 16:59:04 +0100 | [diff] [blame] | 18 | #include <southbridge/intel/lynxpoint/lp_gpio.h> |
Angel Pons | af4bd56 | 2021-12-28 13:05:56 +0100 | [diff] [blame] | 19 | #include <types.h> |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 20 | |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 21 | /* Low Power variant has 6 root ports. */ |
Angel Pons | 2ead363 | 2020-09-24 16:50:05 +0200 | [diff] [blame] | 22 | #define MAX_NUM_ROOT_PORTS 6 |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 23 | |
| 24 | struct root_port_config { |
| 25 | /* RPFN is a write-once register so keep a copy until it is written */ |
| 26 | u32 orig_rpfn; |
| 27 | u32 new_rpfn; |
| 28 | u32 pin_ownership; |
| 29 | u32 strpfusecfg1; |
| 30 | u32 strpfusecfg2; |
| 31 | u32 strpfusecfg3; |
| 32 | u32 b0d28f0_32c; |
| 33 | u32 b0d28f4_32c; |
| 34 | u32 b0d28f5_32c; |
Angel Pons | af4bd56 | 2021-12-28 13:05:56 +0100 | [diff] [blame] | 35 | bool coalesce; |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 36 | int gbe_port; |
| 37 | int num_ports; |
Angel Pons | 2ead363 | 2020-09-24 16:50:05 +0200 | [diff] [blame] | 38 | struct device *ports[MAX_NUM_ROOT_PORTS]; |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 39 | }; |
| 40 | |
| 41 | static struct root_port_config rpc; |
| 42 | |
Elyes HAOUAS | 040aff2 | 2018-05-27 16:30:36 +0200 | [diff] [blame] | 43 | static inline int root_port_is_first(struct device *dev) |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 44 | { |
| 45 | return PCI_FUNC(dev->path.pci.devfn) == 0; |
| 46 | } |
| 47 | |
Elyes HAOUAS | 040aff2 | 2018-05-27 16:30:36 +0200 | [diff] [blame] | 48 | static inline int root_port_is_last(struct device *dev) |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 49 | { |
| 50 | return PCI_FUNC(dev->path.pci.devfn) == (rpc.num_ports - 1); |
| 51 | } |
| 52 | |
| 53 | /* Root ports are numbered 1..N in the documentation. */ |
Elyes HAOUAS | 040aff2 | 2018-05-27 16:30:36 +0200 | [diff] [blame] | 54 | static inline int root_port_number(struct device *dev) |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 55 | { |
| 56 | return PCI_FUNC(dev->path.pci.devfn) + 1; |
| 57 | } |
| 58 | |
| 59 | static void root_port_config_update_gbe_port(void) |
| 60 | { |
| 61 | /* Is the Gbe Port enabled? */ |
| 62 | if (!((rpc.strpfusecfg1 >> 19) & 1)) |
| 63 | return; |
| 64 | |
| 65 | switch ((rpc.strpfusecfg1 >> 16) & 0x7) { |
| 66 | case 0: |
| 67 | rpc.gbe_port = 3; |
| 68 | break; |
| 69 | case 1: |
| 70 | rpc.gbe_port = 4; |
| 71 | break; |
| 72 | case 2: |
| 73 | case 3: |
| 74 | case 4: |
| 75 | case 5: |
| 76 | /* Lanes 0-4 of Root Port 5. */ |
| 77 | rpc.gbe_port = 5; |
| 78 | break; |
| 79 | default: |
| 80 | printk(BIOS_DEBUG, "Invalid GbE Port Selection.\n"); |
| 81 | } |
| 82 | } |
| 83 | |
Elyes HAOUAS | 040aff2 | 2018-05-27 16:30:36 +0200 | [diff] [blame] | 84 | static void pcie_iosf_port_grant_count(struct device *dev) |
Kenji Chen | 87d4a20 | 2014-09-24 01:18:26 +0800 | [diff] [blame] | 85 | { |
| 86 | u8 update_val; |
Patrick Georgi | e8f2ef5 | 2016-07-29 18:53:34 +0200 | [diff] [blame] | 87 | u32 rpcd = (pci_read_config32(dev, 0xfc) >> 14) & 0x3; |
Kenji Chen | 87d4a20 | 2014-09-24 01:18:26 +0800 | [diff] [blame] | 88 | |
| 89 | switch (rpcd) { |
| 90 | case 1: |
| 91 | case 3: |
| 92 | update_val = 0x02; |
| 93 | break; |
| 94 | case 2: |
| 95 | update_val = 0x22; |
| 96 | break; |
| 97 | default: |
| 98 | update_val = 0x00; |
| 99 | break; |
| 100 | } |
| 101 | |
| 102 | RCBA32(0x103C) = (RCBA32(0x103C) & (~0xff)) | update_val; |
| 103 | } |
| 104 | |
Elyes HAOUAS | 040aff2 | 2018-05-27 16:30:36 +0200 | [diff] [blame] | 105 | static void root_port_init_config(struct device *dev) |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 106 | { |
| 107 | int rp; |
Martin Roth | 2b2ff7f | 2015-12-18 10:46:59 -0700 | [diff] [blame] | 108 | u32 data = 0; |
Kenji Chen | e383feb | 2014-09-26 03:14:57 +0800 | [diff] [blame] | 109 | u8 resp, id; |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 110 | |
| 111 | if (root_port_is_first(dev)) { |
| 112 | rpc.orig_rpfn = RCBA32(RPFN); |
| 113 | rpc.new_rpfn = rpc.orig_rpfn; |
Angel Pons | 2ead363 | 2020-09-24 16:50:05 +0200 | [diff] [blame] | 114 | rpc.num_ports = MAX_NUM_ROOT_PORTS; |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 115 | rpc.gbe_port = -1; |
Kenji Chen | 87d4a20 | 2014-09-24 01:18:26 +0800 | [diff] [blame] | 116 | /* RP0 f5[3:0] = 0101b*/ |
Kyösti Mälkki | 48c389e | 2013-07-26 08:53:59 +0300 | [diff] [blame] | 117 | pci_update_config8(dev, 0xf5, ~0xa, 0x5); |
Kenji Chen | 87d4a20 | 2014-09-24 01:18:26 +0800 | [diff] [blame] | 118 | |
| 119 | pcie_iosf_port_grant_count(dev); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 120 | |
| 121 | rpc.pin_ownership = pci_read_config32(dev, 0x410); |
| 122 | root_port_config_update_gbe_port(); |
| 123 | |
Angel Pons | 6b486e1 | 2020-10-28 14:16:06 +0100 | [diff] [blame] | 124 | pci_or_config8(dev, 0xe2, 3 << 4); |
Angel Pons | 3cc2c38 | 2020-10-23 20:38:23 +0200 | [diff] [blame] | 125 | const struct soc_intel_broadwell_pch_config *config = config_of(dev); |
Kyösti Mälkki | 8950cfb | 2019-07-13 22:16:25 +0300 | [diff] [blame] | 126 | rpc.coalesce = config->pcie_port_coalesce; |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 127 | } |
| 128 | |
| 129 | rp = root_port_number(dev); |
| 130 | if (rp > rpc.num_ports) { |
| 131 | printk(BIOS_ERR, "Found Root Port %d, expecting %d\n", |
| 132 | rp, rpc.num_ports); |
| 133 | return; |
| 134 | } |
| 135 | |
| 136 | /* Read the fuse configuration and pin ownership. */ |
| 137 | switch (rp) { |
| 138 | case 1: |
| 139 | rpc.strpfusecfg1 = pci_read_config32(dev, 0xfc); |
| 140 | rpc.b0d28f0_32c = pci_read_config32(dev, 0x32c); |
| 141 | break; |
| 142 | case 5: |
| 143 | rpc.strpfusecfg2 = pci_read_config32(dev, 0xfc); |
| 144 | rpc.b0d28f4_32c = pci_read_config32(dev, 0x32c); |
| 145 | break; |
| 146 | case 6: |
| 147 | rpc.b0d28f5_32c = pci_read_config32(dev, 0x32c); |
| 148 | rpc.strpfusecfg3 = pci_read_config32(dev, 0xfc); |
| 149 | break; |
| 150 | default: |
| 151 | break; |
| 152 | } |
| 153 | |
Angel Pons | 6b486e1 | 2020-10-28 14:16:06 +0100 | [diff] [blame] | 154 | pci_write_config32(dev, 0x418, 0x02000430); |
Kenji Chen | e383feb | 2014-09-26 03:14:57 +0800 | [diff] [blame] | 155 | |
Kenji Chen | e383feb | 2014-09-26 03:14:57 +0800 | [diff] [blame] | 156 | if (root_port_is_first(dev)) { |
Kenji Chen | e8f3664 | 2014-10-04 02:59:06 +0800 | [diff] [blame] | 157 | /* |
| 158 | * set RP0 PCICFG E2h[5:4] = 11b and E1h[6] = 1 |
| 159 | * before configuring ASPM |
| 160 | */ |
Kenji Chen | e383feb | 2014-09-26 03:14:57 +0800 | [diff] [blame] | 161 | id = 0xe0 + (u8)(RCBA32(RPFN) & 0x07); |
| 162 | pch_iobp_exec(0xE00000E0, IOBP_PCICFG_READ, id, &data, &resp); |
Kenji Chen | e8f3664 | 2014-10-04 02:59:06 +0800 | [diff] [blame] | 163 | data |= ((0x30 << 16) | (0x40 << 8)); |
Kenji Chen | e383feb | 2014-09-26 03:14:57 +0800 | [diff] [blame] | 164 | pch_iobp_exec(0xE00000E0, IOBP_PCICFG_WRITE, id, &data, &resp); |
| 165 | } |
| 166 | |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 167 | /* Cache pci device. */ |
| 168 | rpc.ports[rp - 1] = dev; |
| 169 | } |
| 170 | |
| 171 | /* Update devicetree with new Root Port function number assignment */ |
| 172 | static void pch_pcie_device_set_func(int index, int pci_func) |
| 173 | { |
Elyes HAOUAS | 040aff2 | 2018-05-27 16:30:36 +0200 | [diff] [blame] | 174 | struct device *dev; |
Lee Leahy | 23602df | 2017-03-16 19:00:37 -0700 | [diff] [blame] | 175 | unsigned int new_devfn; |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 176 | |
| 177 | dev = rpc.ports[index]; |
| 178 | |
| 179 | /* Set the new PCI function field for this Root Port. */ |
| 180 | rpc.new_rpfn &= ~RPFN_FNMASK(index); |
| 181 | rpc.new_rpfn |= RPFN_FNSET(index, pci_func); |
| 182 | |
| 183 | /* Determine the new devfn for this port */ |
| 184 | new_devfn = PCI_DEVFN(PCH_DEV_SLOT_PCIE, pci_func); |
| 185 | |
Angel Pons | d5689dd | 2020-09-25 00:32:44 +0200 | [diff] [blame] | 186 | if (dev && dev->path.pci.devfn != new_devfn) { |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 187 | printk(BIOS_DEBUG, |
| 188 | "PCH: PCIe map %02x.%1x -> %02x.%1x\n", |
| 189 | PCI_SLOT(dev->path.pci.devfn), |
| 190 | PCI_FUNC(dev->path.pci.devfn), |
| 191 | PCI_SLOT(new_devfn), PCI_FUNC(new_devfn)); |
| 192 | |
| 193 | dev->path.pci.devfn = new_devfn; |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | static void pcie_enable_clock_gating(void) |
| 198 | { |
| 199 | int i; |
| 200 | int enabled_ports = 0; |
Kane Chen | 4fef5a2 | 2014-08-27 15:21:32 -0700 | [diff] [blame] | 201 | int is_broadwell = !!(cpu_family_model() == BROADWELL_FAMILY_ULT); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 202 | |
| 203 | for (i = 0; i < rpc.num_ports; i++) { |
Elyes HAOUAS | 040aff2 | 2018-05-27 16:30:36 +0200 | [diff] [blame] | 204 | struct device *dev; |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 205 | int rp; |
| 206 | |
| 207 | dev = rpc.ports[i]; |
Angel Pons | d5689dd | 2020-09-25 00:32:44 +0200 | [diff] [blame] | 208 | if (!dev) |
| 209 | continue; |
| 210 | |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 211 | rp = root_port_number(dev); |
| 212 | |
| 213 | if (!dev->enabled) { |
| 214 | /* Configure shared resource clock gating. */ |
| 215 | if (rp == 1 || rp == 5 || rp == 6) |
Angel Pons | 6b486e1 | 2020-10-28 14:16:06 +0100 | [diff] [blame] | 216 | pci_or_config8(dev, 0xe1, 0x3c); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 217 | |
Angel Pons | 6b486e1 | 2020-10-28 14:16:06 +0100 | [diff] [blame] | 218 | pci_or_config8(dev, 0xe2, 3 << 4); |
| 219 | pci_or_config32(dev, 0x420, 1 << 31); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 220 | |
| 221 | /* Per-Port CLKREQ# handling. */ |
| 222 | if (gpio_is_native(18 + rp - 1)) |
Angel Pons | 6b486e1 | 2020-10-28 14:16:06 +0100 | [diff] [blame] | 223 | pci_or_config32(dev, 0x420, 3 << 29); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 224 | |
| 225 | /* Enable static clock gating. */ |
| 226 | if (rp == 1 && !rpc.ports[1]->enabled && |
| 227 | !rpc.ports[2]->enabled && !rpc.ports[3]->enabled) { |
Angel Pons | 6b486e1 | 2020-10-28 14:16:06 +0100 | [diff] [blame] | 228 | pci_or_config8(dev, 0xe2, 1); |
| 229 | pci_or_config8(dev, 0xe1, 1 << 7); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 230 | } else if (rp == 5 || rp == 6) { |
Angel Pons | 6b486e1 | 2020-10-28 14:16:06 +0100 | [diff] [blame] | 231 | pci_or_config8(dev, 0xe2, 1); |
| 232 | pci_or_config8(dev, 0xe1, 1 << 7); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 233 | } |
| 234 | continue; |
| 235 | } |
| 236 | |
| 237 | enabled_ports++; |
| 238 | |
| 239 | /* Enable dynamic clock gating. */ |
Angel Pons | 6b486e1 | 2020-10-28 14:16:06 +0100 | [diff] [blame] | 240 | pci_or_config8(dev, 0xe1, 0x03); |
| 241 | pci_or_config8(dev, 0xe2, 1 << 6); |
Kyösti Mälkki | 48c389e | 2013-07-26 08:53:59 +0300 | [diff] [blame] | 242 | pci_update_config8(dev, 0xe8, ~(3 << 2), (2 << 2)); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 243 | |
| 244 | /* Update PECR1 register. */ |
Angel Pons | 6b486e1 | 2020-10-28 14:16:06 +0100 | [diff] [blame] | 245 | pci_or_config8(dev, 0xe8, 3); |
| 246 | |
Kane Chen | 4fef5a2 | 2014-08-27 15:21:32 -0700 | [diff] [blame] | 247 | if (is_broadwell) { |
Angel Pons | 6b486e1 | 2020-10-28 14:16:06 +0100 | [diff] [blame] | 248 | pci_or_config32(dev, 0x324, (1 << 5) | (1 << 14)); |
Kane Chen | 4fef5a2 | 2014-08-27 15:21:32 -0700 | [diff] [blame] | 249 | } else { |
Angel Pons | 6b486e1 | 2020-10-28 14:16:06 +0100 | [diff] [blame] | 250 | pci_or_config32(dev, 0x324, 1 << 5); |
Kane Chen | 4fef5a2 | 2014-08-27 15:21:32 -0700 | [diff] [blame] | 251 | } |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 252 | /* Per-Port CLKREQ# handling. */ |
| 253 | if (gpio_is_native(18 + rp - 1)) |
Kenji Chen | e8f3664 | 2014-10-04 02:59:06 +0800 | [diff] [blame] | 254 | /* |
| 255 | * In addition to D28Fx PCICFG 420h[30:29] = 11b, |
| 256 | * set 420h[17] = 0b and 420[0] = 1b for L1 SubState. |
| 257 | */ |
Angel Pons | 6b486e1 | 2020-10-28 14:16:06 +0100 | [diff] [blame] | 258 | pci_update_config32(dev, 0x420, ~(1 << 17), (3 << 29) | 1); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 259 | |
| 260 | /* Configure shared resource clock gating. */ |
| 261 | if (rp == 1 || rp == 5 || rp == 6) |
Angel Pons | 6b486e1 | 2020-10-28 14:16:06 +0100 | [diff] [blame] | 262 | pci_or_config8(dev, 0xe1, 0x3c); |
Duncan Laurie | 446fb8e | 2014-08-08 09:59:43 -0700 | [diff] [blame] | 263 | |
| 264 | /* CLKREQ# VR Idle Enable */ |
| 265 | RCBA32_OR(0x2b1c, (1 << (16 + i))); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 266 | } |
| 267 | |
| 268 | if (!enabled_ports) |
Angel Pons | 6b486e1 | 2020-10-28 14:16:06 +0100 | [diff] [blame] | 269 | pci_or_config8(rpc.ports[0], 0xe1, 1 << 6); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 270 | } |
| 271 | |
| 272 | static void root_port_commit_config(void) |
| 273 | { |
| 274 | int i; |
| 275 | |
| 276 | /* If the first root port is disabled the coalesce ports. */ |
| 277 | if (!rpc.ports[0]->enabled) |
Angel Pons | af4bd56 | 2021-12-28 13:05:56 +0100 | [diff] [blame] | 278 | rpc.coalesce = true; |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 279 | |
| 280 | /* Perform clock gating configuration. */ |
| 281 | pcie_enable_clock_gating(); |
| 282 | |
| 283 | for (i = 0; i < rpc.num_ports; i++) { |
Elyes HAOUAS | 040aff2 | 2018-05-27 16:30:36 +0200 | [diff] [blame] | 284 | struct device *dev; |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 285 | u32 reg32; |
Wenkai Du | 8306761 | 2014-12-05 14:00:26 -0800 | [diff] [blame] | 286 | int n = 0; |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 287 | |
| 288 | dev = rpc.ports[i]; |
| 289 | |
| 290 | if (dev == NULL) { |
| 291 | printk(BIOS_ERR, "Root Port %d device is NULL?\n", i+1); |
| 292 | continue; |
| 293 | } |
| 294 | |
| 295 | if (dev->enabled) |
| 296 | continue; |
| 297 | |
| 298 | printk(BIOS_DEBUG, "%s: Disabling device\n", dev_path(dev)); |
| 299 | |
Wenkai Du | 8306761 | 2014-12-05 14:00:26 -0800 | [diff] [blame] | 300 | /* 8.2 Configuration of PCI Express Root Ports */ |
Angel Pons | 6b486e1 | 2020-10-28 14:16:06 +0100 | [diff] [blame] | 301 | pci_or_config32(dev, 0x338, 1 << 26); |
Wenkai Du | 8306761 | 2014-12-05 14:00:26 -0800 | [diff] [blame] | 302 | |
| 303 | do { |
| 304 | reg32 = pci_read_config32(dev, 0x328); |
| 305 | n++; |
Duncan Laurie | cad2b7b | 2015-01-14 17:30:20 -0800 | [diff] [blame] | 306 | if (((reg32 & 0xff000000) == 0x01000000) || (n > 50)) |
Wenkai Du | 8306761 | 2014-12-05 14:00:26 -0800 | [diff] [blame] | 307 | break; |
| 308 | udelay(100); |
| 309 | } while (1); |
| 310 | |
Duncan Laurie | cad2b7b | 2015-01-14 17:30:20 -0800 | [diff] [blame] | 311 | if (n > 50) |
Wenkai Du | 8306761 | 2014-12-05 14:00:26 -0800 | [diff] [blame] | 312 | printk(BIOS_DEBUG, "%s: Timeout waiting for 328h\n", |
| 313 | dev_path(dev)); |
| 314 | |
Angel Pons | 6b486e1 | 2020-10-28 14:16:06 +0100 | [diff] [blame] | 315 | pci_or_config32(dev, 0x408, 1 << 27); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 316 | |
| 317 | /* Disable this device if possible */ |
| 318 | pch_disable_devfn(dev); |
| 319 | } |
| 320 | |
| 321 | if (rpc.coalesce) { |
| 322 | int current_func; |
| 323 | |
| 324 | /* For all Root Ports N enabled ports get assigned the lower |
| 325 | * PCI function number. The disabled ones get upper PCI |
| 326 | * function numbers. */ |
| 327 | current_func = 0; |
| 328 | for (i = 0; i < rpc.num_ports; i++) { |
| 329 | if (!rpc.ports[i]->enabled) |
| 330 | continue; |
| 331 | pch_pcie_device_set_func(i, current_func); |
| 332 | current_func++; |
| 333 | } |
| 334 | |
| 335 | /* Allocate the disabled devices' PCI function number. */ |
| 336 | for (i = 0; i < rpc.num_ports; i++) { |
| 337 | if (rpc.ports[i]->enabled) |
| 338 | continue; |
| 339 | pch_pcie_device_set_func(i, current_func); |
| 340 | current_func++; |
| 341 | } |
| 342 | } |
| 343 | |
| 344 | printk(BIOS_SPEW, "PCH: RPFN 0x%08x -> 0x%08x\n", |
| 345 | rpc.orig_rpfn, rpc.new_rpfn); |
| 346 | RCBA32(RPFN) = rpc.new_rpfn; |
| 347 | } |
| 348 | |
Elyes HAOUAS | 040aff2 | 2018-05-27 16:30:36 +0200 | [diff] [blame] | 349 | static void root_port_mark_disable(struct device *dev) |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 350 | { |
| 351 | /* Mark device as disabled. */ |
| 352 | dev->enabled = 0; |
| 353 | /* Mark device to be hidden. */ |
| 354 | rpc.new_rpfn |= RPFN_HIDE(PCI_FUNC(dev->path.pci.devfn)); |
| 355 | } |
| 356 | |
Elyes HAOUAS | 040aff2 | 2018-05-27 16:30:36 +0200 | [diff] [blame] | 357 | static void root_port_check_disable(struct device *dev) |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 358 | { |
| 359 | int rp; |
| 360 | |
| 361 | /* Device already disabled. */ |
| 362 | if (!dev->enabled) { |
| 363 | root_port_mark_disable(dev); |
| 364 | return; |
| 365 | } |
| 366 | |
| 367 | rp = root_port_number(dev); |
| 368 | |
| 369 | /* Is the GbE port mapped to this Root Port? */ |
| 370 | if (rp == rpc.gbe_port) { |
| 371 | root_port_mark_disable(dev); |
| 372 | return; |
| 373 | } |
| 374 | |
| 375 | /* Check Root Port Configuration. */ |
| 376 | switch (rp) { |
Lee Leahy | 6ef5192 | 2017-03-17 10:56:08 -0700 | [diff] [blame] | 377 | case 2: |
| 378 | /* Root Port 2 is disabled for all lane configurations |
| 379 | * but config 00b (4x1 links). */ |
| 380 | if ((rpc.strpfusecfg1 >> 14) & 0x3) { |
| 381 | root_port_mark_disable(dev); |
| 382 | return; |
| 383 | } |
| 384 | break; |
| 385 | case 3: |
| 386 | /* Root Port 3 is disabled in config 11b (1x4 links). */ |
| 387 | if (((rpc.strpfusecfg1 >> 14) & 0x3) == 0x3) { |
| 388 | root_port_mark_disable(dev); |
| 389 | return; |
| 390 | } |
| 391 | break; |
| 392 | case 4: |
| 393 | /* Root Port 4 is disabled in configs 11b (1x4 links) |
| 394 | * and 10b (2x2 links). */ |
| 395 | if ((rpc.strpfusecfg1 >> 14) & 0x2) { |
| 396 | root_port_mark_disable(dev); |
| 397 | return; |
| 398 | } |
| 399 | break; |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 400 | } |
| 401 | |
| 402 | /* Check Pin Ownership. */ |
| 403 | switch (rp) { |
| 404 | case 1: |
| 405 | /* Bit 0 is Root Port 1 ownership. */ |
| 406 | if ((rpc.pin_ownership & 0x1) == 0) { |
| 407 | root_port_mark_disable(dev); |
| 408 | return; |
| 409 | } |
| 410 | break; |
| 411 | case 2: |
| 412 | /* Bit 2 is Root Port 2 ownership. */ |
| 413 | if ((rpc.pin_ownership & 0x4) == 0) { |
| 414 | root_port_mark_disable(dev); |
| 415 | return; |
| 416 | } |
| 417 | break; |
| 418 | case 6: |
| 419 | /* Bits 7:4 are Root Port 6 pin-lane ownership. */ |
| 420 | if ((rpc.pin_ownership & 0xf0) == 0) { |
| 421 | root_port_mark_disable(dev); |
| 422 | return; |
| 423 | } |
| 424 | break; |
| 425 | } |
| 426 | } |
| 427 | |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 428 | static void pcie_add_0x0202000_iobp(u32 reg) |
| 429 | { |
| 430 | u32 reg32; |
| 431 | |
| 432 | reg32 = pch_iobp_read(reg); |
| 433 | reg32 += (0x2 << 16) | (0x2 << 8); |
| 434 | pch_iobp_write(reg, reg32); |
| 435 | } |
| 436 | |
| 437 | static void pch_pcie_early(struct device *dev) |
| 438 | { |
Angel Pons | 3cc2c38 | 2020-10-23 20:38:23 +0200 | [diff] [blame] | 439 | const struct soc_intel_broadwell_pch_config *config = config_of(dev); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 440 | int do_aspm = 0; |
| 441 | int rp = root_port_number(dev); |
| 442 | |
| 443 | switch (rp) { |
| 444 | case 1: |
| 445 | case 2: |
| 446 | case 3: |
| 447 | case 4: |
| 448 | /* |
Martin Roth | de7ed6f | 2014-12-07 14:58:18 -0700 | [diff] [blame] | 449 | * Bits 31:28 of b0d28f0 0x32c register correspond to |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 450 | * Root Ports 4:1. |
| 451 | */ |
| 452 | do_aspm = !!(rpc.b0d28f0_32c & (1 << (28 + rp - 1))); |
| 453 | break; |
| 454 | case 5: |
| 455 | /* |
Martin Roth | de7ed6f | 2014-12-07 14:58:18 -0700 | [diff] [blame] | 456 | * Bit 28 of b0d28f4 0x32c register correspond to |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 457 | * Root Ports 4:1. |
| 458 | */ |
| 459 | do_aspm = !!(rpc.b0d28f4_32c & (1 << 28)); |
| 460 | break; |
| 461 | case 6: |
| 462 | /* |
Martin Roth | de7ed6f | 2014-12-07 14:58:18 -0700 | [diff] [blame] | 463 | * Bit 28 of b0d28f5 0x32c register correspond to |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 464 | * Root Ports 4:1. |
| 465 | */ |
| 466 | do_aspm = !!(rpc.b0d28f5_32c & (1 << 28)); |
| 467 | break; |
| 468 | } |
| 469 | |
| 470 | /* Allow ASPM to be forced on in devicetree */ |
Kyösti Mälkki | 8950cfb | 2019-07-13 22:16:25 +0300 | [diff] [blame] | 471 | if ((config->pcie_port_force_aspm & (1 << (rp - 1)))) |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 472 | do_aspm = 1; |
| 473 | |
| 474 | printk(BIOS_DEBUG, "PCIe Root Port %d ASPM is %sabled\n", |
| 475 | rp, do_aspm ? "en" : "dis"); |
| 476 | |
| 477 | if (do_aspm) { |
| 478 | /* Set ASPM bits in MPC2 register. */ |
Angel Pons | 2ead363 | 2020-09-24 16:50:05 +0200 | [diff] [blame] | 479 | pci_update_config32(dev, 0xd4, ~(0x3 << 2), (1 << 4) | (0x2 << 2)); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 480 | |
| 481 | /* Set unique clock exit latency in MPC register. */ |
Kyösti Mälkki | 48c389e | 2013-07-26 08:53:59 +0300 | [diff] [blame] | 482 | pci_update_config32(dev, 0xd8, ~(0x7 << 18), (0x7 << 18)); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 483 | |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 484 | switch (rp) { |
| 485 | case 1: |
| 486 | pcie_add_0x0202000_iobp(0xe9002440); |
| 487 | break; |
| 488 | case 2: |
| 489 | pcie_add_0x0202000_iobp(0xe9002640); |
| 490 | break; |
| 491 | case 3: |
| 492 | pcie_add_0x0202000_iobp(0xe9000840); |
| 493 | break; |
| 494 | case 4: |
| 495 | pcie_add_0x0202000_iobp(0xe9000a40); |
| 496 | break; |
| 497 | case 5: |
| 498 | pcie_add_0x0202000_iobp(0xe9000c40); |
| 499 | pcie_add_0x0202000_iobp(0xe9000e40); |
| 500 | pcie_add_0x0202000_iobp(0xe9001040); |
| 501 | pcie_add_0x0202000_iobp(0xe9001240); |
| 502 | break; |
| 503 | case 6: |
| 504 | /* Update IOBP based on lane ownership. */ |
| 505 | if (rpc.pin_ownership & (1 << 4)) |
| 506 | pcie_add_0x0202000_iobp(0xea002040); |
| 507 | if (rpc.pin_ownership & (1 << 5)) |
| 508 | pcie_add_0x0202000_iobp(0xea002240); |
| 509 | if (rpc.pin_ownership & (1 << 6)) |
| 510 | pcie_add_0x0202000_iobp(0xea002440); |
| 511 | if (rpc.pin_ownership & (1 << 7)) |
| 512 | pcie_add_0x0202000_iobp(0xea002640); |
| 513 | break; |
| 514 | } |
| 515 | |
Kyösti Mälkki | 48c389e | 2013-07-26 08:53:59 +0300 | [diff] [blame] | 516 | pci_update_config32(dev, 0x338, ~(1 << 26), 0); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 517 | } |
| 518 | |
Kenji Chen | c373f50 | 2014-09-26 02:48:16 +0800 | [diff] [blame] | 519 | /* Enable LTR in Root Port. Disable OBFF. */ |
Angel Pons | c7ca0f2 | 2021-09-08 14:22:12 +0200 | [diff] [blame] | 520 | pci_update_config32(dev, 0x64, ~(3 << 18), (1 << 11)); |
| 521 | pci_or_config32(dev, 0x68, 1 << 10); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 522 | |
Kyösti Mälkki | 48c389e | 2013-07-26 08:53:59 +0300 | [diff] [blame] | 523 | pci_update_config32(dev, 0x318, ~(0xffff << 16), (0x1414 << 16)); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 524 | |
| 525 | /* Set L1 exit latency in LCAP register. */ |
| 526 | if (!do_aspm && (pci_read_config8(dev, 0xf5) & 0x1)) |
Kyösti Mälkki | 48c389e | 2013-07-26 08:53:59 +0300 | [diff] [blame] | 527 | pci_update_config32(dev, 0x4c, ~(0x7 << 15), (0x4 << 15)); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 528 | else |
Kyösti Mälkki | 48c389e | 2013-07-26 08:53:59 +0300 | [diff] [blame] | 529 | pci_update_config32(dev, 0x4c, ~(0x7 << 15), (0x2 << 15)); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 530 | |
Angel Pons | 2ead363 | 2020-09-24 16:50:05 +0200 | [diff] [blame] | 531 | pci_update_config32(dev, 0x314, 0, 0x743a361b); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 532 | |
| 533 | /* Set Common Clock Exit Latency in MPC register. */ |
Kyösti Mälkki | 48c389e | 2013-07-26 08:53:59 +0300 | [diff] [blame] | 534 | pci_update_config32(dev, 0xd8, ~(0x7 << 15), (0x3 << 15)); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 535 | |
Kyösti Mälkki | 48c389e | 2013-07-26 08:53:59 +0300 | [diff] [blame] | 536 | pci_update_config32(dev, 0x33c, ~0x00ffffff, 0x854d74); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 537 | |
Martin Roth | de7ed6f | 2014-12-07 14:58:18 -0700 | [diff] [blame] | 538 | /* Set Invalid Receive Range Check Enable in MPC register. */ |
Angel Pons | 6b486e1 | 2020-10-28 14:16:06 +0100 | [diff] [blame] | 539 | pci_or_config32(dev, 0xd8, 1 << 25); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 540 | |
Angel Pons | 6b486e1 | 2020-10-28 14:16:06 +0100 | [diff] [blame] | 541 | pci_and_config8(dev, 0xf5, 0x0f); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 542 | |
Kenji Chen | 94fea49 | 2014-09-30 14:17:35 +0800 | [diff] [blame] | 543 | /* Set AER Extended Cap ID to 01h and Next Cap Pointer to 200h. */ |
Julius Werner | cd49cce | 2019-03-05 16:53:33 -0800 | [diff] [blame] | 544 | if (CONFIG(PCIEXP_AER)) |
Angel Pons | 6b486e1 | 2020-10-28 14:16:06 +0100 | [diff] [blame] | 545 | pci_update_config32(dev, 0x100, ~0xfffff, (1 << 29) | 0x10001); |
Youness Alaoui | 7161678 | 2018-05-04 15:34:06 -0400 | [diff] [blame] | 546 | else |
Angel Pons | 6b486e1 | 2020-10-28 14:16:06 +0100 | [diff] [blame] | 547 | pci_update_config32(dev, 0x100, ~0xfffff, (1 << 29)); |
Kenji Chen | 8ef55ee | 2014-09-25 21:34:42 +0800 | [diff] [blame] | 548 | |
Kenji Chen | 94fea49 | 2014-09-30 14:17:35 +0800 | [diff] [blame] | 549 | /* Set L1 Sub-State Cap ID to 1Eh and Next Cap Pointer to None. */ |
Julius Werner | cd49cce | 2019-03-05 16:53:33 -0800 | [diff] [blame] | 550 | if (CONFIG(PCIEXP_L1_SUB_STATE)) |
Youness Alaoui | 1f64b01 | 2018-05-04 15:33:54 -0400 | [diff] [blame] | 551 | pci_update_config32(dev, 0x200, ~0xfffff, 0x001e); |
| 552 | else |
| 553 | pci_update_config32(dev, 0x200, ~0xfffff, 0); |
Kenji Chen | 94fea49 | 2014-09-30 14:17:35 +0800 | [diff] [blame] | 554 | |
Angel Pons | 6b486e1 | 2020-10-28 14:16:06 +0100 | [diff] [blame] | 555 | pci_update_config32(dev, 0x320, ~(3 << 20) & ~(7 << 6), (1 << 20) | (3 << 6)); |
| 556 | |
Kenji Chen | c373f50 | 2014-09-26 02:48:16 +0800 | [diff] [blame] | 557 | /* Enable Relaxed Order from Root Port. */ |
Angel Pons | 6b486e1 | 2020-10-28 14:16:06 +0100 | [diff] [blame] | 558 | pci_or_config32(dev, 0x320, 3 << 23); |
Kenji Chen | c373f50 | 2014-09-26 02:48:16 +0800 | [diff] [blame] | 559 | |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 560 | if (rp == 1 || rp == 5 || rp == 6) |
Kyösti Mälkki | 48c389e | 2013-07-26 08:53:59 +0300 | [diff] [blame] | 561 | pci_update_config8(dev, 0xf7, ~0xc, 0); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 562 | |
| 563 | /* Set EOI forwarding disable. */ |
Kyösti Mälkki | 48c389e | 2013-07-26 08:53:59 +0300 | [diff] [blame] | 564 | pci_update_config32(dev, 0xd4, ~0, (1 << 1)); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 565 | |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 566 | /* Read and write back write-once capability registers. */ |
Kyösti Mälkki | 48c389e | 2013-07-26 08:53:59 +0300 | [diff] [blame] | 567 | pci_update_config32(dev, 0x34, ~0, 0); |
| 568 | pci_update_config32(dev, 0x40, ~0, 0); |
| 569 | pci_update_config32(dev, 0x80, ~0, 0); |
| 570 | pci_update_config32(dev, 0x90, ~0, 0); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 571 | } |
| 572 | |
| 573 | static void pch_pcie_init(struct device *dev) |
| 574 | { |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 575 | printk(BIOS_DEBUG, "Initializing PCH PCIe bridge.\n"); |
| 576 | |
| 577 | /* Enable SERR */ |
Elyes HAOUAS | b887adf | 2020-04-29 10:42:34 +0200 | [diff] [blame] | 578 | pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_SERR); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 579 | |
| 580 | /* Enable Bus Master */ |
Elyes HAOUAS | b887adf | 2020-04-29 10:42:34 +0200 | [diff] [blame] | 581 | pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 582 | |
| 583 | /* Set Cache Line Size to 0x10 */ |
| 584 | pci_write_config8(dev, 0x0c, 0x10); |
| 585 | |
Angel Pons | 2ead363 | 2020-09-24 16:50:05 +0200 | [diff] [blame] | 586 | pci_and_config16(dev, PCI_BRIDGE_CONTROL, ~PCI_BRIDGE_CTL_PARITY); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 587 | |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 588 | /* Clear errors in status registers */ |
Angel Pons | 2ead363 | 2020-09-24 16:50:05 +0200 | [diff] [blame] | 589 | pci_update_config16(dev, 0x06, ~0, 0); |
| 590 | pci_update_config16(dev, 0x1e, ~0, 0); |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 591 | } |
| 592 | |
Elyes HAOUAS | 040aff2 | 2018-05-27 16:30:36 +0200 | [diff] [blame] | 593 | static void pch_pcie_enable(struct device *dev) |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 594 | { |
| 595 | /* Add this device to the root port config structure. */ |
| 596 | root_port_init_config(dev); |
| 597 | |
| 598 | /* Check to see if this Root Port should be disabled. */ |
| 599 | root_port_check_disable(dev); |
| 600 | |
| 601 | /* Power Management init before enumeration */ |
| 602 | if (dev->enabled) |
| 603 | pch_pcie_early(dev); |
| 604 | |
| 605 | /* |
| 606 | * When processing the last PCIe root port we can now |
| 607 | * update the Root Port Function Number and Hide register. |
| 608 | */ |
| 609 | if (root_port_is_last(dev)) |
| 610 | root_port_commit_config(); |
| 611 | } |
| 612 | |
Nico Huber | 968ef75 | 2021-03-07 01:39:18 +0100 | [diff] [blame] | 613 | static void pcie_get_ltr_max_latencies(u16 *max_snoop, u16 *max_nosnoop) |
Kenji Chen | b71d9b8 | 2014-10-10 03:08:15 +0800 | [diff] [blame] | 614 | { |
Nico Huber | 968ef75 | 2021-03-07 01:39:18 +0100 | [diff] [blame] | 615 | *max_snoop = PCIE_LTR_MAX_SNOOP_LATENCY_3146US; |
| 616 | *max_nosnoop = PCIE_LTR_MAX_NO_SNOOP_LATENCY_3146US; |
Kenji Chen | b71d9b8 | 2014-10-10 03:08:15 +0800 | [diff] [blame] | 617 | } |
| 618 | |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 619 | static struct pci_operations pcie_ops = { |
Subrata Banik | 15ccbf0 | 2019-03-20 15:09:44 +0530 | [diff] [blame] | 620 | .set_subsystem = pci_dev_set_subsystem, |
Nico Huber | 968ef75 | 2021-03-07 01:39:18 +0100 | [diff] [blame] | 621 | .get_ltr_max_latencies = pcie_get_ltr_max_latencies, |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 622 | }; |
| 623 | |
| 624 | static struct device_operations device_ops = { |
| 625 | .read_resources = pci_bus_read_resources, |
| 626 | .set_resources = pci_dev_set_resources, |
| 627 | .enable_resources = pci_bus_enable_resources, |
| 628 | .init = pch_pcie_init, |
| 629 | .enable = pch_pcie_enable, |
| 630 | .scan_bus = pciexp_scan_bridge, |
| 631 | .ops_pci = &pcie_ops, |
| 632 | }; |
| 633 | |
| 634 | static const unsigned short pcie_device_ids[] = { |
| 635 | /* Lynxpoint-LP */ |
| 636 | 0x9c10, 0x9c12, 0x9c14, 0x9c16, 0x9c18, 0x9c1a, |
| 637 | /* WildcatPoint */ |
| 638 | 0x9c90, 0x9c92, 0x9c94, 0x9c96, 0x9c98, 0x9c9a, 0x2448, |
| 639 | 0 |
| 640 | }; |
| 641 | |
| 642 | static const struct pci_driver pch_pcie __pci_driver = { |
| 643 | .ops = &device_ops, |
Felix Singer | 43b7f41 | 2022-03-07 04:34:52 +0100 | [diff] [blame] | 644 | .vendor = PCI_VID_INTEL, |
Duncan Laurie | c88c54c | 2014-04-30 16:36:13 -0700 | [diff] [blame] | 645 | .devices = pcie_device_ids, |
| 646 | }; |