cpu/x86/smm/pci_resource_store: Store DEV/VEN ID
[coreboot2.git] / src / superio / winbond / wpcd376i / superio.c
blob635d02512b2afd062156e283b3d6c42f5d3f3a02
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #include <device/device.h>
4 #include <device/pnp.h>
5 #include <pc80/keyboard.h>
6 #include "wpcd376i.h"
8 static void init(struct device *dev)
10 if (!dev->enabled)
11 return;
13 switch (dev->path.pnp.device) {
14 case WPCD376I_KBCK:
15 pc_keyboard_init(NO_AUX_DEVICE);
16 break;
20 static struct device_operations ops = {
21 .read_resources = pnp_read_resources,
22 .set_resources = pnp_set_resources,
23 .enable_resources = pnp_enable_resources,
24 .enable = pnp_enable,
25 .init = init,
28 static struct pnp_info pnp_dev_info[] = {
29 { NULL, WPCD376I_FDC,
30 PNP_IO0 | PNP_IRQ0 | PNP_DRQ0 | PNP_MSC0 | PNP_MSC1 | PNP_MSC8,
31 0x07f8, },
32 { NULL, WPCD376I_LPT,
33 PNP_IO0 | PNP_IRQ0 | PNP_DRQ0 | PNP_MSC0 | PNP_MSC8,
34 0x03f8, },
35 { NULL, WPCD376I_SP1,
36 PNP_IO0 | PNP_IRQ0 | PNP_MSC0,
37 0x07f8, },
38 { NULL, WPCD376I_SWC,
39 PNP_IO0 | PNP_IO1 | PNP_IRQ0,
40 0xfff0, 0xfff0, },
41 { NULL, WPCD376I_KBCM,
42 PNP_IRQ0, },
43 { NULL, WPCD376I_KBCK,
44 PNP_IO0 | PNP_IO1 | PNP_IRQ0 | PNP_MSC0,
45 0x07f8, 0x07f8, },
46 { NULL, WPCD376I_GPIO,
47 PNP_IO0 | PNP_IRQ0 | PNP_MSC0 | PNP_MSC1 | PNP_MSC2 | PNP_MSC3 |
48 PNP_MSC8,
49 0xffe0, },
50 { NULL, WPCD376I_ECIR,
51 PNP_IO0 | PNP_IO1 | PNP_IRQ0,
52 0xfff0, 0xfff0, },
53 { NULL, WPCD376I_IR,
54 PNP_IO0 | PNP_IRQ0 | PNP_DRQ0 | PNP_DRQ1 | PNP_MSC0,
55 0xfff8, },
58 static void enable_dev(struct device *dev)
60 pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
63 struct chip_operations superio_winbond_wpcd376i_ops = {
64 .name = "Winbond WPCD376I Super I/O",
65 .enable_dev = enable_dev,