diff options
author | David S. Miller <davem@davemloft.net> | 2008-09-10 03:15:56 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-09-10 23:11:57 -0700 |
commit | 1c03a55cdf309d0939e881b313abbe7e9a67d95e (patch) | |
tree | d965f7cbe122dec580656d609521716b3fdd71e7 /arch/sparc64/kernel/psycho_common.c | |
parent | a21cff3e5e39c087b5a4c5efb20f1744475c556e (diff) | |
download | lwn-1c03a55cdf309d0939e881b313abbe7e9a67d95e.tar.gz lwn-1c03a55cdf309d0939e881b313abbe7e9a67d95e.zip |
sparc64: Create and use psycho_pbm_init_common().
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/psycho_common.c')
-rw-r--r-- | arch/sparc64/kernel/psycho_common.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/psycho_common.c b/arch/sparc64/kernel/psycho_common.c index 07acc13637b3..1b4d462513df 100644 --- a/arch/sparc64/kernel/psycho_common.c +++ b/arch/sparc64/kernel/psycho_common.c @@ -91,3 +91,25 @@ int psycho_iommu_init(struct pci_pbm_info *pbm, int tsbsize, return 0; } + +void psycho_pbm_init_common(struct pci_pbm_info *pbm, struct of_device *op, + const char *chip_name, int chip_type) +{ + struct device_node *dp = op->node; + + pbm->name = dp->full_name; + pbm->numa_node = -1; + pbm->chip_type = chip_type; + pbm->chip_version = of_getintprop_default(dp, "version#", 0); + pbm->chip_revision = of_getintprop_default(dp, "module-revision#", 0); + pbm->op = op; + pbm->pci_ops = &sun4u_pci_ops; + pbm->config_space_reg_bits = 8; + pbm->index = pci_num_pbms++; + pci_get_pbm_props(pbm); + pci_determine_mem_io_space(pbm); + + printk(KERN_INFO "%s: %s PCI Bus Module ver[%x:%x]\n", + pbm->name, chip_name, + pbm->chip_version, pbm->chip_revision); +} |