blob: fe5b9e8627475c6de0251b53ac2b803c9b01a286 [file] [log] [blame]
Lennert Buytenhekabc01972008-03-27 14:51:40 -04001/*
Lennert Buytenhek6f088f12008-08-09 13:44:58 +02002 * arch/arm/plat-orion/include/plat/pcie.h
Lennert Buytenhekabc01972008-03-27 14:51:40 -04003 *
4 * Marvell Orion SoC PCIe handling.
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
Lennert Buytenhek6f088f12008-08-09 13:44:58 +020011#ifndef __PLAT_PCIE_H
12#define __PLAT_PCIE_H
Lennert Buytenhekabc01972008-03-27 14:51:40 -040013
Nicolas Pitre39249962010-10-21 15:48:33 -040014struct pci_bus;
15
Lennert Buytenhekabc01972008-03-27 14:51:40 -040016u32 orion_pcie_dev_id(void __iomem *base);
17u32 orion_pcie_rev(void __iomem *base);
18int orion_pcie_link_up(void __iomem *base);
Lennert Buytenheka9311cf2008-06-22 22:45:09 +020019int orion_pcie_x4_mode(void __iomem *base);
Lennert Buytenhekabc01972008-03-27 14:51:40 -040020int orion_pcie_get_local_bus_nr(void __iomem *base);
21void orion_pcie_set_local_bus_nr(void __iomem *base, int nr);
Nicolas Pitre39249962010-10-21 15:48:33 -040022void orion_pcie_reset(void __iomem *base);
Andrew Lunn63a93322011-12-07 21:48:07 +010023void orion_pcie_setup(void __iomem *base);
Lennert Buytenhekabc01972008-03-27 14:51:40 -040024int orion_pcie_rd_conf(void __iomem *base, struct pci_bus *bus,
25 u32 devfn, int where, int size, u32 *val);
26int orion_pcie_rd_conf_tlp(void __iomem *base, struct pci_bus *bus,
27 u32 devfn, int where, int size, u32 *val);
28int orion_pcie_rd_conf_wa(void __iomem *wa_base, struct pci_bus *bus,
29 u32 devfn, int where, int size, u32 *val);
30int orion_pcie_wr_conf(void __iomem *base, struct pci_bus *bus,
31 u32 devfn, int where, int size, u32 val);
32
33
34#endif