History

c6x: use common built-in dtb support

Using the common build support for built-in dtb files just requires adding a .dtb.o target to obj-y. The dtb now needs to be copied when unflattened because an init section is used now.

Rob Herring committed 8 years ago

Commit be7cd2d1 parent a91c6145 files · +3 −25Browse files

Unified · Split

5 files
  1. arch/c6x/boot/dts/Makefile +1 −10
  2. arch/c6x/boot/dts/linked_dtb.S +0 −2
  3. arch/c6x/include/asm/sections.h +0 −1
  4. arch/c6x/kernel/setup.c +2 −2
  5. arch/c6x/kernel/vmlinux.lds.S +0 −10
arch/c6x/boot/dts/Makefile+1−10
@@ -6,14 +6,5 @@ · 5 unmodified lines
66 DTC_FLAGS ?= -p 1024
77
88 ifneq ($(DTB),)
9−obj-y += linked_dtb.o
9+obj-y += $(DTB).dtb.o
1010 endif
11−
12−quiet_cmd_cp = CP $< $@$2
13− cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false)
14−
15−# Generate builtin.dtb from $(DTB).dtb
16−$(obj)/builtin.dtb: $(obj)/$(DTB).dtb
17− $(call if_changed,cp)
18−
19−$(obj)/linked_dtb.o: $(obj)/builtin.dtb
arch/c6x/boot/dts/linked_dtb.S+0−2
@@ -1,2 +0,0 @@
1−.section __fdt_blob,"a"
2−.incbin "arch/c6x/boot/dts/builtin.dtb"
arch/c6x/include/asm/sections.h+0−1
@@ -8,6 +8,5 @@ extern char _vectors_start[]; · 7 unmodified lines
88 extern char _vectors_end[];
99
1010 extern char _data_lma[];
11−extern char _fdt_start[], _fdt_end[];
1211
1312 #endif /* _ASM_C6X_SECTIONS_H */
arch/c6x/kernel/setup.c+2−2
@@ -270,7 +270,7 @@ int __init c6x_add_memory(phys_addr_t start, unsigned long size) · 269 unmodified lines
270270 notrace void __init machine_init(unsigned long dt_ptr)
271271 {
272272 void *dtb = __va(dt_ptr);
273− void *fdt = _fdt_start;
273+ void *fdt = __dtb_start;
274274
275275 /* interrupts must be masked */
276276 set_creg(IER, 2);
@@ -363,7 +363,7 @@ void __init setup_arch(char **cmdline_p) · 86 unmodified lines
363363 memory_end >> PAGE_SHIFT);
364364 memblock_reserve(memory_start, bootmap_size);
365365
366− unflatten_device_tree();
366+ unflatten_and_copy_device_tree();
367367
368368 c6x_cache_init();
369369
arch/c6x/kernel/vmlinux.lds.S+0−10
@@ -90,16 +90,6 @@ SECTIONS · 89 unmodified lines
9090 *(.switch)
9191 }
9292
93− . = ALIGN (8) ;
94− __fdt_blob : AT(ADDR(__fdt_blob) - LOAD_OFFSET)
95− {
96− _fdt_start = . ; /* place for fdt blob */
97− *(__fdt_blob) ; /* Any link-placed DTB */
98− BYTE(0); /* section always has contents */
99− . = _fdt_start + 0x4000; /* Pad up to 16kbyte */
100− _fdt_end = . ;
101− }
102−
10393 _etext = .;
10494
10595 /*