[PATCH: For next 2/2] board: phytec-som-am335x: Print last occurred reset reason.

Wadim Egorov w.egorov at phytec.de
Mon Feb 9 07:01:47 PST 2015


Print the last occurred reset reason in MLO.

Signed-off-by: Wadim Egorov <w.egorov at phytec.de>
---
 arch/arm/boards/phytec-som-am335x/board.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boards/phytec-som-am335x/board.c b/arch/arm/boards/phytec-som-am335x/board.c
index d084898..61ee0f9 100644
--- a/arch/arm/boards/phytec-som-am335x/board.c
+++ b/arch/arm/boards/phytec-som-am335x/board.c
@@ -96,8 +96,10 @@ static int physom_devices_init(void)
 		xloadslots, ARRAY_SIZE(xloadslots));
 	am33xx_bbu_nand_register_handler("nand", "/dev/nand0.barebox.bb");
 
-	if (IS_ENABLED(CONFIG_SHELL_NONE))
+	if (IS_ENABLED(CONFIG_SHELL_NONE)) {
+		printf("%s reset occurred\n", am33xx_get_reset_reason_str());
 		return am33xx_of_register_bootdevice();
+	}
 
 	return 0;
 }
-- 
1.9.1




More information about the barebox mailing list