tree: drop last paragraph of GPL copyright header
[coreboot.git] / src / superio / smsc / lpc47m15x / superio.c
blob166f3832e3a6a9299badc137726a3535786c11d1
1 /*
2 * This file is part of the coreboot project.
4 * Copyright (C) 2009 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.
16 /* RAM driver for the SMSC LPC47M15X Super I/O chip */
18 #include <arch/io.h>
19 #include <device/device.h>
20 #include <device/pnp.h>
21 #include <superio/conf_mode.h>
22 #include <console/console.h>
23 #include <device/smbus.h>
24 #include <string.h>
25 #include <pc80/keyboard.h>
26 #include <stdlib.h>
27 #include "lpc47m15x.h"
29 /* Forward declarations */
30 static void enable_dev(struct device *dev);
31 static void lpc47m15x_init(struct device *dev);
33 struct chip_operations superio_smsc_lpc47m15x_ops = {
34 CHIP_NAME("SMSC LPC47M15x/192/997 Super I/O")
35 .enable_dev = enable_dev
38 static struct device_operations ops = {
39 .read_resources = pnp_read_resources,
40 .set_resources = pnp_set_resources,
41 .enable_resources = pnp_enable_resources,
42 .enable = pnp_alt_enable,
43 .init = lpc47m15x_init,
44 .ops_pnp_mode = &pnp_conf_mode_55_aa,
47 static struct pnp_info pnp_dev_info[] = {
48 { &ops, LPC47M15X_FDC, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, {0x07f8, 0}, },
49 { &ops, LPC47M15X_PP, PNP_IO0 | PNP_IRQ0 | PNP_DRQ0, {0x07f8, 0}, },
50 { &ops, LPC47M15X_SP1, PNP_IO0 | PNP_IRQ0, {0x07f8, 0}, },
51 { &ops, LPC47M15X_SP2, PNP_IO0 | PNP_IRQ0, {0x07f8, 0}, },
52 { &ops, LPC47M15X_KBC, PNP_IO0 | PNP_IO1 | PNP_IRQ0 | PNP_IRQ1, {0x07ff, 0}, {0x07ff, 4}, },
55 static void enable_dev(struct device *dev)
57 pnp_enable_devices(dev, &pnp_ops,
58 ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
61 static void lpc47m15x_init(struct device *dev)
64 if (!dev->enabled)
65 return;
67 switch(dev->path.pnp.device) {
68 case LPC47M15X_KBC:
69 pc_keyboard_init();
70 break;