From aa4e7f70837fc7f714822de234d30fb13fb29d14 Mon Sep 17 00:00:00 2001 From: Padmarao Begari Date: Fri, 12 Sep 2025 15:35:38 +0530 Subject: FWU: Add platform hook support for fwu metata FWU metadata information is unavailable for platform-specific operations since FWU initialization has not yet occurred. The initialization function is invoked as part of the main loop event. To address this, the FWU platform hook function is introduced during FWU initialization, allowing metadata processing with platform-specific operations. Signed-off-by: Padmarao Begari Link: https://lore.kernel.org/r/20250912100539.4127378-2-padmarao.begari@amd.com Signed-off-by: Michal Simek --- include/fwu.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include') diff --git a/include/fwu.h b/include/fwu.h index 77e60167fc7..e7bd1d492af 100644 --- a/include/fwu.h +++ b/include/fwu.h @@ -128,6 +128,17 @@ int fwu_read_mdata(struct udevice *dev, struct fwu_mdata *mdata, int fwu_write_mdata(struct udevice *dev, struct fwu_mdata *mdata, bool primary, uint32_t size); +/** + * fwu_platform_hook() - Platform specific processing with FWU metadata + * @dev: FWU metadata device + * @data: FWU metadata + * + * Provide a platform specific function for processing with the FWU metadata. + * + * Return: 0 if OK, -ve on error + */ +int fwu_platform_hook(struct udevice *dev, struct fwu_data *data); + /** * fwu_get_mdata() - Read, verify and return the FWU metadata * -- cgit v1.2.3