diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-04 13:02:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-04 13:02:38 -0400 |
commit | d27050641e9bc056446deb0814e7ba1aa7911f5a (patch) | |
tree | 160f46d9a6df3d7234c71a9fbaa31ebcf89c04d0 /arch/mips/ralink | |
parent | b77279bc2e81545b20824da701b349272a78e4e7 (diff) | |
parent | 43cb43678705e39b175b325f17938295996aefc7 (diff) |
Merge tag 'devicetree-for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux into next
Pull DeviceTree updates from Rob Herring:
- Another round of clean-up of FDT related code in architecture code.
This removes knowledge of internal FDT details from most
architectures except powerpc.
- Conversion of kernel's custom FDT parsing code to use libfdt.
- DT based initialization for generic serial earlycon. The
introduction of generic serial earlycon support went in through the
tty tree.
- Improve the platform device naming for DT probed devices to ensure
unique naming and use parent names instead of a global index.
- Fix a race condition in of_update_property.
- Unify the various linker section OF match tables and fix several
function prototype errors.
- Update platform_get_irq_byname to work in deferred probe cases.
- 2 binding doc updates
* tag 'devicetree-for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (58 commits)
of: handle NULL node in next_child iterators
of/irq: provide more wrappers for !CONFIG_OF
devicetree: bindings: Document micrel vendor prefix
dt: bindings: dwc2: fix required value for the phy-names property
of_pci_irq: kill useless variable in of_irq_parse_pci()
of/irq: do irq resolution in platform_get_irq_byname()
of: Add a testcase for of_find_node_by_path()
of: Make of_find_node_by_path() handle /aliases
of: Create unlocked version of for_each_child_of_node()
lib: add glibc style strchrnul() variant
of: Handle memory@0 node on PPC32 only
pci/of: Remove dead code
of: fix race between search and remove in of_update_property()
of: Use NULL for pointers
of: Stop naming platform_device using dcr address
of: Ensure unique names without sacrificing determinism
tty/serial: pl011: add DT based earlycon support
of/fdt: add FDT serial scanning for earlycon
of/fdt: add FDT address translation support
serial: earlycon: add DT support
...
Diffstat (limited to 'arch/mips/ralink')
-rw-r--r-- | arch/mips/ralink/of.c | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/arch/mips/ralink/of.c b/arch/mips/ralink/of.c index eccc5526155e..251395210e23 100644 --- a/arch/mips/ralink/of.c +++ b/arch/mips/ralink/of.c | |||
@@ -28,8 +28,6 @@ | |||
28 | __iomem void *rt_sysc_membase; | 28 | __iomem void *rt_sysc_membase; |
29 | __iomem void *rt_memc_membase; | 29 | __iomem void *rt_memc_membase; |
30 | 30 | ||
31 | extern struct boot_param_header __dtb_start; | ||
32 | |||
33 | __iomem void *plat_of_remap_node(const char *node) | 31 | __iomem void *plat_of_remap_node(const char *node) |
34 | { | 32 | { |
35 | struct resource res; | 33 | struct resource res; |
@@ -52,30 +50,7 @@ __iomem void *plat_of_remap_node(const char *node) | |||
52 | 50 | ||
53 | void __init device_tree_init(void) | 51 | void __init device_tree_init(void) |
54 | { | 52 | { |
55 | unsigned long base, size; | 53 | unflatten_and_copy_device_tree(); |
56 | void *fdt_copy; | ||
57 | |||
58 | if (!initial_boot_params) | ||
59 | return; | ||
60 | |||
61 | base = virt_to_phys((void *)initial_boot_params); | ||
62 | size = be32_to_cpu(initial_boot_params->totalsize); | ||
63 | |||
64 | /* Before we do anything, lets reserve the dt blob */ | ||
65 | reserve_bootmem(base, size, BOOTMEM_DEFAULT); | ||
66 | |||
67 | /* The strings in the flattened tree are referenced directly by the | ||
68 | * device tree, so copy the flattened device tree from init memory | ||
69 | * to regular memory. | ||
70 | */ | ||
71 | fdt_copy = alloc_bootmem(size); | ||
72 | memcpy(fdt_copy, initial_boot_params, size); | ||
73 | initial_boot_params = fdt_copy; | ||
74 | |||
75 | unflatten_device_tree(); | ||
76 | |||
77 | /* free the space reserved for the dt blob */ | ||
78 | free_bootmem(base, size); | ||
79 | } | 54 | } |
80 | 55 | ||
81 | void __init plat_mem_setup(void) | 56 | void __init plat_mem_setup(void) |
@@ -86,7 +61,7 @@ void __init plat_mem_setup(void) | |||
86 | * Load the builtin devicetree. This causes the chosen node to be | 61 | * Load the builtin devicetree. This causes the chosen node to be |
87 | * parsed resulting in our memory appearing | 62 | * parsed resulting in our memory appearing |
88 | */ | 63 | */ |
89 | __dt_setup_arch(&__dtb_start); | 64 | __dt_setup_arch(__dtb_start); |
90 | 65 | ||
91 | if (soc_info.mem_size) | 66 | if (soc_info.mem_size) |
92 | add_memory_region(soc_info.mem_base, soc_info.mem_size * SZ_1M, | 67 | add_memory_region(soc_info.mem_base, soc_info.mem_size * SZ_1M, |