Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180936
b: refs/heads/master
c: 1406bc2
h: refs/heads/master
v: v3
  • Loading branch information
Jeremy Kerr authored and Grant Likely committed Feb 9, 2010
1 parent 22e3638 commit 5e34b57
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 17 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: 50ab2fe147e22c8786552cda1791a61ae81b84d2
refs/heads/master: 1406bc2f57787797d1f6a3675c019a7093769275
10 changes: 10 additions & 0 deletions trunk/arch/microblaze/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,16 @@ void __init early_init_devtree(void *params)
pr_debug(" <- early_init_devtree()\n");
}

#ifdef CONFIG_BLK_DEV_INITRD
void __init early_init_dt_setup_initrd_arch(unsigned long start,
unsigned long end)
{
initrd_start = (unsigned long)__va(start);
initrd_end = (unsigned long)__va(end);
initrd_below_start_ok = 1;
}
#endif

/*******
*
* New implementation of the OF "find" APIs, return a refcounted
Expand Down
10 changes: 10 additions & 0 deletions trunk/arch/powerpc/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,16 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
memstart_addr = min((u64)memstart_addr, base);
}

#ifdef CONFIG_BLK_DEV_INITRD
void __init early_init_dt_setup_initrd_arch(unsigned long start,
unsigned long end)
{
initrd_start = (unsigned long)__va(start);
initrd_end = (unsigned long)__va(end);
initrd_below_start_ok = 1;
}
#endif

static void __init early_reserve_mem(void)
{
u64 base, size;
Expand Down
27 changes: 11 additions & 16 deletions trunk/drivers/of/fdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,28 +384,23 @@ unsigned long __init unflatten_dt_node(unsigned long mem,
*/
void __init early_init_dt_check_for_initrd(unsigned long node)
{
unsigned long len;
unsigned long start, end, len;
u32 *prop;

pr_debug("Looking for initrd properties... ");

prop = of_get_flat_dt_prop(node, "linux,initrd-start", &len);
if (prop) {
initrd_start = (unsigned long)
__va(of_read_ulong(prop, len/4));

prop = of_get_flat_dt_prop(node, "linux,initrd-end", &len);
if (prop) {
initrd_end = (unsigned long)
__va(of_read_ulong(prop, len/4));
initrd_below_start_ok = 1;
} else {
initrd_start = 0;
}
}
if (!prop)
return;
start = of_read_ulong(prop, len/4);

prop = of_get_flat_dt_prop(node, "linux,initrd-end", &len);
if (!prop)
return;
end = of_read_ulong(prop, len/4);

pr_debug("initrd_start=0x%lx initrd_end=0x%lx\n",
initrd_start, initrd_end);
early_init_dt_setup_initrd_arch(start, end);
pr_debug("initrd_start=0x%lx initrd_end=0x%lx\n", start, end);
}
#else
inline void early_init_dt_check_for_initrd(unsigned long node)
Expand Down
10 changes: 10 additions & 0 deletions trunk/include/linux/of_fdt.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ extern int early_init_dt_scan_memory(unsigned long node, const char *uname,
extern void early_init_dt_add_memory_arch(u64 base, u64 size);
extern u64 dt_mem_next_cell(int s, u32 **cellp);

/*
* If BLK_DEV_INITRD, the fdt early init code will call this function,
* to be provided by the arch code. start and end are specified as
* physical addresses.
*/
#ifdef CONFIG_BLK_DEV_INITRD
extern void early_init_dt_setup_initrd_arch(unsigned long start,
unsigned long end);
#endif

/* Early flat tree scan hooks */
extern int early_init_dt_scan_root(unsigned long node, const char *uname,
int depth, void *data);
Expand Down

0 comments on commit 5e34b57

Please sign in to comment.