ramips: 5.10: copy patches from 5.4
[openwrt/staging/rmilecki.git] / target / linux / ramips / patches-5.10 / 0103-staging-mt7621-pci-change-value-for-PERST_DELAY_MS.patch
1 From e462e7d3211479df42357a620fa788a2257556b7 Mon Sep 17 00:00:00 2001
2 From: Sergio Paracuellos <sergio.paracuellos@gmail.com>
3 Date: Fri, 13 Mar 2020 21:09:09 +0100
4 Subject: [PATCH] staging: mt7621-pci: change value for 'PERST_DELAY_MS'
5
6 Value of 'PERST_DELAY_MS' is too high and it is ok just
7 to set up to 100 ms. Update also define name from
8 'PERST_DELAY_US' into 'PERST_DELAY_MS'
9
10 Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
11 Link: https://lore.kernel.org/r/20200313200913.24321-3-sergio.paracuellos@gmail.com
12 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 ---
14 drivers/staging/mt7621-pci/pci-mt7621.c | 6 +++---
15 1 file changed, 3 insertions(+), 3 deletions(-)
16
17 --- a/drivers/staging/mt7621-pci/pci-mt7621.c
18 +++ b/drivers/staging/mt7621-pci/pci-mt7621.c
19 @@ -86,7 +86,7 @@
20 #define MEMORY_BASE 0x0
21 #define PERST_MODE_MASK GENMASK(11, 10)
22 #define PERST_MODE_GPIO BIT(10)
23 -#define PERST_DELAY_US 1000
24 +#define PERST_DELAY_MS 100
25
26 /**
27 * struct mt7621_pcie_port - PCIe port information
28 @@ -463,7 +463,7 @@ static void mt7621_pcie_reset_assert(str
29 mt7621_rst_gpio_pcie_assert(port);
30 }
31
32 - mdelay(PERST_DELAY_US);
33 + mdelay(PERST_DELAY_MS);
34 }
35
36 static void mt7621_pcie_reset_rc_deassert(struct mt7621_pcie *pcie)
37 @@ -481,7 +481,7 @@ static void mt7621_pcie_reset_ep_deasser
38 list_for_each_entry(port, &pcie->ports, list)
39 mt7621_rst_gpio_pcie_deassert(port);
40
41 - mdelay(PERST_DELAY_US);
42 + mdelay(PERST_DELAY_MS);
43 }
44
45 static void mt7621_pcie_init_ports(struct mt7621_pcie *pcie)