8c3c1491eaaeae7707148cc885c1f5a499b79a1e
[cascardo/linux.git] / drivers / pci / host / pci-host-common.h
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License version 2 as
4  * published by the Free Software Foundation.
5  *
6  * This program is distributed in the hope that it will be useful,
7  * but WITHOUT ANY WARRANTY; without even the implied warranty of
8  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9  * GNU General Public License for more details.
10  *
11  * You should have received a copy of the GNU General Public License
12  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
13  *
14  * Copyright (C) 2014 ARM Limited
15  *
16  * Author: Will Deacon <will.deacon@arm.com>
17  */
18
19 #ifndef _PCI_HOST_COMMON_H
20 #define _PCI_HOST_COMMON_H
21
22 #include <linux/kernel.h>
23 #include <linux/platform_device.h>
24
25 struct gen_pci_cfg_bus_ops {
26         u32 bus_shift;
27         struct pci_ops ops;
28 };
29
30 struct gen_pci_cfg_windows {
31         struct resource                         res;
32         struct resource                         *bus_range;
33         void __iomem                            **win;
34
35         struct gen_pci_cfg_bus_ops              *ops;
36 };
37
38 struct gen_pci {
39         struct pci_host_bridge                  host;
40         struct gen_pci_cfg_windows              cfg;
41         struct list_head                        resources;
42 };
43
44 #endif /* _PCI_HOST_COMMON_H */