1 #ifndef _ASM_PCI_BRIDGE_H
2 #define _ASM_PCI_BRIDGE_H
4 void pmac_find_bridges(void);
7 * pci_io_base returns the memory address at which you can access
8 * the I/O space for PCI bus number `bus' (or NULL on error).
10 * NOTE: This doesn't handle the new Uni-N chip which requires
13 void *pci_io_base(unsigned int bus
);
15 /* This version handles the new Uni-N host bridge, the iobase is now
16 * a per-device thing. I also added the memory base so PReP can
17 * be fixed to return 0xc0000000 (I didn't actually implement it)
19 void *pci_dev_io_base(unsigned char bus
, unsigned char devfn
);
20 void *pci_dev_mem_base(unsigned char bus
, unsigned char devfn
);
22 /* Returns the root-bridge number (Uni-N number) of a device */
23 int pci_dev_root_bridge(unsigned char bus
, unsigned char devfn
);
26 * pci_device_loc returns the bus number and device/function number
27 * for a device on a PCI bus, given its device_node struct.
28 * It returns 0 if OK, -1 on error.
30 int pci_device_loc(struct device_node
*dev
, unsigned char *bus_ptr
,
31 unsigned char *devfn_ptr
);
34 volatile unsigned int *cfg_addr
;
35 volatile unsigned char *cfg_data
;
39 struct bridge_data
*next
;
40 struct device_node
*node
;