1/* $Id: isa.h,v 1.1.1.1 2007/08/03 18:53:36 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 7#ifndef __SPARC64_ISA_H 8#define __SPARC64_ISA_H 9 10#include <asm/oplib.h> 11#include <asm/prom.h> 12#include <asm/of_device.h> 13 14struct sparc_isa_bridge; 15 16struct sparc_isa_device { 17 struct of_device ofdev; 18 struct sparc_isa_device *next; 19 struct sparc_isa_device *child; 20 struct sparc_isa_bridge *bus; 21 struct device_node *prom_node; 22 struct resource resource; 23 unsigned int irq; 24}; 25#define to_isa_device(d) container_of(d, struct sparc_isa_device, ofdev.dev) 26 27struct sparc_isa_bridge { 28 struct of_device ofdev; 29 struct sparc_isa_bridge *next; 30 struct sparc_isa_device *devices; 31 struct pci_dev *self; 32 int index; 33 struct device_node *prom_node; 34}; 35#define to_isa_bridge(d) container_of(d, struct sparc_isa_bridge, ofdev.dev) 36 37extern struct sparc_isa_bridge *isa_chain; 38 39extern void isa_init(void); 40 41#define for_each_isa(bus) \ 42 for((bus) = isa_chain; (bus); (bus) = (bus)->next) 43 44#define for_each_isadev(dev, bus) \ 45 for((dev) = (bus)->devices; (dev); (dev) = (dev)->next) 46 47#endif /* !(__SPARC64_ISA_H) */ 48