Skip to content

Commit 2e6bec8

Browse files
committed
dpll: zl3073x: Add low-level flash functions
JIRA: https://issues.redhat.com/browse/RHEL-115367 commit 3639bd0 Author: Ivan Vecera <ivecera@redhat.com> Date: Tue Sep 9 11:15:29 2025 +0200 dpll: zl3073x: Add low-level flash functions To implement the devlink device flash functionality, the driver needs to access both the device memory and the internal flash memory. The flash memory is accessed using a device-specific program (called the flash utility). This flash utility must be downloaded by the driver into the device memory and then executed by the device CPU. Once running, the flash utility provides a flash API to access the flash memory itself. During this operation, the normal functionality provided by the standard firmware is not available. Therefore, the driver must ensure that DPLL callbacks and monitoring functions are not executed during the flash operation. Add all necessary functions for downloading the utility to device memory, entering and exiting flash mode, and performing flash operations. Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Signed-off-by: Ivan Vecera <ivecera@redhat.com> Link: https://patch.msgid.link/20250909091532.11790-3-ivecera@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
1 parent 1129947 commit 2e6bec8

File tree

6 files changed

+747
-1
lines changed

6 files changed

+747
-1
lines changed

drivers/dpll/zl3073x/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22

33
obj-$(CONFIG_ZL3073X) += zl3073x.o
4-
zl3073x-objs := core.o devlink.o dpll.o prop.o
4+
zl3073x-objs := core.o devlink.o dpll.o flash.o prop.o
55

66
obj-$(CONFIG_ZL3073X_I2C) += zl3073x_i2c.o
77
zl3073x_i2c-objs := i2c.o

drivers/dpll/zl3073x/devlink.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,15 @@ zl3073x_devlink_reload_up(struct devlink *devlink,
138138
return 0;
139139
}
140140

141+
void zl3073x_devlink_flash_notify(struct zl3073x_dev *zldev, const char *msg,
142+
const char *component, u32 done, u32 total)
143+
{
144+
struct devlink *devlink = priv_to_devlink(zldev);
145+
146+
devlink_flash_update_status_notify(devlink, msg, component, done,
147+
total);
148+
}
149+
141150
static const struct devlink_ops zl3073x_devlink_ops = {
142151
.info_get = zl3073x_devlink_info_get,
143152
.reload_actions = BIT(DEVLINK_RELOAD_ACTION_DRIVER_REINIT),

drivers/dpll/zl3073x/devlink.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,7 @@ struct zl3073x_dev *zl3073x_devm_alloc(struct device *dev);
99

1010
int zl3073x_devlink_register(struct zl3073x_dev *zldev);
1111

12+
void zl3073x_devlink_flash_notify(struct zl3073x_dev *zldev, const char *msg,
13+
const char *component, u32 done, u32 total);
14+
1215
#endif /* _ZL3073X_DEVLINK_H */

0 commit comments

Comments
 (0)