All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] ARM: imx8mp: verdin-imx8mp: Add memory size detection
@ 2022-09-07  9:51 Francesco Dolcini
  2022-09-07 14:41 ` Marcel Ziswiler
  2022-09-28  7:29 ` Francesco Dolcini
  0 siblings, 2 replies; 4+ messages in thread
From: Francesco Dolcini @ 2022-09-07  9:51 UTC (permalink / raw)
  To: Marcel Ziswiler, u-boot; +Cc: Francesco Dolcini

Add RAM auto-sizing, without this change memory size for all SKU is set
to 8GB and the system will crash on SKU with less memory as soon as the
non existent memory addresses are accessed.

Fixes: 2bc2f817cea7 ("board: toradex: add verdin imx8m plus support")
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
---
 board/toradex/verdin-imx8mp/verdin-imx8mp.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/board/toradex/verdin-imx8mp/verdin-imx8mp.c b/board/toradex/verdin-imx8mp/verdin-imx8mp.c
index e3c1a1201daa..743e00bf9c46 100644
--- a/board/toradex/verdin-imx8mp/verdin-imx8mp.c
+++ b/board/toradex/verdin-imx8mp/verdin-imx8mp.c
@@ -121,6 +121,16 @@ int board_late_init(void)
 	return 0;
 }
 
+int board_phys_sdram_size(phys_size_t *size)
+{
+	if (!size)
+		return -EINVAL;
+
+	*size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE + PHYS_SDRAM_2_SIZE);
+
+	return 0;
+}
+
 #if IS_ENABLED(CONFIG_OF_LIBFDT) && IS_ENABLED(CONFIG_OF_BOARD_SETUP)
 int ft_board_setup(void *blob, struct bd_info *bd)
 {
-- 
2.25.1


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

* Re: [PATCH v1] ARM: imx8mp: verdin-imx8mp: Add memory size detection
  2022-09-07  9:51 [PATCH v1] ARM: imx8mp: verdin-imx8mp: Add memory size detection Francesco Dolcini
@ 2022-09-07 14:41 ` Marcel Ziswiler
  2022-09-28  7:29 ` Francesco Dolcini
  1 sibling, 0 replies; 4+ messages in thread
From: Marcel Ziswiler @ 2022-09-07 14:41 UTC (permalink / raw)
  To: u-boot, Francesco Dolcini

On Wed, 2022-09-07 at 11:51 +0200, Francesco Dolcini wrote:
> Add RAM auto-sizing, without this change memory size for all SKU is set
> to 8GB and the system will crash on SKU with less memory as soon as the
> non existent memory addresses are accessed.
> 
> Fixes: 2bc2f817cea7 ("board: toradex: add verdin imx8m plus support")
> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>

Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>

> ---
>  board/toradex/verdin-imx8mp/verdin-imx8mp.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/board/toradex/verdin-imx8mp/verdin-imx8mp.c b/board/toradex/verdin-imx8mp/verdin-imx8mp.c
> index e3c1a1201daa..743e00bf9c46 100644
> --- a/board/toradex/verdin-imx8mp/verdin-imx8mp.c
> +++ b/board/toradex/verdin-imx8mp/verdin-imx8mp.c
> @@ -121,6 +121,16 @@ int board_late_init(void)
>         return 0;
>  }
>  
> +int board_phys_sdram_size(phys_size_t *size)
> +{
> +       if (!size)
> +               return -EINVAL;
> +
> +       *size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE + PHYS_SDRAM_2_SIZE);
> +
> +       return 0;
> +}
> +
>  #if IS_ENABLED(CONFIG_OF_LIBFDT) && IS_ENABLED(CONFIG_OF_BOARD_SETUP)
>  int ft_board_setup(void *blob, struct bd_info *bd)
>  {

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

* Re: [PATCH v1] ARM: imx8mp: verdin-imx8mp: Add memory size detection
  2022-09-07  9:51 [PATCH v1] ARM: imx8mp: verdin-imx8mp: Add memory size detection Francesco Dolcini
  2022-09-07 14:41 ` Marcel Ziswiler
@ 2022-09-28  7:29 ` Francesco Dolcini
  1 sibling, 0 replies; 4+ messages in thread
From: Francesco Dolcini @ 2022-09-28  7:29 UTC (permalink / raw)
  To: Tom Rini; +Cc: Marcel Ziswiler, u-boot, Francesco Dolcini, sbabic

On Wed, Sep 07, 2022 at 11:51:05AM +0200, Francesco Dolcini wrote:
> Add RAM auto-sizing, without this change memory size for all SKU is set
> to 8GB and the system will crash on SKU with less memory as soon as the
> non existent memory addresses are accessed.
> 
> Fixes: 2bc2f817cea7 ("board: toradex: add verdin imx8m plus support")
> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>

Hello Tom,
any chance to pick this up? Without it support for verdin-imx8mp is
really broken.

Francesco


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

* [PATCH v1] ARM: imx8mp: verdin-imx8mp: Add memory size detection
@ 2022-10-21 11:40 sbabic
  0 siblings, 0 replies; 4+ messages in thread
From: sbabic @ 2022-10-21 11:40 UTC (permalink / raw)
  To: Francesco Dolcini, u-boot

> Add RAM auto-sizing, without this change memory size for all SKU is set
> to 8GB and the system will crash on SKU with less memory as soon as the
> non existent memory addresses are accessed.
> Fixes: 2bc2f817cea7 ("board: toradex: add verdin imx8m plus support")
> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================

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

end of thread, other threads:[~2022-10-21 11:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-07  9:51 [PATCH v1] ARM: imx8mp: verdin-imx8mp: Add memory size detection Francesco Dolcini
2022-09-07 14:41 ` Marcel Ziswiler
2022-09-28  7:29 ` Francesco Dolcini
2022-10-21 11:40 sbabic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.