Skip to content

Commit f6f0204

Browse files
committed
Merge branches 'acpi-cppc' and 'acpi-dptf'
Merge new ACPI CPPC driver updates and new Raptor Lake DPTF device IDs for 5.17-rc1. * acpi-cppc: ACPI: CPPC: Drop redundant local variable from cpc_read() ACPI: CPPC: Fix up I/O port access in cpc_read() * acpi-dptf: ACPI: DPTF: Support Raptor Lake
3 parents 6a8d7fb + f684b10 + a510c78 commit f6f0204

File tree

5 files changed

+16
-5
lines changed

5 files changed

+16
-5
lines changed

drivers/acpi/cppc_acpi.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -915,30 +915,31 @@ int __weak cpc_write_ffh(int cpunum, struct cpc_reg *reg, u64 val)
915915

916916
static int cpc_read(int cpu, struct cpc_register_resource *reg_res, u64 *val)
917917
{
918-
int ret_val = 0;
919918
void __iomem *vaddr = NULL;
920919
int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu);
921920
struct cpc_reg *reg = &reg_res->cpc_entry.reg;
922921

923922
if (reg_res->type == ACPI_TYPE_INTEGER) {
924923
*val = reg_res->cpc_entry.int_value;
925-
return ret_val;
924+
return 0;
926925
}
927926

928927
*val = 0;
929928

930929
if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_IO) {
931930
u32 width = 8 << (reg->access_width - 1);
931+
u32 val_u32;
932932
acpi_status status;
933933

934934
status = acpi_os_read_port((acpi_io_address)reg->address,
935-
(u32 *)val, width);
935+
&val_u32, width);
936936
if (ACPI_FAILURE(status)) {
937937
pr_debug("Error: Failed to read SystemIO port %llx\n",
938938
reg->address);
939939
return -EFAULT;
940940
}
941941

942+
*val = val_u32;
942943
return 0;
943944
} else if (reg->space_id == ACPI_ADR_SPACE_PLATFORM_COMM && pcc_ss_id >= 0)
944945
vaddr = GET_PCC_VADDR(reg->address, pcc_ss_id);
@@ -966,10 +967,10 @@ static int cpc_read(int cpu, struct cpc_register_resource *reg_res, u64 *val)
966967
default:
967968
pr_debug("Error: Cannot read %u bit width from PCC for ss: %d\n",
968969
reg->bit_width, pcc_ss_id);
969-
ret_val = -EFAULT;
970+
return -EFAULT;
970971
}
971972

972-
return ret_val;
973+
return 0;
973974
}
974975

975976
static int cpc_write(int cpu, struct cpc_register_resource *reg_res, u64 val)

drivers/acpi/dptf/dptf_pch_fivr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ static int pch_fivr_remove(struct platform_device *pdev)
151151
static const struct acpi_device_id pch_fivr_device_ids[] = {
152152
{"INTC1045", 0},
153153
{"INTC1049", 0},
154+
{"INTC10A3", 0},
154155
{"", 0},
155156
};
156157
MODULE_DEVICE_TABLE(acpi, pch_fivr_device_ids);

drivers/acpi/dptf/dptf_power.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,8 @@ static const struct acpi_device_id int3407_device_ids[] = {
231231
{"INTC1050", 0},
232232
{"INTC1060", 0},
233233
{"INTC1061", 0},
234+
{"INTC10A4", 0},
235+
{"INTC10A5", 0},
234236
{"", 0},
235237
};
236238
MODULE_DEVICE_TABLE(acpi, int3407_device_ids);

drivers/acpi/dptf/int340x_thermal.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ static const struct acpi_device_id int340x_thermal_device_ids[] = {
3737
{"INTC1050"},
3838
{"INTC1060"},
3939
{"INTC1061"},
40+
{"INTC10A0"},
41+
{"INTC10A1"},
42+
{"INTC10A2"},
43+
{"INTC10A3"},
44+
{"INTC10A4"},
45+
{"INTC10A5"},
4046
{""},
4147
};
4248

drivers/acpi/fan.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@
1010
{"INT3404", }, /* Fan */ \
1111
{"INTC1044", }, /* Fan for Tiger Lake generation */ \
1212
{"INTC1048", }, /* Fan for Alder Lake generation */ \
13+
{"INTC10A2", }, /* Fan for Raptor Lake generation */ \
1314
{"PNP0C0B", } /* Generic ACPI fan */

0 commit comments

Comments
 (0)