[PATCH 2/4] power: reset: reboot-mode: parse barebox,mode-* properties

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The same syscon may be used both to communicate with the bootrom and
with barebox. In this case, it may be required that not all boot modes
are enabled for the OS as Linux just makes them available in turn
to userspace. Teach barebox to handle the barebox,mode- prefix the
same way it handles mode-. As Linux doesn't parse this new property,
this means that it is unproblematic to fix it up into the Linux
device tree.

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

diff --git a/drivers/power/reset/reboot-mode.c b/drivers/power/reset/reboot-mode.c
index ab23c32a4370..9a99b4056ff1 100644
--- a/drivers/power/reset/reboot-mode.c
+++ b/drivers/power/reset/reboot-mode.c
@@ -114,6 +114,8 @@ static const char *get_mode_name(const struct property *prop)
 	unsigned prefix_len;
 
 	prefix_len = str_has_prefix(prop->name, "mode-");
+	if (!prefix_len)
+		prefix_len = str_has_prefix(prop->name, "barebox,mode-");
 	if (!prefix_len)
 		return NULL;
 
-- 
2.30.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux