]> xenbits.xensource.com Git - people/julieng/boot-wrapper-aarch64.git/commitdiff
If enabled, add the PSCI node to the FDT
authorMatthew Leach <Matthew.Leach@arm.com>
Thu, 23 Jan 2014 17:29:30 +0000 (17:29 +0000)
committerMark Rutland <mark.rutland@arm.com>
Wed, 12 Mar 2014 11:15:58 +0000 (11:15 +0000)
PSCI requires a node to be inserted into the FDT. Do this for the user
automatically if PSCI is enabled.

Signed-off-by: Matthew Leach <matthew.leach@arm.com>
[Mark: add missing "method" property, fix indentation]
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Makefile.am

index 763eb58f63ff3af12ffc54d2a80131189129c282..610e3bbcd5121050ff54a9c92e054fda2a47c7e2 100644 (file)
@@ -26,8 +26,15 @@ BOOTLOADER   := boot.S
 
 if PSCI
 BOOTMETHOD     := psci.o
+PSCI_NODE      := psci {                               \
+                       compatible = \"arm,psci\";      \
+                       method = \"smc\";               \
+                       cpu_on = <0x84000002>;          \
+                       cpu_off = <0x84000001>;         \
+                  };
 else
 BOOTMETHOD     := spin.o
+PSCI_NODE      :=
 endif
 
 MBOX_OFFSET    := 0xfff8
@@ -72,7 +79,7 @@ model.lds: $(LD_SCRIPT) Makefile
        $(CPP) $(CPPFLAGS) -ansi -DPHYS_OFFSET=$(PHYS_OFFSET) -DMBOX_OFFSET=$(MBOX_OFFSET) -DKERNEL_OFFSET=$(KERNEL_OFFSET) -DFDT_OFFSET=$(FDT_OFFSET) -DFS_OFFSET=$(FS_OFFSET) -DKERNEL=$(KERNEL_IMAGE) -DFILESYSTEM=$(FILESYSTEM) -DBOOTMETHOD=$(BOOTMETHOD) -P -C -o $@ $<
 
 fdt.dtb: $(KERNEL_DTB) Makefile
-       ( $(DTC) -O dts -I dtb $(KERNEL_DTB) ; echo "/ { $(CHOSEN_NODE) };" ) | $(DTC) -O dtb -o $@ -
+       ( $(DTC) -O dts -I dtb $(KERNEL_DTB) ; echo "/ { $(CHOSEN_NODE) $(PSCI_NODE) };" ) | $(DTC) -O dtb -o $@ -
 
 # The filesystem archive might not exist if INITRD is not being used
 .PHONY: all clean $(FILESYSTEM)