From 6b6db657d89c47855d2b099ce1d5121672986c01 Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Tue, 17 Dec 2019 12:22:38 +0100 Subject: ARM: rdu-common: restart machine after fixing i210 device ID For the iNVM change to take effect we need to reset the i210 adapter. As this is not really possible in isolation in Barebox, we just go through a full machine reset cycle. As this should only happen once during the lifetime of each device there is no need for a more elaborate solution. Signed-off-by: Lucas Stach Signed-off-by: Sascha Hauer --- arch/arm/boards/zii-common/board.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/arm/boards/zii-common/board.c b/arch/arm/boards/zii-common/board.c index eafb5a3aa8..7bd3a6cabc 100644 --- a/arch/arm/boards/zii-common/board.c +++ b/arch/arm/boards/zii-common/board.c @@ -13,11 +13,12 @@ */ #include +#include #include #include -#include -#include #include +#include +#include static int rdu_eth_register_ethaddr(struct device_node *np) { @@ -129,6 +130,9 @@ static int rdu_i210_invm(void) val = I210_CFGWORD_PCIID_157B; pwrite(fd, &val, sizeof(val), 0); + shutdown_barebox(); + restart_machine(); + return 0; } late_initcall(rdu_i210_invm); -- cgit v1.2.3