diff mbox series

Correct sun8i-v3s SRAM size

Message ID 0035f071-15b6-1742-f1e7-fc63f5640fdf@bamkrs.de
State New
Headers show
Series Correct sun8i-v3s SRAM size | expand

Commit Message

=?UTF-8?Q?Benedikt-Alexander_Mokro=c3=9f?= April 28, 2020, 2:33 p.m. UTC
According to the Datasheet, the V3s has a 32KiB SRAM.
This patch corrects CONFIG_SPL_MAX_SIZE and LOW_LEVEL_SRAM_STACK
accordingly.

Signed-off-by: Benedikt-Alexander Mokro? <u-boot at bamkrs.de>
---
  include/configs/sunxi-common.h | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Jagan Teki June 1, 2020, 5 p.m. UTC | #1
On Tue, Apr 28, 2020 at 9:26 PM Benedikt-Alexander Mokro?
<catchall at bamkrs.de> wrote:
>
> According to the Datasheet, the V3s has a 32KiB SRAM.
> This patch corrects CONFIG_SPL_MAX_SIZE and LOW_LEVEL_SRAM_STACK
> accordingly.

Look like the existing value has taken from allwinner BSP, but did you
find any issues with the existing one?

Jagan.
=?UTF-8?Q?Benedikt-Alexander_Mokro=c3=9f?= June 2, 2020, 7:10 a.m. UTC | #2
Hi Jagan,

I run into some size-related issues regarding my SPL configuration for a custom V3s board (mainly due to using fit images). In fact, the V3s has even more SRAM that could be used for the SPL. However the BROM won't boot anything larger than 32KiB. So I use this 32KiB limit in production now and found no issues with my 29KiB SPL whatsoever. And - if I read the BROM ASM correctly - there is no performance drawback for default (and smaller) SPL configurations since the BROM only loads the actual SPL size amount of pages/bytes.

I think it would be much less frustrating for other users if they could use these 32KiB from the start since the current limit is hit pretty fast and there is no reason why it should be this 24k limit for the V3s. It's another poorly or even plain wrongly documented aspect of the Allwinner BSP.

Benedikt

Am 1. Juni 2020 19:00:30 MESZ schrieb Jagan Teki <jagan at amarulasolutions.com>:
On Tue, Apr 28, 2020 at 9:26 PM Benedikt-Alexander Mokro?
<catchall at bamkrs.de> wrote:

 According to the Datasheet, the V3s has a 32KiB SRAM.
 This patch corrects CONFIG_SPL_MAX_SIZE and LOW_LEVEL_SRAM_STACK
 accordingly.

Look like the existing value has taken from allwinner BSP, but did you
find any issues with the existing one?

Jagan.
Maxime Ripard June 2, 2020, 10:50 a.m. UTC | #3
On Tue, Jun 02, 2020 at 09:10:08AM +0200, Benedikt-Alexander Mokro? wrote:
> Hi Jagan,
> 
> I run into some size-related issues regarding my SPL configuration for
> a custom V3s board (mainly due to using fit images). In fact, the V3s
> has even more SRAM that could be used for the SPL. However the BROM
> won't boot anything larger than 32KiB. So I use this 32KiB limit in
> production now and found no issues with my 29KiB SPL whatsoever. And -
> if I read the BROM ASM correctly - there is no performance drawback
> for default (and smaller) SPL configurations since the BROM only loads
> the actual SPL size amount of pages/bytes.
> 
> I think it would be much less frustrating for other users if they
> could use these 32KiB from the start since the current limit is hit
> pretty fast and there is no reason why it should be this 24k limit for
> the V3s. It's another poorly or even plain wrongly documented aspect
> of the Allwinner BSP.

I agree

Maxime
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200602/fbdc9a5f/attachment.sig>
Jagan Teki June 11, 2020, 9:30 a.m. UTC | #4
On Tue, Jun 2, 2020 at 12:40 PM Benedikt-Alexander Mokro?
<u-boot at bamkrs.de> wrote:
>
> Hi Jagan,
>
> I run into some size-related issues regarding my SPL configuration for a custom V3s board (mainly due to using fit images). In fact, the V3s has even more SRAM that could be used for the SPL. However the BROM won't boot anything larger than 32KiB. So I use this 32KiB limit in production now and found no issues with my 29KiB SPL whatsoever. And - if I read the BROM ASM correctly - there is no performance drawback for default (and smaller) SPL configurations since the BROM only loads the actual SPL size amount of pages/bytes.
>
> I think it would be much less frustrating for other users if they could use these 32KiB from the start since the current limit is hit pretty fast and there is no reason why it should be this 24k limit for the V3s. It's another poorly or even plain wrongly documented aspect of the Allwinner BSP.

Can you rebase on master and send it with the proper commit head.

"sunxi: Correct sun8i-v3s SRAM size"
diff mbox series

Patch

diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 0ef289fd64..623501edce 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -185,8 +185,11 @@ 
  #define CONFIG_SPL_MAX_SIZE		0x7fa0		/* 32 KiB */
  /* end of SRAM A2 on H6 for now */
  #define LOW_LEVEL_SRAM_STACK		0x00118000
+#elif defined CONFIG_MACH_SUN8I_V3S
+#define CONFIG_SPL_MAX_SIZE		0x7fa0		/* 32 KiB */
+#define LOW_LEVEL_SRAM_STACK		0x0000F000	/* End of sram */
  #else
  #define CONFIG_SPL_MAX_SIZE		0x5fa0		/* 24KB on sun4i/sun7i */
  #define LOW_LEVEL_SRAM_STACK		0x00008000	/* End of sram */
  #endif