diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2009-11-23 16:53:09 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2009-11-23 16:53:09 -0500 |
commit | e169cfbef46d62e042614ffafa8880eed1d894bb (patch) | |
tree | 44982b47e17dc361783d89629fbdde751cbc35e3 /drivers/of/fdt.c | |
parent | 2cfcadde83b308240690ff1c18f117d8bc7a08b0 (diff) |
of/flattree: merge find_flat_dt_string and initial_boot_params
Merge common code between Microblaze and PowerPC.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
Tested-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'drivers/of/fdt.c')
-rw-r--r-- | drivers/of/fdt.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c new file mode 100644 index 000000000000..9faa9a5cbdf0 --- /dev/null +++ b/drivers/of/fdt.c | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * Functions for working with the Flattened Device Tree data format | ||
3 | * | ||
4 | * Copyright 2009 Benjamin Herrenschmidt, IBM Corp | ||
5 | * benh@kernel.crashing.org | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * version 2 as published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #include <linux/of.h> | ||
13 | #include <linux/of_fdt.h> | ||
14 | |||
15 | struct boot_param_header *initial_boot_params; | ||
16 | |||
17 | char *find_flat_dt_string(u32 offset) | ||
18 | { | ||
19 | return ((char *)initial_boot_params) + | ||
20 | initial_boot_params->off_dt_strings + offset; | ||
21 | } | ||