pci-asb2305.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /* ASB2305 Arch-specific PCI declarations
  2. *
  3. * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
  4. * Written by David Howells (dhowells@redhat.com)
  5. * Derived from: arch/i386/kernel/pci-i386.h: (c) 1999 Martin Mares <mj@ucw.cz>
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public Licence
  9. * as published by the Free Software Foundation; either version
  10. * 2 of the Licence, or (at your option) any later version.
  11. */
  12. #ifndef _PCI_ASB2305_H
  13. #define _PCI_ASB2305_H
  14. #undef DEBUG
  15. #ifdef DEBUG
  16. #define DBG(x...) printk(x)
  17. #else
  18. #define DBG(x...)
  19. #endif
  20. extern unsigned int pci_probe;
  21. /* pci-asb2305.c */
  22. extern void pcibios_resource_survey(void);
  23. /* pci.c */
  24. extern struct pci_ops *pci_root_ops;
  25. extern struct irq_routing_table *pcibios_get_irq_routing_table(void);
  26. extern int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq);
  27. /* pci-irq.c */
  28. struct irq_info {
  29. u8 bus, devfn; /* Bus, device and function */
  30. struct {
  31. u8 link; /* IRQ line ID, chipset dependent,
  32. * 0=not routed */
  33. u16 bitmap; /* Available IRQs */
  34. } __attribute__((packed)) irq[4];
  35. u8 slot; /* Slot number, 0=onboard */
  36. u8 rfu;
  37. } __attribute__((packed));
  38. struct irq_routing_table {
  39. u32 signature; /* PIRQ_SIGNATURE should be here */
  40. u16 version; /* PIRQ_VERSION */
  41. u16 size; /* Table size in bytes */
  42. u8 rtr_bus, rtr_devfn; /* Where the interrupt router lies */
  43. u16 exclusive_irqs; /* IRQs devoted exclusively to PCI usage */
  44. u16 rtr_vendor, rtr_device; /* Vendor and device ID of interrupt router */
  45. u32 miniport_data; /* Crap */
  46. u8 rfu[11];
  47. u8 checksum; /* Modulo 256 checksum must give zero */
  48. struct irq_info slots[0];
  49. } __attribute__((packed));
  50. extern unsigned int pcibios_irq_mask;
  51. extern void pcibios_irq_init(void);
  52. extern void pcibios_fixup_irqs(void);
  53. extern void pcibios_enable_irq(struct pci_dev *dev);
  54. #endif /* PCI_ASB2305_H */