From: Peter Korsgaard <peter@korsgaard.com>
To: Nava kishore Manne <nava.manne@xilinx.com>
Cc: <michal.simek@xilinx.com>, <hao.wu@intel.com>,
<trix@redhat.com>, <mdf@kernel.org>, <yilun.xu@intel.com>,
<gregkh@linuxfoundation.org>, <ronak.jain@xilinx.com>,
<rajan.vaja@xilinx.com>, <abhyuday.godhasara@xilinx.com>,
<piyush.mehta@xilinx.com>, <harsha.harsha@xilinx.com>,
<lakshmi.sai.krishna.potthuri@xilinx.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <linux-fpga@vger.kernel.org>,
<git@xilinx.com>
Subject: Re: [PATCH v2 3/3] fpga: zynqmp-fpga: Adds status interface
Date: Wed, 22 Jun 2022 14:16:47 +0200 [thread overview]
Message-ID: <87edzg51w0.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <20220621092833.1057408-4-nava.manne@xilinx.com> (Nava kishore Manne's message of "Tue, 21 Jun 2022 14:58:33 +0530")
>>>>> "Nava" == Nava kishore Manne <nava.manne@xilinx.com> writes:
> Adds status interface for zynqmp-fpga, It's a read only
> interface which allows the user to get the PL status.
> Usage:
> To read the PL configuration status
> cat /sys/class/fpga_manager/<fpga>/status
> Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
> ---
> Changes for v2:
> - Updated status messages handling logic as suggested by Xu Yilun.
> drivers/fpga/zynqmp-fpga.c | 53 ++++++++++++++++++++++++++++++++++++++
> 1 file changed, 53 insertions(+)
> diff --git a/drivers/fpga/zynqmp-fpga.c b/drivers/fpga/zynqmp-fpga.c
> index c60f20949c47..e194bba91d3f 100644
> --- a/drivers/fpga/zynqmp-fpga.c
> +++ b/drivers/fpga/zynqmp-fpga.c
> @@ -14,6 +14,19 @@
> /* Constant Definitions */
> #define IXR_FPGA_DONE_MASK BIT(3)
> +#define READ_DMA_SIZE 256U
> +
> +/* Error Register */
> +#define IXR_FPGA_ERR_CRC_ERR BIT(0)
> +#define IXR_FPGA_ERR_SECURITY_ERR BIT(16)
> +
> +/* Signal Status Register. For details refer ug570 */
> +#define IXR_FPGA_END_OF_STARTUP BIT(4)
> +#define IXR_FPGA_GST_CFG_B BIT(5)
> +#define IXR_FPGA_INIT_B_INTERNAL BIT(11)
> +#define IXR_FPGA_DONE_INTERNAL_SIGNAL BIT(13)
> +
> +#define IXR_FPGA_CONFIG_STAT_OFFSET 7U
> /**
> * struct zynqmp_fpga_priv - Private data structure
> @@ -77,8 +90,48 @@ static enum fpga_mgr_states zynqmp_fpga_ops_state(struct fpga_manager *mgr)
> return FPGA_MGR_STATE_UNKNOWN;
> }
> +static ssize_t zynqmp_fpga_ops_status(struct fpga_manager *mgr, char *buf)
> +{
> + unsigned int *kbuf, reg_val;
> + dma_addr_t dma_addr;
> + ssize_t len = 0;
> + int ret;
> +
> + kbuf = dma_alloc_coherent(mgr->dev.parent, READ_DMA_SIZE,
> + &dma_addr, GFP_KERNEL);
> + if (!kbuf)
> + return -ENOMEM;
What is kbuf used for? You don't seem to ever access it?
--
Bye, Peter Korsgaard
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-06-22 12:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-21 9:28 [PATCH v2 0/3]Adds status interface for zynqmp-fpga Nava kishore Manne
2022-06-21 9:28 ` [PATCH v2 1/3] fpga: manager: change status api prototype, don't use older Nava kishore Manne
2022-06-28 8:31 ` Xu Yilun
2022-08-17 11:16 ` Manne, Nava kishore
2022-08-18 2:29 ` Xu Yilun
2022-06-21 9:28 ` [PATCH v2 2/3] firmware: xilinx: Add pm api function for PL readback Nava kishore Manne
2022-06-21 15:21 ` kernel test robot
2022-06-21 15:21 ` kernel test robot
2022-06-22 12:14 ` Peter Korsgaard
2022-06-21 9:28 ` [PATCH v2 3/3] fpga: zynqmp-fpga: Adds status interface Nava kishore Manne
2022-06-22 12:16 ` Peter Korsgaard [this message]
2022-06-28 8:40 ` Xu Yilun
2022-08-17 10:45 ` Manne, Nava kishore
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=87edzg51w0.fsf@dell.be.48ers.dk \
--to=peter@korsgaard.com \
--cc=abhyuday.godhasara@xilinx.com \
--cc=git@xilinx.com \
--cc=gregkh@linuxfoundation.org \
--cc=hao.wu@intel.com \
--cc=harsha.harsha@xilinx.com \
--cc=lakshmi.sai.krishna.potthuri@xilinx.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mdf@kernel.org \
--cc=michal.simek@xilinx.com \
--cc=nava.manne@xilinx.com \
--cc=piyush.mehta@xilinx.com \
--cc=rajan.vaja@xilinx.com \
--cc=ronak.jain@xilinx.com \
--cc=trix@redhat.com \
--cc=yilun.xu@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).