diff mbox series

OF: Use new property "stdout-path" for boot console

Message ID 20180301060632.14289-1-nikunj@linux.vnet.ibm.com
State Accepted
Headers show
Series OF: Use new property "stdout-path" for boot console | expand

Commit Message

Nikunj A Dadhania March 1, 2018, 6:06 a.m. UTC
Linux kernel commit 2a9d832cc9aae21ea827520fef635b6c49a06c6d
(of: Add bindings for chosen node, stdout-path) deprecated chosen property
"linux,stdout-path" and "stdout".

Check for new property "stdout-path" first and as a fallback check
"linux,stdout-path". This older property can be deprecated after 5 years.

Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
---
 board-qemu/slof/OF.fs | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

Comments

Alexey Kardashevskiy March 5, 2018, 4:05 a.m. UTC | #1
On 01/03/18 17:06, Nikunj A Dadhania wrote:
> Linux kernel commit 2a9d832cc9aae21ea827520fef635b6c49a06c6d
> (of: Add bindings for chosen node, stdout-path) deprecated chosen property
> "linux,stdout-path" and "stdout".
> 
> Check for new property "stdout-path" first and as a fallback check
> "linux,stdout-path". This older property can be deprecated after 5 years.
> 
> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>


Thanks, applied.



> ---
>  board-qemu/slof/OF.fs | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/board-qemu/slof/OF.fs b/board-qemu/slof/OF.fs
> index 35fe233..a85f6c5 100644
> --- a/board-qemu/slof/OF.fs
> +++ b/board-qemu/slof/OF.fs
> @@ -214,8 +214,18 @@ romfs-base 400000 0 ' claim CATCH IF ." claim failed!" cr 2drop THEN drop
>  
>  8d0 cp
>  
> +: get-stdout-path ( - [ prop len ] success )
> +    \ Check for new property
> +    s" stdout-path" get-chosen ?dup NOT IF
> +        \ May be running on older qemu, this property will be deprecated
> +        s" linux,stdout-path" get-chosen ?dup NOT IF
> +            FALSE
> +        THEN
> +    THEN
> +;
> +
>  : set-default-console
> -    s" linux,stdout-path" get-chosen IF
> +    get-stdout-path IF
>          decode-string
>          ." Using default console: " 2dup type cr
>          io
>
diff mbox series

Patch

diff --git a/board-qemu/slof/OF.fs b/board-qemu/slof/OF.fs
index 35fe233..a85f6c5 100644
--- a/board-qemu/slof/OF.fs
+++ b/board-qemu/slof/OF.fs
@@ -214,8 +214,18 @@  romfs-base 400000 0 ' claim CATCH IF ." claim failed!" cr 2drop THEN drop
 
 8d0 cp
 
+: get-stdout-path ( - [ prop len ] success )
+    \ Check for new property
+    s" stdout-path" get-chosen ?dup NOT IF
+        \ May be running on older qemu, this property will be deprecated
+        s" linux,stdout-path" get-chosen ?dup NOT IF
+            FALSE
+        THEN
+    THEN
+;
+
 : set-default-console
-    s" linux,stdout-path" get-chosen IF
+    get-stdout-path IF
         decode-string
         ." Using default console: " 2dup type cr
         io