summaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci-mvebu.h
diff options
context:
space:
mode:
authorSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>2014-07-30 10:39:40 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-07-31 07:29:24 +0200
commit5a9ba98f2175fc81ff7cb1961eedee7ec4106386 (patch)
tree8f29d439e7550a71b8f3d8e30ab0388108cb4f45 /drivers/pci/pci-mvebu.h
parent846da3d7df1c0873d437bc7ee1c3e94f5dac6dcf (diff)
downloadbarebox-5a9ba98f2175fc81ff7cb1961eedee7ec4106386.tar.gz
barebox-5a9ba98f2175fc81ff7cb1961eedee7ec4106386.tar.xz
pci: mvebu: Add PCIe driver
This adds a PCI driver for the controllers found on Marvell MVEBU SoCs. Besides the functional driver itself, it also adds SoC specific PHY setup required for PCIe. Currently, only Armada 370 is fully supported. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Acked-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/pci/pci-mvebu.h')
-rw-r--r--drivers/pci/pci-mvebu.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/drivers/pci/pci-mvebu.h b/drivers/pci/pci-mvebu.h
new file mode 100644
index 0000000000..8ced9fefca
--- /dev/null
+++ b/drivers/pci/pci-mvebu.h
@@ -0,0 +1,37 @@
+/*
+ * PCIe include for Marvell MVEBU SoCs
+ *
+ * Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#ifndef __MVEBU_PCI_H
+#define __MVEBU_PCI_H
+
+#include <linux/pci.h>
+
+struct mvebu_pcie {
+ struct pci_controller pci;
+ char *name;
+ void __iomem *base;
+ void __iomem *membase;
+ struct resource mem;
+ void __iomem *iobase;
+ struct resource io;
+ u32 port;
+ u32 lane;
+ u32 lane_mask;
+ int devfn;
+};
+
+struct mvebu_pcie_ops {
+ int (*phy_setup)(struct mvebu_pcie *pcie);
+};
+
+int armada_370_phy_setup(struct mvebu_pcie *pcie);
+int armada_xp_phy_setup(struct mvebu_pcie *pcie);
+
+#endif