Path: blob/master/arch/powerpc/platforms/iseries/pci.h
10820 views
#ifndef _PLATFORMS_ISERIES_PCI_H1#define _PLATFORMS_ISERIES_PCI_H23/*4* Created by Allan Trautman on Tue Feb 20, 2001.5*6* Define some useful macros for the iSeries pci routines.7* Copyright (C) 2001 Allan H Trautman, IBM Corporation8*9* This program is free software; you can redistribute it and/or modify10* it under the terms of the GNU General Public License as published by11* the Free Software Foundation; either version 2 of the License, or12* (at your option) any later version.13*14* This program is distributed in the hope that it will be useful,15* but WITHOUT ANY WARRANTY; without even the implied warranty of16* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the17* GNU General Public License for more details.18*19* You should have received a copy of the GNU General Public License20* along with this program; if not, write to the:21* Free Software Foundation, Inc.,22* 59 Temple Place, Suite 330,23* Boston, MA 02111-1307 USA24*25* Change Activity:26* Created Feb 20, 200127* Added device reset, March 22, 200128* Ported to ppc64, May 25, 200129* End Change Activity30*/3132/*33* Decodes Linux DevFn to iSeries DevFn, bridge device, or function.34* For Linux, see PCI_SLOT and PCI_FUNC in include/linux/pci.h35*/3637#define ISERIES_PCI_AGENTID(idsel, func) \38(((idsel & 0x0F) << 4) | (func & 0x07))39#define ISERIES_ENCODE_DEVICE(agentid) \40((0x10) | ((agentid & 0x20) >> 2) | (agentid & 0x07))4142#define ISERIES_GET_DEVICE_FROM_SUBBUS(subbus) ((subbus >> 5) & 0x7)43#define ISERIES_GET_FUNCTION_FROM_SUBBUS(subbus) ((subbus >> 2) & 0x7)4445struct pci_dev;4647#ifdef CONFIG_PCI48extern void iSeries_pcibios_init(void);49extern void iSeries_pci_final_fixup(void);50extern void iSeries_pcibios_fixup_resources(struct pci_dev *dev);51#else52static inline void iSeries_pcibios_init(void) { }53static inline void iSeries_pci_final_fixup(void) { }54static inline void iSeries_pcibios_fixup_resources(struct pci_dev *dev) {}55#endif5657#endif /* _PLATFORMS_ISERIES_PCI_H */585960