mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 07/13] sandbox: use nvmem-reboot-mode instead of syscon-reboot-mode
Date: Sat, 19 Jun 2021 05:45:10 +0200	[thread overview]
Message-ID: <20210619034516.6737-8-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20210619034516.6737-1-a.fatoum@pengutronix.de>

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@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@0 {
 					reg = <0x0 0x1>;
 				};
+
+				reboot_mode: reboot-mode@1 {
+					reg = <0x1 0x4>;
+				};
 			};
 
 			part_env: env@400 {
-- 
2.29.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


  parent reply	other threads:[~2021-06-19  3:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-19  3:45 [PATCH 00/13] nvmem: misc enhancements Ahmad Fatoum
2021-06-19  3:45 ` [PATCH 01/13] nvmem: bsec: remove unused, left-over, struct member Ahmad Fatoum
2021-06-19  3:45 ` [PATCH 02/13] nvmem: treat devices without nvmem_bus::write as read only Ahmad Fatoum
2021-06-19  3:45 ` [PATCH 03/13] nvmem: add support for new read-only memory (rmem) binding Ahmad Fatoum
2021-06-19  3:45 ` [PATCH 04/13] nvmem: add support for nvmem-cells binding Ahmad Fatoum
2021-06-19  3:45 ` [PATCH 05/13] sandbox: use nvmem on top of stickypage for reset reason Ahmad Fatoum
2021-06-19  3:45 ` [PATCH 06/13] power: reset: port Linux generic NVMEM reboot mode driver Ahmad Fatoum
2021-06-19  3:45 ` Ahmad Fatoum [this message]
2021-06-19  3:45 ` [PATCH 08/13] sandbox: dts: fix unit-address for state partition Ahmad Fatoum
2021-06-19  3:45 ` [PATCH 09/13] nvmem: add command to list nvmem devices Ahmad Fatoum
2021-06-19  3:45 ` [PATCH 10/13] sandbox: hostfile: move initcall to earlier postcore level Ahmad Fatoum
2021-06-19  3:45 ` [PATCH 11/13] of: of_net: sync of_get_mac_address with Linux for NVMEM support Ahmad Fatoum
2021-06-19  3:45 ` [PATCH 12/13] net: consult device tree for ethernet address in NVMEM as fall-back Ahmad Fatoum
2021-06-19  3:45 ` [PATCH 13/13] sandbox: ship sample environment Ahmad Fatoum
2021-06-21  6:05 ` [PATCH 00/13] nvmem: misc enhancements Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210619034516.6737-8-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --subject='Re: [PATCH 07/13] sandbox: use nvmem-reboot-mode instead of syscon-reboot-mode' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox