aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2006-07-04 02:47:18 -0400
committerPaul Mackerras <paulus@samba.org>2006-07-07 06:19:16 -0400
commit3da27289a8ecc688fc62c0961dfe89d392370480 (patch)
treecda59eaa2450fa1e98185f0c753210625570228e /arch/powerpc
parentb5a1a9abe1a54ba40a9612001920f98bbdd0c56f (diff)
[POWERPC] Remove linux,pci-domain properties
The linux,pci-domain property is no longer used by DLPAR/PCI Hotplug utilites, or LSVPD. This change removes it. Built for ppc64_defconfig. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/pci_64.c39
1 files changed, 1 insertions, 38 deletions
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index efc0b5559ee0..1d85fcba51e4 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -185,34 +185,6 @@ static void __devinit pci_setup_pci_controller(struct pci_controller *hose)
185 spin_unlock(&hose_spinlock); 185 spin_unlock(&hose_spinlock);
186} 186}
187 187
188static void add_linux_pci_domain(struct device_node *dev,
189 struct pci_controller *phb)
190{
191 struct property *of_prop;
192 unsigned int size;
193
194 of_prop = (struct property *)
195 get_property(dev, "linux,pci-domain", &size);
196 if (of_prop != NULL)
197 return;
198 WARN_ON(of_prop && size < sizeof(int));
199 if (of_prop && size < sizeof(int))
200 of_prop = NULL;
201 size = sizeof(struct property) + sizeof(int);
202 if (of_prop == NULL) {
203 if (mem_init_done)
204 of_prop = kmalloc(size, GFP_KERNEL);
205 else
206 of_prop = alloc_bootmem(size);
207 }
208 memset(of_prop, 0, sizeof(struct property));
209 of_prop->name = "linux,pci-domain";
210 of_prop->length = sizeof(int);
211 of_prop->value = (unsigned char *)&of_prop[1];
212 *((int *)of_prop->value) = phb->global_number;
213 prom_add_property(dev, of_prop);
214}
215
216struct pci_controller * pcibios_alloc_controller(struct device_node *dev) 188struct pci_controller * pcibios_alloc_controller(struct device_node *dev)
217{ 189{
218 struct pci_controller *phb; 190 struct pci_controller *phb;
@@ -226,22 +198,13 @@ struct pci_controller * pcibios_alloc_controller(struct device_node *dev)
226 pci_setup_pci_controller(phb); 198 pci_setup_pci_controller(phb);
227 phb->arch_data = dev; 199 phb->arch_data = dev;
228 phb->is_dynamic = mem_init_done; 200 phb->is_dynamic = mem_init_done;
229 if (dev) { 201 if (dev)
230 PHB_SET_NODE(phb, of_node_to_nid(dev)); 202 PHB_SET_NODE(phb, of_node_to_nid(dev));
231 add_linux_pci_domain(dev, phb);
232 }
233 return phb; 203 return phb;
234} 204}
235 205
236void pcibios_free_controller(struct pci_controller *phb) 206void pcibios_free_controller(struct pci_controller *phb)
237{ 207{
238 if (phb->arch_data) {
239 struct device_node *np = phb->arch_data;
240 int *domain = (int *)get_property(np,
241 "linux,pci-domain", NULL);
242 if (domain)
243 *domain = -1;
244 }
245 if (phb->is_dynamic) 208 if (phb->is_dynamic)
246 kfree(phb); 209 kfree(phb);
247} 210}