[PATCH v2] CONFIG_NR_DRAM_BANKS: Remove unreferenced code as its always defined

Stefan Roese sr at denx.de
Tue Aug 11 08:37:46 CEST 2020


Hi Tom,
Hi Pali,

(added Pali because of the Nokia RX51 issue)

On 07.08.20 21:21, Tom Rini wrote:
> On Thu, Jul 30, 2020 at 12:51:10PM +0200, Stefan Roese wrote:
> 
>> Since commit 86cf1c82850f ("configs: Migrate CONFIG_NR_DRAM_BANKS") &
>> commit 999a772d9f24 ("Kconfig: Migrate CONFIG_NR_DRAM_BANKS"),
>> CONFIG_NR_DRAM_BANKS is always defined with a value (4 is default).
>> It makes no sense to still carry code that is guarded with
>> "#ifndef CONFIG_NR_DRAM_BANKS" (and similar). This patch removes
>> all these unreferenced code paths.
>>
>> Also complete remove bi_memstart & bi_memsize from the board-info
>> struct. As now bi_dram[] is always enabled and should be used instead.
>> This removes the redundant varriables.
>>
>> Signed-off-by: Stefan Roese <sr at denx.de>
>> Cc: Daniel Schwierzeck <daniel.schwierzeck at gmail.com>
>> Cc: Tom Rini <trini at konsulko.com>
>> Cc: Ramon Fried <ramon.fried at gmail.com>
>> Cc: Simon Glass <sjg at chromium.org>
>> Cc: Michal Simek <michal.simek at xilinx.com>
>> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck at gmail.com>
> 
> I don't see quite how, but this is breaking running
> test/nokia_rx51_test.sh (or, my fixup of this to apply to current master
> was wrong, and is what's breaking the test).  Please rebase and confirm
> that test passes as well, thanks!

I've checked the issue with nokia_rx51_test.sh and could not find any
issues in the patch. My assumption now is, that the very old Linux
kernel (2.6.28) that is used in this Nokia test, still uses the bd_info
struct in Linux to pass the memory information (via bd_memstart &
bi_memsize), as was also done in the very old PowerPC days. With this
patch now and the removal of these fields from bd_info, this might
explain why this kernel does not boot any more (no output on the serial
console at all).

Pali, could you please check if my assumption is correct here? And if
yes, could please switch the test to using a newer kernel version? Or
remove the Linux kernel booting from the test?

I've pushed the latest patch version into this branch (based on top of
the latest TOT):

https://gitlab.denx.de/u-boot/custodians/u-boot-marvell/-/commits/remove-config-nr-dram-banks-v3-2020-08-11

The failing Azure CI report can be found here:

https://dev.azure.com/sr0718/u-boot/_build/results?buildId=20&view=results

A working Azure report is here for comparison:

https://dev.azure.com/sr0718/u-boot/_build/results?buildId=18&view=results

Thanks,
Stefan


More information about the U-Boot mailing list