libpayload: configs: Add new config.featuretest to broaden CI
[coreboot.git] / src / superio / fintek / f81865f / superio.c
blob8ca66a0c9063496e2405dcd935cebccd3d5709d6
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 <pc80/keyboard.h>
8 #include "f81865f.h"
10 static void f81865f_init(struct device *dev)
12 if (!dev->enabled)
13 return;
15 switch (dev->path.pnp.device) {
16 /* TODO: Might potentially need code for HWM or FDC etc. */
17 case F81865F_KBC:
18 pc_keyboard_init(NO_AUX_DEVICE);
19 break;
23 static struct device_operations ops = {
24 .read_resources = pnp_read_resources,
25 .set_resources = pnp_set_resources,
26 .enable_resources = pnp_enable_resources,
27 .enable = pnp_alt_enable,
28 .init = f81865f_init,
29 .ops_pnp_mode = &pnp_conf_mode_8787_aa,
32 static struct pnp_info pnp_dev_info[] = {
33 /* TODO: Some of the 0x7f8 etc. values may not be correct. */
34 { NULL, F81865F_FDC, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, 0x07f8, },
35 { NULL, F81865F_SP1, PNP_IO0 | PNP_IRQ0, 0x7f8, },
36 { NULL, F81865F_SP2, PNP_IO0 | PNP_IRQ0, 0x7f8, },
37 { NULL, F81865F_KBC, PNP_IO0 | PNP_IRQ0 | PNP_IRQ1, 0x07ff, },
38 { NULL, F81865F_PP, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, 0x07f8, },
39 { NULL, F81865F_HWM, PNP_IO0 | PNP_IRQ0, 0xff8, },
40 { NULL, F81865F_GPIO, PNP_IRQ0, },
41 { NULL, F81865F_PME, },
44 static void enable_dev(struct device *dev)
46 pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
49 struct chip_operations superio_fintek_f81865f_ops = {
50 .name = "Fintek F81865F Super I/O",
51 .enable_dev = enable_dev