[PATCH 07/13] sandbox: use nvmem-reboot-mode instead of syscon-reboot-mode
Ahmad Fatoum
a.fatoum at pengutronix.de
Fri Jun 18 20:45:10 PDT 2021
We have some syscon-reboot-mode users in tree, but no nvmem-reboot-mode
yet. Use the new nvmem-cells binding to remedy this. Added benefit is
that we no longer access unpartitioned space; The reboot mode is now
clearly described in the device tree.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
arch/sandbox/configs/sandbox_defconfig | 2 +-
arch/sandbox/dts/sandbox.dts | 15 ++++++++++-----
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/arch/sandbox/configs/sandbox_defconfig b/arch/sandbox/configs/sandbox_defconfig
index d9d96d948155..881762444b21 100644
--- a/arch/sandbox/configs/sandbox_defconfig
+++ b/arch/sandbox/configs/sandbox_defconfig
@@ -4,7 +4,6 @@ CONFIG_CMDLINE_EDITING=y
CONFIG_AUTO_COMPLETE=y
CONFIG_MENU=y
CONFIG_CONSOLE_ALLOW_COLOR=y
-CONFIG_PARTITION=y
CONFIG_PARTITION_DISK_EFI=y
CONFIG_DEFAULT_COMPRESSION_GZIP=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
@@ -126,6 +125,7 @@ CONFIG_WATCHDOG_POLLER=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_DS1307=y
CONFIG_SYSCON_REBOOT_MODE=y
+CONFIG_NVMEM_REBOOT_MODE=y
CONFIG_FS_CRAMFS=y
CONFIG_FS_EXT4=y
CONFIG_FS_TFTP=y
diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts
index 7f8f1964e408..fa9348d71f62 100644
--- a/arch/sandbox/dts/sandbox.dts
+++ b/arch/sandbox/dts/sandbox.dts
@@ -59,11 +59,12 @@
barebox,cdev; /* no caching allowed */
bmode: reboot-mode {
- compatible = "syscon-reboot-mode";
- offset = <0>;
- mask = <0xffffff00>;
- mode-normal = <0x00000000>;
- mode-loader = <0xbbbbbb00>;
+ compatible = "nvmem-reboot-mode";
+ nvmem-cells = <&reboot_mode>;
+ nvmem-cell-names = "reboot-mode";
+
+ mode-normal = <0x000000>;
+ mode-loader = <0xbbbbbb>;
};
partitions {
@@ -81,6 +82,10 @@
reset_source: reset-source at 0 {
reg = <0x0 0x1>;
};
+
+ reboot_mode: reboot-mode at 1 {
+ reg = <0x1 0x4>;
+ };
};
part_env: env at 400 {
--
2.29.2
More information about the barebox
mailing list