drivers/uart: Replace 'unsigned long int' by 'unsigned long'
[coreboot2.git] / src / superio / ite / it8721f / superio.c
blobeb7f2eec20fcd7e7131d23a90923f6e18939b1ce
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 <superio/conf_mode.h>
8 #include "it8721f.h"
10 static void init(struct device *dev)
12 if (!dev->enabled)
13 return;
15 switch (dev->path.pnp.device) {
16 case IT8721F_FDC: /* TODO. */
17 break;
18 case IT8721F_PP: /* TODO. */
19 break;
20 case IT8721F_EC: /* TODO. */
21 break;
22 case IT8721F_KBCK:
23 pc_keyboard_init(NO_AUX_DEVICE);
24 break;
25 case IT8721F_KBCM: /* TODO. */
26 break;
27 case IT8721F_IR: /* TODO. */
28 break;
32 static struct device_operations ops = {
33 .read_resources = pnp_read_resources,
34 .set_resources = pnp_set_resources,
35 .enable_resources = pnp_enable_resources,
36 .enable = pnp_enable,
37 .init = init,
38 .ops_pnp_mode = &pnp_conf_mode_870155_aa,
41 /* Guessed */
42 static struct pnp_info pnp_dev_info[] = {
43 { NULL, IT8721F_FDC, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0
44 | PNP_MSC0 | PNP_MSC1, 0x0ff8, },
45 { NULL, IT8721F_SP1, PNP_IO0 | PNP_IRQ0, 0x07f8, },
46 { NULL, IT8721F_SP2, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0 | PNP_DRQ1,
47 0x07f8, },
48 { NULL, IT8721F_PP, PNP_IO0 | PNP_IO1 | PNP_IRQ0 | PNP_DRQ0 | PNP_MSC0,
49 0x0ff8, 0x0ff8, },
50 { NULL, IT8721F_EC, PNP_IO0 | PNP_IO1 | PNP_IRQ0
51 | PNP_MSC0 | PNP_MSC1 | PNP_MSC2 | PNP_MSC3
52 | PNP_MSC4 | PNP_MSC5 | PNP_MSC6,
53 0x0ff8, 0x0ff8, },
54 { NULL, IT8721F_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07f8, 0x07f8, },
55 { NULL, IT8721F_KBCM, PNP_IRQ0 | PNP_MSC0, },
56 { NULL, IT8721F_IR, },
59 static void enable_dev(struct device *dev)
61 pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
64 struct chip_operations superio_ite_it8721f_ops = {
65 .name = "ITE IT8721F Super I/O",
66 .enable_dev = enable_dev,