[PATCH] ARM: rdu-common: restart machine after fixing i210 device ID

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

 



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@xxxxxxxxxxxxxx>
---
 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 c13b04c2221e..3e44b85a4d70 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);
-- 
2.20.1


_______________________________________________
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