payloads/edk2: Disable the CPU Timer Lib unless supported
[coreboot.git] / src / superio / nsc / pc87417 / superio.c
blobbe99f7f03165eba673b34e6f0b37d0c675b473c8
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #include <device/device.h>
4 #include <device/pnp.h>
5 #include <pc80/keyboard.h>
7 #include "pc87417.h"
9 static void init(struct device *dev)
11 if (!dev->enabled)
12 return;
14 switch (dev->path.pnp.device) {
15 case PC87417_KBCK:
16 pc_keyboard_init(NO_AUX_DEVICE);
17 break;
21 static struct device_operations ops = {
22 .read_resources = pnp_read_resources,
23 .set_resources = pnp_set_resources,
24 .enable_resources = pnp_enable_resources,
25 .enable = pnp_enable,
26 .init = init,
29 static struct pnp_info pnp_dev_info[] = {
30 { NULL, PC87417_FDC, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, 0x07f8, },
31 { NULL, PC87417_PP, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, 0x07f8, },
32 { NULL, PC87417_SP2, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0 | PNP_DRQ1,
33 0x07f8, },
34 { NULL, PC87417_SP1, PNP_IO0 | PNP_IRQ0, 0x07f8, },
35 { NULL, PC87417_SWC, PNP_IO0 | PNP_IRQ0, 0xfff0, },
36 { NULL, PC87417_KBCM, PNP_IRQ0, },
37 { NULL, PC87417_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07f8, 0x07f8, },
38 { NULL, PC87417_GPIO, PNP_IO0 | PNP_IRQ0, 0xfff8, },
39 { NULL, PC87417_XBUS, PNP_IO0 | PNP_IRQ0, 0xffe0, },
40 { NULL, PC87417_RTC, PNP_IO0 | PNP_IO1, 0xfffe, 0xfffe, },
43 static void enable_dev(struct device *dev)
45 pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
48 struct chip_operations superio_nsc_pc87417_ops = {
49 CHIP_NAME("NSC PC87417 Super I/O")
50 .enable_dev = enable_dev,