diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2021-06-19 05:45:06 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-06-21 08:04:35 +0200 |
commit | 20dbfeaff73ff9417bf0fa74e373ffa1f1059a60 (patch) | |
tree | 518266076c588fc6a6f4d8fbe9f91f2eea07c1c4 /include/driver.h | |
parent | 4b3ecdb261beca50d5b7d39876af8bbebb2c3fcb (diff) | |
download | barebox-20dbfeaff73ff9417bf0fa74e373ffa1f1059a60.tar.gz barebox-20dbfeaff73ff9417bf0fa74e373ffa1f1059a60.tar.xz |
nvmem: add support for new read-only memory (rmem) binding
Only upstream user of this binding is the raspberry pi 4 DT, where it's
used to pass along bootloader-provided info to Linux. We have instances
in barebox, where a previous stage bootloader passes along a memory
region with info for barebox to interpret. This could in future be
modelled as nvmem-rmem nodes. The binding is also quite handy for
debugging.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210619034516.6737-4-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/driver.h')
-rw-r--r-- | include/driver.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/driver.h b/include/driver.h index d84fe35d50..c7f5903fce 100644 --- a/include/driver.h +++ b/include/driver.h @@ -347,6 +347,9 @@ struct cdev; /* These are used by drivers which work with direct memory accesses */ ssize_t mem_read(struct cdev *cdev, void *buf, size_t count, loff_t offset, ulong flags); ssize_t mem_write(struct cdev *cdev, const void *buf, size_t count, loff_t offset, ulong flags); +ssize_t mem_copy(struct device_d *dev, void *dst, const void *src, + resource_size_t count, resource_size_t offset, + unsigned long flags); int generic_memmap_ro(struct cdev *dev, void **map, int flags); int generic_memmap_rw(struct cdev *dev, void **map, int flags); |