On Sun, Jun 08, 2025 at 09:42:26AM +0200, Heinrich Schuchardt wrote: > Avoid build failures > > In file included from include/config.h:3, > from board/toradex/verdin-am62p/verdin-am62p.c:9: > board/toradex/verdin-am62p/verdin-am62p.c: In function 'dram_init': > include/configs/verdin-am62p.h:13:33: error: 'SZ_2G' undeclared (first use in > this function) > 13 | #define CFG_SYS_SDRAM_SIZE SZ_2G /* Maximum supported size */ > | ^~~~~ > board/toradex/verdin-am62p/verdin-am62p.c:63:65: note: in expansion of macro > 'CFG_SYS_SDRAM_SIZE' > 63 | gd->ram_size = get_ram_size((long *)CFG_SYS_SDRAM_BASE, > CFG_SYS_SDRAM_SIZE); > | > ^~~~~~~~~~~~~~~~~~ > include/configs/verdin-am62p.h:13:33: note: each undeclared identifier is > reported only once for each function it appears in > board/toradex/verdin-am62p/verdin-am62p.c:65:28: error: 'SZ_1G' undeclared > (first use in this function) > 65 | if (gd->ram_size < SZ_1G) > | ^~~~~ > > Signed-off-by: Heinrich Schuchardt <heinrich.schucha...@canonical.com> > --- > v2: > drop change in board/toradex/verdin-am62p/verdin-am62p.c > --- > include/configs/verdin-am62p.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/configs/verdin-am62p.h b/include/configs/verdin-am62p.h > index eef360ee9b6..c3464bdb838 100644 > --- a/include/configs/verdin-am62p.h > +++ b/include/configs/verdin-am62p.h > @@ -8,6 +8,8 @@ > #ifndef __VERDIN_AM62P_H > #define __VERDIN_AM62P_H > > +#include <linux/sizes.h> > + > /* DDR Configuration */ > #define CFG_SYS_SDRAM_BASE 0x80000000 > #define CFG_SYS_SDRAM_SIZE SZ_2G /* Maximum supported size */
I dislike adding <linux/sizes.h> here even if we end up using SZ_xx in config.h because this gets included *everywhere* and so we can mask other errors by doing this. -- Tom
signature.asc
Description: PGP signature