pci.c (9a64e8e0ace51b309fdcff4b4754b3649250382a) | pci.c (d28a0d94d752354d9830f8cc0426e9119f9f227d) |
---|---|
1/* 2 * Copyright (C) 2006 PA Semi, Inc 3 * 4 * Authors: Kip Walker, PA Semi 5 * Olof Johansson, PA Semi 6 * 7 * Maintained by: Olof Johansson <olof@lixom.net> 8 * --- 17 unchanged lines hidden (view full) --- 26#include <linux/kernel.h> 27#include <linux/pci.h> 28 29#include <asm/pci-bridge.h> 30#include <asm/machdep.h> 31 32#include <asm/ppc-pci.h> 33 | 1/* 2 * Copyright (C) 2006 PA Semi, Inc 3 * 4 * Authors: Kip Walker, PA Semi 5 * Olof Johansson, PA Semi 6 * 7 * Maintained by: Olof Johansson <olof@lixom.net> 8 * --- 17 unchanged lines hidden (view full) --- 26#include <linux/kernel.h> 27#include <linux/pci.h> 28 29#include <asm/pci-bridge.h> 30#include <asm/machdep.h> 31 32#include <asm/ppc-pci.h> 33 |
34#include "pasemi.h" 35 |
|
34#define PA_PXP_CFA(bus, devfn, off) (((bus) << 20) | ((devfn) << 12) | (off)) 35 36static inline int pa_pxp_offset_valid(u8 bus, u8 devfn, int offset) 37{ 38 /* Device 0 Function 0 is special: It's config space spans function 1 as 39 * well, so allow larger offset. It's really a two-function device but the 40 * second function does not probe. 41 */ --- 152 unchanged lines hidden (view full) --- 194 pr_debug("Adding PCI host bridge %s\n", dev->full_name); 195 196 hose = pcibios_alloc_controller(dev); 197 if (!hose) 198 return -ENOMEM; 199 200 hose->first_busno = 0; 201 hose->last_busno = 0xff; | 36#define PA_PXP_CFA(bus, devfn, off) (((bus) << 20) | ((devfn) << 12) | (off)) 37 38static inline int pa_pxp_offset_valid(u8 bus, u8 devfn, int offset) 39{ 40 /* Device 0 Function 0 is special: It's config space spans function 1 as 41 * well, so allow larger offset. It's really a two-function device but the 42 * second function does not probe. 43 */ --- 152 unchanged lines hidden (view full) --- 196 pr_debug("Adding PCI host bridge %s\n", dev->full_name); 197 198 hose = pcibios_alloc_controller(dev); 199 if (!hose) 200 return -ENOMEM; 201 202 hose->first_busno = 0; 203 hose->last_busno = 0xff; |
204 hose->controller_ops = pasemi_pci_controller_ops; |
|
202 203 setup_pa_pxp(hose); 204 205 printk(KERN_INFO "Found PA-PXP PCI host bridge.\n"); 206 207 /* Interpret the "ranges" property */ 208 pci_process_bridge_OF_ranges(hose, dev, 1); 209 --- 24 unchanged lines hidden (view full) --- 234void __iomem *pasemi_pci_getcfgaddr(struct pci_dev *dev, int offset) 235{ 236 struct pci_controller *hose; 237 238 hose = pci_bus_to_host(dev->bus); 239 240 return (void __iomem *)pa_pxp_cfg_addr(hose, dev->bus->number, dev->devfn, offset); 241} | 205 206 setup_pa_pxp(hose); 207 208 printk(KERN_INFO "Found PA-PXP PCI host bridge.\n"); 209 210 /* Interpret the "ranges" property */ 211 pci_process_bridge_OF_ranges(hose, dev, 1); 212 --- 24 unchanged lines hidden (view full) --- 237void __iomem *pasemi_pci_getcfgaddr(struct pci_dev *dev, int offset) 238{ 239 struct pci_controller *hose; 240 241 hose = pci_bus_to_host(dev->bus); 242 243 return (void __iomem *)pa_pxp_cfg_addr(hose, dev->bus->number, dev->devfn, offset); 244} |
245 246struct pci_controller_ops pasemi_pci_controller_ops; |
|