isa.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* $Id: isa.h,v 1.1 2001/05/11 04:31:55 davem Exp $
  2. * isa.h: Sparc64 layer for PCI to ISA bridge devices.
  3. *
  4. * Copyright (C) 2001 David S. Miller (davem@redhat.com)
  5. */
  6. #ifndef __SPARC64_ISA_H
  7. #define __SPARC64_ISA_H
  8. #include <asm/oplib.h>
  9. #include <asm/prom.h>
  10. #include <asm/of_device.h>
  11. struct sparc_isa_bridge;
  12. struct sparc_isa_device {
  13. struct of_device ofdev;
  14. struct sparc_isa_device *next;
  15. struct sparc_isa_device *child;
  16. struct sparc_isa_bridge *bus;
  17. struct device_node *prom_node;
  18. struct resource resource;
  19. unsigned int irq;
  20. };
  21. #define to_isa_device(d) container_of(d, struct sparc_isa_device, ofdev.dev)
  22. struct sparc_isa_bridge {
  23. struct of_device ofdev;
  24. struct sparc_isa_bridge *next;
  25. struct sparc_isa_device *devices;
  26. struct pci_dev *self;
  27. int index;
  28. struct device_node *prom_node;
  29. };
  30. #define to_isa_bridge(d) container_of(d, struct sparc_isa_bridge, ofdev.dev)
  31. extern struct sparc_isa_bridge *isa_chain;
  32. extern void isa_init(void);
  33. #define for_each_isa(bus) \
  34. for((bus) = isa_chain; (bus); (bus) = (bus)->next)
  35. #define for_each_isadev(dev, bus) \
  36. for((dev) = (bus)->devices; (dev); (dev) = (dev)->next)
  37. #endif /* !(__SPARC64_ISA_H) */