Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180938
b: refs/heads/master
c: 2e89e68
h: refs/heads/master
v: v3
  • Loading branch information
Jeremy Kerr authored and Grant Likely committed Feb 9, 2010
1 parent cb1d924 commit 436dfc9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 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: 36b9d3070d653af5807cef74ff129721d9047107
refs/heads/master: 2e89e685a8fd0e8334de967739d11e2e28c1a4dd
4 changes: 2 additions & 2 deletions trunk/drivers/of/fdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,9 +431,9 @@ int __init early_init_dt_scan_root(unsigned long node, const char *uname,
return 1;
}

u64 __init dt_mem_next_cell(int s, u32 **cellp)
u64 __init dt_mem_next_cell(int s, __be32 **cellp)
{
u32 *p = *cellp;
__be32 *p = *cellp;

*cellp = p + s;
return of_read_number(p, s);
Expand Down
8 changes: 5 additions & 3 deletions trunk/include/linux/of.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#include <linux/kref.h>
#include <linux/mod_devicetable.h>

#include <asm/byteorder.h>

typedef u32 phandle;
typedef u32 ihandle;

Expand Down Expand Up @@ -95,16 +97,16 @@ extern void of_node_put(struct device_node *node);
*/

/* Helper to read a big number; size is in cells (not bytes) */
static inline u64 of_read_number(const u32 *cell, int size)
static inline u64 of_read_number(const __be32 *cell, int size)
{
u64 r = 0;
while (size--)
r = (r << 32) | *(cell++);
r = (r << 32) | be32_to_cpu(*(cell++));
return r;
}

/* Like of_read_number, but we want an unsigned long result */
static inline unsigned long of_read_ulong(const u32 *cell, int size)
static inline unsigned long of_read_ulong(const __be32 *cell, int size)
{
/* toss away upper bits if unsigned long is smaller than u64 */
return of_read_number(cell, size);
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/of_fdt.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ extern void early_init_dt_check_for_initrd(unsigned long node);
extern int early_init_dt_scan_memory(unsigned long node, const char *uname,
int depth, void *data);
extern void early_init_dt_add_memory_arch(u64 base, u64 size);
extern u64 dt_mem_next_cell(int s, u32 **cellp);
extern u64 dt_mem_next_cell(int s, __be32 **cellp);

/*
* If BLK_DEV_INITRD, the fdt early init code will call this function,
Expand Down

0 comments on commit 436dfc9

Please sign in to comment.