payloads/edk2: Disable the CPU Timer Lib unless supported
[coreboot.git] / src / superio / nsc / pc87392 / superio.c
blobe65afeab6eedd67cc3c1946df45fc355faec9f82
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #include <device/device.h>
4 #include <device/pnp.h>
6 #include "pc87392.h"
8 static void init(struct device *dev)
10 if (!dev->enabled)
11 return;
14 static struct device_operations ops = {
15 .read_resources = pnp_read_resources,
16 .set_resources = pnp_set_resources,
17 .enable_resources = pnp_enable_resources,
18 .enable = pnp_enable,
19 .init = init,
22 static struct pnp_info pnp_dev_info[] = {
23 { NULL, PC87392_FDC, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, 0x07f8 },
24 { NULL, PC87392_PP, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, 0x07f8 },
25 { NULL, PC87392_SP2, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0 | PNP_DRQ1,
26 0x07f8 },
27 { NULL, PC87392_SP1, PNP_IO0 | PNP_IRQ0, 0x07f8 },
28 { NULL, PC87392_GPIO, PNP_IO0 | PNP_IRQ0, 0xfff8 },
29 { NULL, PC87392_WDT, PNP_IO0 | PNP_IRQ0, 0xfffc },
32 static void enable_dev(struct device *dev)
34 pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
37 struct chip_operations superio_nsc_pc87392_ops = {
38 CHIP_NAME("NSC PC87392 Super I/O")
39 .enable_dev = enable_dev,