Skip to content

Commit 05a55d9

Browse files
Ajay Agarwalbjorn-helgaas
authored andcommitted
PCI/ASPM: Rename L1.2-specific functions from 'l1ss' to 'l12'
The functions aspm_calc_l1ss_info() and calc_l1ss_pwron() perform calculations and register programming specific to L1.2 state. Rename them to aspm_calc_l12_info() and calc_l12_pwron() respectively. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ajay Agarwal <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent 80950a5 commit 05a55d9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/pci/pcie/aspm.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ static u32 calc_l1_acceptable(u32 encoding)
337337
}
338338

339339
/* Convert L1SS T_pwr encoding to usec */
340-
static u32 calc_l1ss_pwron(struct pci_dev *pdev, u32 scale, u32 val)
340+
static u32 calc_l12_pwron(struct pci_dev *pdev, u32 scale, u32 val)
341341
{
342342
switch (scale) {
343343
case 0:
@@ -471,7 +471,7 @@ static void pci_clear_and_set_dword(struct pci_dev *pdev, int pos,
471471
}
472472

473473
/* Calculate L1.2 PM substate timing parameters */
474-
static void aspm_calc_l1ss_info(struct pcie_link_state *link,
474+
static void aspm_calc_l12_info(struct pcie_link_state *link,
475475
u32 parent_l1ss_cap, u32 child_l1ss_cap)
476476
{
477477
struct pci_dev *child = link->downstream, *parent = link->pdev;
@@ -495,13 +495,13 @@ static void aspm_calc_l1ss_info(struct pcie_link_state *link,
495495
val2 = (child_l1ss_cap & PCI_L1SS_CAP_P_PWR_ON_VALUE) >> 19;
496496
scale2 = (child_l1ss_cap & PCI_L1SS_CAP_P_PWR_ON_SCALE) >> 16;
497497

498-
if (calc_l1ss_pwron(parent, scale1, val1) >
499-
calc_l1ss_pwron(child, scale2, val2)) {
498+
if (calc_l12_pwron(parent, scale1, val1) >
499+
calc_l12_pwron(child, scale2, val2)) {
500500
ctl2 |= scale1 | (val1 << 3);
501-
t_power_on = calc_l1ss_pwron(parent, scale1, val1);
501+
t_power_on = calc_l12_pwron(parent, scale1, val1);
502502
} else {
503503
ctl2 |= scale2 | (val2 << 3);
504-
t_power_on = calc_l1ss_pwron(child, scale2, val2);
504+
t_power_on = calc_l12_pwron(child, scale2, val2);
505505
}
506506

507507
/*
@@ -617,7 +617,7 @@ static void aspm_l1ss_init(struct pcie_link_state *link)
617617
link->aspm_enabled |= ASPM_STATE_L1_2_PCIPM;
618618

619619
if (link->aspm_support & ASPM_STATE_L1SS)
620-
aspm_calc_l1ss_info(link, parent_l1ss_cap, child_l1ss_cap);
620+
aspm_calc_l12_info(link, parent_l1ss_cap, child_l1ss_cap);
621621
}
622622

623623
static void pcie_aspm_cap_init(struct pcie_link_state *link, int blacklist)

0 commit comments

Comments
 (0)