[PATCH v3 5/7] arm: mach-k3: j721s2_init: Initialize AVS Class 0

Kumar, Udit u-kumar1 at ti.com
Wed Oct 2 03:15:26 CEST 2024


On 10/1/2024 2:18 PM, Manorit Chawdhry wrote:
> Hi Udit,
>
> On 08:46-20240815, Kumar, Udit wrote:
>> On 8/13/2024 11:40 AM, Manorit Chawdhry wrote:
>>> Initialize AVS Class 0.
>>>
>>> Signed-off-by: Manorit Chawdhry <m-chawdhry at ti.com>
>>> ---
>>>    arch/arm/mach-k3/j721s2/j721s2_init.c | 10 ++++++++++
>>>    1 file changed, 10 insertions(+)
>>>
>>> diff --git a/arch/arm/mach-k3/j721s2/j721s2_init.c b/arch/arm/mach-k3/j721s2/j721s2_init.c
>>> index 05453fcad41a..5f5961a2c17a 100644
>>> --- a/arch/arm/mach-k3/j721s2/j721s2_init.c
>>> +++ b/arch/arm/mach-k3/j721s2/j721s2_init.c
>>> @@ -315,6 +315,9 @@ void do_dt_magic(void)
>>>    #ifdef CONFIG_SPL_BUILD
>>>    void board_init_f(ulong dummy)
>>>    {
>>> +	struct udevice *dev;
>>> +	int ret;
>>> +
>>>    	k3_spl_init();
>>>    #if defined(CONFIG_SPL_OF_LIST) && defined(CONFIG_TI_I2C_BOARD_DETECT)
>>>    	do_dt_magic();
>>> @@ -325,6 +328,13 @@ void board_init_f(ulong dummy)
>>>    		setup_navss_nb();
>>>    	setup_qos();
>>> +
>>> +	if (IS_ENABLED(CONFIG_CPU_V7R) && IS_ENABLED(CONFIG_K3_AVS0)) {
>>> +		ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(k3_avs),
>>> +						  &dev);
>> Can we remove this ret, Something like
> I would say we can let this remain, general convention of this file is
> to have ret itself, I know it's only used in one place as of now but I
> feel keeping it consistent is better IMO.


I still suggest to remove non needed variable .

To make it consistent , please think to change at other places :)


>
> Regards,
> Manorit


More information about the U-Boot mailing list