Commit 71f1b916 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'acpi-5.17-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull extra ACPI updates from Rafael Wysocki:
 "These fix and clean up the ACPI CPPC driver on top of the recent
  changes in it merged previously and add some new device IDs to the
  ACPI DPTF driver.

  Specifics:

   - Fix a recently introduced endianness-related issue in the ACPI CPPC
     library and clean it up on top of that (Rafael Wysocki)

   - Add new device IDs for the Raptor Lake SoC to the ACPI DPTF driver
     (Srinivas Pandruvada)"

* tag 'acpi-5.17-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: DPTF: Support Raptor Lake
  ACPI: CPPC: Drop redundant local variable from cpc_read()
  ACPI: CPPC: Fix up I/O port access in cpc_read()
parents 0809edba f6f02040
...@@ -915,30 +915,31 @@ int __weak cpc_write_ffh(int cpunum, struct cpc_reg *reg, u64 val) ...@@ -915,30 +915,31 @@ int __weak cpc_write_ffh(int cpunum, struct cpc_reg *reg, u64 val)
static int cpc_read(int cpu, struct cpc_register_resource *reg_res, u64 *val) static int cpc_read(int cpu, struct cpc_register_resource *reg_res, u64 *val)
{ {
int ret_val = 0;
void __iomem *vaddr = NULL; void __iomem *vaddr = NULL;
int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu); int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu);
struct cpc_reg *reg = &reg_res->cpc_entry.reg; struct cpc_reg *reg = &reg_res->cpc_entry.reg;
if (reg_res->type == ACPI_TYPE_INTEGER) { if (reg_res->type == ACPI_TYPE_INTEGER) {
*val = reg_res->cpc_entry.int_value; *val = reg_res->cpc_entry.int_value;
return ret_val; return 0;
} }
*val = 0; *val = 0;
if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_IO) { if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_IO) {
u32 width = 8 << (reg->access_width - 1); u32 width = 8 << (reg->access_width - 1);
u32 val_u32;
acpi_status status; acpi_status status;
status = acpi_os_read_port((acpi_io_address)reg->address, status = acpi_os_read_port((acpi_io_address)reg->address,
(u32 *)val, width); &val_u32, width);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
pr_debug("Error: Failed to read SystemIO port %llx\n", pr_debug("Error: Failed to read SystemIO port %llx\n",
reg->address); reg->address);
return -EFAULT; return -EFAULT;
} }
*val = val_u32;
return 0; return 0;
} else if (reg->space_id == ACPI_ADR_SPACE_PLATFORM_COMM && pcc_ss_id >= 0) } else if (reg->space_id == ACPI_ADR_SPACE_PLATFORM_COMM && pcc_ss_id >= 0)
vaddr = GET_PCC_VADDR(reg->address, pcc_ss_id); 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) ...@@ -966,10 +967,10 @@ static int cpc_read(int cpu, struct cpc_register_resource *reg_res, u64 *val)
default: default:
pr_debug("Error: Cannot read %u bit width from PCC for ss: %d\n", pr_debug("Error: Cannot read %u bit width from PCC for ss: %d\n",
reg->bit_width, pcc_ss_id); reg->bit_width, pcc_ss_id);
ret_val = -EFAULT; return -EFAULT;
} }
return ret_val; return 0;
} }
static int cpc_write(int cpu, struct cpc_register_resource *reg_res, u64 val) static int cpc_write(int cpu, struct cpc_register_resource *reg_res, u64 val)
......
...@@ -151,6 +151,7 @@ static int pch_fivr_remove(struct platform_device *pdev) ...@@ -151,6 +151,7 @@ static int pch_fivr_remove(struct platform_device *pdev)
static const struct acpi_device_id pch_fivr_device_ids[] = { static const struct acpi_device_id pch_fivr_device_ids[] = {
{"INTC1045", 0}, {"INTC1045", 0},
{"INTC1049", 0}, {"INTC1049", 0},
{"INTC10A3", 0},
{"", 0}, {"", 0},
}; };
MODULE_DEVICE_TABLE(acpi, pch_fivr_device_ids); MODULE_DEVICE_TABLE(acpi, pch_fivr_device_ids);
......
...@@ -231,6 +231,8 @@ static const struct acpi_device_id int3407_device_ids[] = { ...@@ -231,6 +231,8 @@ static const struct acpi_device_id int3407_device_ids[] = {
{"INTC1050", 0}, {"INTC1050", 0},
{"INTC1060", 0}, {"INTC1060", 0},
{"INTC1061", 0}, {"INTC1061", 0},
{"INTC10A4", 0},
{"INTC10A5", 0},
{"", 0}, {"", 0},
}; };
MODULE_DEVICE_TABLE(acpi, int3407_device_ids); MODULE_DEVICE_TABLE(acpi, int3407_device_ids);
......
...@@ -37,6 +37,12 @@ static const struct acpi_device_id int340x_thermal_device_ids[] = { ...@@ -37,6 +37,12 @@ static const struct acpi_device_id int340x_thermal_device_ids[] = {
{"INTC1050"}, {"INTC1050"},
{"INTC1060"}, {"INTC1060"},
{"INTC1061"}, {"INTC1061"},
{"INTC10A0"},
{"INTC10A1"},
{"INTC10A2"},
{"INTC10A3"},
{"INTC10A4"},
{"INTC10A5"},
{""}, {""},
}; };
......
...@@ -10,4 +10,5 @@ ...@@ -10,4 +10,5 @@
{"INT3404", }, /* Fan */ \ {"INT3404", }, /* Fan */ \
{"INTC1044", }, /* Fan for Tiger Lake generation */ \ {"INTC1044", }, /* Fan for Tiger Lake generation */ \
{"INTC1048", }, /* Fan for Alder Lake generation */ \ {"INTC1048", }, /* Fan for Alder Lake generation */ \
{"INTC10A2", }, /* Fan for Raptor Lake generation */ \
{"PNP0C0B", } /* Generic ACPI fan */ {"PNP0C0B", } /* Generic ACPI fan */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment