aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/pci_psycho.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-09-10 06:15:56 -0400
committerDavid S. Miller <davem@davemloft.net>2008-09-11 02:11:57 -0400
commit1c03a55cdf309d0939e881b313abbe7e9a67d95e (patch)
treed965f7cbe122dec580656d609521716b3fdd71e7 /arch/sparc64/kernel/pci_psycho.c
parenta21cff3e5e39c087b5a4c5efb20f1744475c556e (diff)
sparc64: Create and use psycho_pbm_init_common().
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/pci_psycho.c')
-rw-r--r--arch/sparc64/kernel/pci_psycho.c32
1 files changed, 4 insertions, 28 deletions
diff --git a/arch/sparc64/kernel/pci_psycho.c b/arch/sparc64/kernel/pci_psycho.c
index 4681e3d8b5fb..2de51fb34ee7 100644
--- a/arch/sparc64/kernel/pci_psycho.c
+++ b/arch/sparc64/kernel/pci_psycho.c
@@ -895,35 +895,8 @@ static void psycho_pbm_strbuf_init(struct pci_pbm_info *pbm,
895static void __init psycho_pbm_init(struct pci_pbm_info *pbm, 895static void __init psycho_pbm_init(struct pci_pbm_info *pbm,
896 struct of_device *op, int is_pbm_a) 896 struct of_device *op, int is_pbm_a)
897{ 897{
898 struct device_node *dp = op->node; 898 psycho_pbm_init_common(pbm, op, "PSYCHO", PBM_CHIP_TYPE_PSYCHO);
899
900 pbm->next = pci_pbm_root;
901 pci_pbm_root = pbm;
902
903 pbm->numa_node = -1;
904
905 pbm->pci_ops = &sun4u_pci_ops;
906 pbm->config_space_reg_bits = 8;
907
908 pbm->index = pci_num_pbms++;
909
910 pbm->chip_type = PBM_CHIP_TYPE_PSYCHO;
911 pbm->chip_version = of_getintprop_default(dp, "version#", 0);
912 pbm->chip_revision = of_getintprop_default(dp, "module-revision#", 0);
913
914 pbm->op = op;
915 pbm->name = dp->full_name;
916
917 printk(KERN_INFO "%s: PSYCHO PCI Bus Module ver[%x:%x]\n",
918 pbm->name,
919 pbm->chip_version, pbm->chip_revision);
920
921 pci_determine_mem_io_space(pbm);
922
923 pci_get_pbm_props(pbm);
924
925 psycho_pbm_strbuf_init(pbm, is_pbm_a); 899 psycho_pbm_strbuf_init(pbm, is_pbm_a);
926
927 psycho_scan_bus(pbm, &op->dev); 900 psycho_scan_bus(pbm, &op->dev);
928} 901}
929 902
@@ -1009,6 +982,9 @@ static int __devinit psycho_probe(struct of_device *op,
1009 982
1010 psycho_pbm_init(pbm, op, is_pbm_a); 983 psycho_pbm_init(pbm, op, is_pbm_a);
1011 984
985 pbm->next = pci_pbm_root;
986 pci_pbm_root = pbm;
987
1012 if (pbm->sibling) 988 if (pbm->sibling)
1013 pbm->sibling->sibling = pbm; 989 pbm->sibling->sibling = pbm;
1014 990