mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
drivers: firmware: Add PDI load API support
This patch adds load PDI API support to enable full/partial PDI loading from linux. Programmable Device Image (PDI) is combination of headers, images and bitstream files to be loaded. Reviewed-by: Moritz Fischer <mdf@kernel.org> Signed-off-by: Nava kishore Manne <nava.manne@xilinx.com> Link: https://lore.kernel.org/r/20210626155248.5004-2-nava.manne@xilinx.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2734d6c1b1
commit
2b9fc773c3
@ -1011,6 +1011,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
|
||||
* @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.
|
||||
|
@ -52,6 +52,10 @@
|
||||
#define ZYNQMP_PM_CAPABILITY_WAKEUP 0x4U
|
||||
#define ZYNQMP_PM_CAPABILITY_UNUSABLE 0x8U
|
||||
|
||||
/* Loader commands */
|
||||
#define PM_LOAD_PDI 0x701
|
||||
#define PDI_SRC_DDR 0xF
|
||||
|
||||
/*
|
||||
* Firmware FPGA Manager flags
|
||||
* XILINX_ZYNQMP_PM_FPGA_FULL: FPGA full reconfiguration
|
||||
@ -411,6 +415,7 @@ int zynqmp_pm_pinctrl_get_config(const u32 pin, const u32 param,
|
||||
u32 *value);
|
||||
int zynqmp_pm_pinctrl_set_config(const u32 pin, const u32 param,
|
||||
u32 value);
|
||||
int zynqmp_pm_load_pdi(const u32 src, const u64 address);
|
||||
#else
|
||||
static inline int zynqmp_pm_get_api_version(u32 *version)
|
||||
{
|
||||
@ -622,6 +627,11 @@ static inline int zynqmp_pm_pinctrl_set_config(const u32 pin, const u32 param,
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline int zynqmp_pm_load_pdi(const u32 src, const u64 address)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __FIRMWARE_ZYNQMP_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user