soc/intel/pantherlake: Remove soc_info.[hc] interface
[coreboot2.git] / src / southbridge / intel / ibexpeak / thermal.c
blob40df0bd0d6edb14ab8661fa0c47c4685b59620e7
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <console/console.h>
4 #include <device/device.h>
5 #include <device/pci.h>
6 #include <device/pci_ids.h>
7 #include "pch.h"
8 #include <device/mmio.h>
10 static void thermal_init(struct device *dev)
12 struct resource *res;
13 u8 *base;
14 printk(BIOS_DEBUG, "Thermal init start.\n");
16 res = probe_resource(dev, PCI_BASE_ADDRESS_0);
17 if (!res)
18 return;
20 base = res2mmio(res, 0, 0);
21 write32(base + 4, 0x3a2b);
22 write8(base + 0xe, 0x40);
23 write16(base + 0x56, 0xffff);
24 write16(base + 0x64, 0xffff);
25 write16(base + 0x66, 0xffff);
26 write16(base + 0x68, 0xfa);
28 write8(base + 1, 0xb8);
30 printk(BIOS_DEBUG, "Thermal init done.\n");
33 static struct device_operations thermal_ops = {
34 .read_resources = pci_dev_read_resources,
35 .set_resources = pci_dev_set_resources,
36 .enable_resources = pci_dev_enable_resources,
37 .init = thermal_init,
38 .ops_pci = &pci_dev_ops_pci,
41 static const struct pci_driver pch_thermal __pci_driver = {
42 .ops = &thermal_ops,
43 .vendor = PCI_VID_INTEL,
44 .device = PCI_DID_INTEL_IBEXPEAK_THERMAL,