On 3/10/22 8:04 AM, Andre Przywara wrote: > On Thu, 10 Mar 2022 08:32:11 -0500 > Tom Rini <tr...@konsulko.com> wrote: > >> On Thu, Mar 10, 2022 at 10:58:50AM +0000, Andre Przywara wrote: >>> On Wed, 9 Mar 2022 20:43:51 -0500 >>> Tom Rini <tr...@konsulko.com> wrote: >>> >>> Hi Tom, >>> >>>> At this point, sunxi-common.h is used for all systems except for some >>>> MACH_SUN50I variants. Remove the now basically empty header files and >>>> update CONFIG_SYS_CONFIG_NAME to use sunxi-common.h directly. >>> >>> So is this #include <include/configs/$CONFIG_SYS_CONFIG_NAME.h> the only >>> user of this symbol? I was on the brink of removing those files several >>> times already, but wasn't sure if that has side effects. >>> I think buildman names use that as well, so we can't run "./buildman >>> sun7i" anymore? >>> If that's the only thing, I am fine with this. >> >> Yup, that's the only place it's used. >> >>> Actually the content of sun50i.h is bogus, since we don't define >>> CONFIG_GICV2, so don't need the GIC addresses. >>> So this can go as well, and SYS_CONFIG_NAME can maybe just become "sunxi"? >>> >>> Samuel, does this torpedo any RISC-V efforts? >> >> I'll do the move for v2 and keep an eye out if that's a problem for >> RISC-V efforts. > > Thanks. I guess we can bring it back, if needed, or turn it upside down > by including "sunxi-riscv.h" from sunxi.h, inside an #ifdef.
Don't worry about affecting the RISC-V port when changing sunxi-common.h. I just tried switching over to using it, and I only ran into a couple of issues beyond the the usual SRAM/DRAM layout changes: - CONFIG_SYS_TCLK, used in drivers/i2c/mvtwsi.c, comes from asm/arch/i2c.h, which doesn't exist. I suggest moving this constant to sunxi-common.h (or Kconfig, but I see at least one definition that's not a constant). It will also need to change for suniv. - SUNXI_UART*_BASE come from asm/arch/cpu.h, which doesn't exist. The constants are only used inside "#ifndef CONFIG_DM_SERIAL", so I wrapped the #include in that as well. Regards, Samuel