diff options
Diffstat (limited to 'arch/arm/boards/zii-common/board.c')
-rw-r--r-- | arch/arm/boards/zii-common/board.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/arch/arm/boards/zii-common/board.c b/arch/arm/boards/zii-common/board.c index eafb5a3aa8..96f9243591 100644 --- a/arch/arm/boards/zii-common/board.c +++ b/arch/arm/boards/zii-common/board.c @@ -1,23 +1,13 @@ -/* - * Copyright (C) 2019 Zodiac Inflight Innovation - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ +// SPDX-License-Identifier: GPL-2.0-or-later +// SPDX-FileCopyrightText: 2019 Zodiac Inflight Innovation #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) { @@ -78,7 +68,7 @@ late_initcall(rdu_ethernet_init); static int rdu_networkconfig(void) { static char *rdu_netconfig; - struct device_d *sp_dev; + struct device *sp_dev; if (!of_machine_is_compatible("zii,imx8mq-ultra") && !of_machine_is_compatible("zii,imx6q-zii-rdu2") && @@ -103,6 +93,8 @@ static int rdu_networkconfig(void) } late_initcall(rdu_networkconfig); +#ifdef CONFIG_PCI_IMX6 + #define I210_CFGWORD_PCIID_157B 0x157b1a11 static int rdu_i210_invm(void) { @@ -129,6 +121,11 @@ 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); + +#endif |