Commit c4681b2b authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'peci-next-6.11-rc1' of...

Merge tag 'peci-next-6.11-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/iwi/linux into char-misc-next

Iwona writes:

Update peci-next for v6.11-rc1

* peci, hwmon
- Update peci subsystem to use new Intel CPU model defines.

* aspeed
- Clear clock_divider before setting it.

* tag 'peci-next-6.11-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/iwi/linux:
  peci: aspeed: Clear clock_divider value before setting it
  peci, hwmon: Switch to new Intel CPU model defines
parents 20460472 aba59ce1
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -360,10 +360,10 @@ static int init_core_mask(struct peci_cputemp *priv)
	int ret;

	/* Get the RESOLVED_CORES register value */
	switch (peci_dev->info.model) {
	case INTEL_FAM6_ICELAKE_X:
	case INTEL_FAM6_ICELAKE_D:
	case INTEL_FAM6_SAPPHIRERAPIDS_X:
	switch (peci_dev->info.x86_vfm) {
	case INTEL_ICELAKE_X:
	case INTEL_ICELAKE_D:
	case INTEL_SAPPHIRERAPIDS_X:
		ret = peci_ep_pci_local_read(peci_dev, 0, reg->bus, reg->dev,
					     reg->func, reg->offset + 4, &data);
		if (ret)
+1 −0
Original line number Diff line number Diff line
@@ -351,6 +351,7 @@ static int clk_aspeed_peci_set_rate(struct clk_hw *hw, unsigned long rate,
	clk_aspeed_peci_find_div_values(this_rate, &msg_timing, &clk_div_exp);

	val = readl(aspeed_peci->base + ASPEED_PECI_CTRL);
	val &= ~ASPEED_PECI_CTRL_CLK_DIV_MASK;
	val |= FIELD_PREP(ASPEED_PECI_CTRL_CLK_DIV_MASK, clk_div_exp);
	writel(val, aspeed_peci->base + ASPEED_PECI_CTRL);

+2 −3
Original line number Diff line number Diff line
@@ -163,9 +163,8 @@ EXPORT_SYMBOL_NS_GPL(devm_peci_controller_add, PECI);
static const struct peci_device_id *
peci_bus_match_device_id(const struct peci_device_id *id, struct peci_device *device)
{
	while (id->family != 0) {
		if (id->family == device->info.family &&
		    id->model == device->info.model)
	while (id->x86_vfm != 0) {
		if (id->x86_vfm == device->info.x86_vfm)
			return id;
		id++;
	}
+7 −14
Original line number Diff line number Diff line
@@ -294,38 +294,31 @@ peci_cpu_probe(struct peci_device *device, const struct peci_device_id *id)

static const struct peci_device_id peci_cpu_device_ids[] = {
	{ /* Haswell Xeon */
		.family	= 6,
		.model	= INTEL_FAM6_HASWELL_X,
		.x86_vfm = INTEL_HASWELL_X,
		.data	= "hsx",
	},
	{ /* Broadwell Xeon */
		.family	= 6,
		.model	= INTEL_FAM6_BROADWELL_X,
		.x86_vfm = INTEL_BROADWELL_X,
		.data	= "bdx",
	},
	{ /* Broadwell Xeon D */
		.family	= 6,
		.model	= INTEL_FAM6_BROADWELL_D,
		.x86_vfm = INTEL_BROADWELL_D,
		.data	= "bdxd",
	},
	{ /* Skylake Xeon */
		.family	= 6,
		.model	= INTEL_FAM6_SKYLAKE_X,
		.x86_vfm = INTEL_SKYLAKE_X,
		.data	= "skx",
	},
	{ /* Icelake Xeon */
		.family	= 6,
		.model	= INTEL_FAM6_ICELAKE_X,
		.x86_vfm = INTEL_ICELAKE_X,
		.data	= "icx",
	},
	{ /* Icelake Xeon D */
		.family	= 6,
		.model	= INTEL_FAM6_ICELAKE_D,
		.x86_vfm = INTEL_ICELAKE_D,
		.data	= "icxd",
	},
	{ /* Sapphire Rapids Xeon */
		.family	= 6,
		.model	= INTEL_FAM6_SAPPHIRERAPIDS_X,
		.x86_vfm = INTEL_SAPPHIRERAPIDS_X,
		.data	= "spr",
	},
	{ }
+1 −2
Original line number Diff line number Diff line
@@ -100,8 +100,7 @@ static int peci_device_info_init(struct peci_device *device)
	if (ret)
		return ret;

	device->info.family = peci_x86_cpu_family(cpu_id);
	device->info.model = peci_x86_cpu_model(cpu_id);
	device->info.x86_vfm = IFM(peci_x86_cpu_family(cpu_id), peci_x86_cpu_model(cpu_id));

	ret = peci_get_revision(device, &revision);
	if (ret)
Loading