[PATCH RFC 16/17] c6x: Convert from _fdt_start to __dtb_start

From: Geert Uytterhoeven
Date: Tue Nov 12 2013 - 14:45:05 EST


Kill the c6x-specific __fdt_blob section, and start using .dtb.init.rodata
from <asm-generic/sections.h> for built-in DTBs, like most other DT enabled
architectures.

Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Cc: Aurelien Jacquiot <a-jacquiot@xxxxxx>
Cc: Rob Herring <rob.herring@xxxxxxxxxxx>
Cc: linux-c6x-dev@xxxxxxxxxxxxx
Cc: devicetree@xxxxxxxxxxxxxxx
---
Untested due to lack of cross-compiler, but the changes are similar to
microblaze.

QUESTION: The padding of the DTB is gone, is this OK?

TODO: Start using the DTB logic in scripts/Makefile.lib instead of
arch/c6x/boot/dts/linked_dtb.S

arch/c6x/boot/dts/linked_dtb.S | 2 +-
arch/c6x/include/asm/sections.h | 1 -
arch/c6x/kernel/setup.c | 2 +-
arch/c6x/kernel/vmlinux.lds.S | 9 ---------
4 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/arch/c6x/boot/dts/linked_dtb.S b/arch/c6x/boot/dts/linked_dtb.S
index cf347f1d16ce..a3447423abda 100644
--- a/arch/c6x/boot/dts/linked_dtb.S
+++ b/arch/c6x/boot/dts/linked_dtb.S
@@ -1,2 +1,2 @@
-.section __fdt_blob,"a"
+.section .dtb.init.rodata,"a"
.incbin "arch/c6x/boot/dts/builtin.dtb"
diff --git a/arch/c6x/include/asm/sections.h b/arch/c6x/include/asm/sections.h
index f703989d837a..b0eeca16824f 100644
--- a/arch/c6x/include/asm/sections.h
+++ b/arch/c6x/include/asm/sections.h
@@ -7,6 +7,5 @@ extern char _vectors_start[];
extern char _vectors_end[];

extern char _data_lma[];
-extern char _fdt_start[], _fdt_end[];

#endif /* _ASM_C6X_SECTIONS_H */
diff --git a/arch/c6x/kernel/setup.c b/arch/c6x/kernel/setup.c
index 731db4b9014d..414353027ba9 100644
--- a/arch/c6x/kernel/setup.c
+++ b/arch/c6x/kernel/setup.c
@@ -266,7 +266,7 @@ int __init c6x_add_memory(phys_addr_t start, unsigned long size)
notrace void __init machine_init(unsigned long dt_ptr)
{
struct boot_param_header *dtb = __va(dt_ptr);
- struct boot_param_header *fdt = (struct boot_param_header *)_fdt_start;
+ struct boot_param_header *fdt = &__dtb_start;

/* interrupts must be masked */
set_creg(IER, 2);
diff --git a/arch/c6x/kernel/vmlinux.lds.S b/arch/c6x/kernel/vmlinux.lds.S
index 5a6e141d1641..fea7f7a90f0f 100644
--- a/arch/c6x/kernel/vmlinux.lds.S
+++ b/arch/c6x/kernel/vmlinux.lds.S
@@ -88,15 +88,6 @@ SECTIONS
}

. = 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 = .;

/*
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/