pci_dn.c (7483d45f0aee3afc0646d185cabd4af9f6cab58c) | pci_dn.c (cad5cef62a5a0c525d39118d2e94b6e2034d5e05) |
---|---|
1/* 2 * pci_dn.c 3 * 4 * Copyright (C) 2001 Todd Inglett, IBM Corporation 5 * 6 * PCI manipulation via device_nodes. 7 * 8 * This program is free software; you can redistribute it and/or modify --- 22 unchanged lines hidden (view full) --- 31#include <asm/pci-bridge.h> 32#include <asm/ppc-pci.h> 33#include <asm/firmware.h> 34 35/* 36 * Traverse_func that inits the PCI fields of the device node. 37 * NOTE: this *must* be done before read/write config to the device. 38 */ | 1/* 2 * pci_dn.c 3 * 4 * Copyright (C) 2001 Todd Inglett, IBM Corporation 5 * 6 * PCI manipulation via device_nodes. 7 * 8 * This program is free software; you can redistribute it and/or modify --- 22 unchanged lines hidden (view full) --- 31#include <asm/pci-bridge.h> 32#include <asm/ppc-pci.h> 33#include <asm/firmware.h> 34 35/* 36 * Traverse_func that inits the PCI fields of the device node. 37 * NOTE: this *must* be done before read/write config to the device. 38 */ |
39void * __devinit update_dn_pci_info(struct device_node *dn, void *data) | 39void *update_dn_pci_info(struct device_node *dn, void *data) |
40{ 41 struct pci_controller *phb = data; 42 const int *type = 43 of_get_property(dn, "ibm,pci-config-space-type", NULL); 44 const u32 *regs; 45 struct pci_dn *pdn; 46 47 pdn = zalloc_maybe_bootmem(sizeof(*pdn), GFP_KERNEL); --- 76 unchanged lines hidden (view full) --- 124/** 125 * pci_devs_phb_init_dynamic - setup pci devices under this PHB 126 * phb: pci-to-host bridge (top-level bridge connecting to cpu) 127 * 128 * This routine is called both during boot, (before the memory 129 * subsystem is set up, before kmalloc is valid) and during the 130 * dynamic lpar operation of adding a PHB to a running system. 131 */ | 40{ 41 struct pci_controller *phb = data; 42 const int *type = 43 of_get_property(dn, "ibm,pci-config-space-type", NULL); 44 const u32 *regs; 45 struct pci_dn *pdn; 46 47 pdn = zalloc_maybe_bootmem(sizeof(*pdn), GFP_KERNEL); --- 76 unchanged lines hidden (view full) --- 124/** 125 * pci_devs_phb_init_dynamic - setup pci devices under this PHB 126 * phb: pci-to-host bridge (top-level bridge connecting to cpu) 127 * 128 * This routine is called both during boot, (before the memory 129 * subsystem is set up, before kmalloc is valid) and during the 130 * dynamic lpar operation of adding a PHB to a running system. 131 */ |
132void __devinit pci_devs_phb_init_dynamic(struct pci_controller *phb) | 132void pci_devs_phb_init_dynamic(struct pci_controller *phb) |
133{ 134 struct device_node *dn = phb->dn; 135 struct pci_dn *pdn; 136 137 /* PHB nodes themselves must not match */ 138 update_dn_pci_info(dn, phb); 139 pdn = dn->data; 140 if (pdn) { --- 25 unchanged lines hidden --- | 133{ 134 struct device_node *dn = phb->dn; 135 struct pci_dn *pdn; 136 137 /* PHB nodes themselves must not match */ 138 update_dn_pci_info(dn, phb); 139 pdn = dn->data; 140 if (pdn) { --- 25 unchanged lines hidden --- |