diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-04-29 14:46:59 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-04-29 14:47:05 +0200 |
| commit | e7fd5d4b3d240f42c30a9e3d20a4689c4d3a795a (patch) | |
| tree | 4ba588631dd8189a818a91c9e3976526071178b6 /arch/sparc/kernel/of_device_32.c | |
| parent | 1130b0296184bc21806225fd06d533515a99d2db (diff) | |
| parent | 56a50adda49b2020156616c4eb15353e0f9ad7de (diff) | |
Merge branch 'linus' into perfcounters/core
Merge reason: This brach was on -rc1, refresh it to almost-rc4 to pick up
the latest upstream fixes.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/sparc/kernel/of_device_32.c')
| -rw-r--r-- | arch/sparc/kernel/of_device_32.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/arch/sparc/kernel/of_device_32.c b/arch/sparc/kernel/of_device_32.c index 0a83bd737654..c8f14c1dc521 100644 --- a/arch/sparc/kernel/of_device_32.c +++ b/arch/sparc/kernel/of_device_32.c @@ -246,8 +246,25 @@ static unsigned long of_bus_pci_get_flags(const u32 *addr, unsigned long flags) static int of_bus_sbus_match(struct device_node *np) { - return !strcmp(np->name, "sbus") || - !strcmp(np->name, "sbi"); + struct device_node *dp = np; + + while (dp) { + if (!strcmp(dp->name, "sbus") || + !strcmp(dp->name, "sbi")) + return 1; + + /* Have a look at use_1to1_mapping(). We're trying + * to match SBUS if that's the top-level bus and we + * don't have some intervening real bus that provides + * ranges based translations. + */ + if (of_find_property(dp, "ranges", NULL) != NULL) + break; + + dp = dp->parent; + } + + return 0; } static void of_bus_sbus_count_cells(struct device_node *child, |
