diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-12 02:52:17 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-12 02:52:17 -0500 |
commit | 10d0c9705e80bbd3d587c5fad24599aabaca6688 (patch) | |
tree | 9456083a1b04b8d98da08d88e937cfeff80e2a7d /arch/arm64/kernel | |
parent | 85b656cf1560e27a89354a23f2c10ba229d2f173 (diff) | |
parent | c11eede69b6ad0ac44ebc1e021a8d2699c5f1f8f (diff) |
Merge tag 'devicetree-for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull devicetree updates from Rob Herring:
"DeviceTree updates for 3.13. This is a bit larger pull request than
usual for this cycle with lots of clean-up.
- Cross arch clean-up and consolidation of early DT scanning code.
- Clean-up and removal of arch prom.h headers. Makes arch specific
prom.h optional on all but Sparc.
- Addition of interrupts-extended property for devices connected to
multiple interrupt controllers.
- Refactoring of DT interrupt parsing code in preparation for
deferred probe of interrupts.
- ARM cpu and cpu topology bindings documentation.
- Various DT vendor binding documentation updates"
* tag 'devicetree-for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (82 commits)
powerpc: add missing explicit OF includes for ppc
dt/irq: add empty of_irq_count for !OF_IRQ
dt: disable self-tests for !OF_IRQ
of: irq: Fix interrupt-map entry matching
MIPS: Netlogic: replace early_init_devtree() call
of: Add Panasonic Corporation vendor prefix
of: Add Chunghwa Picture Tubes Ltd. vendor prefix
of: Add AU Optronics Corporation vendor prefix
of/irq: Fix potential buffer overflow
of/irq: Fix bug in interrupt parsing refactor.
of: set dma_mask to point to coherent_dma_mask
of: add vendor prefix for PHYTEC Messtechnik GmbH
DT: sort vendor-prefixes.txt
of: Add vendor prefix for Cadence
of: Add empty for_each_available_child_of_node() macro definition
arm/versatile: Fix versatile irq specifications.
of/irq: create interrupts-extended property
microblaze/pci: Drop PowerPC-ism from irq parsing
of/irq: Create of_irq_parse_and_map_pci() to consolidate arch code.
of/irq: Use irq_of_parse_and_map()
...
Diffstat (limited to 'arch/arm64/kernel')
-rw-r--r-- | arch/arm64/kernel/setup.c | 60 |
1 files changed, 4 insertions, 56 deletions
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index 47905598d790..0bc5e4cbc017 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c | |||
@@ -140,70 +140,18 @@ static void __init setup_processor(void) | |||
140 | 140 | ||
141 | static void __init setup_machine_fdt(phys_addr_t dt_phys) | 141 | static void __init setup_machine_fdt(phys_addr_t dt_phys) |
142 | { | 142 | { |
143 | struct boot_param_header *devtree; | 143 | if (!dt_phys || !early_init_dt_scan(phys_to_virt(dt_phys))) { |
144 | unsigned long dt_root; | ||
145 | |||
146 | /* Check we have a non-NULL DT pointer */ | ||
147 | if (!dt_phys) { | ||
148 | early_print("\n" | ||
149 | "Error: NULL or invalid device tree blob\n" | ||
150 | "The dtb must be 8-byte aligned and passed in the first 512MB of memory\n" | ||
151 | "\nPlease check your bootloader.\n"); | ||
152 | |||
153 | while (true) | ||
154 | cpu_relax(); | ||
155 | |||
156 | } | ||
157 | |||
158 | devtree = phys_to_virt(dt_phys); | ||
159 | |||
160 | /* Check device tree validity */ | ||
161 | if (be32_to_cpu(devtree->magic) != OF_DT_HEADER) { | ||
162 | early_print("\n" | 144 | early_print("\n" |
163 | "Error: invalid device tree blob at physical address 0x%p (virtual address 0x%p)\n" | 145 | "Error: invalid device tree blob at physical address 0x%p (virtual address 0x%p)\n" |
164 | "Expected 0x%x, found 0x%x\n" | 146 | "The dtb must be 8-byte aligned and passed in the first 512MB of memory\n" |
165 | "\nPlease check your bootloader.\n", | 147 | "\nPlease check your bootloader.\n", |
166 | dt_phys, devtree, OF_DT_HEADER, | 148 | dt_phys, phys_to_virt(dt_phys)); |
167 | be32_to_cpu(devtree->magic)); | ||
168 | 149 | ||
169 | while (true) | 150 | while (true) |
170 | cpu_relax(); | 151 | cpu_relax(); |
171 | } | 152 | } |
172 | 153 | ||
173 | initial_boot_params = devtree; | 154 | machine_name = of_flat_dt_get_machine_name(); |
174 | dt_root = of_get_flat_dt_root(); | ||
175 | |||
176 | machine_name = of_get_flat_dt_prop(dt_root, "model", NULL); | ||
177 | if (!machine_name) | ||
178 | machine_name = of_get_flat_dt_prop(dt_root, "compatible", NULL); | ||
179 | if (!machine_name) | ||
180 | machine_name = "<unknown>"; | ||
181 | pr_info("Machine: %s\n", machine_name); | ||
182 | |||
183 | /* Retrieve various information from the /chosen node */ | ||
184 | of_scan_flat_dt(early_init_dt_scan_chosen, boot_command_line); | ||
185 | /* Initialize {size,address}-cells info */ | ||
186 | of_scan_flat_dt(early_init_dt_scan_root, NULL); | ||
187 | /* Setup memory, calling early_init_dt_add_memory_arch */ | ||
188 | of_scan_flat_dt(early_init_dt_scan_memory, NULL); | ||
189 | } | ||
190 | |||
191 | void __init early_init_dt_add_memory_arch(u64 base, u64 size) | ||
192 | { | ||
193 | base &= PAGE_MASK; | ||
194 | size &= PAGE_MASK; | ||
195 | if (base + size < PHYS_OFFSET) { | ||
196 | pr_warning("Ignoring memory block 0x%llx - 0x%llx\n", | ||
197 | base, base + size); | ||
198 | return; | ||
199 | } | ||
200 | if (base < PHYS_OFFSET) { | ||
201 | pr_warning("Ignoring memory range 0x%llx - 0x%llx\n", | ||
202 | base, PHYS_OFFSET); | ||
203 | size -= PHYS_OFFSET - base; | ||
204 | base = PHYS_OFFSET; | ||
205 | } | ||
206 | memblock_add(base, size); | ||
207 | } | 155 | } |
208 | 156 | ||
209 | /* | 157 | /* |