-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
David Daney
authored and
Ralf Baechle
committed
Jul 23, 2012
1 parent
7dd265e
commit bbe32ec
Showing
5 changed files
with
36 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 736b1c9c957e38b80d2e36b2ed196fa1c07468bc | ||
refs/heads/master: b01da9f130adbf69cfbad2a65f1327f1382bf4ae |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
obj-y += setup.o platform.o nlm_hal.o | ||
obj-$(CONFIG_OF) += of.o | ||
obj-$(CONFIG_SMP) += wakeup.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#include <linux/bootmem.h> | ||
#include <linux/init.h> | ||
#include <linux/io.h> | ||
#include <linux/of_fdt.h> | ||
#include <asm/byteorder.h> | ||
|
||
static int __init reserve_mem_mach(unsigned long addr, unsigned long size) | ||
{ | ||
return reserve_bootmem(addr, size, BOOTMEM_DEFAULT); | ||
} | ||
|
||
void __init free_mem_mach(unsigned long addr, unsigned long size) | ||
{ | ||
return free_bootmem(addr, size); | ||
} | ||
|
||
void __init device_tree_init(void) | ||
{ | ||
unsigned long base, size; | ||
|
||
if (!initial_boot_params) | ||
return; | ||
|
||
base = virt_to_phys((void *)initial_boot_params); | ||
size = be32_to_cpu(initial_boot_params->totalsize); | ||
|
||
/* Before we do anything, lets reserve the dt blob */ | ||
reserve_mem_mach(base, size); | ||
|
||
unflatten_device_tree(); | ||
|
||
/* free the space reserved for the dt blob */ | ||
free_mem_mach(base, size); | ||
} |