Skip to content

Commit bbc6a82

Browse files
floatiousMani-Sadhasivam
authored andcommitted
PCI: rockchip-host: Use macro PCIE_RESET_CONFIG_WAIT_MS
Macro PCIE_RESET_CONFIG_DEVICE_WAIT_MS was added to pci.h in commit d5ceb94 ("PCI: Add PCIE_RESET_CONFIG_DEVICE_WAIT_MS waiting time value"). Later, in commit 70a7bfb ("PCI: rockchip-host: Wait 100ms after reset before starting configuration"), PCIE_T_RRS_READY_MS was added to pci.h. These macros are duplicates, and represent the exact same delay in the PCIe specification. Since the comment above PCIE_RESET_CONFIG_WAIT_MS is strictly more correct than the comment above PCIE_T_RRS_READY_MS, change rockchip-host to use PCIE_RESET_CONFIG_WAIT_MS, and remove PCIE_T_RRS_READY_MS, as rockchip-host is the only user of this macro. Signed-off-by: Niklas Cassel <cassel@kernel.org> Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Reviewed-by: Wilfred Mallawa <wilfred.mallawa@wdc.com> Link: https://patch.msgid.link/20250625102347.1205584-11-cassel@kernel.org
1 parent 817f989 commit bbc6a82

2 files changed

Lines changed: 1 addition & 8 deletions

File tree

drivers/pci/controller/pcie-rockchip-host.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ static int rockchip_pcie_host_init_port(struct rockchip_pcie *rockchip)
325325
msleep(PCIE_T_PVPERL_MS);
326326
gpiod_set_value_cansleep(rockchip->perst_gpio, 1);
327327

328-
msleep(PCIE_T_RRS_READY_MS);
328+
msleep(PCIE_RESET_CONFIG_WAIT_MS);
329329

330330
/* 500ms timeout value should be enough for Gen1/2 training */
331331
err = readl_poll_timeout(rockchip->apb_base + PCIE_CLIENT_BASIC_STATUS1,

drivers/pci/pci.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,6 @@ struct pcie_tlp_log;
3535
*/
3636
#define PCIE_T_PERST_CLK_US 100
3737

38-
/*
39-
* End of conventional reset (PERST# de-asserted) to first configuration
40-
* request (device able to respond with a "Request Retry Status" completion),
41-
* from PCIe r6.0, sec 6.6.1.
42-
*/
43-
#define PCIE_T_RRS_READY_MS 100
44-
4538
/*
4639
* PCIe r6.0, sec 5.3.3.2.1 <PME Synchronization>
4740
* Recommends 1ms to 10ms timeout to check L2 ready.

0 commit comments

Comments
 (0)