Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mfd: intel-lpss: Introduce QUIRK_CLOCK_DIVIDER_UNITY for XPS 9530

Some devices (eg. Dell XPS 9530, 2023) due to a firmware bug have a
misconfigured clock divider, which should've been 1:1. This introduces
quirk which conditionally re-configures the clock divider to 1:1.

Signed-off-by: Aleksandrs Vinarskis <alex.vinarskis@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20231221185142.9224-3-alex.vinarskis@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Aleksandrs Vinarskis and committed by
Lee Jones
1d8c51ed ac9538f6

+17
+5
drivers/mfd/intel-lpss-pci.c
··· 34 34 PCI_DEVICE_SUB(PCI_VENDOR_ID_INTEL, 0x9d64, 0x152d, 0x1237), 35 35 .driver_data = QUIRK_IGNORE_RESOURCE_CONFLICTS, 36 36 }, 37 + { 38 + /* Dell XPS 9530 (2023) */ 39 + PCI_DEVICE_SUB(PCI_VENDOR_ID_INTEL, 0x51fb, 0x1028, 0x0beb), 40 + .driver_data = QUIRK_CLOCK_DIVIDER_UNITY, 41 + }, 37 42 { } 38 43 }; 39 44
+7
drivers/mfd/intel-lpss.c
··· 300 300 { 301 301 char name[32]; 302 302 struct clk *tmp = *clk; 303 + int ret; 303 304 304 305 snprintf(name, sizeof(name), "%s-enable", devname); 305 306 tmp = clk_register_gate(NULL, name, __clk_get_name(tmp), 0, ··· 316 315 if (IS_ERR(tmp)) 317 316 return PTR_ERR(tmp); 318 317 *clk = tmp; 318 + 319 + if (lpss->info->quirks & QUIRK_CLOCK_DIVIDER_UNITY) { 320 + ret = clk_set_rate(tmp, lpss->info->clk_rate); 321 + if (ret) 322 + return ret; 323 + } 319 324 320 325 snprintf(name, sizeof(name), "%s-update", devname); 321 326 tmp = clk_register_gate(NULL, name, __clk_get_name(tmp),
+5
drivers/mfd/intel-lpss.h
··· 19 19 * Set to ignore resource conflicts with ACPI declared SystemMemory regions. 20 20 */ 21 21 #define QUIRK_IGNORE_RESOURCE_CONFLICTS BIT(0) 22 + /* 23 + * Some devices have misconfigured clock divider due to a firmware bug. 24 + * Set this to force the clock divider to 1:1 ratio. 25 + */ 26 + #define QUIRK_CLOCK_DIVIDER_UNITY BIT(1) 22 27 23 28 struct device; 24 29 struct resource;