* [PATCH] ARM: dts: realview: Extend PBX family memory description
@ 2016-10-18 8:21 Linus Walleij
2016-10-18 10:14 ` Robin Murphy
2016-10-18 10:25 ` Russell King - ARM Linux
0 siblings, 2 replies; 4+ messages in thread
From: Linus Walleij @ 2016-10-18 8:21 UTC (permalink / raw)
To: linux-arm-kernel
From: Robin Murphy <robin.murphy@arm.com>
All three platforms sharing the later RealView Platform Baseboard memory
map - PBX-A9, PB-A8 and PB11MPCore, provide 512MB of DDR SDRAM on the
baseboard, of which the boot alias at 0x0 maps the first 256MB. Expand
the size of the default memory node to reflect that, and describe the
full memory regions in each board's DTS, but leave those commented by
default to avoid breaking existing bootloaders.
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ARM SoC folks: I forgot to send this patch for ARM SoC earlier.
As it is a small change I suggest you just apply it to the ARM
SoC tree as I do not foresee any other RealView work in the near
future. If you think it can go into v4.9 then put it in as a fix,
else just push it to the next merge window.
Robin: sorry for screwing up :(
---
arch/arm/boot/dts/arm-realview-pba8.dts | 8 ++++++++
arch/arm/boot/dts/arm-realview-pbx-a9.dts | 9 +++++++++
arch/arm/boot/dts/arm-realview-pbx.dtsi | 4 ++--
3 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/arm-realview-pba8.dts b/arch/arm/boot/dts/arm-realview-pba8.dts
index d3238c252b59..9f6c92b84f9f 100644
--- a/arch/arm/boot/dts/arm-realview-pba8.dts
+++ b/arch/arm/boot/dts/arm-realview-pba8.dts
@@ -40,6 +40,14 @@
};
};
+ /*
+ * Using the full 512MB of RAM will require bootloader
+ * changes to not load the kernel to the alias at 0x0.
+ */
+ memory {
+ /*reg = <0x70000000 0x20000000>; /* 512 MiB baseboard DDR */
+ };
+
pmu: pmu at 0 {
compatible = "arm,cortex-a8-pmu";
interrupt-parent = <&intc>;
diff --git a/arch/arm/boot/dts/arm-realview-pbx-a9.dts b/arch/arm/boot/dts/arm-realview-pbx-a9.dts
index 90d00b407f85..9fef9188660a 100644
--- a/arch/arm/boot/dts/arm-realview-pbx-a9.dts
+++ b/arch/arm/boot/dts/arm-realview-pbx-a9.dts
@@ -60,6 +60,15 @@
};
};
+ /*
+ * There is 1GB of RAM total, but using all of it will require
+ * bootloader changes to not load the kernel to the alias at 0x0.
+ */
+ memory {
+ /*reg = <0x20000000 0x20000000>, /* 512 MiB daughterboard DDR2 */
+ /* <0x70000000 0x20000000>; /* 512 MiB baseboard DDR */
+ };
+
L2: l2-cache {
compatible = "arm,pl310-cache";
reg = <0x1f002000 0x1000>;
diff --git a/arch/arm/boot/dts/arm-realview-pbx.dtsi b/arch/arm/boot/dts/arm-realview-pbx.dtsi
index aeb49c4bd773..8477f667d27c 100644
--- a/arch/arm/boot/dts/arm-realview-pbx.dtsi
+++ b/arch/arm/boot/dts/arm-realview-pbx.dtsi
@@ -38,8 +38,8 @@
};
memory {
- /* 128 MiB memory @ 0x0 */
- reg = <0x00000000 0x08000000>;
+ /* 256 MiB alias of baseboard DDR @ 0x0 */
+ reg = <0x00000000 0x10000000>;
};
/* The voltage to the MMC card is hardwired at 3.3V */
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH] ARM: dts: realview: Extend PBX family memory description
2016-10-18 8:21 [PATCH] ARM: dts: realview: Extend PBX family memory description Linus Walleij
@ 2016-10-18 10:14 ` Robin Murphy
2016-10-18 10:25 ` Russell King - ARM Linux
1 sibling, 0 replies; 4+ messages in thread
From: Robin Murphy @ 2016-10-18 10:14 UTC (permalink / raw)
To: linux-arm-kernel
On 18/10/16 09:21, Linus Walleij wrote:
> From: Robin Murphy <robin.murphy@arm.com>
>
> All three platforms sharing the later RealView Platform Baseboard memory
> map - PBX-A9, PB-A8 and PB11MPCore, provide 512MB of DDR SDRAM on the
> baseboard, of which the boot alias at 0x0 maps the first 256MB. Expand
> the size of the default memory node to reflect that, and describe the
> full memory regions in each board's DTS, but leave those commented by
> default to avoid breaking existing bootloaders.
>
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ARM SoC folks: I forgot to send this patch for ARM SoC earlier.
> As it is a small change I suggest you just apply it to the ARM
> SoC tree as I do not foresee any other RealView work in the near
> future. If you think it can go into v4.9 then put it in as a fix,
> else just push it to the next merge window.
> Robin: sorry for screwing up :(
No worries - it's gone back in the cupboard now anyway :)
Robin.
> ---
> arch/arm/boot/dts/arm-realview-pba8.dts | 8 ++++++++
> arch/arm/boot/dts/arm-realview-pbx-a9.dts | 9 +++++++++
> arch/arm/boot/dts/arm-realview-pbx.dtsi | 4 ++--
> 3 files changed, 19 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/boot/dts/arm-realview-pba8.dts b/arch/arm/boot/dts/arm-realview-pba8.dts
> index d3238c252b59..9f6c92b84f9f 100644
> --- a/arch/arm/boot/dts/arm-realview-pba8.dts
> +++ b/arch/arm/boot/dts/arm-realview-pba8.dts
> @@ -40,6 +40,14 @@
> };
> };
>
> + /*
> + * Using the full 512MB of RAM will require bootloader
> + * changes to not load the kernel to the alias at 0x0.
> + */
> + memory {
> + /*reg = <0x70000000 0x20000000>; /* 512 MiB baseboard DDR */
> + };
> +
> pmu: pmu at 0 {
> compatible = "arm,cortex-a8-pmu";
> interrupt-parent = <&intc>;
> diff --git a/arch/arm/boot/dts/arm-realview-pbx-a9.dts b/arch/arm/boot/dts/arm-realview-pbx-a9.dts
> index 90d00b407f85..9fef9188660a 100644
> --- a/arch/arm/boot/dts/arm-realview-pbx-a9.dts
> +++ b/arch/arm/boot/dts/arm-realview-pbx-a9.dts
> @@ -60,6 +60,15 @@
> };
> };
>
> + /*
> + * There is 1GB of RAM total, but using all of it will require
> + * bootloader changes to not load the kernel to the alias at 0x0.
> + */
> + memory {
> + /*reg = <0x20000000 0x20000000>, /* 512 MiB daughterboard DDR2 */
> + /* <0x70000000 0x20000000>; /* 512 MiB baseboard DDR */
> + };
> +
> L2: l2-cache {
> compatible = "arm,pl310-cache";
> reg = <0x1f002000 0x1000>;
> diff --git a/arch/arm/boot/dts/arm-realview-pbx.dtsi b/arch/arm/boot/dts/arm-realview-pbx.dtsi
> index aeb49c4bd773..8477f667d27c 100644
> --- a/arch/arm/boot/dts/arm-realview-pbx.dtsi
> +++ b/arch/arm/boot/dts/arm-realview-pbx.dtsi
> @@ -38,8 +38,8 @@
> };
>
> memory {
> - /* 128 MiB memory @ 0x0 */
> - reg = <0x00000000 0x08000000>;
> + /* 256 MiB alias of baseboard DDR @ 0x0 */
> + reg = <0x00000000 0x10000000>;
> };
>
> /* The voltage to the MMC card is hardwired at 3.3V */
>
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH] ARM: dts: realview: Extend PBX family memory description
2016-10-18 8:21 [PATCH] ARM: dts: realview: Extend PBX family memory description Linus Walleij
2016-10-18 10:14 ` Robin Murphy
@ 2016-10-18 10:25 ` Russell King - ARM Linux
2016-10-18 10:40 ` Robin Murphy
1 sibling, 1 reply; 4+ messages in thread
From: Russell King - ARM Linux @ 2016-10-18 10:25 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Oct 18, 2016 at 10:21:13AM +0200, Linus Walleij wrote:
> From: Robin Murphy <robin.murphy@arm.com>
>
> All three platforms sharing the later RealView Platform Baseboard memory
> map - PBX-A9, PB-A8 and PB11MPCore, provide 512MB of DDR SDRAM on the
> baseboard, of which the boot alias at 0x0 maps the first 256MB. Expand
> the size of the default memory node to reflect that, and describe the
> full memory regions in each board's DTS, but leave those commented by
> default to avoid breaking existing bootloaders.
>
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ARM SoC folks: I forgot to send this patch for ARM SoC earlier.
> As it is a small change I suggest you just apply it to the ARM
> SoC tree as I do not foresee any other RealView work in the near
> future. If you think it can go into v4.9 then put it in as a fix,
> else just push it to the next merge window.
> Robin: sorry for screwing up :(
Normally, memory nodes describe different regions of unique memory.
This is not unique memory, but is an alias of some already-described
memory.
The problem with adding the aliased memory addresses is that we end
up needing platform knowledge to reject the "other alias" from the
memory description, which really isn't good.
The only reason it works is that we reject memory nodes where the
physical address < PHYS_OFFSET. That works provided the alias is
below PHYS_OFFSET, but that isn't always the case.
So, I think it is completely wrong to describe the aliased memory
regions in DT.
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently@9.6Mbps down 400kbps up
according to speedtest.net.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] ARM: dts: realview: Extend PBX family memory description
2016-10-18 10:25 ` Russell King - ARM Linux
@ 2016-10-18 10:40 ` Robin Murphy
0 siblings, 0 replies; 4+ messages in thread
From: Robin Murphy @ 2016-10-18 10:40 UTC (permalink / raw)
To: linux-arm-kernel
On 18/10/16 11:25, Russell King - ARM Linux wrote:
> On Tue, Oct 18, 2016 at 10:21:13AM +0200, Linus Walleij wrote:
>> From: Robin Murphy <robin.murphy@arm.com>
>>
>> All three platforms sharing the later RealView Platform Baseboard memory
>> map - PBX-A9, PB-A8 and PB11MPCore, provide 512MB of DDR SDRAM on the
>> baseboard, of which the boot alias at 0x0 maps the first 256MB. Expand
>> the size of the default memory node to reflect that, and describe the
>> full memory regions in each board's DTS, but leave those commented by
>> default to avoid breaking existing bootloaders.
>>
>> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>> ---
>> ARM SoC folks: I forgot to send this patch for ARM SoC earlier.
>> As it is a small change I suggest you just apply it to the ARM
>> SoC tree as I do not foresee any other RealView work in the near
>> future. If you think it can go into v4.9 then put it in as a fix,
>> else just push it to the next merge window.
>> Robin: sorry for screwing up :(
>
> Normally, memory nodes describe different regions of unique memory.
> This is not unique memory, but is an alias of some already-described
> memory.
Well, really, this is _the_ memory, and the 256MB at 0 is the alias, but
only the separate PB11MPCore DTS has the luxury of being correct from
the off, thanks to the precedent of the QEMU PB-A8 model being popular
and expecting to use the low alias.
> The problem with adding the aliased memory addresses is that we end
> up needing platform knowledge to reject the "other alias" from the
> memory description, which really isn't good.
>
> The only reason it works is that we reject memory nodes where the
> physical address < PHYS_OFFSET. That works provided the alias is
> below PHYS_OFFSET, but that isn't always the case.
Look again ;) It works perfectly because whilst the information is in
the DTS for completeness, as-is it's not in the DTB that the kernel
gets. And if someone _does_ adjust their kernel load address and
uncomment the .dts node accordingly, the "reg" property from the .dtsi
node gets overridden, not added to, so it's still fine.
Robin.
>
> So, I think it is completely wrong to describe the aliased memory
> regions in DT.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-10-18 10:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-18 8:21 [PATCH] ARM: dts: realview: Extend PBX family memory description Linus Walleij
2016-10-18 10:14 ` Robin Murphy
2016-10-18 10:25 ` Russell King - ARM Linux
2016-10-18 10:40 ` Robin Murphy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox