linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: aspeed: Add default memory node
@ 2018-03-14  7:13 Joel Stanley
  2018-03-14  9:03 ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Stanley @ 2018-03-14  7:13 UTC (permalink / raw)
  To: linux-arm-kernel

When we removed the inclusion of skeleton.dtsi from the device trees, we
broke booting for systems with bootloaders that aren't device tre aware.
This can be seen, for example, when appending the device tree blob to
the kernel image.

The reason booting broke was that the kernel lacked the device_type
label in the memory node. Add in a default memory node wth the
device_type. It can contain the memory address as the location is fixed
for each SoC generation, but the size needs to be added by the
bootloader or the board specific dts.

Fixes: 73102d6fdc32 ("ARM: dts: aspeed: Remove skeleton.dtsi")
Cc: <stable@vger.kernel.org>
Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
Arnd, can you please merge this as a fix for 4.16?

 arch/arm/boot/dts/aspeed-g4.dtsi | 5 +++++
 arch/arm/boot/dts/aspeed-g5.dtsi | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi
index 36ae23aa3b48..518d2bc7c7fc 100644
--- a/arch/arm/boot/dts/aspeed-g4.dtsi
+++ b/arch/arm/boot/dts/aspeed-g4.dtsi
@@ -42,6 +42,11 @@
 		};
 	};
 
+	memory at 40000000 {
+		device_type = "memory";
+		reg = <0x40000000 0>;
+	};
+
 	ahb {
 		compatible = "simple-bus";
 		#address-cells = <1>;
diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
index 17ee0fa33a14..f9917717dd08 100644
--- a/arch/arm/boot/dts/aspeed-g5.dtsi
+++ b/arch/arm/boot/dts/aspeed-g5.dtsi
@@ -42,6 +42,11 @@
 		};
 	};
 
+	memory at 80000000 {
+		device_type = "memory";
+		reg = <0x80000000 0>;
+	};
+
 	ahb {
 		compatible = "simple-bus";
 		#address-cells = <1>;
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] ARM: dts: aspeed: Add default memory node
  2018-03-14  7:13 [PATCH] ARM: dts: aspeed: Add default memory node Joel Stanley
@ 2018-03-14  9:03 ` Arnd Bergmann
  2018-03-27  3:37   ` Joel Stanley
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2018-03-14  9:03 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 14, 2018 at 8:13 AM, Joel Stanley <joel@jms.id.au> wrote:
> When we removed the inclusion of skeleton.dtsi from the device trees, we
> broke booting for systems with bootloaders that aren't device tre aware.
> This can be seen, for example, when appending the device tree blob to
> the kernel image.
>
> The reason booting broke was that the kernel lacked the device_type
> label in the memory node. Add in a default memory node wth the
> device_type. It can contain the memory address as the location is fixed
> for each SoC generation, but the size needs to be added by the
> bootloader or the board specific dts.
>
> Fixes: 73102d6fdc32 ("ARM: dts: aspeed: Remove skeleton.dtsi")
> Cc: <stable@vger.kernel.org>
> Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Signed-off-by: Joel Stanley <joel@jms.id.au>
> ---
> Arnd, can you please merge this as a fix for 4.16?

Sure, applied to fixes branch now.

     Arnd

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] ARM: dts: aspeed: Add default memory node
  2018-03-14  9:03 ` Arnd Bergmann
@ 2018-03-27  3:37   ` Joel Stanley
  0 siblings, 0 replies; 3+ messages in thread
From: Joel Stanley @ 2018-03-27  3:37 UTC (permalink / raw)
  To: linux-arm-kernel

On 14 March 2018 at 19:33, Arnd Bergmann <arnd@arndb.de> wrote:
> On Wed, Mar 14, 2018 at 8:13 AM, Joel Stanley <joel@jms.id.au> wrote:
>> When we removed the inclusion of skeleton.dtsi from the device trees, we
>> broke booting for systems with bootloaders that aren't device tre aware.
>> This can be seen, for example, when appending the device tree blob to
>> the kernel image.
>>
>> The reason booting broke was that the kernel lacked the device_type
>> label in the memory node. Add in a default memory node wth the
>> device_type. It can contain the memory address as the location is fixed
>> for each SoC generation, but the size needs to be added by the
>> bootloader or the board specific dts.
>>
>> Fixes: 73102d6fdc32 ("ARM: dts: aspeed: Remove skeleton.dtsi")
>> Cc: <stable@vger.kernel.org>
>> Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>> Signed-off-by: Joel Stanley <joel@jms.id.au>
>> ---
>> Arnd, can you please merge this as a fix for 4.16?
>
> Sure, applied to fixes branch now.

Thanks!

Has this been sent to Linus?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-27  3:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-14  7:13 [PATCH] ARM: dts: aspeed: Add default memory node Joel Stanley
2018-03-14  9:03 ` Arnd Bergmann
2018-03-27  3:37   ` Joel Stanley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).