tree: drop last paragraph of GPL copyright header
[coreboot.git] / src / superio / nsc / pc87366 / superio.c
blobf9dca216185a9c029590a3905d67c689ed4bcd64
1 /*
2 * This file is part of the coreboot project.
4 * Copyright (C) 2000 AG Electronics Ltd.
5 * Copyright (C) 2003-2004 Linux Networx
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.
18 #include <arch/io.h>
19 #include <device/device.h>
20 #include <device/pnp.h>
21 #include <console/console.h>
22 #include <string.h>
23 #include <pc80/keyboard.h>
24 #include <stdlib.h>
25 #include "pc87366.h"
27 static void init(struct device *dev)
29 if (!dev->enabled)
30 return;
32 switch(dev->path.pnp.device) {
33 case PC87366_KBCK:
34 pc_keyboard_init();
35 break;
39 static struct device_operations ops = {
40 .read_resources = pnp_read_resources,
41 .set_resources = pnp_set_resources,
42 .enable_resources = pnp_enable_resources,
43 .enable = pnp_enable,
44 .init = init,
47 static struct pnp_info pnp_dev_info[] = {
48 { &ops, PC87366_FDC, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, {0x07fa, 0}, },
49 { &ops, PC87366_PP, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, {0x04f8, 0}, },
50 { &ops, PC87366_SP2, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0 | PNP_DRQ1, {0x07f8, 0}, },
51 { &ops, PC87366_SP1, PNP_IO0 | PNP_IRQ0, {0x07f8, 0}, },
52 { &ops, PC87366_SWC, PNP_IO0 | PNP_IRQ0, {0xfff0, 0}, },
53 { &ops, PC87366_KBCM, PNP_IRQ0, },
54 { &ops, PC87366_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0, {0x07f8, 0}, {0x07f8, 4}, },
55 { &ops, PC87366_GPIO, PNP_IO0 | PNP_IRQ0, {0xfff8, 0}, },
56 { &ops, PC87366_ACB, PNP_IO0 | PNP_IRQ0, {0xfff8, 0}, },
57 { &ops, PC87366_FSCM, PNP_IO0 | PNP_IRQ0, {0xfff8, 0}, },
58 { &ops, PC87366_WDT, PNP_IO0 | PNP_IRQ0, {0xfffc, 0}, },
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_nsc_pc87366_ops = {
68 CHIP_NAME("NSC PC87366 Super I/O")
69 .enable_dev = enable_dev,