[PATCH 5/9] ARM: boards: protonic-rk356x: Move mecsbc code to model init function

Robin van der Gracht robin at protonic.nl
Tue Mar 10 08:17:26 PDT 2026


Hi Sascha,

On 3/10/26 11:20, Sascha Hauer wrote:
> Hi Robin,
>
> On Wed, Mar 04, 2026 at 12:00:09PM +0100, Robin van der Gracht wrote:
>> This adds a means for registering a model specific late initcall function.
> Please explain why this is necessary in the commit message.
>
>> +static int prt_rk356x_mecsbc_init(void)
>> +{
>> +	if (prt_priv.hw_id == 0 && prt_priv.hw_rev == 0)
>> +		of_register_fixup(mecsbc_sd_of_fixup, prt_priv.dev);
>> +
>> +	return 0;
>> +}
>> +
>> +static int prt_rk356x_devices_init(void)
>> +{
>> +	int ret;
>> +
>> +	if (prt_priv.model->init) {
>> +		ret = prt_priv.model->init();
>> +		if (ret) {
>> +			pr_warn("Model init failed with %d\n", ret);
>> +			return ret;
>> +		}
>> +	}
>> +
>> +	return 0;
>> +}
>> +late_initcall(prt_rk356x_devices_init);
> This executes unconditionally on all boards. You have a patch later in
> this series fixing that, please squash it into this patch.
>
> Sascha
>
Ack. I'll make the changes and submit v2.

Robin



More information about the barebox mailing list