Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180945
b: refs/heads/master
c: 4ef7b37
h: refs/heads/master
i:
  180943: 38efbb7
v: v3
  • Loading branch information
Jeremy Kerr authored and Grant Likely committed Feb 14, 2010
1 parent acb2048 commit 6a77f6c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 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: 9dfbf207802c7e8cda9d081a8d750b50633c82d2
refs/heads/master: 4ef7b373df330bc0ff037dc4792d373c9346375f
5 changes: 5 additions & 0 deletions trunk/arch/microblaze/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
lmb_add(base, size);
}

u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
{
return lmb_alloc(size, align);
}

#ifdef CONFIG_EARLY_PRINTK
/* MS this is Microblaze specifig function */
static int __init early_init_dt_scan_serial(unsigned long node,
Expand Down
5 changes: 5 additions & 0 deletions trunk/arch/powerpc/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,11 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
memstart_addr = min((u64)memstart_addr, base);
}

u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
{
return lmb_alloc(size, align);
}

#ifdef CONFIG_BLK_DEV_INITRD
void __init early_init_dt_setup_initrd_arch(unsigned long start,
unsigned long end)
Expand Down
9 changes: 6 additions & 3 deletions trunk/drivers/of/fdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@
*/

#include <linux/kernel.h>
#include <linux/lmb.h>
#include <linux/initrd.h>
#include <linux/of.h>
#include <linux/of_fdt.h>

#include <linux/string.h>
#include <linux/errno.h>

#ifdef CONFIG_PPC
#include <asm/machdep.h>
#endif /* CONFIG_PPC */

#include <asm/page.h>

int __initdata dt_root_addr_cells;
int __initdata dt_root_size_cells;

Expand Down Expand Up @@ -560,7 +562,8 @@ void __init unflatten_device_tree(void)
pr_debug(" size is %lx, allocating...\n", size);

/* Allocate memory for the expanded device tree */
mem = lmb_alloc(size + 4, __alignof__(struct device_node));
mem = early_init_dt_alloc_memory_arch(size + 4,
__alignof__(struct device_node));
mem = (unsigned long) __va(mem);

((__be32 *)mem)[size / 4] = cpu_to_be32(0xdeadbeef);
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/of_fdt.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +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 early_init_dt_alloc_memory_arch(u64 size, u64 align);
extern u64 dt_mem_next_cell(int s, __be32 **cellp);

/*
Expand Down

0 comments on commit 6a77f6c

Please sign in to comment.