diff options
author | Stefan Kristiansson <stefan.kristiansson@saunalahti.fi> | 2011-11-10 15:38:29 (GMT) |
---|---|---|
committer | Jonas Bonn <jonas@southpole.se> | 2012-02-17 08:55:22 (GMT) |
commit | dec830189e1e192a80f574243a2dc31bdc1c4fc5 (patch) | |
tree | 864ae5fd9b3975805195eb2b0396d80e6a408425 /arch/openrisc/kernel/setup.c | |
parent | 2e1c958de4e22b6badc13dba1a0ebaa5aa798664 (diff) | |
download | linux-fsl-qoriq-dec830189e1e192a80f574243a2dc31bdc1c4fc5.tar.xz |
openrisc: enable passing of flattened device tree pointer
This patch enables passing a fdt pointer to the kernel.
This makes for the kernel parameter API:
void kernel(unsigned int fdt);
which, in accordance with the OpenRISC ABI results in:
r3 = pointer to fdt
Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Signed-off-by: Jonas Bonn <jonas@southpole.se>
Diffstat (limited to 'arch/openrisc/kernel/setup.c')
-rw-r--r-- | arch/openrisc/kernel/setup.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/openrisc/kernel/setup.c b/arch/openrisc/kernel/setup.c index 1422f74..bf5eba2 100644 --- a/arch/openrisc/kernel/setup.c +++ b/arch/openrisc/kernel/setup.c @@ -207,18 +207,18 @@ void __init setup_cpuinfo(void) * Handles the pointer to the device tree that this kernel is to use * for establishing the available platform devices. * - * For now, this is limited to using the built-in device tree. In the future, - * it is intended that this function will take a pointer to the device tree - * that is potentially built-in, but potentially also passed in by the - * bootloader, or discovered by some equally clever means... + * Falls back on built-in device tree in case null pointer is passed. */ -void __init or32_early_setup(void) +void __init or32_early_setup(unsigned int fdt) { - - early_init_devtree(__dtb_start); - - printk(KERN_INFO "Compiled-in FDT at 0x%p\n", __dtb_start); + if (fdt) { + early_init_devtree((void*) fdt); + printk(KERN_INFO "FDT at 0x%08x\n", fdt); + } else { + early_init_devtree(__dtb_start); + printk(KERN_INFO "Compiled-in FDT at %p\n", __dtb_start); + } } static int __init openrisc_device_probe(void) |