On Thu, May 11, 2023 at 01:37:09AM +0200, Jules Maselbas wrote: > diff --git a/arch/arm/mach-sunxi/sun50i-a64-ddr3-init.c b/arch/arm/mach-sunxi/sun50i-a64-ddr3-init.c > new file mode 100644 > index 0000000000..4c54588556 > --- /dev/null > +++ b/arch/arm/mach-sunxi/sun50i-a64-ddr3-init.c > @@ -0,0 +1,9 @@ > +#define CONFIG_MACH_SUN50I y > +#define CONFIG_SUNXI_DRAM_DW y > +#define CONFIG_SUNXI_DRAM_DW_32BIT y > +#define CONFIG_SUNXI_DRAM_DDR3 y > +#define CONFIG_SYS_SDRAM_BASE 0x40000000 > + > +#define sunxi_dram_init sun50i_a64_ddr3_dram_init > + > +#include "sun50i-sdram.c" I wanted to mourn about the use of defines and ifdefs for configuring the SoC type and configuration of the SDRAM which makes it impossible to compile in multiple configurations, but you found a nice way to bypass this problem ;) How much variation in the parameters is there in practice? Adding boards with CONFIG_SUNXI_DRAM_DW_16BIT would mean we have to duplicate these two files into four. This won't scale anymore quite fast. We could make these files board specific. I think we should find another prefix for the CONFIG_ defines and leave the CONFIG_ namespace for Kconfig only. -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |