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"
39 static const struct firmware *test_firmware;
46 const struct firmware *fw;
57 * @name: the name of the firmware file to look for
69 * @read_fw_idx: index of thread from which we want to read firmware results
71 * @upload_name: firmware name to be used with upload_read sysfs node
80 * information passed today on error is the fact that no firmware was
81 * found so we can only assume -ENOENT on async calls if the firmware is
118 int (*req_firmware)(const struct firmware **fw, const char *name,
715 const struct firmware *firmware = NULL;
733 rc = firmware_request_platform(&firmware, name, dev);
738 if (firmware->size != sizeof(test_data) ||
739 memcmp(firmware->data, test_data, sizeof(test_data)) != 0) {
740 pr_info("firmware contents mismatch for '%s'\n", name);
744 pr_info("loaded: %zu\n", firmware->size);
749 release_firmware(firmware);
760 static void trigger_async_request_cb(const struct firmware *fw, void *context)
800 pr_err("failed to async load firmware\n");
846 pr_err("failed to async load firmware\n");
919 * multiple cards are used and firmware loading happens outside of probe.
944 pr_info("batched sync firmware loading '%s' %u times\n",
971 * then we might miss on an opportunity of having a successful firmware
996 static void trigger_batched_cb(const struct firmware *fw, void *context)
1012 * Unfortunately the firmware API gives us nothing other than a null FW
1013 * if the firmware was not found on async requests. Best we can do is
1082 * then we might miss on an opportunity of having a successful firmware
1135 [FW_UPLOAD_ERR_FW_INVALID] = "firmware-invalid",
1416 pr_err("#%u: failed to async load firmware\n", idx);
1424 pr_err("Testing interface must use PAGE_SIZE firmware for now\n");
1465 pr_err("Testing interface must use PAGE_SIZE firmware for now\n");
1535 pr_err("could not init firmware test config: %d\n", rc);