2 * This file is part of the coreboot project.
4 * Copyright (C) 2008 coresystems GmbH
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 #include <device/device.h>
22 #include <device/pnp.h>
24 #include <pc80/keyboard.h>
26 #include "sio10n268.h"
28 static void init(device_t dev)
30 struct superio_smsc_sio10n268_config *conf = dev->chip_info;
35 switch (dev->path.pnp.device) {
36 case SIO10N268_FDC: /* TODO. */
38 case SIO10N268_PP: /* TODO. */
41 /* TODO: This is still hardcoded. */
42 pc_keyboard_init(&conf->keyboard);
44 // [..] The rest: TODO
48 static struct device_operations ops = {
49 .read_resources = pnp_read_resources,
50 .set_resources = pnp_set_resources,
51 .enable_resources = pnp_enable_resources,
56 /* TODO: FDC, PP, AUX. */
57 static struct pnp_info pnp_dev_info[] = {
58 { &ops, SIO10N268_KBDC, PNP_IO0 | PNP_IO1, {0x07f8, 0}, {0x07f8, 4}, },
61 static void enable_dev(struct device *dev)
63 pnp_enable_devices(dev, &pnp_ops,
64 ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
67 struct chip_operations superio_smsc_sio10n268_ops = {
68 CHIP_NAME("SMSC SIO10N268 Super I/O")
69 .enable_dev = enable_dev,