Message ID | 20181015141750.56480-2-sjg@chromium.org |
---|---|
State | Superseded, archived |
Delegated to: | Alexander Graf |
Headers | show |
Series | efi_loader: Code refactoring and improvement | expand |
On 10/15/2018 04:17 PM, Simon Glass wrote: > The CPU uclass expects that all CPUs have a parent device which is a > cpu-bus. Fix up the sandbox test DT to follow this convention. This allow > the code in smbios_write_type4_dm() to work, since it calls > dev_get_parent_platdata() on each CPU. > > Signed-off-by: Simon Glass <sjg@chromium.org> > --- > > Changes in v11: > - Add a new patch to put CPUs under a cpu-bus node > > Changes in v9: None > Changes in v7: None > Changes in v5: None > Changes in v4: None > Changes in v3: None > > arch/sandbox/dts/test.dts | 18 ++++++++++-------- > 1 file changed, 10 insertions(+), 8 deletions(-) > > diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts > index 420b72f4dbc..dc24fef3b21 100644 > --- a/arch/sandbox/dts/test.dts > +++ b/arch/sandbox/dts/test.dts > @@ -344,16 +344,18 @@ > mbox-names = "other", "test"; > }; > > - cpu-test1 { > - compatible = "sandbox,cpu_sandbox"; > - }; > + cpus { Our device trees should adhere to the "Devicetree Specification, Release v0.2" available on https://www.devicetree.org/specifications/ Please, add all required properties: - #address-cells - #size-cells > + cpu-test1 { The device tree specification has: "The node name for every CPU node should be cpu". Please, call the CPUs cpu1 - cpu3. Please, add all required properties: - device-type - reg - clock-frequency - timebase-frequency Best regards Heinrich > + compatible = "sandbox,cpu_sandbox"; > + }; > > - cpu-test2 { > - compatible = "sandbox,cpu_sandbox"; > - }; > + cpu-test2 { > + compatible = "sandbox,cpu_sandbox"; > + }; > > - cpu-test3 { > - compatible = "sandbox,cpu_sandbox"; > + cpu-test3 { > + compatible = "sandbox,cpu_sandbox"; > + }; > }; > > misc-test { >
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index 420b72f4dbc..dc24fef3b21 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts/test.dts @@ -344,16 +344,18 @@ mbox-names = "other", "test"; }; - cpu-test1 { - compatible = "sandbox,cpu_sandbox"; - }; + cpus { + cpu-test1 { + compatible = "sandbox,cpu_sandbox"; + }; - cpu-test2 { - compatible = "sandbox,cpu_sandbox"; - }; + cpu-test2 { + compatible = "sandbox,cpu_sandbox"; + }; - cpu-test3 { - compatible = "sandbox,cpu_sandbox"; + cpu-test3 { + compatible = "sandbox,cpu_sandbox"; + }; }; misc-test {
The CPU uclass expects that all CPUs have a parent device which is a cpu-bus. Fix up the sandbox test DT to follow this convention. This allow the code in smbios_write_type4_dm() to work, since it calls dev_get_parent_platdata() on each CPU. Signed-off-by: Simon Glass <sjg@chromium.org> --- Changes in v11: - Add a new patch to put CPUs under a cpu-bus node Changes in v9: None Changes in v7: None Changes in v5: None Changes in v4: None Changes in v3: None arch/sandbox/dts/test.dts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)