mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: "Martin Tůma" <tumic@gpxsee.org>, "Vinod Koul" <vkoul@kernel.org>,
	"Lizhi Hou" <lizhi.hou@amd.com>
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
	max.zhen@amd.com, sonal.santan@amd.com, larry.liu@amd.com,
	brian.xu@amd.com
Subject: Re: [RESEND PATCH V11 XDMA 2/2] dmaengine: xilinx: xdma: Add user logic interrupt support
Date: Wed, 18 Jan 2023 07:33:42 -0800	[thread overview]
Message-ID: <483c7088-1ac1-6924-9cfb-a131e82276ee@metafoo.de> (raw)
In-Reply-To: <85d1e660-1df4-6e84-a329-751197ef7eec@gpxsee.org>

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.


  reply	other threads:[~2023-01-18 16:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-17 20:54 [RESEND PATCH V11 XDMA 0/2] xilinx XDMA driver Lizhi Hou
2023-01-17 20:54 ` [RESEND PATCH V11 XDMA 1/2] dmaengine: xilinx: xdma: Add xilinx xdma driver Lizhi Hou
2023-01-18  6:28   ` Vinod Koul
2023-01-18 15:20     ` Martin Tůma
2023-01-18 21:59     ` Lizhi Hou
2023-01-17 20:54 ` [RESEND PATCH V11 XDMA 2/2] dmaengine: xilinx: xdma: Add user logic interrupt support Lizhi Hou
2023-01-18  6:29   ` Vinod Koul
2023-01-18 15:28     ` Martin Tůma
2023-01-18 15:33       ` Lars-Peter Clausen [this message]
2023-01-18 16:39         ` Martin Tůma
  -- strict thread matches above, loose matches on Subject: below --
2023-01-04 16:40 [RESEND PATCH V11 XDMA 0/2] xilinx XDMA driver Lizhi Hou
2023-01-04 16:40 ` [RESEND PATCH V11 XDMA 2/2] dmaengine: xilinx: xdma: Add user logic interrupt support Lizhi Hou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=483c7088-1ac1-6924-9cfb-a131e82276ee@metafoo.de \
    --to=lars@metafoo.de \
    --cc=brian.xu@amd.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=larry.liu@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizhi.hou@amd.com \
    --cc=max.zhen@amd.com \
    --cc=sonal.santan@amd.com \
    --cc=tumic@gpxsee.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®