diff options
| author | Tom Rini <[email protected]> | 2019-01-15 20:33:07 -0500 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2019-01-15 20:33:07 -0500 |
| commit | e807f6b5f9a164dc1fc35e1c733fa343acf335c0 (patch) | |
| tree | 73d8d68a2d4497ec6000f44d4ae8d4db80b40be2 /doc | |
| parent | d3689267f92c5956e09cc7d1baa4700141662bff (diff) | |
| parent | 03dcf17dba3dbd6f1cfe9ecaa0665ea8c11e0ef2 (diff) | |
Merge branch '2019-01-14-master-imports'
- MediaTek improvements (eth support)
- DM conversion for HI6220
- ISEE, Toby Churchill, other platform updates
- Various format code printf fixes
- Build race fixes
- Command repeat functionality enhanced, command autocomplete support
enhanced.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/driver-model/fs_firmware_loader.txt | 35 |
1 files changed, 7 insertions, 28 deletions
diff --git a/doc/driver-model/fs_firmware_loader.txt b/doc/driver-model/fs_firmware_loader.txt index 290915a9598..b9aee848cc5 100644 --- a/doc/driver-model/fs_firmware_loader.txt +++ b/doc/driver-model/fs_firmware_loader.txt @@ -74,17 +74,16 @@ Firmware storage device described in device tree source File system firmware Loader API ------------------------------- -int request_firmware_into_buf(struct device_platdata *plat, +int request_firmware_into_buf(struct udevice *dev, const char *name, - void *buf, size_t size, u32 offset, - struct firmware **firmwarep) + void *buf, size_t size, u32 offset) -------------------------------------------------------------------- Load firmware into a previously allocated buffer Parameters: -1. struct device_platdata *plat - Platform data such as storage and partition firmware loading from +1. struct udevice *dev + An instance of a driver 2. const char *name name of firmware file @@ -98,36 +97,16 @@ Parameters: 5. u32 offset offset of a file for start reading into buffer -6. struct firmware **firmwarep - pointer to firmware image - return: size of total read -ve when error Description: - The firmware is loaded directly into the buffer pointed to by buf and - the @firmwarep data member is pointed at buf - -Note: Memory would be allocated for firmware image, hence user should - free() *firmwarep and *firmwarep->priv structs after usage of - request_firmware_into_buf(), otherwise it will always leak memory - while subsequent calls of request_firmware_into_buf() with the same - *firmwarep argument. Those arguments can be free through calling API - below release_firmware(); + The firmware is loaded directly into the buffer pointed to by buf Example of creating firmware loader instance and calling request_firmware_into_buf API: if (uclass_get_device(UCLASS_FS_FIRMWARE_LOADER, 0, &dev)) { - request_firmware_into_buf(dev->plat, filename, buffer_location, - buffer_size, offset_ofreading, &fw); + request_firmware_into_buf(dev, filename, buffer_location, + buffer_size, offset_ofreading); } - -void release_firmware(struct firmware *firmware) ------------------------------------------------- -Release the resource associated with a firmware image - -Parameters: - -1. struct firmware *firmware - Firmware resource to release |
