Commit be7cd2df authored by Rob Herring's avatar Rob Herring

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: default avatarRob Herring <robh@kernel.org>
parent a91c6145
...@@ -6,14 +6,5 @@ ...@@ -6,14 +6,5 @@
DTC_FLAGS ?= -p 1024 DTC_FLAGS ?= -p 1024
ifneq ($(DTB),) ifneq ($(DTB),)
obj-y += linked_dtb.o obj-y += $(DTB).dtb.o
endif endif
quiet_cmd_cp = CP $< $@$2
cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false)
# Generate builtin.dtb from $(DTB).dtb
$(obj)/builtin.dtb: $(obj)/$(DTB).dtb
$(call if_changed,cp)
$(obj)/linked_dtb.o: $(obj)/builtin.dtb
.section __fdt_blob,"a"
.incbin "arch/c6x/boot/dts/builtin.dtb"
...@@ -8,6 +8,5 @@ extern char _vectors_start[]; ...@@ -8,6 +8,5 @@ extern char _vectors_start[];
extern char _vectors_end[]; extern char _vectors_end[];
extern char _data_lma[]; extern char _data_lma[];
extern char _fdt_start[], _fdt_end[];
#endif /* _ASM_C6X_SECTIONS_H */ #endif /* _ASM_C6X_SECTIONS_H */
...@@ -270,7 +270,7 @@ int __init c6x_add_memory(phys_addr_t start, unsigned long size) ...@@ -270,7 +270,7 @@ int __init c6x_add_memory(phys_addr_t start, unsigned long size)
notrace void __init machine_init(unsigned long dt_ptr) notrace void __init machine_init(unsigned long dt_ptr)
{ {
void *dtb = __va(dt_ptr); void *dtb = __va(dt_ptr);
void *fdt = _fdt_start; void *fdt = __dtb_start;
/* interrupts must be masked */ /* interrupts must be masked */
set_creg(IER, 2); set_creg(IER, 2);
...@@ -363,7 +363,7 @@ void __init setup_arch(char **cmdline_p) ...@@ -363,7 +363,7 @@ void __init setup_arch(char **cmdline_p)
memory_end >> PAGE_SHIFT); memory_end >> PAGE_SHIFT);
memblock_reserve(memory_start, bootmap_size); memblock_reserve(memory_start, bootmap_size);
unflatten_device_tree(); unflatten_and_copy_device_tree();
c6x_cache_init(); c6x_cache_init();
......
...@@ -90,16 +90,6 @@ SECTIONS ...@@ -90,16 +90,6 @@ SECTIONS
*(.switch) *(.switch)
} }
. = ALIGN (8) ;
__fdt_blob : AT(ADDR(__fdt_blob) - LOAD_OFFSET)
{
_fdt_start = . ; /* place for fdt blob */
*(__fdt_blob) ; /* Any link-placed DTB */
BYTE(0); /* section always has contents */
. = _fdt_start + 0x4000; /* Pad up to 16kbyte */
_fdt_end = . ;
}
_etext = .; _etext = .;
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment