[PATCH v1 1/4] arm: k3: select tifsstub via board_fit_config_name_match

Anshul Dalal anshuld at ti.com
Tue Jun 23 09:29:12 CEST 2026


On Tue Jun 23, 2026 at 12:31 PM IST, Aristo Chen wrote:
> On Tue, Jun 23, 2026 at 2:18 PM Anshul Dalal <anshuld at ti.com> wrote:

[snip]

>> > diff --git a/arch/arm/mach-k3/common.h b/arch/arm/mach-k3/common.h
>> > index 466ad22f895..37ff98d8992 100644
>> > --- a/arch/arm/mach-k3/common.h
>> > +++ b/arch/arm/mach-k3/common.h
>> > @@ -55,7 +46,6 @@ const struct k3_speed_grade_map *k3_get_speed_grade_map(void);
>> >  void k3_fix_rproc_clock(const char *path);
>> >  void mmr_unlock(uintptr_t base, u32 partition);
>> >  bool is_rom_loaded_sysfw(struct rom_extended_boot_data *data);
>> > -enum k3_device_type get_device_type(void);
>>
>> Why the move of this function from common.h to hardware.h? This header should be
>> accessible to all of K3 anyways.
>
> If I understand correctly, arch/arm/mach-k3/common.h is currently
> mach-k3-internal. It is not in the include search path for board
> files; it is pulled in by .c files inside mach-k3/ via relative
> includes (#include "common.h" or #include "../common.h").
>
> Board files like board/ti/am62x/evm.c include the K3 SoC header via
> <asm/arch/hardware.h>, which maps to
> arch/arm/mach-k3/include/mach/hardware.h. They have no direct path to
> arch/arm/mach-k3/common.h today.
>
> For the board_fit_config_name_match() wrappers in this patch to call
> get_device_type(), the declaration needs to live somewhere boards can
> reach. The two options I considered were:
>
>   1. Move enum k3_device_type and get_device_type() to hardware.h
> (what this patch does). Touches two files.
>
>   2. Relocate common.h into arch/arm/mach-k3/include/mach/ to make it
> public, then update every relative include inside mach-k3/. Touches
> every mach-k3/ source file.
>
> I went with (1) as the smaller change. Happy to revisit if you would
> prefer (2), but it felt out of scope for this series.
>

I can take a jab at refactoring things at a later point. But for the
time being, what you have done with option #1 is alright.


More information about the U-Boot mailing list