Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204894
b: refs/heads/master
c: 3930f29
h: refs/heads/master
v: v3
  • Loading branch information
Grant Likely committed Jul 5, 2010
1 parent 6877442 commit 8960c10
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 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: 154063a9c03d31228b6f9366d2ffc2b7c4961698
refs/heads/master: 3930f294d081c9e2a65f137a7d5fb6c161e4aa94
11 changes: 10 additions & 1 deletion trunk/drivers/of/address.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,21 @@ static int of_translate_one(struct device_node *parent, struct of_bus *bus,
* a 1:1 translation at that level. It's up to the caller not to try
* to translate addresses that aren't supposed to be translated in
* the first place. --BenH.
*
* As far as we know, this damage only exists on Apple machines, so
* This code is only enabled on powerpc. --gcl
*/
ranges = of_get_property(parent, rprop, &rlen);
#if !defined(CONFIG_PPC)
if (ranges == NULL) {
pr_err("OF: no ranges; cannot translate\n");
return 1;
}
#endif /* !defined(CONFIG_PPC) */
if (ranges == NULL || rlen == 0) {
offset = of_read_number(addr, na);
memset(addr, 0, pna * 4);
pr_debug("OF: no ranges, 1:1 translation\n");
pr_debug("OF: empty ranges; 1:1 translation\n");
goto finish;
}

Expand Down

0 comments on commit 8960c10

Please sign in to comment.