Remove dependency on cpu/@0 for booting

With the addition of cpu hotplug in QEMU, cpu@0 can be removed as well.
SLOF should not depend on it. Find the first child in the "/cpus" node
and get the timer base frequency and set it as the chosen cpu as well

Reported-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
This commit is contained in:
Nikunj A Dadhania 2016-08-03 10:54:01 +05:30 committed by Alexey Kardashevskiy
parent 9ca6ebded5
commit 2c94f46891
1 changed files with 11 additions and 2 deletions

View File

@ -45,7 +45,9 @@ device-end
\ Fixup timebase frequency from device-tree
: fixup-tbfreq
" /cpus/@0" find-device
" /cpus" find-device
get-node child dup 0= ABORT" CPU not found"
set-node
" timebase-frequency" get-node get-package-property IF
2drop
ELSE
@ -167,7 +169,14 @@ populate-pci-busses
6c0 cp
s" /cpus/@0" open-dev encode-int s" cpu" set-chosen
\ Do not assume that cpu0 is available
: set-chosen-cpu
" /cpus" find-device
get-node child dup 0= ABORT" CPU not found"
node>path open-dev encode-int s" cpu" set-chosen
;
set-chosen-cpu
s" /memory@0" open-dev encode-int s" memory" set-chosen
6e0 cp