Skip to content

Commit

Permalink
Revert "nuumio: dts/c: rockpro64: add pcie scan sleep and enable it f…
Browse files Browse the repository at this point in the history
…or rockpro64 (#45)"

This reverts commit 3cde5c6.
  • Loading branch information
ayufan committed May 25, 2019
1 parent 68167a8 commit f8addc6
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 35 deletions.
8 changes: 0 additions & 8 deletions Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2983,14 +2983,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
nomsi Do not use MSI for native PCIe PME signaling (this makes
all PCIe root ports use INTx for all services).

pcie_rk_bus_scan_delay= [PCIE] Delay in ms before
scanning PCIe bus in Rockchip PCIe host driver. Some PCIe
cards seem to need delays that can be several hundred ms.
If set to greater than or equal to 0 this parameter will
override delay that can be set in device tree.
Values less than 0 mean that this parameter is ignored.
default=-1

pcmv= [HW,PCMCIA] BadgePAD 4

pd_ignore_unused
Expand Down
1 change: 0 additions & 1 deletion arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,6 @@
pinctrl-names = "default";
pinctrl-0 = <&pcie_clkreqn>;
vpcie3v3-supply = <&vcc3v3_pcie>;
bus-scan-delay-ms = <1000>;
status = "okay";
};

Expand Down
26 changes: 0 additions & 26 deletions drivers/pci/host/pcie-rockchip.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <linux/irqdomain.h>
#include <linux/kernel.h>
#include <linux/mfd/syscon.h>
#include <linux/moduleparam.h>
#include <linux/of_address.h>
#include <linux/of_device.h>
#include <linux/of_pci.h>
Expand Down Expand Up @@ -254,12 +253,8 @@ struct rockchip_pcie {
int wait_ep;
struct dma_trx_obj *dma_obj;
struct list_head resources;
u32 bus_scan_delay;
};

static int bus_scan_delay = -1;
core_param(pcie_rk_bus_scan_delay, bus_scan_delay, int, S_IRUGO);

static u32 rockchip_pcie_read(struct rockchip_pcie *rockchip, u32 reg)
{
return readl(rockchip->apb_base + reg);
Expand Down Expand Up @@ -1080,14 +1075,6 @@ static int rockchip_pcie_parse_dt(struct rockchip_pcie *rockchip)
dev_info(dev, "no vpcie0v9 regulator found\n");
}

err = of_property_read_u32(node, "bus-scan-delay-ms", &rockchip->bus_scan_delay);
if (err) {
dev_info(dev, "no bus-scan-delay-ms in device tree, default 0 ms\n");
rockchip->bus_scan_delay = 0;
} else {
dev_info(dev, "bus-scan-delay-ms in device tree is %u ms\n", rockchip->bus_scan_delay);
}

mem = of_parse_phandle(node, "memory-region", 0);
if (!mem) {
dev_warn(dev, "missing \"memory-region\" property\n");
Expand Down Expand Up @@ -1412,7 +1399,6 @@ static int rockchip_pcie_really_probe(struct rockchip_pcie *rockchip)
int err;
struct pci_bus *bus, *child;
struct device *dev = rockchip->dev;
u32 delay = 0;

err = rockchip_pcie_init_port(rockchip);
if (err)
Expand All @@ -1424,18 +1410,6 @@ static int rockchip_pcie_really_probe(struct rockchip_pcie *rockchip)
if (err)
return err;

/* Prefer command-line param over device tree */
if (bus_scan_delay > 0) {
delay = bus_scan_delay;
dev_info(dev, "wait %u ms (from command-line) before bus scan\n", delay);
} else if (rockchip->bus_scan_delay > 0 && bus_scan_delay < 0) {
delay = rockchip->bus_scan_delay;
dev_info(dev, "wait %u ms (from device tree) before bus scan\n", delay);
}
if (delay > 0) {
msleep(delay);
}

bus = pci_scan_root_bus(dev, 0, &rockchip_pcie_ops,
rockchip, &rockchip->resources);
if (!bus)
Expand Down

0 comments on commit f8addc6

Please sign in to comment.