From: Moritz Fischer <mdf@kernel.org>
To: Nava kishore Manne <nava.manne@xilinx.com>
Cc: mdf@kernel.org, trix@redhat.com, robh+dt@kernel.org,
michal.simek@xilinx.com, linux-fpga@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, git@xilinx.com,
chinnikishore369@gmail.com
Subject: Re: [PATCH 1/3] drivers: firmware: Add Pdi load API support
Date: Sat, 23 Jan 2021 15:35:06 -0800 [thread overview]
Message-ID: <YAyyqnCmYcWGgbom@epycbox.lan> (raw)
In-Reply-To: <20210118024318.9530-1-nava.manne@xilinx.com>
On Mon, Jan 18, 2021 at 08:13:16AM +0530, Nava kishore Manne wrote:
> This patch adds load pdi api support to enable pdi/partial loading from
> linux. Programmable Device Image (PDI) is combination of headers, images
> and bitstream files to be loaded. Partial PDI is partial set of image/
> images to be loaded.
>
> Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com>
> ---
> drivers/firmware/xilinx/zynqmp.c | 17 +++++++++++++++++
> include/linux/firmware/xlnx-zynqmp.h | 9 +++++++++
> 2 files changed, 26 insertions(+)
>
> diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c
> index 7eb9958662dd..a466225b9f9e 100644
> --- a/drivers/firmware/xilinx/zynqmp.c
> +++ b/drivers/firmware/xilinx/zynqmp.c
> @@ -897,6 +897,23 @@ int zynqmp_pm_set_requirement(const u32 node, const u32 capabilities,
> }
> EXPORT_SYMBOL_GPL(zynqmp_pm_set_requirement);
>
> +/**
> + * zynqmp_pm_load_pdi - Load and process pdi
Nit: Is it pdi or PDI. Pick one :)
> + * @src: Source device where PDI is located
> + * @address: Pdi src address
> + *
> + * This function provides support to load pdi from linux
> + *
> + * Return: Returns status, either success or error+reason
> + */
> +int zynqmp_pm_load_pdi(const u32 src, const u64 address)
> +{
> + return zynqmp_pm_invoke_fn(PM_LOAD_PDI, src,
> + lower_32_bits(address),
> + upper_32_bits(address), 0, NULL);
> +}
> +EXPORT_SYMBOL_GPL(zynqmp_pm_load_pdi);
> +
> /**
> * zynqmp_pm_aes - Access AES hardware to encrypt/decrypt the data using
> * AES-GCM core.
> diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h
> index 2a0da841c942..87114ee645b1 100644
> --- a/include/linux/firmware/xlnx-zynqmp.h
> +++ b/include/linux/firmware/xlnx-zynqmp.h
> @@ -52,6 +52,9 @@
> #define ZYNQMP_PM_CAPABILITY_WAKEUP 0x4U
> #define ZYNQMP_PM_CAPABILITY_UNUSABLE 0x8U
>
> +/* Loader commands */
> +#define PM_LOAD_PDI 0x701
> +
> /*
> * Firmware FPGA Manager flags
> * XILINX_ZYNQMP_PM_FPGA_FULL: FPGA full reconfiguration
> @@ -354,6 +357,7 @@ int zynqmp_pm_write_pggs(u32 index, u32 value);
> int zynqmp_pm_read_pggs(u32 index, u32 *value);
> int zynqmp_pm_system_shutdown(const u32 type, const u32 subtype);
> int zynqmp_pm_set_boot_health_status(u32 value);
> +int zynqmp_pm_load_pdi(const u32 src, const u64 address);
> #else
> static inline struct zynqmp_eemi_ops *zynqmp_pm_get_eemi_ops(void)
> {
> @@ -538,6 +542,11 @@ static inline int zynqmp_pm_set_boot_health_status(u32 value)
> {
> return -ENODEV;
> }
> +
> +static inline int zynqmp_pm_load_pdi(const u32 src, const u64 address)
> +{
> + return -ENODEV;
> +}
> #endif
>
> #endif /* __FIRMWARE_ZYNQMP_H__ */
> --
> 2.18.0
>
prev parent reply other threads:[~2021-01-23 23:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-18 2:43 [PATCH 1/3] drivers: firmware: Add Pdi load API support Nava kishore Manne
2021-01-18 2:43 ` [PATCH 2/3] dt-bindings: fpga: Add binding doc for versal fpga manager Nava kishore Manne
2021-01-18 8:52 ` Michal Simek
2021-01-22 9:44 ` Nava kishore Manne
2021-01-18 15:47 ` Rob Herring
2021-01-18 2:43 ` [PATCH 3/3] fpga: versal-fpga: Add versal fpga manager driver Nava kishore Manne
2021-01-19 0:33 ` Moritz Fischer
2021-01-22 10:34 ` Nava kishore Manne
2021-01-23 23:33 ` Moritz Fischer
2021-01-27 8:57 ` Nava kishore Manne
2021-01-27 9:16 ` Michal Simek
2021-01-27 21:44 ` Moritz Fischer
2021-02-03 9:26 ` Nava kishore Manne
2021-01-23 23:35 ` Moritz Fischer [this message]
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=YAyyqnCmYcWGgbom@epycbox.lan \
--to=mdf@kernel.org \
--cc=chinnikishore369@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=git@xilinx.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=nava.manne@xilinx.com \
--cc=robh+dt@kernel.org \
--cc=trix@redhat.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).