Re: [PATCH v4 07/15] dmaengine: ti: k3 PSI-L remote endpoint configuration

From: Peter Ujfalusi
Date: Mon Nov 11 2019 - 03:46:28 EST




On 11/11/2019 6.47, Vinod Koul wrote:
> On 01-11-19, 10:41, Peter Ujfalusi wrote:
>
>> --- /dev/null
>> +++ b/drivers/dma/ti/k3-psil.c
>> @@ -0,0 +1,97 @@
>> +// SPDX-License-Identifier: GPL-2.0
>
> ...
>
>> +extern struct psil_ep_map am654_ep_map;
>> +extern struct psil_ep_map j721e_ep_map;
>> +
>> +static DEFINE_MUTEX(ep_map_mutex);
>> +static struct psil_ep_map *soc_ep_map;
>> +
>> +struct psil_endpoint_config *psil_get_ep_config(u32 thread_id)
>> +{
>> + int i;
>> +
>> + mutex_lock(&ep_map_mutex);
>> + if (!soc_ep_map) {
>> + if (of_machine_is_compatible("ti,am654")) {
>> + soc_ep_map = &am654_ep_map;
>> + } else if (of_machine_is_compatible("ti,j721e")) {
>> + soc_ep_map = &j721e_ep_map;
>> + } else {
>> + pr_err("PSIL: No compatible machine found for map\n");
>> + return ERR_PTR(-ENOTSUPP);
>> + }
>> + pr_debug("%s: Using map for %s\n", __func__, soc_ep_map->name);
>> + }
>> + mutex_unlock(&ep_map_mutex);
>> +
>> + if (thread_id & K3_PSIL_DST_THREAD_ID_OFFSET && soc_ep_map->dst) {
>> + /* check in destination thread map */
>> + for (i = 0; i < soc_ep_map->dst_count; i++) {
>> + if (soc_ep_map->dst[i].thread_id == thread_id)
>> + return &soc_ep_map->dst[i].ep_config;
>> + }
>> + }
>> +
>> + thread_id &= ~K3_PSIL_DST_THREAD_ID_OFFSET;
>> + if (soc_ep_map->src) {
>> + for (i = 0; i < soc_ep_map->src_count; i++) {
>> + if (soc_ep_map->src[i].thread_id == thread_id)
>> + return &soc_ep_map->src[i].ep_config;
>> + }
>> + }
>> +
>> + return ERR_PTR(-ENOENT);
>> +}
>> +EXPORT_SYMBOL(psil_get_ep_config);
>
> This doesn't match the license of this module, we need it to be
> EXPORT_SYMBOL_GPL

Oops, will fix it.


- PÃter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki