diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-05-08 00:51:41 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-05-08 19:41:12 -0400 |
commit | cfa0652c4eb4ca37f88fcdd7d871cf98d9d98c0e (patch) | |
tree | 14a3278bd62870a1b0a8fb3ba709fd2f3f3257ee /arch/sparc64/kernel/pci_common.c | |
parent | 36f021b579d195cdc5fa6f3e2bab198b4bf70643 (diff) |
[SPARC64] PCI: Use common routine to fetch PBM properties.
Namely bus-range and ino-bitmap.
This allows us also to eliminate pci_controller_info's
pci_{first,last}_busno fields as only the pbm ones are
used now.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/pci_common.c')
-rw-r--r-- | arch/sparc64/kernel/pci_common.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/pci_common.c b/arch/sparc64/kernel/pci_common.c index 1e6aeedf43c4..b1168bfa16fb 100644 --- a/arch/sparc64/kernel/pci_common.c +++ b/arch/sparc64/kernel/pci_common.c | |||
@@ -15,6 +15,20 @@ | |||
15 | 15 | ||
16 | #include "pci_impl.h" | 16 | #include "pci_impl.h" |
17 | 17 | ||
18 | void pci_get_pbm_props(struct pci_pbm_info *pbm) | ||
19 | { | ||
20 | const u32 *val = of_get_property(pbm->prom_node, "bus-range", NULL); | ||
21 | |||
22 | pbm->pci_first_busno = val[0]; | ||
23 | pbm->pci_last_busno = val[1]; | ||
24 | |||
25 | val = of_get_property(pbm->prom_node, "ino-bitmap", NULL); | ||
26 | if (val) { | ||
27 | pbm->ino_bitmap = (((u64)val[1] << 32UL) | | ||
28 | ((u64)val[0] << 0UL)); | ||
29 | } | ||
30 | } | ||
31 | |||
18 | static void pci_register_legacy_regions(struct resource *io_res, | 32 | static void pci_register_legacy_regions(struct resource *io_res, |
19 | struct resource *mem_res) | 33 | struct resource *mem_res) |
20 | { | 34 | { |