Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'pci/aspm' into next

* pci/aspm:
PCI/ASPM: Add comment about L1 substate latency
PCI/ASPM: Configure L1 substate settings
PCI/ASPM: Calculate and save the L1.2 timing parameters
PCI/ASPM: Read and set up L1 substate capabilities
PCI/ASPM: Add support for L1 substates
PCI/ASPM: Add L1 substate capability structure register definitions

+302 -13
+8
drivers/pci/pcie/Kconfig
··· 71 71 Enable PCI Express ASPM L0s and L1 where possible, even if the 72 72 BIOS did not. 73 73 74 + config PCIEASPM_POWER_SUPERSAVE 75 + bool "Power Supersave" 76 + depends on PCIEASPM 77 + help 78 + Same as PCIEASPM_POWERSAVE, except it also enables L1 substates where 79 + possible. This would result in higher power savings while staying in L1 80 + where the components support it. 81 + 74 82 config PCIEASPM_PERFORMANCE 75 83 bool "Performance" 76 84 depends on PCIEASPM
+278 -13
drivers/pci/pcie/aspm.c
··· 30 30 #define ASPM_STATE_L0S_UP (1) /* Upstream direction L0s state */ 31 31 #define ASPM_STATE_L0S_DW (2) /* Downstream direction L0s state */ 32 32 #define ASPM_STATE_L1 (4) /* L1 state */ 33 + #define ASPM_STATE_L1_1 (8) /* ASPM L1.1 state */ 34 + #define ASPM_STATE_L1_2 (0x10) /* ASPM L1.2 state */ 35 + #define ASPM_STATE_L1_1_PCIPM (0x20) /* PCI PM L1.1 state */ 36 + #define ASPM_STATE_L1_2_PCIPM (0x40) /* PCI PM L1.2 state */ 37 + #define ASPM_STATE_L1_SS_PCIPM (ASPM_STATE_L1_1_PCIPM | ASPM_STATE_L1_2_PCIPM) 38 + #define ASPM_STATE_L1_2_MASK (ASPM_STATE_L1_2 | ASPM_STATE_L1_2_PCIPM) 39 + #define ASPM_STATE_L1SS (ASPM_STATE_L1_1 | ASPM_STATE_L1_1_PCIPM |\ 40 + ASPM_STATE_L1_2_MASK) 33 41 #define ASPM_STATE_L0S (ASPM_STATE_L0S_UP | ASPM_STATE_L0S_DW) 34 - #define ASPM_STATE_ALL (ASPM_STATE_L0S | ASPM_STATE_L1) 42 + #define ASPM_STATE_ALL (ASPM_STATE_L0S | ASPM_STATE_L1 | \ 43 + ASPM_STATE_L1SS) 44 + 45 + /* 46 + * When L1 substates are enabled, the LTR L1.2 threshold is a timing parameter 47 + * that decides whether L1.1 or L1.2 is entered (Refer PCIe spec for details). 48 + * Not sure is there is a way to "calculate" this on the fly, but maybe we 49 + * could turn it into a parameter in future. This value has been taken from 50 + * the following files from Intel's coreboot (which is the only code I found 51 + * to have used this): 52 + * https://www.coreboot.org/pipermail/coreboot-gerrit/2015-March/021134.html 53 + * https://review.coreboot.org/#/c/8832/ 54 + */ 55 + #define LTR_L1_2_THRESHOLD_BITS ((1 << 21) | (1 << 23) | (1 << 30)) 35 56 36 57 struct aspm_latency { 37 58 u32 l0s; /* L0s latency (nsec) */ ··· 61 40 62 41 struct pcie_link_state { 63 42 struct pci_dev *pdev; /* Upstream component of the Link */ 43 + struct pci_dev *downstream; /* Downstream component, function 0 */ 64 44 struct pcie_link_state *root; /* pointer to the root port link */ 65 45 struct pcie_link_state *parent; /* pointer to the parent Link state */ 66 46 struct list_head sibling; /* node in link_list */ ··· 69 47 struct list_head link; /* node in parent's children list */ 70 48 71 49 /* ASPM state */ 72 - u32 aspm_support:3; /* Supported ASPM state */ 73 - u32 aspm_enabled:3; /* Enabled ASPM state */ 74 - u32 aspm_capable:3; /* Capable ASPM state with latency */ 75 - u32 aspm_default:3; /* Default ASPM state by BIOS */ 76 - u32 aspm_disable:3; /* Disabled ASPM state */ 50 + u32 aspm_support:7; /* Supported ASPM state */ 51 + u32 aspm_enabled:7; /* Enabled ASPM state */ 52 + u32 aspm_capable:7; /* Capable ASPM state with latency */ 53 + u32 aspm_default:7; /* Default ASPM state by BIOS */ 54 + u32 aspm_disable:7; /* Disabled ASPM state */ 77 55 78 56 /* Clock PM state */ 79 57 u32 clkpm_capable:1; /* Clock PM capable? */ ··· 88 66 * has one slot under it, so at most there are 8 functions. 89 67 */ 90 68 struct aspm_latency acceptable[8]; 69 + 70 + /* L1 PM Substate info */ 71 + struct { 72 + u32 up_cap_ptr; /* L1SS cap ptr in upstream dev */ 73 + u32 dw_cap_ptr; /* L1SS cap ptr in downstream dev */ 74 + u32 ctl1; /* value to be programmed in ctl1 */ 75 + u32 ctl2; /* value to be programmed in ctl2 */ 76 + } l1ss; 91 77 }; 92 78 93 79 static int aspm_disabled, aspm_force; ··· 106 76 #define POLICY_DEFAULT 0 /* BIOS default setting */ 107 77 #define POLICY_PERFORMANCE 1 /* high performance */ 108 78 #define POLICY_POWERSAVE 2 /* high power saving */ 79 + #define POLICY_POWER_SUPERSAVE 3 /* possibly even more power saving */ 109 80 110 81 #ifdef CONFIG_PCIEASPM_PERFORMANCE 111 82 static int aspm_policy = POLICY_PERFORMANCE; 112 83 #elif defined CONFIG_PCIEASPM_POWERSAVE 113 84 static int aspm_policy = POLICY_POWERSAVE; 85 + #elif defined CONFIG_PCIEASPM_POWER_SUPERSAVE 86 + static int aspm_policy = POLICY_POWER_SUPERSAVE; 114 87 #else 115 88 static int aspm_policy; 116 89 #endif ··· 121 88 static const char *policy_str[] = { 122 89 [POLICY_DEFAULT] = "default", 123 90 [POLICY_PERFORMANCE] = "performance", 124 - [POLICY_POWERSAVE] = "powersave" 91 + [POLICY_POWERSAVE] = "powersave", 92 + [POLICY_POWER_SUPERSAVE] = "powersupersave" 125 93 }; 126 94 127 95 #define LINK_RETRAIN_TIMEOUT HZ ··· 135 101 return 0; 136 102 case POLICY_POWERSAVE: 137 103 /* Enable ASPM L0s/L1 */ 104 + return (ASPM_STATE_L0S | ASPM_STATE_L1); 105 + case POLICY_POWER_SUPERSAVE: 106 + /* Enable Everything */ 138 107 return ASPM_STATE_ALL; 139 108 case POLICY_DEFAULT: 140 109 return link->aspm_default; ··· 152 115 /* Disable ASPM and Clock PM */ 153 116 return 0; 154 117 case POLICY_POWERSAVE: 155 - /* Disable Clock PM */ 118 + case POLICY_POWER_SUPERSAVE: 119 + /* Enable Clock PM */ 156 120 return 1; 157 121 case POLICY_DEFAULT: 158 122 return link->clkpm_default; ··· 316 278 return (1000 << encoding); 317 279 } 318 280 281 + /* Convert L1SS T_pwr encoding to usec */ 282 + static u32 calc_l1ss_pwron(struct pci_dev *pdev, u32 scale, u32 val) 283 + { 284 + switch (scale) { 285 + case 0: 286 + return val * 2; 287 + case 1: 288 + return val * 10; 289 + case 2: 290 + return val * 100; 291 + } 292 + dev_err(&pdev->dev, "%s: Invalid T_PwrOn scale: %u\n", 293 + __func__, scale); 294 + return 0; 295 + } 296 + 319 297 struct aspm_register_info { 320 298 u32 support:2; 321 299 u32 enabled:2; 322 300 u32 latency_encoding_l0s; 323 301 u32 latency_encoding_l1; 302 + 303 + /* L1 substates */ 304 + u32 l1ss_cap_ptr; 305 + u32 l1ss_cap; 306 + u32 l1ss_ctl1; 307 + u32 l1ss_ctl2; 324 308 }; 325 309 326 310 static void pcie_get_aspm_reg(struct pci_dev *pdev, ··· 357 297 info->latency_encoding_l1 = (reg32 & PCI_EXP_LNKCAP_L1EL) >> 15; 358 298 pcie_capability_read_word(pdev, PCI_EXP_LNKCTL, &reg16); 359 299 info->enabled = reg16 & PCI_EXP_LNKCTL_ASPMC; 300 + 301 + /* Read L1 PM substate capabilities */ 302 + info->l1ss_cap = info->l1ss_ctl1 = info->l1ss_ctl2 = 0; 303 + info->l1ss_cap_ptr = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_L1SS); 304 + if (!info->l1ss_cap_ptr) 305 + return; 306 + pci_read_config_dword(pdev, info->l1ss_cap_ptr + PCI_L1SS_CAP, 307 + &info->l1ss_cap); 308 + if (!(info->l1ss_cap & PCI_L1SS_CAP_L1_PM_SS)) { 309 + info->l1ss_cap = 0; 310 + return; 311 + } 312 + pci_read_config_dword(pdev, info->l1ss_cap_ptr + PCI_L1SS_CTL1, 313 + &info->l1ss_ctl1); 314 + pci_read_config_dword(pdev, info->l1ss_cap_ptr + PCI_L1SS_CTL2, 315 + &info->l1ss_ctl2); 360 316 } 361 317 362 318 static void pcie_aspm_check_latency(struct pci_dev *endpoint) ··· 403 327 * Check L1 latency. 404 328 * Every switch on the path to root complex need 1 405 329 * more microsecond for L1. Spec doesn't mention L0s. 330 + * 331 + * The exit latencies for L1 substates are not advertised 332 + * by a device. Since the spec also doesn't mention a way 333 + * to determine max latencies introduced by enabling L1 334 + * substates on the components, it is not clear how to do 335 + * a L1 substate exit latency check. We assume that the 336 + * L1 exit latencies advertised by a device include L1 337 + * substate latencies (and hence do not do any check). 406 338 */ 407 339 latency = max_t(u32, link->latency_up.l1, link->latency_dw.l1); 408 340 if ((link->aspm_capable & ASPM_STATE_L1) && ··· 420 336 421 337 link = link->parent; 422 338 } 339 + } 340 + 341 + /* 342 + * The L1 PM substate capability is only implemented in function 0 in a 343 + * multi function device. 344 + */ 345 + static struct pci_dev *pci_function_0(struct pci_bus *linkbus) 346 + { 347 + struct pci_dev *child; 348 + 349 + list_for_each_entry(child, &linkbus->devices, bus_list) 350 + if (PCI_FUNC(child->devfn) == 0) 351 + return child; 352 + return NULL; 353 + } 354 + 355 + /* Calculate L1.2 PM substate timing parameters */ 356 + static void aspm_calc_l1ss_info(struct pcie_link_state *link, 357 + struct aspm_register_info *upreg, 358 + struct aspm_register_info *dwreg) 359 + { 360 + u32 val1, val2, scale1, scale2; 361 + 362 + link->l1ss.up_cap_ptr = upreg->l1ss_cap_ptr; 363 + link->l1ss.dw_cap_ptr = dwreg->l1ss_cap_ptr; 364 + link->l1ss.ctl1 = link->l1ss.ctl2 = 0; 365 + 366 + if (!(link->aspm_support & ASPM_STATE_L1_2_MASK)) 367 + return; 368 + 369 + /* Choose the greater of the two T_cmn_mode_rstr_time */ 370 + val1 = (upreg->l1ss_cap >> 8) & 0xFF; 371 + val2 = (upreg->l1ss_cap >> 8) & 0xFF; 372 + if (val1 > val2) 373 + link->l1ss.ctl1 |= val1 << 8; 374 + else 375 + link->l1ss.ctl1 |= val2 << 8; 376 + /* 377 + * We currently use LTR L1.2 threshold to be fixed constant picked from 378 + * Intel's coreboot. 379 + */ 380 + link->l1ss.ctl1 |= LTR_L1_2_THRESHOLD_BITS; 381 + 382 + /* Choose the greater of the two T_pwr_on */ 383 + val1 = (upreg->l1ss_cap >> 19) & 0x1F; 384 + scale1 = (upreg->l1ss_cap >> 16) & 0x03; 385 + val2 = (dwreg->l1ss_cap >> 19) & 0x1F; 386 + scale2 = (dwreg->l1ss_cap >> 16) & 0x03; 387 + 388 + if (calc_l1ss_pwron(link->pdev, scale1, val1) > 389 + calc_l1ss_pwron(link->downstream, scale2, val2)) 390 + link->l1ss.ctl2 |= scale1 | (val1 << 3); 391 + else 392 + link->l1ss.ctl2 |= scale2 | (val2 << 3); 423 393 } 424 394 425 395 static void pcie_aspm_cap_init(struct pcie_link_state *link, int blacklist) ··· 491 353 492 354 /* Get upstream/downstream components' register state */ 493 355 pcie_get_aspm_reg(parent, &upreg); 494 - child = list_entry(linkbus->devices.next, struct pci_dev, bus_list); 356 + child = pci_function_0(linkbus); 495 357 pcie_get_aspm_reg(child, &dwreg); 358 + link->downstream = child; 496 359 497 360 /* 498 361 * If ASPM not supported, don't mess with the clocks and link, ··· 536 397 link->latency_up.l1 = calc_l1_latency(upreg.latency_encoding_l1); 537 398 link->latency_dw.l1 = calc_l1_latency(dwreg.latency_encoding_l1); 538 399 400 + /* Setup L1 substate */ 401 + if (upreg.l1ss_cap & dwreg.l1ss_cap & PCI_L1SS_CAP_ASPM_L1_1) 402 + link->aspm_support |= ASPM_STATE_L1_1; 403 + if (upreg.l1ss_cap & dwreg.l1ss_cap & PCI_L1SS_CAP_ASPM_L1_2) 404 + link->aspm_support |= ASPM_STATE_L1_2; 405 + if (upreg.l1ss_cap & dwreg.l1ss_cap & PCI_L1SS_CAP_PCIPM_L1_1) 406 + link->aspm_support |= ASPM_STATE_L1_1_PCIPM; 407 + if (upreg.l1ss_cap & dwreg.l1ss_cap & PCI_L1SS_CAP_PCIPM_L1_2) 408 + link->aspm_support |= ASPM_STATE_L1_2_PCIPM; 409 + 410 + if (upreg.l1ss_ctl1 & dwreg.l1ss_ctl1 & PCI_L1SS_CTL1_ASPM_L1_1) 411 + link->aspm_enabled |= ASPM_STATE_L1_1; 412 + if (upreg.l1ss_ctl1 & dwreg.l1ss_ctl1 & PCI_L1SS_CTL1_ASPM_L1_2) 413 + link->aspm_enabled |= ASPM_STATE_L1_2; 414 + if (upreg.l1ss_ctl1 & dwreg.l1ss_ctl1 & PCI_L1SS_CTL1_PCIPM_L1_1) 415 + link->aspm_enabled |= ASPM_STATE_L1_1_PCIPM; 416 + if (upreg.l1ss_ctl1 & dwreg.l1ss_ctl1 & PCI_L1SS_CTL1_PCIPM_L1_2) 417 + link->aspm_enabled |= ASPM_STATE_L1_2_PCIPM; 418 + 419 + if (link->aspm_support & ASPM_STATE_L1SS) 420 + aspm_calc_l1ss_info(link, &upreg, &dwreg); 421 + 539 422 /* Save default state */ 540 423 link->aspm_default = link->aspm_enabled; 541 424 ··· 596 435 } 597 436 } 598 437 438 + static void pci_clear_and_set_dword(struct pci_dev *pdev, int pos, 439 + u32 clear, u32 set) 440 + { 441 + u32 val; 442 + 443 + pci_read_config_dword(pdev, pos, &val); 444 + val &= ~clear; 445 + val |= set; 446 + pci_write_config_dword(pdev, pos, val); 447 + } 448 + 449 + /* Configure the ASPM L1 substates */ 450 + static void pcie_config_aspm_l1ss(struct pcie_link_state *link, u32 state) 451 + { 452 + u32 val, enable_req; 453 + struct pci_dev *child = link->downstream, *parent = link->pdev; 454 + u32 up_cap_ptr = link->l1ss.up_cap_ptr; 455 + u32 dw_cap_ptr = link->l1ss.dw_cap_ptr; 456 + 457 + enable_req = (link->aspm_enabled ^ state) & state; 458 + 459 + /* 460 + * Here are the rules specified in the PCIe spec for enabling L1SS: 461 + * - When enabling L1.x, enable bit at parent first, then at child 462 + * - When disabling L1.x, disable bit at child first, then at parent 463 + * - When enabling ASPM L1.x, need to disable L1 464 + * (at child followed by parent). 465 + * - The ASPM/PCIPM L1.2 must be disabled while programming timing 466 + * parameters 467 + * 468 + * To keep it simple, disable all L1SS bits first, and later enable 469 + * what is needed. 470 + */ 471 + 472 + /* Disable all L1 substates */ 473 + pci_clear_and_set_dword(child, dw_cap_ptr + PCI_L1SS_CTL1, 474 + PCI_L1SS_CTL1_L1SS_MASK, 0); 475 + pci_clear_and_set_dword(parent, up_cap_ptr + PCI_L1SS_CTL1, 476 + PCI_L1SS_CTL1_L1SS_MASK, 0); 477 + /* 478 + * If needed, disable L1, and it gets enabled later 479 + * in pcie_config_aspm_link(). 480 + */ 481 + if (enable_req & (ASPM_STATE_L1_1 | ASPM_STATE_L1_2)) { 482 + pcie_capability_clear_and_set_word(child, PCI_EXP_LNKCTL, 483 + PCI_EXP_LNKCTL_ASPM_L1, 0); 484 + pcie_capability_clear_and_set_word(parent, PCI_EXP_LNKCTL, 485 + PCI_EXP_LNKCTL_ASPM_L1, 0); 486 + } 487 + 488 + if (enable_req & ASPM_STATE_L1_2_MASK) { 489 + 490 + /* Program T_pwr_on in both ports */ 491 + pci_write_config_dword(parent, up_cap_ptr + PCI_L1SS_CTL2, 492 + link->l1ss.ctl2); 493 + pci_write_config_dword(child, dw_cap_ptr + PCI_L1SS_CTL2, 494 + link->l1ss.ctl2); 495 + 496 + /* Program T_cmn_mode in parent */ 497 + pci_clear_and_set_dword(parent, up_cap_ptr + PCI_L1SS_CTL1, 498 + 0xFF00, link->l1ss.ctl1); 499 + 500 + /* Program LTR L1.2 threshold in both ports */ 501 + pci_clear_and_set_dword(parent, dw_cap_ptr + PCI_L1SS_CTL1, 502 + 0xE3FF0000, link->l1ss.ctl1); 503 + pci_clear_and_set_dword(child, dw_cap_ptr + PCI_L1SS_CTL1, 504 + 0xE3FF0000, link->l1ss.ctl1); 505 + } 506 + 507 + val = 0; 508 + if (state & ASPM_STATE_L1_1) 509 + val |= PCI_L1SS_CTL1_ASPM_L1_1; 510 + if (state & ASPM_STATE_L1_2) 511 + val |= PCI_L1SS_CTL1_ASPM_L1_2; 512 + if (state & ASPM_STATE_L1_1_PCIPM) 513 + val |= PCI_L1SS_CTL1_PCIPM_L1_1; 514 + if (state & ASPM_STATE_L1_2_PCIPM) 515 + val |= PCI_L1SS_CTL1_PCIPM_L1_2; 516 + 517 + /* Enable what we need to enable */ 518 + pci_clear_and_set_dword(parent, up_cap_ptr + PCI_L1SS_CTL1, 519 + PCI_L1SS_CAP_L1_PM_SS, val); 520 + pci_clear_and_set_dword(child, dw_cap_ptr + PCI_L1SS_CTL1, 521 + PCI_L1SS_CAP_L1_PM_SS, val); 522 + } 523 + 599 524 static void pcie_config_aspm_dev(struct pci_dev *pdev, u32 val) 600 525 { 601 526 pcie_capability_clear_and_set_word(pdev, PCI_EXP_LNKCTL, ··· 691 444 static void pcie_config_aspm_link(struct pcie_link_state *link, u32 state) 692 445 { 693 446 u32 upstream = 0, dwstream = 0; 694 - struct pci_dev *child, *parent = link->pdev; 447 + struct pci_dev *child = link->downstream, *parent = link->pdev; 695 448 struct pci_bus *linkbus = parent->subordinate; 696 449 697 - /* Nothing to do if the link is already in the requested state */ 450 + /* Enable only the states that were not explicitly disabled */ 698 451 state &= (link->aspm_capable & ~link->aspm_disable); 452 + 453 + /* Can't enable any substates if L1 is not enabled */ 454 + if (!(state & ASPM_STATE_L1)) 455 + state &= ~ASPM_STATE_L1SS; 456 + 457 + /* Spec says both ports must be in D0 before enabling PCI PM substates*/ 458 + if (parent->current_state != PCI_D0 || child->current_state != PCI_D0) { 459 + state &= ~ASPM_STATE_L1_SS_PCIPM; 460 + state |= (link->aspm_enabled & ASPM_STATE_L1_SS_PCIPM); 461 + } 462 + 463 + /* Nothing to do if the link is already in the requested state */ 699 464 if (link->aspm_enabled == state) 700 465 return; 701 466 /* Convert ASPM state to upstream/downstream ASPM register state */ ··· 719 460 upstream |= PCI_EXP_LNKCTL_ASPM_L1; 720 461 dwstream |= PCI_EXP_LNKCTL_ASPM_L1; 721 462 } 463 + 464 + if (link->aspm_capable & ASPM_STATE_L1SS) 465 + pcie_config_aspm_l1ss(link, state); 466 + 722 467 /* 723 468 * Spec 2.0 suggests all functions should be configured the 724 469 * same setting for ASPM. Enabling ASPM L1 should be done in ··· 875 612 * the BIOS's expectation, we'll do so once pci_enable_device() is 876 613 * called. 877 614 */ 878 - if (aspm_policy != POLICY_POWERSAVE) { 615 + if (aspm_policy != POLICY_POWERSAVE && 616 + aspm_policy != POLICY_POWER_SUPERSAVE) { 879 617 pcie_config_aspm_path(link); 880 618 pcie_set_clkpm(link, policy_to_clkpm_state(link)); 881 619 } ··· 976 712 if (aspm_disabled || !link) 977 713 return; 978 714 979 - if (aspm_policy != POLICY_POWERSAVE) 715 + if (aspm_policy != POLICY_POWERSAVE && 716 + aspm_policy != POLICY_POWER_SUPERSAVE) 980 717 return; 981 718 982 719 down_read(&pci_bus_sem);
+16
include/uapi/linux/pci_regs.h
··· 682 682 #define PCI_EXT_CAP_ID_PMUX 0x1A /* Protocol Multiplexing */ 683 683 #define PCI_EXT_CAP_ID_PASID 0x1B /* Process Address Space ID */ 684 684 #define PCI_EXT_CAP_ID_DPC 0x1D /* Downstream Port Containment */ 685 + #define PCI_EXT_CAP_ID_L1SS 0x1E /* L1 PM Substates */ 685 686 #define PCI_EXT_CAP_ID_PTM 0x1F /* Precision Time Measurement */ 686 687 #define PCI_EXT_CAP_ID_MAX PCI_EXT_CAP_ID_PTM 687 688 ··· 985 984 #define PCI_PTM_CTRL 0x08 /* PTM Control */ 986 985 #define PCI_PTM_CTRL_ENABLE 0x00000001 /* PTM enable */ 987 986 #define PCI_PTM_CTRL_ROOT 0x00000002 /* Root select */ 987 + 988 + /* L1 PM Substates */ 989 + #define PCI_L1SS_CAP 4 /* capability register */ 990 + #define PCI_L1SS_CAP_PCIPM_L1_2 1 /* PCI PM L1.2 Support */ 991 + #define PCI_L1SS_CAP_PCIPM_L1_1 2 /* PCI PM L1.1 Support */ 992 + #define PCI_L1SS_CAP_ASPM_L1_2 4 /* ASPM L1.2 Support */ 993 + #define PCI_L1SS_CAP_ASPM_L1_1 8 /* ASPM L1.1 Support */ 994 + #define PCI_L1SS_CAP_L1_PM_SS 16 /* L1 PM Substates Support */ 995 + #define PCI_L1SS_CTL1 8 /* Control Register 1 */ 996 + #define PCI_L1SS_CTL1_PCIPM_L1_2 1 /* PCI PM L1.2 Enable */ 997 + #define PCI_L1SS_CTL1_PCIPM_L1_1 2 /* PCI PM L1.1 Support */ 998 + #define PCI_L1SS_CTL1_ASPM_L1_2 4 /* ASPM L1.2 Support */ 999 + #define PCI_L1SS_CTL1_ASPM_L1_1 8 /* ASPM L1.1 Support */ 1000 + #define PCI_L1SS_CTL1_L1SS_MASK 0x0000000F 1001 + #define PCI_L1SS_CTL2 0xC /* Control Register 2 */ 988 1002 989 1003 #endif /* LINUX_PCI_REGS_H */