Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 170049
b: refs/heads/master
c: b6caf2a
h: refs/heads/master
i:
  170047: 0d29287
v: v3
  • Loading branch information
Grant Likely committed Oct 15, 2009
1 parent bf79b2b commit 178c976
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 33 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: 50436312f47f1fd2bf82c983638fe27ca7e03238
refs/heads/master: b6caf2ad7ce30648b89c1cf40d8f7cf6f4b58033
12 changes: 0 additions & 12 deletions trunk/arch/microblaze/include/asm/prom.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,6 @@ extern int release_OF_resource(struct device_node *node, int index);
* OF address retreival & translation
*/

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

/* Like of_read_number, but we want an unsigned long result */
#define of_read_ulong(cell, size) of_read_number(cell, size)

/* Translate an OF address block into a CPU physical address
*/
extern u64 of_translate_address(struct device_node *np, const u32 *addr);
Expand Down
20 changes: 0 additions & 20 deletions trunk/arch/powerpc/include/asm/prom.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,26 +89,6 @@ extern int release_OF_resource(struct device_node* node, int index);
* OF address retreival & translation
*/


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

/* Like of_read_number, but we want an unsigned long result */
#ifdef CONFIG_PPC32
static inline unsigned long of_read_ulong(const u32 *cell, int size)
{
return cell[size-1];
}
#else
#define of_read_ulong(cell, size) of_read_number(cell, size)
#endif

/* Translate an OF address block into a CPU physical address
*/
extern u64 of_translate_address(struct device_node *np, const u32 *addr);
Expand Down
23 changes: 23 additions & 0 deletions trunk/include/linux/of.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,29 @@ set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de)
dn->pde = de;
}

/*
* OF address retreival & translation
*/

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

/* Like of_read_number, but we want an unsigned long result */
#ifdef CONFIG_PPC32
static inline unsigned long of_read_ulong(const u32 *cell, int size)
{
return cell[size-1];
}
#else
#define of_read_ulong(cell, size) of_read_number(cell, size)
#endif

#include <asm/prom.h>

/* flag descriptions */
Expand Down

0 comments on commit 178c976

Please sign in to comment.