pcie-iproc.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright (C) 2014-2015 Broadcom Corporation
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License as
  6. * published by the Free Software Foundation version 2.
  7. *
  8. * This program is distributed "as is" WITHOUT ANY WARRANTY of any
  9. * kind, whether express or implied; without even the implied warranty
  10. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. */
  13. #ifndef _PCIE_IPROC_H
  14. #define _PCIE_IPROC_H
  15. #define IPROC_PCIE_MAX_NUM_IRQS 6
  16. /**
  17. * iProc PCIe device
  18. * @dev: pointer to device data structure
  19. * @base: PCIe host controller I/O register base
  20. * @resources: linked list of all PCI resources
  21. * @sysdata: Per PCI controller data
  22. * @root_bus: pointer to root bus
  23. * @phy: optional PHY device that controls the Serdes
  24. * @irqs: interrupt IDs
  25. */
  26. struct iproc_pcie {
  27. struct device *dev;
  28. void __iomem *base;
  29. struct list_head *resources;
  30. struct pci_sys_data sysdata;
  31. struct pci_bus *root_bus;
  32. struct phy *phy;
  33. int irqs[IPROC_PCIE_MAX_NUM_IRQS];
  34. };
  35. int iproc_pcie_setup(struct iproc_pcie *pcie);
  36. int iproc_pcie_remove(struct iproc_pcie *pcie);
  37. #endif /* _PCIE_IPROC_H */