diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-05-08 02:24:05 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-05-08 19:41:32 -0400 |
commit | f1cd8de2c951e206b57fd76aff279cf13ea25815 (patch) | |
tree | 67b24b716b53fbcc6bdfcbfe6d75e1348e0e9f1a | |
parent | 96a496fd49fb2c3178128237ae4691b7c7df3a3d (diff) |
[SPARC64]: Move pci_ops into pci_pbm_info.
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | arch/sparc64/kernel/pci.c | 3 | ||||
-rw-r--r-- | arch/sparc64/kernel/pci_fire.c | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/pci_psycho.c | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/pci_sabre.c | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/pci_schizo.c | 2 | ||||
-rw-r--r-- | arch/sparc64/kernel/pci_sun4v.c | 2 | ||||
-rw-r--r-- | include/asm-sparc64/pbm.h | 4 |
7 files changed, 7 insertions, 10 deletions
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index c17723fb1c31..b583deb05062 100644 --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c | |||
@@ -743,7 +743,6 @@ int pci_host_bridge_write_pci_cfg(struct pci_bus *bus_dev, | |||
743 | 743 | ||
744 | struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm) | 744 | struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm) |
745 | { | 745 | { |
746 | struct pci_controller_info *p = pbm->parent; | ||
747 | struct device_node *node = pbm->prom_node; | 746 | struct device_node *node = pbm->prom_node; |
748 | struct pci_dev *host_pdev; | 747 | struct pci_dev *host_pdev; |
749 | struct pci_bus *bus; | 748 | struct pci_bus *bus; |
@@ -751,7 +750,7 @@ struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm) | |||
751 | printk("PCI: Scanning PBM %s\n", node->full_name); | 750 | printk("PCI: Scanning PBM %s\n", node->full_name); |
752 | 751 | ||
753 | /* XXX parent device? XXX */ | 752 | /* XXX parent device? XXX */ |
754 | bus = pci_create_bus(NULL, pbm->pci_first_busno, p->pci_ops, pbm); | 753 | bus = pci_create_bus(NULL, pbm->pci_first_busno, pbm->pci_ops, pbm); |
755 | if (!bus) { | 754 | if (!bus) { |
756 | printk(KERN_ERR "Failed to create bus for %s\n", | 755 | printk(KERN_ERR "Failed to create bus for %s\n", |
757 | node->full_name); | 756 | node->full_name); |
diff --git a/arch/sparc64/kernel/pci_fire.c b/arch/sparc64/kernel/pci_fire.c index f55c08ae0aa0..ac40529a5721 100644 --- a/arch/sparc64/kernel/pci_fire.c +++ b/arch/sparc64/kernel/pci_fire.c | |||
@@ -315,6 +315,7 @@ static void pci_fire_pbm_init(struct pci_controller_info *p, | |||
315 | pci_pbm_root = pbm; | 315 | pci_pbm_root = pbm; |
316 | 316 | ||
317 | pbm->scan_bus = pci_fire_scan_bus; | 317 | pbm->scan_bus = pci_fire_scan_bus; |
318 | pbm->pci_ops = &pci_fire_ops; | ||
318 | 319 | ||
319 | pbm->portid = portid; | 320 | pbm->portid = portid; |
320 | pbm->parent = p; | 321 | pbm->parent = p; |
@@ -375,7 +376,6 @@ void fire_pci_init(struct device_node *dp, const char *model_name) | |||
375 | p->index = pci_num_controllers++; | 376 | p->index = pci_num_controllers++; |
376 | 377 | ||
377 | /* XXX MSI support XXX */ | 378 | /* XXX MSI support XXX */ |
378 | p->pci_ops = &pci_fire_ops; | ||
379 | 379 | ||
380 | /* Like PSYCHO and SCHIZO we have a 2GB aligned area | 380 | /* Like PSYCHO and SCHIZO we have a 2GB aligned area |
381 | * for memory space. | 381 | * for memory space. |
diff --git a/arch/sparc64/kernel/pci_psycho.c b/arch/sparc64/kernel/pci_psycho.c index 4801eb441236..405c1dba781b 100644 --- a/arch/sparc64/kernel/pci_psycho.c +++ b/arch/sparc64/kernel/pci_psycho.c | |||
@@ -1087,6 +1087,7 @@ static void psycho_pbm_init(struct pci_controller_info *p, | |||
1087 | pci_pbm_root = pbm; | 1087 | pci_pbm_root = pbm; |
1088 | 1088 | ||
1089 | pbm->scan_bus = psycho_scan_bus; | 1089 | pbm->scan_bus = psycho_scan_bus; |
1090 | pbm->pci_ops = &psycho_ops; | ||
1090 | 1091 | ||
1091 | pbm->chip_type = PBM_CHIP_TYPE_PSYCHO; | 1092 | pbm->chip_type = PBM_CHIP_TYPE_PSYCHO; |
1092 | pbm->chip_version = 0; | 1093 | pbm->chip_version = 0; |
@@ -1155,7 +1156,6 @@ void psycho_init(struct device_node *dp, char *model_name) | |||
1155 | p->pbm_A.portid = upa_portid; | 1156 | p->pbm_A.portid = upa_portid; |
1156 | p->pbm_B.portid = upa_portid; | 1157 | p->pbm_B.portid = upa_portid; |
1157 | p->index = pci_num_controllers++; | 1158 | p->index = pci_num_controllers++; |
1158 | p->pci_ops = &psycho_ops; | ||
1159 | 1159 | ||
1160 | prop = of_find_property(dp, "reg", NULL); | 1160 | prop = of_find_property(dp, "reg", NULL); |
1161 | pr_regs = prop->value; | 1161 | pr_regs = prop->value; |
diff --git a/arch/sparc64/kernel/pci_sabre.c b/arch/sparc64/kernel/pci_sabre.c index 024dbd8ad025..ec265a30af43 100644 --- a/arch/sparc64/kernel/pci_sabre.c +++ b/arch/sparc64/kernel/pci_sabre.c | |||
@@ -1004,6 +1004,7 @@ static void sabre_pbm_init(struct pci_controller_info *p, struct device_node *dp | |||
1004 | printk("%s: SABRE PCI Bus Module\n", pbm->name); | 1004 | printk("%s: SABRE PCI Bus Module\n", pbm->name); |
1005 | 1005 | ||
1006 | pbm->scan_bus = sabre_scan_bus; | 1006 | pbm->scan_bus = sabre_scan_bus; |
1007 | pbm->pci_ops = &sabre_ops; | ||
1007 | 1008 | ||
1008 | pbm->chip_type = PBM_CHIP_TYPE_SABRE; | 1009 | pbm->chip_type = PBM_CHIP_TYPE_SABRE; |
1009 | pbm->parent = p; | 1010 | pbm->parent = p; |
@@ -1062,7 +1063,6 @@ void sabre_init(struct device_node *dp, char *model_name) | |||
1062 | 1063 | ||
1063 | p->pbm_A.portid = upa_portid; | 1064 | p->pbm_A.portid = upa_portid; |
1064 | p->index = pci_num_controllers++; | 1065 | p->index = pci_num_controllers++; |
1065 | p->pci_ops = &sabre_ops; | ||
1066 | 1066 | ||
1067 | /* | 1067 | /* |
1068 | * Map in SABRE register set and report the presence of this SABRE. | 1068 | * Map in SABRE register set and report the presence of this SABRE. |
diff --git a/arch/sparc64/kernel/pci_schizo.c b/arch/sparc64/kernel/pci_schizo.c index 4ebdcbd5262a..a0da7f2c344e 100644 --- a/arch/sparc64/kernel/pci_schizo.c +++ b/arch/sparc64/kernel/pci_schizo.c | |||
@@ -1462,6 +1462,7 @@ static void schizo_pbm_init(struct pci_controller_info *p, | |||
1462 | pci_pbm_root = pbm; | 1462 | pci_pbm_root = pbm; |
1463 | 1463 | ||
1464 | pbm->scan_bus = schizo_scan_bus; | 1464 | pbm->scan_bus = schizo_scan_bus; |
1465 | pbm->pci_ops = &schizo_ops; | ||
1465 | 1466 | ||
1466 | pbm->portid = portid; | 1467 | pbm->portid = portid; |
1467 | pbm->parent = p; | 1468 | pbm->parent = p; |
@@ -1536,7 +1537,6 @@ static void __schizo_init(struct device_node *dp, char *model_name, int chip_typ | |||
1536 | p->pbm_B.iommu = iommu; | 1537 | p->pbm_B.iommu = iommu; |
1537 | 1538 | ||
1538 | p->index = pci_num_controllers++; | 1539 | p->index = pci_num_controllers++; |
1539 | p->pci_ops = &schizo_ops; | ||
1540 | 1540 | ||
1541 | /* Like PSYCHO we have a 2GB aligned area for memory space. */ | 1541 | /* Like PSYCHO we have a 2GB aligned area for memory space. */ |
1542 | pci_memspace_mask = 0x7fffffffUL; | 1542 | pci_memspace_mask = 0x7fffffffUL; |
diff --git a/arch/sparc64/kernel/pci_sun4v.c b/arch/sparc64/kernel/pci_sun4v.c index 0a101cb22320..ea61fec206a7 100644 --- a/arch/sparc64/kernel/pci_sun4v.c +++ b/arch/sparc64/kernel/pci_sun4v.c | |||
@@ -1236,6 +1236,7 @@ static void pci_sun4v_pbm_init(struct pci_controller_info *p, struct device_node | |||
1236 | pci_pbm_root = pbm; | 1236 | pci_pbm_root = pbm; |
1237 | 1237 | ||
1238 | pbm->scan_bus = pci_sun4v_scan_bus; | 1238 | pbm->scan_bus = pci_sun4v_scan_bus; |
1239 | pbm->pci_ops = &pci_sun4v_ops; | ||
1239 | 1240 | ||
1240 | pbm->parent = p; | 1241 | pbm->parent = p; |
1241 | pbm->prom_node = dp; | 1242 | pbm->prom_node = dp; |
@@ -1306,7 +1307,6 @@ void sun4v_pci_init(struct device_node *dp, char *model_name) | |||
1306 | p->setup_msi_irq = pci_sun4v_setup_msi_irq; | 1307 | p->setup_msi_irq = pci_sun4v_setup_msi_irq; |
1307 | p->teardown_msi_irq = pci_sun4v_teardown_msi_irq; | 1308 | p->teardown_msi_irq = pci_sun4v_teardown_msi_irq; |
1308 | #endif | 1309 | #endif |
1309 | p->pci_ops = &pci_sun4v_ops; | ||
1310 | 1310 | ||
1311 | /* Like PSYCHO and SCHIZO we have a 2GB aligned area | 1311 | /* Like PSYCHO and SCHIZO we have a 2GB aligned area |
1312 | * for memory space. | 1312 | * for memory space. |
diff --git a/include/asm-sparc64/pbm.h b/include/asm-sparc64/pbm.h index cc0e2677773f..1f4de53dcd03 100644 --- a/include/asm-sparc64/pbm.h +++ b/include/asm-sparc64/pbm.h | |||
@@ -116,6 +116,7 @@ struct pci_pbm_info { | |||
116 | unsigned int pci_last_busno; | 116 | unsigned int pci_last_busno; |
117 | struct pci_bus *pci_bus; | 117 | struct pci_bus *pci_bus; |
118 | void (*scan_bus)(struct pci_pbm_info *); | 118 | void (*scan_bus)(struct pci_pbm_info *); |
119 | struct pci_ops *pci_ops; | ||
119 | }; | 120 | }; |
120 | 121 | ||
121 | struct pci_controller_info { | 122 | struct pci_controller_info { |
@@ -134,9 +135,6 @@ struct pci_controller_info { | |||
134 | struct msi_desc *entry); | 135 | struct msi_desc *entry); |
135 | void (*teardown_msi_irq)(unsigned int virt_irq, struct pci_dev *pdev); | 136 | void (*teardown_msi_irq)(unsigned int virt_irq, struct pci_dev *pdev); |
136 | #endif | 137 | #endif |
137 | |||
138 | /* Now things for the actual PCI bus probes. */ | ||
139 | struct pci_ops *pci_ops; | ||
140 | }; | 138 | }; |
141 | 139 | ||
142 | #endif /* !(__SPARC64_PBM_H) */ | 140 | #endif /* !(__SPARC64_PBM_H) */ |