payloads/edk2: Disable the CPU Timer Lib unless supported
[coreboot.git] / src / superio / fintek / f71859 / superio.c
blob1f4424954f71560bce95f81f14aadba4a39d8caa
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #include <device/device.h>
4 #include <device/pnp.h>
5 #include <superio/conf_mode.h>
6 #include "f71859.h"
8 static void f71859_init(struct device *dev)
10 if (!dev->enabled)
11 return;
13 /* TODO: Might potentially need code for HWM or FDC etc. */
16 static struct device_operations ops = {
17 .read_resources = pnp_read_resources,
18 .set_resources = pnp_set_resources,
19 .enable_resources = pnp_enable_resources,
20 .enable = pnp_alt_enable,
21 .init = f71859_init,
22 .ops_pnp_mode = &pnp_conf_mode_8787_aa,
25 static struct pnp_info pnp_dev_info[] = {
26 /* TODO: Some of the 0x07f8 etc. values may not be correct. */
27 { NULL, F71859_SP1, PNP_IO0 | PNP_IRQ0, 0x07f8, },
30 static void enable_dev(struct device *dev)
32 pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
35 struct chip_operations superio_fintek_f71859_ops = {
36 CHIP_NAME("Fintek F71859 Super I/O")
37 .enable_dev = enable_dev