tree: drop last paragraph of GPL copyright header
[coreboot.git] / src / superio / winbond / w83977tf / superio.c
blobf23d7c4319540a2dc4d8c1378c35cdec07f66205
1 /*
2 * This file is part of the coreboot project.
4 * Copyright (C) 2000 AG Electronics Ltd.
5 * Copyright (C) 2003-2004 Linux Networx
6 * Copyright (C) 2004 Tyan
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
19 #include <arch/io.h>
20 #include <device/device.h>
21 #include <device/pnp.h>
22 #include <superio/conf_mode.h>
23 #include <console/console.h>
24 #include <string.h>
25 #include <pc80/keyboard.h>
26 #include <stdlib.h>
27 #include "w83977tf.h"
29 static void w83977tf_init(struct device *dev)
32 if (!dev->enabled)
33 return;
35 switch(dev->path.pnp.device) {
36 case W83977TF_KBC:
37 pc_keyboard_init();
38 break;
42 static struct device_operations ops = {
43 .read_resources = pnp_read_resources,
44 .set_resources = pnp_set_resources,
45 .enable_resources = pnp_enable_resources,
46 .enable = pnp_enable,
47 .init = w83977tf_init,
48 .ops_pnp_mode = &pnp_conf_mode_8787_aa,
51 static struct pnp_info pnp_dev_info[] = {
52 { &ops, W83977TF_FDC, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, {0x07f8, 0}, },
53 { &ops, W83977TF_PP, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, {0x07f8, 0}, },
54 { &ops, W83977TF_SP1, PNP_IO0 | PNP_IRQ0, {0x07f8, 0}, },
55 { &ops, W83977TF_SP2, PNP_IO0 | PNP_IRQ0, {0x07f8, 0}, },
56 { &ops, W83977TF_KBC, PNP_IO0 | PNP_IO1 | PNP_IRQ0 | PNP_IRQ1, {0x07ff, 0}, {0x07ff, 4}, },
57 { &ops, W83977TF_CIR, PNP_IO0 | PNP_IRQ0, {0x07f8, 0}, },
58 { &ops, W83977TF_GAME_MIDI_GPIO1, PNP_IO0 | PNP_IO1 | PNP_IRQ0, {0x07ff, 0}, {0x07fe, 4}, },
59 { &ops, W83977TF_ACPI, PNP_IRQ0, },
62 static void enable_dev(struct device *dev)
64 pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
67 struct chip_operations superio_winbond_w83977tf_ops = {
68 CHIP_NAME("Winbond W83977TF Super I/O")
69 .enable_dev = enable_dev,