forked from Minki/linux
34768bc832
The idea is to move more and more things into the pbm, with the eventual goal of eliminating the pci_controller_info entirely as there really isn't any need for it. This stage of the transformations requires some reworking of the PCI error interrupt handling. It might be tricky to get rid of the pci_controller_info parenting for a few reasons: 1) When we get an uncorrectable or correctable error we want to interrogate the IOMMU and streaming cache of both PBMs for error status. These errors come from the UPA front-end which is shared between the two PBM PCI bus segments. Historically speaking this is why I choose the datastructure hierarchy of pci_controller_info-->pci_pbm_info 2) The probing does a portid/devhandle match to look for the 'other' pbm, but this is entirely an artifact and can be eliminated trivially. What we could do to solve #1 is to have a "buddy" pointer from one pbm to another. Signed-off-by: David S. Miller <davem@davemloft.net>
47 lines
1.6 KiB
C
47 lines
1.6 KiB
C
/* pci_impl.h: Helper definitions for PCI controller support.
|
|
*
|
|
* Copyright (C) 1999, 2007 David S. Miller (davem@davemloft.net)
|
|
*/
|
|
|
|
#ifndef PCI_IMPL_H
|
|
#define PCI_IMPL_H
|
|
|
|
#include <linux/types.h>
|
|
#include <linux/spinlock.h>
|
|
#include <asm/io.h>
|
|
#include <asm/prom.h>
|
|
|
|
extern struct pci_pbm_info *pci_pbm_root;
|
|
extern unsigned long pci_memspace_mask;
|
|
|
|
extern int pci_num_controllers;
|
|
|
|
/* PCI bus scanning and fixup support. */
|
|
extern void pci_get_pbm_props(struct pci_pbm_info *pbm);
|
|
extern struct pci_bus *pci_scan_one_pbm(struct pci_pbm_info *pbm);
|
|
extern void pci_determine_mem_io_space(struct pci_pbm_info *pbm);
|
|
|
|
extern int pci_host_bridge_read_pci_cfg(struct pci_bus *bus_dev,
|
|
unsigned int devfn,
|
|
int where, int size,
|
|
u32 *value);
|
|
extern int pci_host_bridge_write_pci_cfg(struct pci_bus *bus_dev,
|
|
unsigned int devfn,
|
|
int where, int size,
|
|
u32 value);
|
|
|
|
/* Error reporting support. */
|
|
extern void pci_scan_for_target_abort(struct pci_controller_info *, struct pci_pbm_info *, struct pci_bus *);
|
|
extern void pci_scan_for_master_abort(struct pci_controller_info *, struct pci_pbm_info *, struct pci_bus *);
|
|
extern void pci_scan_for_parity_error(struct pci_controller_info *, struct pci_pbm_info *, struct pci_bus *);
|
|
|
|
/* Configuration space access. */
|
|
extern void pci_config_read8(u8 *addr, u8 *ret);
|
|
extern void pci_config_read16(u16 *addr, u16 *ret);
|
|
extern void pci_config_read32(u32 *addr, u32 *ret);
|
|
extern void pci_config_write8(u8 *addr, u8 val);
|
|
extern void pci_config_write16(u16 *addr, u16 val);
|
|
extern void pci_config_write32(u32 *addr, u32 val);
|
|
|
|
#endif /* !(PCI_IMPL_H) */
|