[Phishing Risk] [External] AST2500 u-boot breakage with CONFIG_RAM=y

Dylan Hung dylan_hung at aspeedtech.com
Wed Oct 5 19:42:35 AEDT 2022


> -----Original Message-----
> From: Joel Stanley [mailto:joel at jms.id.au]
> Sent: Monday, October 3, 2022 3:13 PM
> To: Dylan Hung <dylan_hung at aspeedtech.com>
> Cc: Zhang Jian <zhangjian.3032 at bytedance.com>; Zev Weiss
> <zev at bewilderbeest.net>; openbmc at lists.ozlabs.org; Andrew Jeffery
> <andrew at aj.id.au>; ChiaWei Wang <chiawei_wang at aspeedtech.com>; Ryan
> Chen <ryan_chen at aspeedtech.com>
> Subject: Re: [Phishing Risk] [External] AST2500 u-boot breakage with
> CONFIG_RAM=y
> 
> On Mon, 3 Oct 2022 at 04:09, Dylan Hung <dylan_hung at aspeedtech.com>
> wrote:
> >
> > Hi Zev, Zhang,
> >
> > Aspeed recommends using "CONFIG_RAM=n" on AST2500 since platform.S is
> created by Aspeed.
> 
> Can you send a fix to your SDK (which I will rebase into the openbmc
> tree) that makes it clear that CONFIG_RAM=n means it will use platform.S?
> 
> It would be even better if there was only one way to do the DRAM training in
> the tree. Could Aspeed look at improving this?

How about I force platform.S to initialize the DRAM, and remove the compile
option for C driver?

arch/arm/mach-aspeed/ast2500/platform.S

    ldr   r0, =0x1e6e0000
    ldr   r1, =0xFC600309
    str   r1, [r0]
+ /*
+  * Aspeed recommends using platform.S for DRAM initialization.
#ifdef CONFIG_RAM
	mov   pc, lr
#endif
+ */

drivers/ram/aspeed/Makefile

ifndef CONFIG_SPL_BUILD
- obj-$(CONFIG_ASPEED_AST2500) += sdram_ast2500.o
obj-$(CONFIG_ASPEED_AST2600) += sdram_ast2600.o
endif
else
- obj-$(CONFIG_ASPEED_AST2500) += sdram_ast2500.o
obj-$(CONFIG_ASPEED_AST2600) += sdram_ast2600.o
endif

> 
> Cheers,
> 
> Joel

--
Dylan


More information about the openbmc mailing list