Skip to content

Commit

Permalink
Merge branch 'remotes/lorenzo/pci/xilinx-nwl'
Browse files Browse the repository at this point in the history
- Document optional clock DT property (Michal Simek)

- Enable PCIe ref clock (Hyun Kwon)

* remotes/lorenzo/pci/xilinx-nwl:
  PCI: xilinx-nwl: Enable the clock through CCF
  dt-bindings: pci: xilinx-nwl: Document optional clock property
  • Loading branch information
Bjorn Helgaas committed Sep 2, 2021
2 parents 09cfc9d + de0a01f commit eccefc7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/pci/xilinx-nwl-pcie.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Required properties:

Optional properties:
- dma-coherent: present if DMA operations are coherent
- clocks: Input clock specifier. Refer to common clock bindings

Example:
++++++++
Expand Down
12 changes: 12 additions & 0 deletions drivers/pci/controller/pcie-xilinx-nwl.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* (C) Copyright 2014 - 2015, Xilinx, Inc.
*/

#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
Expand Down Expand Up @@ -169,6 +170,7 @@ struct nwl_pcie {
u8 last_busno;
struct nwl_msi msi;
struct irq_domain *legacy_irq_domain;
struct clk *clk;
raw_spinlock_t leg_mask_lock;
};

Expand Down Expand Up @@ -816,6 +818,16 @@ static int nwl_pcie_probe(struct platform_device *pdev)
return err;
}

pcie->clk = devm_clk_get(dev, NULL);
if (IS_ERR(pcie->clk))
return PTR_ERR(pcie->clk);

err = clk_prepare_enable(pcie->clk);
if (err) {
dev_err(dev, "can't enable PCIe ref clock\n");
return err;
}

err = nwl_pcie_bridge_init(pcie);
if (err) {
dev_err(dev, "HW Initialization failed\n");
Expand Down

0 comments on commit eccefc7

Please sign in to comment.