RE: [PATCH v8 1/5] drivers: firmware: Add PDI load API support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tom,

	Please fix my response inline.

> -----Original Message-----
> From: Tom Rix <trix@xxxxxxxxxx>
> Sent: Wednesday, July 7, 2021 2:34 AM
> To: Nava kishore Manne <navam@xxxxxxxxxx>; robh+dt@xxxxxxxxxx; Michal
> Simek <michals@xxxxxxxxxx>; mdf@xxxxxxxxxx; arnd@xxxxxxxx; Rajan Vaja
> <RAJANV@xxxxxxxxxx>; gregkh@xxxxxxxxxxxxxxxxxxx; Amit Sunil Dhamne
> <amitsuni@xxxxxxxxxxxxxxx>; Tejas Patel <tejasp@xxxxxxxxxxxxxxx>;
> zou_wei@xxxxxxxxxx; Sai Krishna Potthuri <lakshmis@xxxxxxxxxx>; Ravi
> Patel <ravipate@xxxxxxxxxxxxxxx>; iwamatsu@xxxxxxxxxxx; Jiaying Liang
> <jliang@xxxxxxxxxx>; devicetree@xxxxxxxxxxxxxxx; linux-arm-
> kernel@xxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; linux-
> fpga@xxxxxxxxxxxxxxx; git <git@xxxxxxxxxx>; chinnikishore369@xxxxxxxxx
> Subject: Re: [PATCH v8 1/5] drivers: firmware: Add PDI load API support
> 
> 
> On 6/26/21 8:52 AM, Nava kishore Manne wrote:
> > 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.
> >
> > Signed-off-by: Nava kishore Manne <nava.manne@xxxxxxxxxx>
> > Reviewed-by: Moritz Fischer <mdf@xxxxxxxxxx>
> > ---
> > Changes for v2:
> >                -Updated API Doc and commit msg.
> >                 No functional changes.
> >
> > Changes for v3:
> >                -None.
> >
> > Changes for v4:
> >                -Rebased the changes on linux-next.
> >                 No functional changes
> >
> > Changes for v5:
> >                -None.
> >
> > Changes for v6:
> >                -None.
> >
> > Changes for v7:
> >                -None.
> >
> > Changes for v8:
> >                 -None.
> >
> >   drivers/firmware/xilinx/zynqmp.c     | 17 +++++++++++++++++
> >   include/linux/firmware/xlnx-zynqmp.h | 10 ++++++++++
> >   2 files changed, 27 insertions(+)
> >
> > diff --git a/drivers/firmware/xilinx/zynqmp.c
> > b/drivers/firmware/xilinx/zynqmp.c
> > index 15b138326ecc..2db571da9ad8 100644
> > --- a/drivers/firmware/xilinx/zynqmp.c
> > +++ b/drivers/firmware/xilinx/zynqmp.c
> > @@ -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.
> > diff --git a/include/linux/firmware/xlnx-zynqmp.h
> > b/include/linux/firmware/xlnx-zynqmp.h
> > index 9d1a5c175065..56b426fe020c 100644
> > --- a/include/linux/firmware/xlnx-zynqmp.h
> > +++ b/include/linux/firmware/xlnx-zynqmp.h
> > @@ -52,6 +52,10 @@
> >   #define	ZYNQMP_PM_CAPABILITY_WAKEUP	0x4U
> >   #define	ZYNQMP_PM_CAPABILITY_UNUSABLE	0x8U
> >
> > +/* Loader commands */
> > +#define PM_LOAD_PDI	0x701
> This should be defined in enum pm_api_id
> > +#define PDI_SRC_DDR	0xF
> 
> This is only used by versal_fpga_ops_write(), consider moving the #define to
> versal-fpga.c
> 

Yes, currently only versal_fpga_write() is using this #define but it’s a generic thing for Versal platform
That’s why we placed it here.

Regards,
Navakishore. 





[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux