mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH master] power: reset: nvmem-reboot-mode: disable device tree fixup
@ 2021-09-22  9:09 Ahmad Fatoum
  2021-10-01 13:27 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2021-09-22  9:09 UTC (permalink / raw)
  To: barebox; +Cc: jbe, Ahmad Fatoum

Fixing up the nvmem reboot device tree node is problematic, because it
contains a phandle to another node. Take the easy way out for now and
expect user to provide matching reboot-mode nodes in both kernel and
barebox device tree manually.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/power/reset/nvmem-reboot-mode.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/power/reset/nvmem-reboot-mode.c b/drivers/power/reset/nvmem-reboot-mode.c
index b82b37d642e7..2086e96400bb 100644
--- a/drivers/power/reset/nvmem-reboot-mode.c
+++ b/drivers/power/reset/nvmem-reboot-mode.c
@@ -57,6 +57,14 @@ static int nvmem_reboot_mode_probe(struct device_d *dev)
 	nvmem_rbm->reboot.write = nvmem_reboot_mode_write;
 	nvmem_rbm->reboot.priority = 200;
 
+	/*
+	 * Fixing up the nvmem reboot device tree node is problematic, because it
+	 * contains a phandle to another node. Take the easy way out for now and
+	 * expect user to provide matching reboot-mode nodes in both kernel and
+	 * barebox device tree manually.
+	 */
+	nvmem_rbm->reboot.no_fixup = true;
+
 	magicbuf = nvmem_cell_read(nvmem_rbm->cell, &len);
 	if (IS_ERR(magicbuf) || len != 4) {
 		dev_err(dev, "error reading reboot mode: %pe\n", magicbuf);
-- 
2.30.2


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH master] power: reset: nvmem-reboot-mode: disable device tree fixup
  2021-09-22  9:09 [PATCH master] power: reset: nvmem-reboot-mode: disable device tree fixup Ahmad Fatoum
@ 2021-10-01 13:27 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2021-10-01 13:27 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox, jbe

On Wed, Sep 22, 2021 at 11:09:40AM +0200, Ahmad Fatoum wrote:
> Fixing up the nvmem reboot device tree node is problematic, because it
> contains a phandle to another node. Take the easy way out for now and
> expect user to provide matching reboot-mode nodes in both kernel and
> barebox device tree manually.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  drivers/power/reset/nvmem-reboot-mode.c | 8 ++++++++
>  1 file changed, 8 insertions(+)

Applied, thanks

Sascha

-- 
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-01 13:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-22  9:09 [PATCH master] power: reset: nvmem-reboot-mode: disable device tree fixup Ahmad Fatoum
2021-10-01 13:27 ` Sascha Hauer

mail archive of the barebox mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://lore.barebox.org/barebox/0 barebox/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 barebox barebox/ https://lore.barebox.org/barebox \
		barebox@lists.infradead.org
	public-inbox-index barebox

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git