Re: [RFC v3 04/18] firmware: thead: Add AON firmware protocol driver

Michal Wilczynski
2025-01-28T16:18:23Z

On 1/21/25 10:56, Krzysztof Kozlowski wrote:

>> diff --git a/include/linux/firmware/thead/thead,th1520-aon.h b/include/linux/firmware/thead/thead,th1520-aon.h
>> new file mode 100644
>> index 000000000000..3daa17c01d17
>> --- /dev/null
>> +++ b/include/linux/firmware/thead/thead,th1520-aon.h
>> @@ -0,0 +1,186 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
>> +/*
>> + * Copyright (C) 2021 Alibaba Group Holding Limited.
>> + */
>> +
>> +#ifndef _THEAD_AON_H
>> +#define _THEAD_AON_H
>> +
>> +#include <linux/device.h>
>> +#include <linux/types.h>
>> +
>> +#define AON_RPC_MSG_MAGIC (0xef)
>> +#define TH1520_AON_RPC_VERSION 2
>> +#define TH1520_AON_RPC_MSG_NUM 7
>> +
>> +extern struct th1520_aon_chan *aon_chan;
>
> Drop all externs.

This is required so the code will compile as the
int th1520_aon_call_rpc(struct th1520_aon_chan *aon_chan, void *msg);
is non static and exposed in the same header.

I really would like to keep th1520_aon_call_rpc in this header, as it
could be useful for other drivers to construct their own RPC calls to
reboot or shutdown the system e.g watchdog.

>
>
> Best regards,
> Krzysztof