[PATCH 04/11] ARM: rpi: move rpi_model_init() to postcore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



rpi_model_init() was so far run at late initcall level, at which time
most drivers have already been probed and it's too late to modify the
built-in device tree and see the changes take effect.

To use the same barebox image for multiple boards, it would be
nice to be able to fix up the device tree a bit. Facilitate this by
moving rpi_model_init() to postcore.

This is ok to do because eth_register_ethaddr() can be called prior
to Ethernet driver probe as well. This was tested on a Raspberry Pi 3B.

Signed-off-by: Ahmad Fatoum <ahmad@xxxxxx>
---
 arch/arm/boards/raspberry-pi/rpi-common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c
index 2535146af488..292bcba608d4 100644
--- a/arch/arm/boards/raspberry-pi/rpi-common.c
+++ b/arch/arm/boards/raspberry-pi/rpi-common.c
@@ -279,7 +279,6 @@ static void rpi_model_init(void)
 		return;
 
 	model->init();
-	rpi_add_led();
 }
 
 static int rpi_mem_init(void)
@@ -301,6 +300,7 @@ static int rpi_postcore_init(void)
 {
 	rpi_get_board_rev();
 	barebox_set_hostname("rpi");
+	rpi_model_init();
 
 	return 0;
 }
@@ -463,7 +463,7 @@ static int rpi_devices_init(void)
 {
 	struct regulator *reg;
 
-	rpi_model_init();
+	rpi_add_led();
 	bcm2835_register_fb();
 	armlinux_set_architecture(MACH_TYPE_BCM2708);
 	rpi_env_init();
-- 
2.28.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux