summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2021-06-24 10:52:13 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2021-06-25 09:27:07 +0200
commit2bfa06b62e7c1f327a01f45f756136b7c7f802dd (patch)
tree4e2d6d03a73c1f7e8263a476fbea7c7c6f2719f6 /include
parent8a7dec93f98a26e944dcfffcc6a320922d5afa2f (diff)
downloadbarebox-2bfa06b62e7c1f327a01f45f756136b7c7f802dd.tar.gz
firmware: Fix device_node matching
firmwaremgr_find_by_node() matches against the device node of the parent of the device associated to the handler. This is correct for the socfpga and zyncmp driver, but not for the altera_serial driver. Add a device_node argument to the handler which is set by the drivers to the correct device node and match against that. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://lore.barebox.org/20210624085223.14616-9-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/firmware.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/firmware.h b/include/firmware.h
index 515bdcaf40..0ffea52840 100644
--- a/include/firmware.h
+++ b/include/firmware.h
@@ -14,6 +14,7 @@ struct firmware_handler {
char *model; /* description for this device */
struct device_d *dev;
void *priv;
+ struct device_node *device_node;
/* called once to prepare the firmware's programming cycle */
int (*open)(struct firmware_handler*);
/* called multiple times to program the firmware with the given data */