diff options
author | Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> | 2016-08-03 10:54:01 +0530 |
---|---|---|
committer | Alexey Kardashevskiy <aik@ozlabs.ru> | 2016-08-03 17:01:08 +1000 |
commit | 2c94f46891fa8ac6cb9cc4bfa2c7e87b322352f7 (patch) | |
tree | 792c8b8cfd3f6c2c0b8bd0557a4d1da96b364b32 /board-qemu | |
parent | 9ca6ebded515bd1ed6f4e3a98d24baac65017ceb (diff) | |
download | SLOF-2c94f46891fa8ac6cb9cc4bfa2c7e87b322352f7.zip SLOF-2c94f46891fa8ac6cb9cc4bfa2c7e87b322352f7.tar.gz SLOF-2c94f46891fa8ac6cb9cc4bfa2c7e87b322352f7.tar.bz2 |
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>
Diffstat (limited to 'board-qemu')
-rw-r--r-- | board-qemu/slof/tree.fs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/board-qemu/slof/tree.fs b/board-qemu/slof/tree.fs index 78dafab..46f7e8f 100644 --- a/board-qemu/slof/tree.fs +++ b/board-qemu/slof/tree.fs @@ -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 |