From f5f3e244c9088f99d6dd6de7639e14cc04e7c52e Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Wed, 8 Dec 2021 15:30:08 +0000 Subject: [PATCH] trivial: Allow quirking all CFI commands --- libfwupdplugin/fu-cfi-device.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/libfwupdplugin/fu-cfi-device.c b/libfwupdplugin/fu-cfi-device.c index 358ac0159..dd3b1a668 100644 --- a/libfwupdplugin/fu-cfi-device.c +++ b/libfwupdplugin/fu-cfi-device.c @@ -265,6 +265,26 @@ fu_cfi_device_set_quirk_kv(FuDevice *device, const gchar *key, const gchar *valu priv->cmds[FU_CFI_DEVICE_CMD_SECTOR_ERASE] = fu_common_strtoull(value); return TRUE; } + if (g_strcmp0(key, "CfiDeviceCmdWriteStatus") == 0) { + priv->cmds[FU_CFI_DEVICE_CMD_WRITE_STATUS] = fu_common_strtoull(value); + return TRUE; + } + if (g_strcmp0(key, "CfiDeviceCmdPageProg") == 0) { + priv->cmds[FU_CFI_DEVICE_CMD_PAGE_PROG] = fu_common_strtoull(value); + return TRUE; + } + if (g_strcmp0(key, "CfiDeviceCmdReadData") == 0) { + priv->cmds[FU_CFI_DEVICE_CMD_READ_DATA] = fu_common_strtoull(value); + return TRUE; + } + if (g_strcmp0(key, "CfiDeviceCmdReadStatus") == 0) { + priv->cmds[FU_CFI_DEVICE_CMD_READ_STATUS] = fu_common_strtoull(value); + return TRUE; + } + if (g_strcmp0(key, "CfiDeviceCmdWriteEn") == 0) { + priv->cmds[FU_CFI_DEVICE_CMD_WRITE_EN] = fu_common_strtoull(value); + return TRUE; + } g_set_error_literal(error, FWUPD_ERROR, FWUPD_ERROR_NOT_SUPPORTED,