1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* 3 * AMD Platform Management Framework Driver Quirks 4 * 5 * Copyright (c) 2024, Advanced Micro Devices, Inc. 6 * All Rights Reserved. 7 * 8 * Author: Mario Limonciello <mario.limonciello@amd.com> 9 */ 10 11 #include <linux/dmi.h> 12 13 #include "pmf.h" 14 15 struct quirk_entry { 16 u32 supported_func; 17 }; 18 19 static struct quirk_entry quirk_no_sps_bug = { 20 .supported_func = 0x4003, 21 }; 22 23 static const struct dmi_system_id fwbug_list[] = { 24 { 25 .ident = "ROG Zephyrus G14", 26 .matches = { 27 DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), 28 DMI_MATCH(DMI_PRODUCT_NAME, "GA403UV"), 29 }, 30 .driver_data = &quirk_no_sps_bug, 31 }, 32 {} 33 }; 34 35 void amd_pmf_quirks_init(struct amd_pmf_dev *dev) 36 { 37 const struct dmi_system_id *dmi_id; 38 struct quirk_entry *quirks; 39 40 dmi_id = dmi_first_match(fwbug_list); 41 if (!dmi_id) 42 return; 43 44 quirks = dmi_id->driver_data; 45 if (quirks->supported_func) { 46 dev->supported_func = quirks->supported_func; 47 pr_info("Using supported funcs quirk to avoid %s platform firmware bug\n", 48 dmi_id->ident); 49 } 50 } 51 52