Lines Matching defs:firmware
3 * This module provides an interface to trigger and test firmware loading.
5 * It is designed to be used for basic evaluation of the firmware loading
6 * subsystem (for example when validating firmware verification). It lacks
17 #include <linux/firmware.h>
32 #define TEST_FIRMWARE_NAME "test-firmware.bin"
37 static const struct firmware *test_firmware;
43 const struct firmware *fw;
54 * @name: the name of the firmware file to look for
66 * @read_fw_idx: index of thread from which we want to read firmware results
76 * information passed today on error is the fact that no firmware was
77 * found so we can only assume -ENOENT on async calls if the firmware is
113 int (*req_firmware)(const struct firmware **fw, const char *name,
650 const struct firmware *firmware = NULL;
668 rc = firmware_request_platform(&firmware, name, dev);
673 if (firmware->size != sizeof(test_data) ||
674 memcmp(firmware->data, test_data, sizeof(test_data)) != 0) {
675 pr_info("firmware contents mismatch for '%s'\n", name);
679 pr_info("loaded: %zu\n", firmware->size);
684 release_firmware(firmware);
695 static void trigger_async_request_cb(const struct firmware *fw, void *context)
735 pr_err("failed to async load firmware\n");
781 pr_err("failed to async load firmware\n");
854 * multiple cards are used and firmware loading happens outside of probe.
879 pr_info("batched sync firmware loading '%s' %u times\n",
906 * then we might miss on an opportunity of having a successful firmware
931 static void trigger_batched_cb(const struct firmware *fw, void *context)
947 * Unfortunately the firmware API gives us nothing other than a null FW
948 * if the firmware was not found on async requests. Best we can do is
1017 * then we might miss on an opportunity of having a successful firmware
1078 pr_err("#%u: failed to async load firmware\n", idx);
1086 pr_err("Testing interface must use PAGE_SIZE firmware for now\n");
1154 pr_err("could not init firmware test config: %d\n", rc);