lkml.org 
[lkml]   [2023]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RESEND PATCH V11 XDMA 2/2] dmaengine: xilinx: xdma: Add user logic interrupt support
From
On 1/18/23 07:28, Martin Tůma wrote:
>>> +++ b/include/linux/dma/amd_xdma.h
>>> @@ -0,0 +1,16 @@
>>> +/* SPDX-License-Identifier: GPL-2.0-or-later */
>>> +/*
>>> + * Copyright (C) 2022, Advanced Micro Devices, Inc.
>>> + */
>>> +
>>> +#ifndef _DMAENGINE_AMD_XDMA_H
>>> +#define _DMAENGINE_AMD_XDMA_H
>>> +
>>> +#include <linux/interrupt.h>
>>> +#include <linux/platform_device.h>
>>> +
>>> +int xdma_enable_user_irq(struct platform_device *pdev, u32 irq_num);
>>> +void xdma_disable_user_irq(struct platform_device *pdev, u32 irq_num);
>>> +int xdma_get_user_irq(struct platform_device *pdev, u32
>>> user_irq_index);
>>
>> who is the user of these APIs? It is not clear to me how this is to be
>> used...
>>
>
> The APIs are used by the PCIe card devices/drivers that use XDMA.
> Without them the "user IRQs" provided by the XDMA HW can not be used
> by the PCIe card drivers. If you look at the XDMA HW overview:
> https://docs.xilinx.com/r/en-US/pg195-pcie-dma/Overview?tocId=O_EMX26J5IsdubL4i3XJ_w
>
> those APIs control the "IRQ module" block.
>
> For a linux driver using them see the mgb4 v4l2 driver:
> https://patchwork.kernel.org/project/linux-media/patch/20230113172636.2590-2-tumic@gpxsee.org/


Rather than custom functions this should probably be integrated with the
generic IRQ framework registering a IRQ chip that provides IRQs that can
be requested by the consumer.

\
 
 \ /
  Last update: 2023-03-26 23:46    [W:0.044 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site