Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 143854
b: refs/heads/master
c: 956d039
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Apr 22, 2009
1 parent 098302f commit ac23fd8
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a40ac3414eb4122345efd071f787a349a30fccf7
refs/heads/master: 956d039a2537cf79ca608450d36cc70e0e515482
21 changes: 19 additions & 2 deletions trunk/arch/sparc/kernel/of_device_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
21 changes: 19 additions & 2 deletions trunk/arch/sparc/kernel/of_device_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,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,
Expand Down

0 comments on commit ac23fd8

Please sign in to comment.