diff mbox series

[1/3] board: dragonboard410c: Fix PHYS_SDRAM_1_SIZE

Message ID 20210714085626.5961-2-stephan@gerhold.net
State Accepted
Commit 1d667227ea512537b8453abeb49abbf19a1a18e8
Delegated to: Tom Rini
Headers show
Series board: dragonboard410c: Fix some minor issues | expand

Commit Message

Stephan Gerhold July 14, 2021, 8:56 a.m. UTC
The DragonBoard 410c has proprietary firmware from Qualcomm that
reserves 8 MiB of memory for tz/smem/hyp/rmtfs/rfsa from 0x86000000
to 0x86800000. I'm not aware of any ATF (ARM Trusted Firmware) port
for DB410c that would reserve 30 MiB of memory at the end of RAM.
I suspect the comment might have been copied from hikey.h which has
a very similar comment (and which actually does have an ATF port).

Reducing the memory size just prevents U-Boot from using the end of
the RAM, not the reserved region inbetween. Therefore we might as well
display the correct DRAM size (1 GiB) instead of strange 986 MiB.

Fixes: 626f048bbc14 ("board: Add Qualcomm Dragonboard 410C support")
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---

 include/configs/dragonboard410c.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Ramon Fried July 14, 2021, 8:37 p.m. UTC | #1
On Wed, Jul 14, 2021 at 11:56 AM Stephan Gerhold <stephan@gerhold.net> wrote:
>
> The DragonBoard 410c has proprietary firmware from Qualcomm that
> reserves 8 MiB of memory for tz/smem/hyp/rmtfs/rfsa from 0x86000000
> to 0x86800000. I'm not aware of any ATF (ARM Trusted Firmware) port
> for DB410c that would reserve 30 MiB of memory at the end of RAM.
> I suspect the comment might have been copied from hikey.h which has
> a very similar comment (and which actually does have an ATF port).
>
> Reducing the memory size just prevents U-Boot from using the end of
> the RAM, not the reserved region inbetween. Therefore we might as well
> display the correct DRAM size (1 GiB) instead of strange 986 MiB.
>
> Fixes: 626f048bbc14 ("board: Add Qualcomm Dragonboard 410C support")
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> ---
>
>  include/configs/dragonboard410c.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/configs/dragonboard410c.h b/include/configs/dragonboard410c.h
> index 1f08508c4d..6474e57b29 100644
> --- a/include/configs/dragonboard410c.h
> +++ b/include/configs/dragonboard410c.h
> @@ -16,8 +16,8 @@
>
>  /* Physical Memory Map */
>  #define PHYS_SDRAM_1                   0x80000000
> -/* 1008 MB (the last ~30Mb are secured for TrustZone by ATF*/
> -#define PHYS_SDRAM_1_SIZE              0x3da00000
> +/* Note: 8 MiB (0x86000000 - 0x86800000) are reserved for tz/smem/hyp/rmtfs/rfsa */
> +#define PHYS_SDRAM_1_SIZE              SZ_1G
>  #define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
>  #define CONFIG_SYS_INIT_SP_ADDR                (CONFIG_SYS_SDRAM_BASE + 0x7fff0)
>  #define CONFIG_SYS_LOAD_ADDR           (CONFIG_SYS_SDRAM_BASE + 0x80000)
> --
> 2.32.0
>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Tom Rini July 24, 2021, 8:40 p.m. UTC | #2
On Wed, Jul 14, 2021 at 10:56:24AM +0200, Stephan Gerhold wrote:

> The DragonBoard 410c has proprietary firmware from Qualcomm that
> reserves 8 MiB of memory for tz/smem/hyp/rmtfs/rfsa from 0x86000000
> to 0x86800000. I'm not aware of any ATF (ARM Trusted Firmware) port
> for DB410c that would reserve 30 MiB of memory at the end of RAM.
> I suspect the comment might have been copied from hikey.h which has
> a very similar comment (and which actually does have an ATF port).
> 
> Reducing the memory size just prevents U-Boot from using the end of
> the RAM, not the reserved region inbetween. Therefore we might as well
> display the correct DRAM size (1 GiB) instead of strange 986 MiB.
> 
> Fixes: 626f048bbc14 ("board: Add Qualcomm Dragonboard 410C support")
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/include/configs/dragonboard410c.h b/include/configs/dragonboard410c.h
index 1f08508c4d..6474e57b29 100644
--- a/include/configs/dragonboard410c.h
+++ b/include/configs/dragonboard410c.h
@@ -16,8 +16,8 @@ 
 
 /* Physical Memory Map */
 #define PHYS_SDRAM_1			0x80000000
-/* 1008 MB (the last ~30Mb are secured for TrustZone by ATF*/
-#define PHYS_SDRAM_1_SIZE		0x3da00000
+/* Note: 8 MiB (0x86000000 - 0x86800000) are reserved for tz/smem/hyp/rmtfs/rfsa */
+#define PHYS_SDRAM_1_SIZE		SZ_1G
 #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
 #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_SDRAM_BASE + 0x7fff0)
 #define CONFIG_SYS_LOAD_ADDR		(CONFIG_SYS_SDRAM_BASE + 0x80000)