2 * This file is part of the coreboot project.
4 * Copyright (C) 2006 Uwe Hermann <uwe@hermann-uwe.de>
5 * Copyright (C) 2011 QingPei Wang <wangqingpei@gmail.com>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #include <device/device.h>
23 #include <device/pnp.h>
25 #include <pc80/keyboard.h>
30 static void init(device_t dev)
32 struct superio_ite_it8721f_config *conf = dev->chip_info;
37 switch (dev->path.pnp.device) {
38 case IT8721F_FDC: /* TODO. */
40 case IT8721F_PP: /* TODO. */
42 case IT8721F_EC: /* TODO. */
45 pc_keyboard_init(&conf->keyboard);
47 case IT8721F_KBCM: /* TODO. */
49 case IT8721F_IR: /* TODO. */
54 static struct device_operations ops = {
55 .read_resources = pnp_read_resources,
56 .set_resources = pnp_set_resources,
57 .enable_resources = pnp_enable_resources,
62 /* TODO: FDC, PP, EC, KBCM, IR. */
63 static struct pnp_info pnp_dev_info[] = {
64 { &ops, IT8721F_SP1, PNP_IO0 | PNP_IRQ0, {0x07f8, 0}, },
65 { &ops, IT8721F_SP2, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0 | PNP_DRQ1, {0x07f8, 0}, },
66 { &ops, IT8721F_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0, {0x07f8, 0}, {0x07f8, 4}, },
69 static void enable_dev(struct device *dev)
71 pnp_enable_devices(dev, &pnp_ops,
72 ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
75 struct chip_operations superio_ite_it8721f_ops = {
76 CHIP_NAME("ITE IT8721F Super I/O")
77 .enable_dev = enable_dev,