mb/google/skyrim: Add initial I2C configuration
[coreboot.git] / src / superio / smsc / sio10n268 / superio.c
blobca5a0c69f1ba49c6f3b1ab4ba05997e7e123f04e
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <device/device.h>
4 #include <device/pnp.h>
5 #include <pc80/keyboard.h>
7 #include "sio10n268.h"
9 static void init(struct device *dev)
11 if (!dev->enabled)
12 return;
14 switch (dev->path.pnp.device) {
15 case SIO10N268_FDC: /* TODO. */
16 break;
17 case SIO10N268_PP: /* TODO. */
18 break;
19 case SIO10N268_KBDC:
20 /* TODO: This is still hardcoded. */
21 pc_keyboard_init(NO_AUX_DEVICE);
22 break;
23 // [..] The rest: TODO
27 static struct device_operations ops = {
28 .read_resources = pnp_read_resources,
29 .set_resources = pnp_set_resources,
30 .enable_resources = pnp_enable_resources,
31 .enable = pnp_enable,
32 .init = init,
35 /* TODO: FDC, PP, AUX. */
36 static struct pnp_info pnp_dev_info[] = {
37 { NULL, SIO10N268_KBDC, PNP_IO0 | PNP_IO1, 0x07f8, 0x07f8, },
40 static void enable_dev(struct device *dev)
42 pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
45 struct chip_operations superio_smsc_sio10n268_ops = {
46 CHIP_NAME("SMSC SIO10N268 Super I/O")
47 .enable_dev = enable_dev,