pci-asb2305.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. #define PCI_PROBE_BIOS 1
  21. #define PCI_PROBE_CONF1 2
  22. #define PCI_PROBE_CONF2 4
  23. #define PCI_NO_CHECKS 0x400
  24. #define PCI_ASSIGN_ROMS 0x1000
  25. #define PCI_BIOS_IRQ_SCAN 0x2000
  26. extern unsigned int pci_probe;
  27. /* pci-asb2305.c */
  28. extern unsigned int pcibios_max_latency;
  29. extern void pcibios_resource_survey(void);
  30. extern int pcibios_enable_resources(struct pci_dev *dev, int mask);
  31. /* pci.c */
  32. extern int pcibios_last_bus;
  33. extern struct pci_bus *pci_root_bus;
  34. extern struct pci_ops *pci_root_ops;
  35. extern struct irq_routing_table *pcibios_get_irq_routing_table(void);
  36. extern int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq);
  37. /* pci-irq.c */
  38. struct irq_info {
  39. u8 bus, devfn; /* Bus, device and function */
  40. struct {
  41. u8 link; /* IRQ line ID, chipset dependent,
  42. * 0=not routed */
  43. u16 bitmap; /* Available IRQs */
  44. } __attribute__((packed)) irq[4];
  45. u8 slot; /* Slot number, 0=onboard */
  46. u8 rfu;
  47. } __attribute__((packed));
  48. struct irq_routing_table {
  49. u32 signature; /* PIRQ_SIGNATURE should be here */
  50. u16 version; /* PIRQ_VERSION */
  51. u16 size; /* Table size in bytes */
  52. u8 rtr_bus, rtr_devfn; /* Where the interrupt router lies */
  53. u16 exclusive_irqs; /* IRQs devoted exclusively to PCI usage */
  54. u16 rtr_vendor, rtr_device; /* Vendor and device ID of interrupt router */
  55. u32 miniport_data; /* Crap */
  56. u8 rfu[11];
  57. u8 checksum; /* Modulo 256 checksum must give zero */
  58. struct irq_info slots[0];
  59. } __attribute__((packed));
  60. extern unsigned int pcibios_irq_mask;
  61. extern void pcibios_irq_init(void);
  62. extern void pcibios_fixup_irqs(void);
  63. extern void pcibios_enable_irq(struct pci_dev *dev);
  64. #endif /* PCI_ASB2305_H */