9
0
Fork 0
barebox/arch/arm/mach-mvebu
Sascha Hauer 295f0b23b5 ARM: mvebu: Simplify memory init order
The initialisation of the memory nodes on mvebu is a bit
compilcated:

pure_initcall(mvebu_memory_fixup_register)
	of_register_fixup(mvebu_memory_of_fixup, NULL)
core_initcall(kirkwood_init_soc)
	mvebu_set_memory()
core_initcall(of_arm_init)
	of_fix_tree()
		mvebu_memory_of_fixup()

First a mvebu common of_fixup function is registered, then the SoC
calls mvebu_set_memory which stores the memory base and size in global
variables. Afterwards the of_fixup is executed which fixes the memory
nodes according to the global variables.

Instead register a SoC specific fixup which directly calls mvebu_set_memory
with the memory base and size as arguments:

pure_initcall(kirkwood_register_soc_fixup);
	of_register_fixup(kirkwood_init_soc, NULL);
core_initcall(of_arm_init)
	of_fix_tree()
		kirkwood_init_soc()
			mvebu_set_memory(phys_base, phys_size);

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-19 09:47:36 +02:00
..
include/mach ARM: mvebu: Simplify memory init order 2014-09-19 09:47:36 +02:00
Kconfig ARM: mvebu: Add Plat'home's Kirkwood Openblocks A6 board support 2014-09-01 11:31:08 +02:00
Makefile ARM: mvebu: move lowlevel code to lowlevel.c 2014-06-24 08:25:03 +02:00
armada-370-xp.c ARM: mvebu: Simplify memory init order 2014-09-19 09:47:36 +02:00
common.c ARM: mvebu: Simplify memory init order 2014-09-19 09:47:36 +02:00
dove.c ARM: mvebu: Simplify memory init order 2014-09-19 09:47:36 +02:00
kirkwood.c ARM: mvebu: Simplify memory init order 2014-09-19 09:47:36 +02:00
lowlevel.c ARM: mvebu: move lowlevel code to lowlevel.c 2014-06-24 08:25:03 +02:00