pci-host-common.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. #ifndef _PCI_HOST_COMMON_H
  19. #define _PCI_HOST_COMMON_H
  20. #include <linux/kernel.h>
  21. #include <linux/platform_device.h>
  22. struct gen_pci_cfg_bus_ops {
  23. u32 bus_shift;
  24. struct pci_ops ops;
  25. };
  26. struct gen_pci_cfg_windows {
  27. struct resource res;
  28. struct resource *bus_range;
  29. void __iomem **win;
  30. struct gen_pci_cfg_bus_ops *ops;
  31. };
  32. struct gen_pci {
  33. struct pci_host_bridge host;
  34. struct gen_pci_cfg_windows cfg;
  35. struct list_head resources;
  36. };
  37. int pci_host_common_probe(struct platform_device *pdev,
  38. struct gen_pci *pci);
  39. #endif /* _PCI_HOST_COMMON_H */