MIPS: qemu-malta: use generic syscon reset driver
PATCH 1/1 MIPS: qemu-malta: use generic syscon reset driver
Signed-off-by Antony Pavlov <[email protected]>
--- arch/mips/configs/qemu-malta_defconfig | 2 ++ arch/mips/dts/qemu-malta.dts | 13 +++++++++++ arch/mips/mach-malta/Makefile | 1 - arch/mips/mach-malta/reset.c | 31 -------------------------- 4 files changed, 15 insertions(+), 32 deletions(-)
arch/mips/configs/qemu-malta_defconfig +2 -0
@@ -75,6 +75,8 @@ CONFIG_DRIVER_VIDEO_BOCHS_PCI=y CONFIG_GPIO_MALTA_FPGA_I2C=y CONFIG_PCI=y CONFIG_PCI_DEBUG=y +CONFIG_SYSCON_REBOOT_MODE=y +CONFIG_POWER_RESET_SYSCON=y CONFIG_FS_CRAMFS=y CONFIG_FS_TFTP=y CONFIG_FS_FAT=y
arch/mips/dts/qemu-malta.dts +13 -0
@@ -27,6 +27,19 @@ clock-frequency = <1843200>; }; + fpga_regs: system-controller@1f000000 { + compatible = "mti,malta-fpga", "syscon", "simple-mfd"; + reg = <0x1f000000 0x600>; + native-endian; + + reboot { + compatible = "syscon-reboot"; + regmap = <&fpga_regs>; + offset = <0x500>; + mask = <0x42>; + }; + }; + gpio: gpio@1f000b00 { compatible = "mti,malta-fpga-i2c-gpio"; gpio-controller;
arch/mips/mach-malta/Makefile +0 -1
@@ -1,2 +1 @@ -obj-y += reset.o obj-$(CONFIG_PCI) += pci.o
arch/mips/mach-malta/reset.c deleted +0 -31
@@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* -* Copyright (C) 2011 Antony Pavlov <[email protected]> -*/ - -/** -* @file -* @brief Resetting an malta board -*/ - -#include <common.h> -#include <io.h> -#include <init.h> -#include <restart.h> -#include <mach/hardware.h> - -static void __noreturn malta_restart_soc (struct restart_handler *rst) -{ -__raw_writel (GORESET , (char *)SOFTRES_REG ); - -hang (); -/*NOTREACHED*/ -} - -static int restart_register_feature (void ) -{ -restart_handler_register_fn ("soc" , malta_restart_soc); - -return 0 ; -} -coredevice_initcall (restart_register_feature);
Signature · 7 lines
2.31.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
On Sun, 25 Apr 2021 09:35:17 +0300
Antony Pavlov <[email protected]> wrote:
ping
Quoted 92 lines
Signed-off-by Antony Pavlov <[email protected]>--- arch/mips/configs/qemu-malta_defconfig | 2 ++ arch/mips/dts/qemu-malta.dts | 13 +++++++++++ arch/mips/mach-malta/Makefile | 1 - arch/mips/mach-malta/reset.c | 31 -------------------------- 4 files changed, 15 insertions(+), 32 deletions(-)arch/mips/configs/qemu-malta_defconfig +2
-0@@ -75,6 +75,8 @@ CONFIG_DRIVER_VIDEO_BOCHS_PCI=y CONFIG_GPIO_MALTA_FPGA_I2C=y CONFIG_PCI=y CONFIG_PCI_DEBUG=y +CONFIG_SYSCON_REBOOT_MODE=y +CONFIG_POWER_RESET_SYSCON=y CONFIG_FS_CRAMFS=y CONFIG_FS_TFTP=y CONFIG_FS_FAT=yarch/mips/dts/qemu-malta.dts +13
-0@@ -27,6 +27,19 @@ clock-frequency = <1843200>; }; + fpga_regs: system-controller@1f000000 { + compatible = "mti,malta-fpga", "syscon", "simple-mfd"; + reg = <0x1f000000 0x600>; + native-endian; + + reboot { + compatible = "syscon-reboot"; + regmap = <&fpga_regs>; + offset = <0x500>; + mask = <0x42>; + }; + }; + gpio: gpio@1f000b00 { compatible = "mti,malta-fpga-i2c-gpio"; gpio-controller;arch/mips/mach-malta/Makefile +0
-1@@ -1,2 +1 @@ -obj-y += reset.o obj-$(CONFIG_PCI) += pci.oarch/mips/mach-malta/reset.c deleted +0
-31@@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* -* Copyright (C) 2011 Antony Pavlov <[email protected]> -*/ - -/** -* @file -* @brief Resetting an malta board -*/ - -#include <common.h> -#include <io.h> -#include <init.h> -#include <restart.h> -#include <mach/hardware.h> - -static void __noreturn malta_restart_soc (struct restart_handler *rst) -{ -__raw_writel (GORESET , (char *)SOFTRES_REG ); - -hang (); -/*NOTREACHED*/ -} - -static int restart_register_feature (void ) -{ -restart_handler_register_fn ("soc" , malta_restart_soc); - -return 0 ; -} -coredevice_initcall (restart_register_feature);Signature · 1 line
2.31.1
Signature · 7 lines
Best regards, Antony Pavlov _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedQuoted 7 lines · Antony Pavlov
Signed-off-by Antony Pavlov <[email protected]>--- arch/mips/configs/qemu-malta_defconfig | 2 ++ arch/mips/dts/qemu-malta.dts | 13 +++++++++++ arch/mips/mach-malta/Makefile | 1 - arch/mips/mach-malta/reset.c | 31 -------------------------- 4 files changed, 15 insertions(+), 32 deletions(-)
Applied, thanks
Sascha
Quoted 86 lines
arch/mips/configs/qemu-malta_defconfig +2
-0@@ -75,6 +75,8 @@ CONFIG_DRIVER_VIDEO_BOCHS_PCI=y CONFIG_GPIO_MALTA_FPGA_I2C=y CONFIG_PCI=y CONFIG_PCI_DEBUG=y +CONFIG_SYSCON_REBOOT_MODE=y +CONFIG_POWER_RESET_SYSCON=y CONFIG_FS_CRAMFS=y CONFIG_FS_TFTP=y CONFIG_FS_FAT=yarch/mips/dts/qemu-malta.dts +13
-0@@ -27,6 +27,19 @@ clock-frequency = <1843200>; }; + fpga_regs: system-controller@1f000000 { + compatible = "mti,malta-fpga", "syscon", "simple-mfd"; + reg = <0x1f000000 0x600>; + native-endian; + + reboot { + compatible = "syscon-reboot"; + regmap = <&fpga_regs>; + offset = <0x500>; + mask = <0x42>; + }; + }; + gpio: gpio@1f000b00 { compatible = "mti,malta-fpga-i2c-gpio"; gpio-controller;arch/mips/mach-malta/Makefile +0
-1@@ -1,2 +1 @@ -obj-y += reset.o obj-$(CONFIG_PCI) += pci.oarch/mips/mach-malta/reset.c deleted +0
-31@@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* -* Copyright (C) 2011 Antony Pavlov <[email protected]> -*/ - -/** -* @file -* @brief Resetting an malta board -*/ - -#include <common.h> -#include <io.h> -#include <init.h> -#include <restart.h> -#include <mach/hardware.h> - -static void __noreturn malta_restart_soc (struct restart_handler *rst) -{ -__raw_writel (GORESET , (char *)SOFTRES_REG ); - -hang (); -/*NOTREACHED*/ -} - -static int restart_register_feature (void ) -{ -restart_handler_register_fn ("soc" , malta_restart_soc); - -return 0 ; -} -coredevice_initcall (restart_register_feature);Signature · 1 line
2.31.1
Signature · 9 lines
Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox