payloads/edk2: Disable the CPU Timer Lib unless supported
[coreboot.git] / src / superio / smsc / kbc1100 / superio.c
blob862a77bd136198a0ced9c69ec5fb4f181525822e
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 /* RAM driver for the SMSC KBC1100 Super I/O chip */
5 #include <device/device.h>
6 #include <device/pnp.h>
7 #include <superio/conf_mode.h>
8 #include <pc80/keyboard.h>
10 #include "kbc1100.h"
12 /* Forward declarations */
13 static void enable_dev(struct device *dev);
14 static void kbc1100_init(struct device *dev);
16 struct chip_operations superio_smsc_kbc1100_ops = {
17 CHIP_NAME("SMSC KBC1100 Super I/O")
18 .enable_dev = enable_dev
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_alt_enable,
26 .init = kbc1100_init,
27 .ops_pnp_mode = &pnp_conf_mode_55_aa,
30 static struct pnp_info pnp_dev_info[] = {
31 { NULL, KBC1100_KBC, PNP_IO0 | PNP_IO1 | PNP_IRQ0 | PNP_IRQ1,
32 0x7ff, 0x7ff, },
35 static void enable_dev(struct device *dev)
37 pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
40 static void kbc1100_init(struct device *dev)
42 if (!dev->enabled)
43 return;
45 switch (dev->path.pnp.device) {
46 case KBC1100_KBC:
47 pc_keyboard_init(NO_AUX_DEVICE);
48 break;