[PATCH 1/4] arm: of: Add a DT quirk method after unflattening

Pantelis Antoniou pantelis.antoniou at konsulko.com
Wed Feb 18 06:59:33 PST 2015


We need a per-machine dt_quirk() method to allow us to perform
device tree quirk processing after unflattening.

Signed-off-by: Pantelis Antoniou <pantelis.antoniou at konsulko.com>
---
 arch/arm/include/asm/mach/arch.h | 1 +
 arch/arm/kernel/setup.c          | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h
index 0406cb3..e873434 100644
--- a/arch/arm/include/asm/mach/arch.h
+++ b/arch/arm/include/asm/mach/arch.h
@@ -51,6 +51,7 @@ struct machine_desc {
 	bool			(*smp_init)(void);
 	void			(*fixup)(struct tag *, char **);
 	void			(*dt_fixup)(void);
+	void			(*dt_quirk)(void);
 	void			(*init_meminfo)(void);
 	void			(*reserve)(void);/* reserve mem blocks	*/
 	void			(*map_io)(void);/* IO mapping function	*/
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index e55408e..e4c6eb5 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -934,6 +934,9 @@ void __init setup_arch(char **cmdline_p)
 
 	unflatten_device_tree();
 
+	if (mdesc->dt_quirk)
+		mdesc->dt_quirk();
+
 	arm_dt_init_cpu_maps();
 	psci_init();
 #ifdef CONFIG_SMP
-- 
1.7.12




More information about the linux-arm-kernel mailing list