diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2019-12-17 12:22:38 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-12-20 16:16:22 +0100 |
commit | 6b6db657d89c47855d2b099ce1d5121672986c01 (patch) | |
tree | 1b6d91c278cc76fb837b996cad191e7a969d47f7 | |
parent | a176cfb82a91af942385907da6843132a6d76dc7 (diff) | |
download | barebox-6b6db657d89c47855d2b099ce1d5121672986c01.tar.gz barebox-6b6db657d89c47855d2b099ce1d5121672986c01.tar.xz |
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 <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | arch/arm/boards/zii-common/board.c | 8 |
1 files 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 <common.h> +#include <fs.h> #include <globalvar.h> #include <init.h> -#include <fs.h> -#include <net.h> #include <linux/nvmem-consumer.h> +#include <net.h> +#include <restart.h> 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); |