| .. | .. |
|---|
| 12 | 12 | struct firmware { |
|---|
| 13 | 13 | size_t size; |
|---|
| 14 | 14 | const u8 *data; |
|---|
| 15 | | - struct page **pages; |
|---|
| 16 | 15 | |
|---|
| 17 | 16 | /* firmware loader private fields */ |
|---|
| 18 | 17 | void *priv; |
|---|
| .. | .. |
|---|
| 37 | 36 | |
|---|
| 38 | 37 | #define DECLARE_BUILTIN_FIRMWARE_SIZE(name, blob, size) \ |
|---|
| 39 | 38 | static const struct builtin_fw __fw_concat(__builtin_fw,__COUNTER__) \ |
|---|
| 40 | | - __used __section(.builtin_fw) = { name, blob, size } |
|---|
| 39 | + __used __section(".builtin_fw") = { name, blob, size } |
|---|
| 41 | 40 | |
|---|
| 42 | 41 | #if defined(CONFIG_FW_LOADER) || (defined(CONFIG_FW_LOADER_MODULE) && defined(MODULE)) |
|---|
| 43 | 42 | int request_firmware(const struct firmware **fw, const char *name, |
|---|
| 44 | 43 | struct device *device); |
|---|
| 45 | 44 | int firmware_request_nowarn(const struct firmware **fw, const char *name, |
|---|
| 46 | 45 | struct device *device); |
|---|
| 46 | +int firmware_request_platform(const struct firmware **fw, const char *name, |
|---|
| 47 | + struct device *device); |
|---|
| 47 | 48 | int request_firmware_nowait( |
|---|
| 48 | 49 | struct module *module, bool uevent, |
|---|
| 49 | 50 | const char *name, struct device *device, gfp_t gfp, void *context, |
|---|
| .. | .. |
|---|
| 52 | 53 | struct device *device); |
|---|
| 53 | 54 | int request_firmware_into_buf(const struct firmware **firmware_p, |
|---|
| 54 | 55 | const char *name, struct device *device, void *buf, size_t size); |
|---|
| 56 | +int request_partial_firmware_into_buf(const struct firmware **firmware_p, |
|---|
| 57 | + const char *name, struct device *device, |
|---|
| 58 | + void *buf, size_t size, size_t offset); |
|---|
| 55 | 59 | |
|---|
| 56 | 60 | void release_firmware(const struct firmware *fw); |
|---|
| 57 | 61 | #else |
|---|
| .. | .. |
|---|
| 65 | 69 | static inline int firmware_request_nowarn(const struct firmware **fw, |
|---|
| 66 | 70 | const char *name, |
|---|
| 67 | 71 | struct device *device) |
|---|
| 72 | +{ |
|---|
| 73 | + return -EINVAL; |
|---|
| 74 | +} |
|---|
| 75 | + |
|---|
| 76 | +static inline int firmware_request_platform(const struct firmware **fw, |
|---|
| 77 | + const char *name, |
|---|
| 78 | + struct device *device) |
|---|
| 68 | 79 | { |
|---|
| 69 | 80 | return -EINVAL; |
|---|
| 70 | 81 | } |
|---|
| .. | .. |
|---|
| 94 | 105 | return -EINVAL; |
|---|
| 95 | 106 | } |
|---|
| 96 | 107 | |
|---|
| 108 | +static inline int request_partial_firmware_into_buf |
|---|
| 109 | + (const struct firmware **firmware_p, |
|---|
| 110 | + const char *name, |
|---|
| 111 | + struct device *device, |
|---|
| 112 | + void *buf, size_t size, size_t offset) |
|---|
| 113 | +{ |
|---|
| 114 | + return -EINVAL; |
|---|
| 115 | +} |
|---|
| 116 | + |
|---|
| 97 | 117 | #endif |
|---|
| 98 | 118 | |
|---|
| 99 | 119 | int firmware_request_cache(struct device *device, const char *name); |
|---|