Skip to content

Commit be7cd2d

Browse files
committed
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. Cc: Mark Salter <msalter@redhat.com> Cc: Aurelien Jacquiot <jacquiot.aurelien@gmail.com> Cc: linux-c6x-dev@linux-c6x.org Signed-off-by: Rob Herring <robh@kernel.org>
1 parent a91c614 commit be7cd2d

File tree

5 files changed

+3
-25
lines changed

5 files changed

+3
-25
lines changed

arch/c6x/boot/dts/Makefile

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,5 @@
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

Lines changed: 0 additions & 2 deletions
This file was deleted.

arch/c6x/include/asm/sections.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@ extern char _vectors_start[];
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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ int __init c6x_add_memory(phys_addr_t start, unsigned long size)
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)
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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,6 @@ SECTIONS
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
/*

0 commit comments

Comments
 (0)